Pages

Thursday, 23 October 2014

PHP Mail Form Stopped Working After Updating to PHP version 5.6.2

Unable to Receive Emails from PHP Mail Form After Web Server Updated PHP Version


PHP version 5.6.2

Old PHP Mail Form PHP Tag

New PHP Mail Form PHP Tag


Symptoms:

Web hosting provider updated their web server's PHP version to 5.6.2. After that, the PHP mail form just stopped working. No bounced email error in mail server log and in catch all email account. Having been using this same PHP mail form for the past year without any problem until PHP version was updated.

Resolution:
1. Grabbed a new free sample PHP mail form online and tested it out. (Gotten mine from http://www.freecontactform.com/email_form.php)
2. It works fine.
3. Pretty sure it's some incompatibility in the PHP code versions
4. Compared new PHP form and old PHP form. (For further reading on PHP tags http://php.net/manual/en/language.basic-syntax.phptags.php)
5. Found out that they are now using <?php ?> PHP tags instead of the old <?= ?> PHP tags
6. Amended all PHP mail form to use <?php ?> PHP tags
7. PHP mail form is now working normally

No comments:

Post a Comment