htaccess.txt rename brakes page

opkyrtsis

Member
Oct 31, 2019
9
0
1
Athens, Greece
cPanel Access Level
Root Administrator
Hey there. There is a strange issue with a Joomla 4 installation running on PHP 8.0. As I always do, I'm enabling SEF rewrite in Joomla an then renaming htaccess.txt to .htaccess. As a result I get a red page front and backend which reads ' This php version is not supported - Your host needs to use PHP version 7.2.5 or newer to run this version of Joomla!' From the server they told me that this behaviour is totally expected since .htaccess file lacks directives that fetch PHP 8.0. Why this happens and how could I fix it? Thank you.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
857
368
363
cPanel Access Level
DataCenter Provider
Go into cPanel and change the PHP version, then set it back to the one you want. It will add the code the the .htaccess file to set the PHP version.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
857
368
363
cPanel Access Level
DataCenter Provider
You just want to make sure that the cPanel code for PHP is at the bottom of that file (that's where it will normally put it). If your still having issues, my guess would be that a PHP module that you need is missing in that version of PHP, but it's just a guess.
 

opkyrtsis

Member
Oct 31, 2019
9
0
1
Athens, Greece
cPanel Access Level
Root Administrator
.htaccess after renaming:


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

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
857
368
363
cPanel Access Level
DataCenter Provider
From what you posted above it looks like all the Joomla stuff is missing. You should be able to add it in above the cPanel stuff.
 

opkyrtsis

Member
Oct 31, 2019
9
0
1
Athens, Greece
cPanel Access Level
Root Administrator
I added the "after renaming to .htaccess" code above the preconfigured code and links work now, but why I had to do this it remains a mystery to me. My other sites work like a charm with the 'short' code seen above only...
 
Thread starter Similar threads Forum Replies Date
3 Miscellaneous 4
PCZero Miscellaneous 5