Bitnami LAMP stack

Home Forums BulletProof Security Pro Bitnami LAMP stack

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #37191
    Ljubomir Manojlovic
    Participant

    I’m just started with first installations and …. it looks some problems exists. So, first to explain what I have .as infrastructure. It is Bitnami LAMP stack (on Google) with today WordPress module on it.

    A) ‘PHP Error Log Path Does Not Match’

    It shows me /opt/bitnami/apps/myapplication/htdocs/wp-content/bps-backup/logs/bps_php_error.log as recommended path (what is automatically set). However, when I place it again in the form line and press ‘Set Error Log Location’, nothing is changed. So, really no idea what to do here.

    B) It started like ‘crazy’ (one per minute) to drop me auto_.htaccess (/opt/bitnami/apps/myapplication/htdocs/.htaccess) in Quarantine. (fresh installation????) – Also, no idea what to do.

    #37192
    AITpro Admin
    Keymaster

    What is the PHP Error Log path seen by your server?  If something is trying to write or flush the Root htaccess file (auto_.htaccess file) then it will be quarantined repeatedly.  To prevent that from happening > go to the B-Core > htaccess File Editor tab page > click the Lock htaccess File button and click the Turn On AutoLock button.  Note:  If you are manually editing or uploading files outside of WordPress then see the AutoRestore|Quarantine Standard Procedural Steps when manually modifying files help section > http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#procedural-steps

    #37193
    Ljubomir Manojlovic
    Participant

    Well, I’m not sure did your reply should be observed as connected, but I understood it as separate.

    A) What is the PHP Error Log path seen by your server?

    ANSWER

    /opt/bitnami/apps/myapplication/htdocs/wp-content/bps-backup/logs/bps_php_error.log

    (I wrote that)

    B) What you mean by ‘If something is trying to write or flush the Root htaccess file’? It is fresh installation. Do you want to say that I’m already subject of attacks or what?

    (steps I understand, but not why it happening on fresh installation)

    #37194
    AITpro Admin
    Keymaster

    Go to the PHP.ini Options tab page > click the Diagnostic Checks|Recommendations > Run Check button.  Post the results of the Diagnostic Check in your forum reply.

    It is a very common known issue that other plugins and themes try to write or flush the root htaccess file when doing things like saving plugin settings or other things.  Maybe that is not the problem that is occurring.  Maybe this has to do directly with your website type.  Send me a link to the Google Bitnami LAMP help page so I can see if it is a “virtual” space.  In order for AutoRestore|Quarantine to work correctly it needs to check “physical” disk space and not virtual space.

    #37195
    Ljubomir Manojlovic
    Participant

    https://docs.bitnami.com/google/infrastructure/lamp/

    PHP Version: 7.1.28
    PHP|php.ini Handler: A PHP|php.ini Handler was Not found in your Root .htaccess file.
    
    Configuration File (php.ini) Path: Click the View PHPINFO button on the PHP Info Viewer page to get this path.
    Loaded Configuration File: /opt/bitnami/php/etc/php.ini
    
    php.ini, php5.ini & .user.ini File Search Results: (Displays the file paths below if files were found)
    
    disable_functions: The ini_set function is Not Disabled
    
    wp-config.php File: The wp-config.php file was found in the website root folder.
    
    Error Log Path Seen by Server:
    PHP Error Log Location Set To: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/logs/bps_php_error.log
    ini_set PHP Error Log Location Set To: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/logs/bps_php_error.log
    
    Website Root Folder: https://ecuadorturinfo.com
    WP ABSPATH: /opt/bitnami/apps/ecuadorturinfo/htdocs/
    Host by Address: bitnami-lampstack-dm-a2a6.c.ecuadorturinfo-hosting.internal
    DNS Name Server: ns20.domaincontrol.com
    
    Server Type: Apache
    Operating System: Linux
    Server API: fpm-fcgi CGI Host Server Type
    
    Zend Engine Version: 3.1.0
    Zend Guard Loader: A Zend Extension is Not Loaded
    FastCGI: Unable to detect whether FastCGI is in use. Check your web host control panel to see if FastCGI is in use.
    
    -------------------------------------------------------------
    
    Shared Hosting Recommendations: 
    For first time installations of BPS Pro it is recommended that you use the ini_set Options to quickly setup your PHP Error Log file and location. If you would like to create a custom php.ini file for your website see this Forum Topic: Custom php.ini File Setup
    
    -------------------------------------------------------------
    
    VPS or Dedicated Hosting Recommendations: 
    For first time installations of BPS Pro it is recommended that you use the ini_set Options to quickly setup your PHP Error Log file and location. You can then create a custom php.ini file, which you can upload to replace the Servers php.ini file for your website at a later time if you would like. You can create/use either a custom php.ini file or the ini_set Options method or both at the same time. If you have created a custom php.ini file and you also use ini_set Options then your ini_set Options settings will take precedence over your custom php.ini file settings.
    
    If a custom php.ini file was found in the php.ini, php5.ini & .user.ini File Search Results: then delete that file. For VPS or Dedicated Hosting you have full access to that Servers php.ini file (Loaded Configuration File:), and you will be uploading your custom php.ini file and replacing the Servers php.ini file with your custom php.ini file instead of creating the custom php.ini file under your website folders. Click HERE for the custom php.ini setup steps for VPS and Dedicated hosting
    #37198
    AITpro Admin
    Keymaster

    Ok the PHP Error Log > Error Log Path Seen by Server: is blank.  So probably what you need to do is edit the php.ini file on your server or create a custom php.ini file on your server and add these php.ini directives below in your new custom php.ini file:

    log_errors = On
    error_log = /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/logs/bps_php_error.log

    The Bitnami LAMP Stack For Google Cloud Platform PHP php.ini file is here: /opt/bitnami/php/etc/php.ini. Note: You need to reboot/restart the server for php.ini configuration changes to take effect.

    See this related Bitnami help topic for how to restart the server > https://docs.bitnami.com/google/infrastructure/lamp/administration/increase-upload-limit-php/

    Restart the servers for the changes to take effect.
    sudo /opt/bitnami/ctlscript.sh restart

    #37203
    Ljubomir Manojlovic
    Participant

    I did that, but it is still not clear for me:

    A) I keep to get BPS red fonts error about path.

    b) I keep to get Quarantine alerts.

    So, what now?

    #37204
    AITpro Admin
    Keymaster

    Double check that you did all the php.ini steps correctly and rebooted your server.  AutoRestore should be turned Off when manually editing files such as the php.ini file or other files.  If the php.ini file was quarantined then restore it from Quarantine and restart your server.

    Turn Off AutoRestore for now until you have the php.ini file changes fixed to set your PHP Error Log path in your php.ini file.  After you have got that working then run the Setup Wizard again.  The Setup Wizard backs up all new or edited files and then turns AutoRestore back On.  Let me know if that also fixes the root htaccess file quarantine problem.

    Also you need to reset the Quarantine alert by clicking the link in the alert and then resetting the Quarantine alert.

    #37207
    Ljubomir Manojlovic
    Participant

    Ups, sorry. Now I did that (first just restarted Apache, now entire machine). Red fonts alert disappeared, but quarantine alert keep on (for now).

    #37208
    AITpro Admin
    Keymaster

    Go to the Quarantine Log page > copy your entire Quarantine Log file contents and post the log file contents in your forum reply.

    #37209
    Ljubomir Manojlovic
    Participant

    Great, your instructions works. All clean.

    So, actually to avoid issue on Bitnami LAMP, before BPS activation, path should be added to PHP.ini (log_errors = On is by default in Bitnami production set as On).

    Thanks again, as it was something new for me.

    Case solved.

    Yeah. Wizard should be done as you wrote to avoid issue with quarantine and than clean it (all steps exactly as you wrote – was my bad(mistake).

    #37212
    Ljubomir Manojlovic
    Participant

    Ups, not, quarantine keep on.

    BPS AutoRestore/Quarantine - ARQ Log
    ====================================
    ====================================
    
    [BPS Pro 13.9: Root File AutoRestore Logged: May 3, 2019 6:22 pm]
    Quarantined Filename: Root .htaccess file renamed to auto_.htaccess
    Quarantine Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/quarantine/root-files/auto_.htaccess
    Restore Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/.htaccess
    
    [BPS Pro 13.9: Root File AutoRestore Logged: May 3, 2019 6:24 pm]
    Quarantined Filename: Root .htaccess file renamed to auto_.htaccess
    Quarantine Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/quarantine/root-files/auto_.htaccess
    Restore Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/.htaccess
    
    [BPS Pro 13.9: Root File AutoRestore Logged: May 3, 2019 6:26 pm]
    Quarantined Filename: Root .htaccess file renamed to auto_.htaccess
    Quarantine Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/quarantine/root-files/auto_.htaccess
    Restore Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/.htaccess
    
    [BPS Pro 13.9: Root File AutoRestore Logged: May 3, 2019 6:28 pm]
    Quarantined Filename: Root .htaccess file renamed to auto_.htaccess
    Quarantine Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/wp-content/bps-backup/quarantine/root-files/auto_.htaccess
    Restore Path: /opt/bitnami/apps/ecuadorturinfo/htdocs/.htaccess
    
    [Rest of the Quarantine Log file contents was deleted by AITpro Admin]
    #37213
    AITpro Admin
    Keymaster

    Do you have any other plugins installed?  Did you lock your Root htaccess file on the BPS Pro > B-Core > htaccess File Editor tab page?

    #37216
    Ljubomir Manojlovic
    Participant
    1. Yes, I have other plugins installed (before BPS is installed). All of them are just activated (not real work/activity).
    2. No, I did not. Black box show Off.
    #37217
    AITpro Admin
    Keymaster

    Ok you need to lock the Root htaccess file to prevent other plugins or your theme from flushing the root htaccess file.  Let me know if the problem is no longer occurring once you lock your root htaccess file, delete the auto_.htaccess files in Quarantine and reset Quarantine alerts on the Quarantine Log page.

Viewing 15 posts - 1 through 15 (of 29 total)
  • You must be logged in to reply to this topic.