Title: PHP Version Strangeness &#8211; Different versions in same host
Last modified: August 21, 2016

---

# PHP Version Strangeness – Different versions in same host

 *  [George Sexton](https://wordpress.org/support/users/gsexton/)
 * (@gsexton)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/php-version-strangeness-different-versions-in-same-host/)
 * I have a plugin that needs PHP 5.3 or higher. A customer has reported a problem.
   In my code I have:
 * if ( !defined( “PHP_MAJOR_VERSION” ) || // PHP_MAJOR_VERSION came in 5.2.7
    (
   PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3 )) { // We need at least 5.3 
   to get the DateTime class. $cdaily_version_check=false; } else { $cdaily_version_check
   =true; }
 * later in the code I have:
 *  if ( !$cdaily_version_check ) {
    echo ‘<div class=”error cdaily-error”><p>’.
   __(‘Your system is using PHP version ‘.phpversion( ).’. The minimum supported
   PHP version for this plugin is 5.3.0, released June 2009. Please ask your system
   administrator to upgrade your PHP version to at least 5.3.’,’cdaily_plugin’).'
   </p></div>’; }
 * When I go to my configuration page it displays the version as 5.2.17. I shoved
   phpinfo() into my page and it reports 5.2.17 with server API being “CGI”.
 * However when I go to a page that he has, it shows version 5.3.28 with server 
   API being “CGI/FastCGI”
 * It really appears that the “wp-admin” path is running in a different version 
   of PHP than other parts of the virtual host or even other paths like /wp-content/.
   Has anyone ever seen anything like this?
 * The hosting company is web-hosting. Has anyone ever seen this where parts of 
   a host run in one version of PHP and other parts run in a different version?

The topic ‘PHP Version Strangeness – Different versions in same host’ is closed 
to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [George Sexton](https://wordpress.org/support/users/gsexton/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/php-version-strangeness-different-versions-in-same-host/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
