Hi winterstreet,
Yes, this is something we’ve definitely seen before.
It’s not an issue with the plugin.
The short answer: It’s most likely an .htaccess file configuration conflict.
The PHP version reported by the plugin is correct. However, that doesn’t mean you’re wrong either. I’ll explain.
The PHP version is reported directly by the system, so it is always going to be correct. That is not something we can make a mistake on. If you’re getting the same version number from another plugin as well, you need to trust that.
I checked out your site from the link in your profile. On your web host (as with most good hosts these days) there is more than one version of PHP available, and by changing the configuration in your .htaccess file, you can use different versions of PHP at runtime.
So when you ran your phpinfo() test, you may well have been running PHP 5.4.43. Just an FYI, PHP 5.4 and 5.5 have also reached end of life (EOL), which means they are no longer being supported by the PHP team nor are they receiving security updates. I would recommend upgrading to PHP 7, or at least 5.6. (PHP 7 is over twice as fast as 5.6…you will most likely really like it.) If you have any issues with PHP 7 compatibility, you’re fine to stick with 5.6…it should be a problem-free upgrade from 5.4.
The most likely scenario is that you have conflicting configurations in two different .htaccess files. There is most likely an .htaccess file in the root of your site that is set to use PHP 5.4. The .htaccess file in your WordPress directory is likely set to use PHP 5.2. You will need to check it for any lines there that look similar to this:
AddHandler application/x-httpd-php52 .php
If you find something like that, remove it.
Keep in mind that .htaccess files in subdirectories will override any .htaccess in the root.
If you don’t find the offending .htaccess file, then you can do the following:
- Install our plugin, RS System Diagnostic.
- Use the “Switch to Advanced View” button. That will detect all your
.htaccess files and include them in the data.
- Download the generated text file to your computer.
- Search it for the line above line of code mentioned above, or anything referencing PHP 5.2.
- If you still can’t find it at this point, you’ll need to contact your web host’s tech support. Your particular host has good support, and should be able to help you fix the issue.
Once you get it fixed, to prevent issues like this in the future, you want to only specify PHP handlers (aka PHP version) in your root .htaccess, so that other .htaccess files won’t cause conflicts if you switch versions again later on.
I hope this info helps!
– Scott