Support

Admin Tools

#35362 PHP reverts to older version (htaccess maker)

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 10 July 2021 20:17 CDT

AlexR

I read in another post that the way to resolve when htaccess maker causes a 500 error as the PHP version is reverting to 5.x version for some reason is to add a custom rule.

Is this sufficient:

AddHandler application/x-httpd-ea-php74 .php .php7 .phtml

or should it be enclosed as here:

<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>

Thanks!

nicholas
Akeeba Staff
Manager

The AddHandler line is sufficient. The IfModule is a conditional wrapper. It tell the server "if the Apache MIME module is installed and active (which means AddHandler is supported) then apply the AddHandler line". However, you already know that your server does have the Apache MIME module is installed and active, otherwise you wouldn't have multiple PHP versions, therefore you can skip the conditional wrapper.

As to how to find the correct AddHandler line. Use your hosting control panel to set up the PHP version you want to use. Open the .htaccess file. You will see the AddHandler line there. Copy that to the .htaccess Maker's custom code to add at the bottom of the file. That's all.

This is not something that is specific to the .htaccess Maker, mind you. Most servers these days support multiple PHP versions. The way you enable a specific PHP version is telling Apache to handle .php files using that version of PHP. This typically happens with an AddHandler or SetHandler line. There are other ways but they are far less common.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!