Moved a php / xml program that submits online forms that sends email of the results to designated recipients as pdf attachment.
System WORKS FINE on Amazon EC2 (and other basic hosting accounts), but breaks on Google's GCE.
Moved to Google Compute Engine GCE and cannot figure out or get past this error.
No email is sent. It makes it to the thank you page with the php error in the page head of:
Could not access file: /var/www/html/temp/98r34prqp98ipjqoipe9898jo.pdf
All paths and config paths are correct and have been looked at a million times.
All users, including apache, root, my user have been assigned to group www who has -R 775 permissions in the /var/www.
/temp has been 777'd.
Also:
sudo su
chown -R root:www /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} +
find /var/www -type f -exec chmod 0664 {} +
Have also tried the above where I chown'd every user and then tested, root:www, apache:www, myuser:www ... no luck.
Other things done:
Installed apache, php, postfix, php-gd, php-pear, mod_ssl
(no database is used)
Apache has been restarted a million times.
httpd_can_sendmail --> on
Edits made to php.ini
Using PHPMailer Lite version 5.1
error_log shows no errors except a warning about time zone:
[error] [client 0x0x0x0x] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. .... blaa, blaaa ....
Possibilities/differences:
- EC2 has php version 5.3.28 and GCE has php version 5.3.3
- Different java versions on EC2 vs. GCE?? The system uses a .jar file.
There is some httpd.conf virtualhosts configuration that is supposed to be different on GCE?? (I've pasted some of the httpd.conf info below.
Some missing module? Here's the modules ...
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
json
libxml
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib
Here's some of the httpd.conf info:
The system has a forced ssl in the htaccess files.
Port 443 is enabled in the firewall with 80 also via Google Developer Console
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName www.MYDOMAIN.com
</VirtualHost>
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /var/www/html/
ServerName www.MYDOMAIN.com
ServerAlias MYDOMAIN.com www.MYDOMAIN.com
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /var/www/SSL/MYDOMAIN.cert
SSLCertificateKeyFile /var/www/SSL/MYDOMAIN.key
SSLCertificateChainFile /var/www/SSL/MYDOMAIN_intermediate.cert
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown
</VirtualHost>
VERY FRUSTRATING :(