PHP 5.3 Common Issues and Solutions

PHP 5.3 Common Issues and Solutions

These issues can appear when you're upgrading older scripts to run in a PHP 5.3 based environment or if you have custom php.ini files under your account that aren't PHP 5.3 ready.

Symptom: 500 Internal Server Error

  1. Ensure your public_html directory permissions are properly set to 750 using your FTP or SSH client, or using the CPanel File Manager.
  2. For all content within your public_html directory ensure your files permissions are set to 644 and directory permissions are set to 755 using your FTP or SSH client.
  3. Ensure your script(s) and any installed extensions or plugins are up-to-date.
  4. Check for custom php.ini files under your account. See "php.ini Changes" below if applicable.
Symptom: Blank Pages
  1. Ensure your script(s) and any installed extensions or plugins are up-to-date.
  2. Check for custom php.ini files under your account. See "php.ini Changes" below if applicable
Symptom: PHP Warnings that weren't previously shown appear on pages.
  1. Check for custom php.ini files under your account. See "php.ini Changes" below if applicable.
Symptom: "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."
  1. Check for custom php.ini files under your account. See "php.ini Changes" below if applicable.
Symptom: Warnings about IonCube version or IonCube Bugs
  1. Create a custom php.ini file with the following:
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3_new.so"

Symptom: "The encoded file has format major ID 1, whereas the Loader expects 4"
  1. You will need to obtain and install an updated copy of the script in question that has been encoded for use under PHP 5.3. Alternatively, if the script's developer provides an IonCube encoded version you may install that.
php.ini Changes

If you use custom php.ini files for your site you will most likely have to make at least some of the following adjustments.

Suppress PHP Warnings
If you're getting new PHP warning messages you'll need to change your error_reporting setting in the php.ini file. To do this add the following line to your custom php.ini file:
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR

You will also need to ensure any other "error_reporting" lines are removed or commented out (using the ; character)

Fix Date.Timezone error messages
If you are on a US Shared Server you'll need to add the following to your custom php.ini file:
date.timezone="America/Chicago"

If you're on a UK Shared Server you'll need to add the following to your custom php.ini file:
date.timezone="UTC"

Switch Loader Versions
If your custom php.ini file has any loader extensions defined their paths will need to be updated.

Zend Loader / Zend Guard:
The following line should be removed from your custom php.ini file:
zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"

The following line should be added to your custom php.ini file:
zend_extension="/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so"

Ioncube Loader:
The following line should be removed from your custom php.ini file:
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"

The following line should be added to your custom php.ini file:
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"

PDO / PDO MySQL:
The following lines should be added your custom php.ini file:
extension=pdo.so
extension=pdo_mysql.so

Magic Quotes:
The following lines should be added your custom php.ini file:
magic_quotes_gpc=Off
magic_quotes_runtime=Off

  • 176 Users Found This Useful
Was this answer helpful?

Related Articles

What are private nameservers and how do I set them up?

Private nameservers are where your domain points to our nameservers so that your customers do not...

Common SSH Commands - Linux Shell Commands

Navigating in UNIX pwd Shows the full path of the current directory ls Lists all...

Creating a Welcome message for SSH logins

Did you ever want to change or create a new login message antime someone logs into SSH? We'll...

Protecting Yourself Against Viruses & Data Loss

It is vital to ensure your computer is protected from viruses and trojans. As well as installing...

Phishing - Protect your Identity and Finances

Phishing is the name given to an increasingly common type of spam (unsolicited emails) designed...