PHP server version change procedural steps with BPS Pro

Home Forums BulletProof Security Pro PHP server version change procedural steps with BPS Pro

This topic contains 28 replies, has 3 voices, and was last updated by  Ruhil Gupta 17 hours, 57 minutes ago.

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #35920

    AbZu2
    Participant

    Updated PHP on my cPanel of my host is being blocked (quarantined) by BPS. Is adding an exception rule for php.ini the correct solution ? TIA

    #35921

    AITpro Admin
    Keymaster

    When you change your PHP server version in your web host control panel do these BPS Pro procedural steps below.

    1. Turn AutoRestore Off.
    2. Unlock your Root htaccess file on the B-Core > htaccess File Editor page and turn Off AutoLock.
    3. Change your PHP sever version in your web host control panel.
    4. Check your Root htaccess file code/contents to see if your particular web host adds php/php.ini htaccess code at the top of your Root htaccess file.  If you see new php/php.ini htaccess code at the top of your Root htaccess file then copy it to this BPS Root Custom Code text box:  1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE, click the Save Root Custom Code button and click the Root folder BulletProof Mode Activate button.  If you do not see any new php/php.ini htaccess code at the top of your Root htaccess file then you do not need to do anything else and can go to step #5.
    5. Lock your Root htaccess file and turn AutoLock back On on the htaccess File Editor page.
    6. Go to the BPS Pro Setup Wizard page and run the Pre-Installation Wizard and Setup Wizard.

    #35922

    AbZu2
    Participant

    Went through all the steps and had my host change the PHP version to 7.0. Didn’t see any changes to my Root htaccess file so I proceeded to step 5 .

    Current Root htaccessfile is:

    
    # CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    # Use PHP5.4 Single php.ini as default
    AddHandler application/x-httpd-php54s .php
    
    

    my site reports: Your current PHP version (5.4.43)

    #35923

    AITpro Admin
    Keymaster

    You need to delete the php/php.ini htaccess code in BPS Root Custom Code that is forcing your website to use PHP 5.4 instead of PHP 7.  Probably your PHP 7 version does not require php/php.ini htaccess code.

    #35924

    AbZu2
    Participant

    Are you referring to deleting the line:

    AddHandler application/x-httpd-php54s .php 

    After that deletion should I go through all the steps 1-6 again or is it sufficient to go only through the set up wizard again. TIA.

    #35926

    AITpro Admin
    Keymaster

    Yep, that is php/php.ini htaccess code.  Yep, you can just do step #6.

    #35929

    AbZu2
    Participant

    Unlocked the root htaccess file to enable editing. Deleted the line:

    AddHandler application/x-httpd-php54s .php

    Then locked the root htacess file. Now all I get is a blank page on my site. I had also turned OFF Autolock. Can’t access my admin or site. 🙁

    #35930

    AbZu2
    Participant

    After deleting the above mentioned line, I ended up with:

    
    # BULLETPROOF PRO 13.6 SECURE .HTACCESS
    
    # CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    # Use PHP5.4 Single php.ini as default
    
    # BEGIN WEBSITE SPEED BOOST
    
    
    #35931

    AbZu2
    Participant

    Deactivated BPS from my cPanel to get my site back 🙁  Reluctant in activating it again until I get confirmation that running the setup wizard is all I need to do or do I need to edit my root htaccessfile somehow.

    #35932

    AITpro Admin
    Keymaster

    Ok this is a really simple thing to do so I do not what is going on at this point.  Send me a WordPress Administrator login and an FTP login to this hosting account so I can get this working/fixed.

    #35980

    AbZu2
    Participant

    Solving the PHP update turned out to be quite an ordeal and I am posting the solution to it on this thread so that it may be of help to anyone else with a similar problem. I consider BPS Pro to be a must-have-plugin. In the past I have been impressed not only by the plugin but the excellent customer support as well. Unfortunately, the support for this issue was not what I had experienced in the past and I felt I was left to find my own solution. To make a looong story short.

    The Problem

    Every attempt to update my PHP version following the instructions at the beginning of this thread would crash my site.

    The Solution

    After numerous emails with AIT attempting to find the cause of the PHP reverting to the original version 5.4 rather than updating to 7.0, after updating PHP to 7.0 on my host, I discovered there was a discrepancy between the information in .htaccess at

    public_html >>.htaccess

    and

    public_html>>wp-content>>bps-backup>>autorestore>>root-files > .htaccess

    public_html>>wp-content>>bps-backup>>autorestore>>root-files > auto_.htaccess

    manually correcting the information of the two files in the bps-back folder mentioned above to be the same as

    public_html >>.htaccess

    fixed the problem. My suspicion is that when BPS was deleted from my host at

    public_html>>wp-content>> plugins>> bulletproof-security

    due to that the bps-backup was in a different directory and for whatever other reason

    public_html>>wp-content>>bps-backup

    was not deleted and would restore the old information to every new installment/activation of BPS, crashing the site.

    #35984

    AITpro Admin
    Keymaster

    Great!  Glad you were able to figure out the issue.  Be sure to let your web host know that there is something wrong with your server.  A server/website should not crash when the wrong php/php.ini handler htaccess code is used.  Even though this was out of the range of BPS Pro plugin support since this was a host server problem, we were happy to assist you and glad that the solution that you posted above and that we gave to you via direct emails worked.

    #35985

    AITpro Admin
    Keymaster

    Your guess below is not correct. What was happening was AutoRestore was restoring the old htaccess file in AutoRestore backup when you activated BPS Pro. The old htaccess file contained your old PHP handler htaccess code for PHP 5.4. This whole issue was very strange and definitely not normal since a website/server should not crash due to invalid or different php handler htaccess code. So be sure to let your web host folks know that they need to fix that server problem on your web host.

    My suspicion is that when BPS was deleted from my host at

    public_html>>wp-content>> plugins>> bulletproof-security

    due to that the bps-backup was in a different directory and for whatever other reason

    public_html>>wp-content>>bps-backup

    was not deleted and would restore the old information to every new installment/activation of BPS, crashing the site

    #35986

    AbZu2
    Participant

    Which file are you referring to and in what directory ?

    I see:  public_html>>wp-content>>bps-backup>>autorestore>>root-files > .htaccess_old

    that contains: BULLETPROOF PRO 12.4 SECURE .HTACCESS

    I assume that it is safe to delete his file.

    What I thought was happening when BPS was activated (after being deleted) was that AutoRestore was restoring from:

    public_html>>wp-content>>bps-backup>>autorestore>>root-files > auto_.htaccess

    and

    public_html>>wp-content>>bps-backup>>autorestore>>root-files > .htaccess

    #35987

    AITpro Admin
    Keymaster

    I am referring to your root .htaccess file that is backed up here and renamed to > /bps-backup/autorestore/root-files/auto_.htaccess.  The root htaccess file must be renamed to auto_.htaccess since if it was not renamed then the security rules in that htaccess file would be applied to the autorestore backup folder.  When the auto_.htaccess file is restored from autorestor backup it is renamed to .htaccess in the copy/restore process.  The .htaccess_old file was a file named .htaccess_old that was backed up from your website root folder to autorestore backup.

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.