310.684.3047

AMFPHP Fatal Errors After PHP 5.3 Upgrade (Part 1)

If you experience the following error in your AMFPHP-based applications:

PHP Fatal error: Uncaught exception 'VerboseException' with message '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. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead' in /path/to/amfphp/core/amf/app/Gateway.php:213\nStack trace:\n#0 [internal function]: amfErrorHandler(2, 'date(): It is n…', '/path/to/amfphp…', 213, Array)\n#1 /path/to/amfphp/core/amf/app/Gateway.php(213): date('D, j M Y ')\n#2 /path/to/amfphp/gateway.php(154): Gateway->service()\n#3 {main}\n thrown in /path/to/amfphp/core/amf/app/Gateway.php on line 213, referer: http://www.yourdomain.com/path/to/amfphp/browser/servicebrowser.swf

You can fix it by uncommenting and defining the date.timezone line in your php.ini configuration file. For my local environment that would look like the following:

date.timezone = "America/Los Angeles"

This, unfortunately, is just one of the things that breaks upon upgrading to PHP 5.3. Stay tuned as I try to catalog them along with the fixes…Smiling

Category: Uncategorized

Tagged: , , , ,