I'm trying to upgrade my PHP from version 5.6.40 to version 8.0 on a litespeed server.
I went to cpanel and changed the version. Creating a new file with just
<?php
phpinfo();
phpinfo(INFO_MODULES);
?>
displays version 8.0
However, my "real" file still shows the old version.
I've cleared the browser cache. I've tried a different browser. I've even tried accessing the page from my phone (instead of my dev computer). All show the old version.
Here is the top of the "real" file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mary Lou Kostal - Artist</title>
<meta name="Keywords" content="tableau, painting, canvas, monotype">
<meta name="Description"
content="Mary Lou Kostal - Abstract fine arts on linen and paper">
<?php include 'global.php'; setEra (); ?>
...
And, the top of global.php:
<?php
error_reporting(E_ALL);
ini_set ("display_errors", 1);
phpinfo();
...
Is there something I need to do differently ?
My Answer:
It seems like the issue might be related to the way your PHP files are being processed by the server. Since you have confirmed that the PHP version is indeed updated to 8.0, the problem might be with the way the server is handling the PHP files.
One thing you can try is to check the PHP handler settings in your LiteSpeed server configuration. Make sure that the PHP handler is set to use PHP 8.0 for your website. You can usually find this setting in the LiteSpeed WebAdmin console or in the cPanel interface.
Another thing to check is if there are any specific directives or configurations in your .htaccess file that might be overriding the PHP version settings. Make sure there are no conflicting directives that force the use of a specific PHP version.
If the issue persists, you may want to reach out to your hosting provider or the LiteSpeed support team for further assistance. They should be able to help you troubleshoot and resolve the issue.
Rate this post
3 of 5 based on 1450 votesComments