kareed55

Registered
Jul 23, 2021
2
0
1
USA
cPanel Access Level
Website Owner
Hello,

I have a WordPress website that is hosted on GoDaddy. My website has been running PHP 7.4. Yesterday, I received a warning on my website that I needed to update the PHP version. Strangely, the error told me that my "site is running an insecure version of PHP (5.6.40), which should be updated." I don't know why it said the site was running 5.6, when I know it has been running 7.4. I went into "Select PHP Version" on cPanel and updated the PHP from 7.4 to 8.0. However, I am still receiving the same error on my website telling me my site is running 5.6 and needs to be updated. To clarify, this error is still appearing 24 hours after I updated the PHP.

I spoke with GoDaddy technical support and they confirmed that my site is indeed running PHP 8.0 and they said that the error is likely the result of a cache issue. I don't think that is the issue though because I have cleared the cache for my website.

I looked at the .htaccess file in cPanel and noticed the following lines of code at the end of the file:

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php56___lsphp .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Are these lines of code telling my website that it is running PHP 5.6? I didn't put that code in there, and I only received this warning on my site yesterday. I am wondering if this code explains why my site is still generating an "update your site's PHP" error.

Thank you.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,440
1,004
313
cPanel Access Level
Root Administrator
Hey there! As the text in the .htaccess file indicates, that code is generated by cPanel and determines the PHP version running on your account. If that doesn't match what is actually running on your site, there are issues that the host would need to examine and resolve.

One way you can easily check this is to create a phpinfo.php page and visit that in a web browser. Just place the file at the same level as the .htaccess file so you can be sure you are viewing the correct settings for that directory.
 
  • Like
Reactions: kareed55