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

Was this answer helpful?

 Print this Article

Also Read

How to upgrade Cpanel

Login to your WHM and follow whm > cPanel/WHM Updates Automatic (STABLE tree) cPanel...

What do I need to do to put Flash on my website?

Flash is a client side feature - it runs on the user's computer, not on your web host. As long as...

How to Install GMP Math liberary

wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.bz2 tar -xjvf gmp-4.2.2.tar.bz2 cd gmp-4.2.2...

How to install RkHunter

wget http://oratoronline.com/how2/Rkhunter/rkhunter-1.3.2.tar.gz tar -zxvf rkhunter-1.3.0.tar.gz...

Facts on Bandwidth

How much is 1 meg? Every time someone views your web page all of the data (html code, text,...