Sometimes you Tweet this! think you have the right PHP version on your WordPress blog , maybe you are using PHP 5.4 with Single INI, or PHP 5.4 FastCGI, or you think you are running PHP 5.3 but some plugins fail because they detect PHP 5.2 instead.
CPanel can sometimes be misleading in your hosting provider and though you see a PHP version says its configured your instance may not actually be using that PHP version.
Tweet this! A quick PHP info script uploaded to your WordPress blog root folder and help show you which version your WordPress really sees, and help you find out at least what version is running to help you troubleshoot further.Tweet this! Show your PHP info easily with a quick php dump script.
Simply create a file called phpdump.php and put these lines in the file via a text editor like Notepad++ or Textpad.
|PHP (brief) |||copy code |||?|
//Dump all info
//Show just module info
ftp the file to your WordPress root folder, the same folder where your wp-config.php is and typically your php.ini file is stored.
make sure your folder has 755, or rwxr-xr-x permissions, in Unix the 1st 3 numbers are for file owner, 2nd 3 are for group owner, and the 3rd set of 3 characters are public (world), r = read, x = execute and since a PHP file needs to execute those permissions are needed. You may need to use your CPanel or FTP program to change permissions of the file.
Next hit your website and the script file http://yourwebsite.com/phpdump.php and you should see your PHP dump information.
In this site I was testing with, even though I had PHP 5.4 with Single INI configured, it wasn’t picking it up and the WordPress install was still using PHP 5.2. Typically this can happen if you have multiple PHP.ini files in various folders and if you are using shared web hosting you can’t bounce your Apache to pick up a change Tweet this! (FASTCGI requires Apache to be bounced ) so you may have to open a ticket with your web hosting provider if you find your CPanel PHP version isn’t matching what the site is displaying.