Zen Cart Logo
Forums / General Questions / PHP version - I'm confused

PHP version - I'm confused

Views: 753

Results 1 to 3 of 3
26 Mar 2024, 6:09 AM
#1
spminis avatar

spminis

Zen Follower

Join Date:
Feb 2015
Location:
USA
Posts:
194
Plugin Contributions:
0

PHP version - I'm confused

spminiatures.com Zen version 1.58a

I set the php version on the server to 8.1. I must have gotten the information to do that when I installed version 1.58a - clean install.

For some reason, my webhosting service periodically puts the following code in my htaccess file:

php -- BEGIN cPanel-generated handler, do not edit

Set the “ea-php81” package as the default “PHP” programming language.

<IfModule mime_module> ## AddHandler application/x-httpd-ea-php81 .php .php8 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit

When that happens, my site goes down. When I remove the code my site works fine. They suggested that I change the PHP version through the cpanel to 7.4. When I checked the php version on the admin server info page it's. 7.3.3. I changed the cpanel php version to 7.3.3. The site seems to be working ok but I'm concerned that there will be problems.

What is the correct php version to use and how to I fix the program to change the version?

Thanks

26 Mar 2024, 6:47 AM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,796
Plugin Contributions:
22

Re: PHP version - I'm confused

The code added to your htaccess file is OK, it's what cPanel adds to tell the server which php version to use. Once it's added, your site fails for a different reason, and I'm pretty sure it's what is described here.
Either way, if you're getting a blank screen, you can always check your logs/ folder for the latest file and see what it's telling you.

26 Mar 2024, 7:21 AM
#3
spminis avatar

spminis

Zen Follower

Join Date:
Feb 2015
Location:
USA
Posts:
194
Plugin Contributions:
0

Re: PHP version - I'm confused

balihr:

The code added to your htaccess file is OK, it's what cPanel adds to tell the server which php version to use. Once it's added, your site fails for a different reason, and I'm pretty sure it's what is described here.
Either way, if you're getting a blank screen, you can always check your logs/ folder for the latest file and see what it's telling you.

Thanks, I'll try it.

Carol