Home › Forums › BulletProof Security Free › SITE DOWNLOADING INSTEAD OF EXECUTING | PHP HANDLER .HTACCESS
- This topic has 5 replies, 2 voices, and was last updated 6 months, 3 weeks ago by OCALA DESIGNS.
-
AuthorPosts
-
OCALA DESIGNSParticipant
I have all of my sites on PHP 8.3, I have been migrating all my sites to BPS. Some of my sites, when on PHP 8.3 won’t complete the setup wizard and start wanting to download the page instead of displaying it. If I replace the handler manually in the htaccess back to the php 7 one, it seems to work with no troubles even though the site is on php 8.3:
# CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE # PHP/php.ini handler htaccess code AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
The pages start working again. What do I need to check in my PHP 8.3 settings to make sure it works when it has the proper handler for PHP 8?
OCALA DESIGNSParticipantI noticed that this PHP7 handler is picking up the 7.4 version. When I do the setups on PHP 8.3 it just says 80, not 83. I manually edit the htaccess which seems to make it work again. I don’t have php 8.0 on the server so I’m going to install it and see if that takes care of the issue but shouldn’t BPS be writing the handler for PHP83 when that’s the only PHP installed?
AITpro AdminKeymasterThe Setup Wizard can only see existing php handler htaccess code, which your particular web host uses. Most web hosts are no longer using php handler htaccess code because it causes these types of problems. So if you had old php handler htaccess code saved in BPS Custom Code from a previous php server version: 7.0, 7.4, etc. then you would need to manually delete that old php handler htaccess code in BPS Custom Code. If your web host still uses/creates php handler htaccess code then that php handler code is created when you switch your php server version in your web host control panel and that php handler htaccess code will be written to your root htaccess file.
I would try deleting any php handler htaccess code in your Root htaccess file. If that works, which most likely it will since most web hosts no longer use php handler htaccess code then all you need to do is delete the old php handler htaccess code saved in BPS Custom Code.
OCALA DESIGNSParticipantThank you that all makes sense. I installed PHP 8 temporarily so that the handlers had something to handle them with. I’m going through all the sites and tweaking the custom code area. Kind of a pain as I have to stop Modsec on each site to save that for some reason. Then I’m deleted the handlers from the htaccess files as well.
AITpro AdminKeymasterYou can use the BPS built-in ModSecurity evasion buttons in Custom Code > Encrypt Custom Code evades ModSecurity.
OCALA DESIGNSParticipantHa! You are all amazing! Love it! The encrypt custom code button in fact does allow me to save without disabling the modsec for the site! Thanks again!
-
AuthorPosts
- You must be logged in to reply to this topic.