Home › Forums › BulletProof Security Pro › php reverting to 7.4
- This topic has 8 replies, 3 voices, and was last updated 2 weeks, 3 days ago by
wpconvert.
-
AuthorPosts
-
handsunc
ParticipantHello, the strangest thing, I was getting notices in my wordpress backend that I was running 7.4 and some plugins would not work, but when I checked cpanel, I am running 8+. I was just working with my assistant becausee sites were crashing in wordpress, she was adding a plugin folder name in Autorestore, wp-content , and then it seems that we had to run setup again because autorestore would get turned off from that. when she ran Seup the sites would crash. I just logged into a site and saw that in Tools, Site Health php ws 8.3, I added the wpvividbackups folder to , Autorestore, wp-content and then ran Bulletproof setup, then I wanted to take a screenshot of the php to show my assistant, and it shows now as 7.4 https://prnt.sc/upLY8bCrp9E6. I just checked cpanel for this site and it is 8.3, https://prnt.sc/3uOaE3D0vPED.
Can you help me figure out why this is happening? Thanks, Carin
AITpro Admin
KeymasterMost likely you have old php handler htaccess code saved in BPS Custom Code from php server version: 7.4. Newer versions of PHP no longer use php handler htaccess code.
Delete the old 7.4 php handler htaccess code in this BPS Root Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE. Click the Save Root Custom Code button. Then either activate Root Folder BulletProof Mode or run the Setup Wizards again.
handsunc
ParticipantI took it out and ran setup and it popped back in, does this mean I have to login to to hosting cpanel and remove 7.4 handler code from all the htaccess in sites I run? I guess hosting overrides it when I change to 8+ in cpanel, but bulletproof picks it up and enforces it.
AITpro Admin
KeymasterDelete y0ur root htaccess file using FTP or your web host control panel file manager tool. Go to the BPS Pro Logs|Info menu > System Info page > check your php version. If you are still seeing php 7.4 then a non-BPS htaccess file in the hosting account root folder has the php handler htaccess code in it, which you need to delete. If you are seeing php 8.3 then go to the BPS Pro Root Custom Code, check all the Custom Code text boxes for php handler htaccess code. Sometimes php handler htaccess code is saved in another Custom Code text box. Delete that php handler htaccess code, save your changes. Double check that your changes were actually saved and the php handler htaccess code was actually deleted from Custom Code. Then run the BPS Setup Wizards.
handsunc
ParticipantI did it a little different, I replaced all .htaccess with simple wordpress;
I deleted the php 7.4 handler from Custom Code, ran setup again and the site is back to 7.4 again,where do you think it could be coming from if not htaccess, in cpanel its 8.3
# BEGIN WordPress RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPressAITpro Admin
KeymasterMaybe your web host requires php handler htaccess code to load php 8.3. Do the steps below.
Delete the root htaccess file.
Go to cPanel and reapply php version 8.3. Or switch to another version of PHP and then switch back to 8.3.
If your host uses php handler htaccess code for php 8.3, you will find that php handler htaccess code in the new htaccess file that your web host created.
If you find php handler htaccess code for php 8.3 in the new htaccess file, then you would copy that php handler htaccess code into this BPS Root Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE.
Click the Save Root Custom Code button.
Then either activate Root Folder BulletProof Mode or run the Setup Wizards again.handsunc
ParticipantHI, the only way this worked for me was to activate Root Folder BulletProof Mode first, then run the Setup Wizards again. If I ran Setup first the old php kept injecting, now I’ve got a fix, thanks for all your help!!
AITpro Admin
KeymasterThat’s odd, but glad it worked.
wpconvert
ParticipantHi
Just noticed this post – and thought I’d respond just in case it’s relevant…
I had a similar issue on my reseller account – I host 20+ websites with no issue – a new client wanted me to take over their websites and 2 were migrated over from GoDaddy to my server. It appears that during this migration, Godaddy php settings were also carried over. This made iteslf known usually after running the Bulletproof Pro setup wizard (after updating sometimes, autorestore would need resetting). Sometimes even after minor updates, php would default to 7.4 (addhandler code would appear in my custom code) and other custom code entries would be blank.
Before really looking into the issue, I just used to restore the previous values – delete the addhandler code, remove Bulletproof backup htaccess files and carry on as normal. But clearly this required a permanent resolution.
This required my host to remove the offending “legacy” php handler that was migrated over with the site and allow those c-panels to use the default php handler. Everything was back to operating as expected.
Hope it helps someone – even if this isn’t the cause of your particular problem.
Have a great day.
-
AuthorPosts
- You must be logged in to reply to this topic.



