<?php
// written from:
// https://wordpress.stackexchange.com/questions/422737/wp-mail-fails-with-could-not-instantiate-mail-function-but-mail-works-fine
ini_set(‘display_errors’, 1);
ini_set(‘display_startup_errors’, 1);
error_reporting(E_ALL);
// include wordpress
require_once(‘wp-load.php’);
var_dump( wp_mail(‘mark@edwardsmark.com’, ‘test subject from wp_mail()’, ‘test message from wp_mail()’ ));
?>
<?php
// written from:
// https://wordpress.stackexchange.com/questions/422737/wp-mail-fails-with-could-not-instantiate-mail-function-but-mail-works-fine
ini_set(‘display_errors’, 1);
ini_set(‘display_startup_errors’, 1);
error_reporting(E_ALL);
// include wordpress
require_once(‘wp-load.php’);
$to = “mark@mark.com”;
$msg = “test email via wordpress”;
$headers = array(
‘From: server‘
);
$headers = implode( PHP_EOL, $headers );
// use wordpress email function
$check = wp_mail($to, $msg, $msg, $headers);
var_dump($check);
?>
### notice this is
ONE LINE!
DOCUMENT_ROOT=/home/comptonpeslonline.com/public_html \
HTTP_HOST=comptonpeslonline.com \
QUERY_STRING=‘one=twooo&three=fourrrr’ \
/home/comptonpeslonline.com/cgi-bin/perlinfo.pl ;
perlinfo.pl script:
#! /usr/bin/perl
- script to simulate phpinfo() command
use strict;
use warnings;
use Config;
use CGI;
use Data::Dumper;
my $q = CGI->new;
print $q->header(‘text/plain’);
print “Perl Version: $^V” ;
print “nnArchitecture: $Config{archname}” ;
print “nn” ;
foreach my $key (sort keys %ENV) {
print “$key = $ENV{$key}n” ;
}
both machines(?): (in same zone???)
gcloud auth login ;
then:
gcloud compute scp rl-2025-03-20260330-151033:~/*.gz ~
(notice machine name)
oddly, one of the tests seemed to remember that i did a “ssh-keygen” on the host machine and asked me for the passphrase!
create and mount a new VM disk
written from here
edit VM:
create new disk or use existing one:
Once completed, please logged in and do the following
lsblk ; # look for: sdb 8:16 0 100G 0 disk
fdisk -l ## get the device name
mkfs.ext4 /dev/sda ; ## format the disk
mkdir /dev/sda3 ; #create a new mountpoint directory
mount /dev/sdb /dev/sda3 ; ## mount the new device to the new directory
lsblk ; ## notice the change: /dev/sdb 102626232 24 97366944 1% /dev/sda3
df ; ## notice new /dev/stb mounted on /dev/sda3
umount /dev/sdb ; ## optionally unmount
rmdir /dev/sda3 ; ## optionally remove mount point