Home › Forums › BulletProof Security Pro › PHP Error Log Path Does Not Match – Use the Error Log Seen by Server value
- This topic has 44 replies, 7 voices, and was last updated 2 years, 12 months ago by
AITpro Admin.
-
AuthorPosts
-
Living Miracles
ParticipantHi,
I just set up a new WordPress site on our SiteGround server and installed BPS Pro. For some reason, I cannot get the PHP Error Log to work properly. Here’s what is happening:
- I’m getting the red “The PHP Error Log Location Set To: folder path does not match the Error Log Path Seen by Server: folder path” error
- ini_set PHP Error Log Location (Recommended): /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log
- PHP Error Log Location Set To: /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log
- Error Log Path Seen by Server: php_errorlog
- I’ve tried many times to set the right (“Recommended”) path in the ini_set Options but the errors are not going away, and the Error Log Path Seen by Server does not change from “php_errorlog”
Besides this, I keep getting an error_log quarantined from this location: /home/mysite/public_html/wp-admin/php_errorlog
Can you tell what may be happening and what I should do to resolve this? I’m not sure I’ve ever run into this before. Usually, setting the PHP Error Log location doesn’t cause me much trouble.
Thank you!
AITpro Admin
KeymasterUse the Error Log Seen by Server value: php_errorlog. Your server’s php.ini file is configured to use the server’s default php error log file. Copy: php_errorlog into the PHP Error Log Location Set To text box and click the Set Error Log Location button.
Living Miracles
ParticipantOh, thank you! Is there any negative impact to not using the “Recommended” path for the PHP Error Log? Would it be better to edit the php.ini file in some way so we can use the “Recommended” path?
AITpro Admin
KeymasterIt does not matter which php error log file you use. A log file is just a plain text file for logging errors to.
Living Miracles
ParticipantHi again,
Thanks for the last response. Please tell me if this is beyond the scope of your support:
The server is seeing this as the error log path: php_errorlog
However, this is structurally above my permission. Meaning, I actually cannot access this file path via FTP because I don’t have permission.
I’d really like the PHP Error Log to be located at /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log
That way, it’s consistent with the rest of my many sites as well. Is this something where you can direct me in the right direction for fixing the issue?
Thank you!
JuttaAITpro Admin
KeymasterYou would need to edit the server’s php.ini file or create a custom php.ini file or contact your web host support and ask them to edit/change your php.ini file PHP Error Log settings. The php.ini directive settings that would need to be changed are:
log_errors = On error_log = /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log
Here is a general help forum topic on how to create a custom php.ini file > https://forum.ait-pro.com/forums/topic/custom-php-ini-file-setup-php5-3-x/
Living Miracles
ParticipantThank you! I’ve looked through the documentation and contacted support at SiteGround. We set up a php.ini file at /home/mysite/public_html/ and defined the error log location there. When I set this error log location in BPS Pro, however, I again started to see the “PHP Error Log Path Does Not Match” error. Any other ideas about this?
When I choose the error log path that the server sees (error_log … not /home/mysite/error_log or something similar), I actually do not see any error log anywhere and I’m not certain the log even works.
Any help you can provide is greatly appreciated! Thank you!
Edit:
I created a /wp-content/plugins/bulletproof-security/admin/php/phpinfo-IP.php file via the Phpinfo Master File Creator tool and it’s showing the error log location at php_errorlog.I also created a /test.php file (content: <?php phpinfo(); ?>) to check the PHP info there as well and the error log location is showing as /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log.
Does that make any sense?
AITpro Admin
KeymasterDid your custom php.ini file get quarantined? If so, restore it from Quarantine. You should be able to edit the new custom php.ini file that you created and change the PHP error log path to the default BPS PHP Error Log file location: /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log. Note: When manually editing website files use the AutoRestore|Quarantine procedural steps for manually editing files > http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#procedural-steps
If you are still seeing the old php.ini file path then either you need to wait at least 15 minutes for the server to refresh and update the new custom php.ini file location or the custom php.ini file was not setup correctly. Sounds like you need to contact SiteGround again and figure out what is going on.
Living Miracles
ParticipantYes, it did get quarantined and I restored it. Did you see my edit above?
Edit:
I created a /wp-content/plugins/bulletproof-security/admin/php/phpinfo-IP.php file via the Phpinfo Master File Creator tool and it’s showing the error log location at php_errorlog.I also created a /test.php file (content: <?php phpinfo(); ?>) to check the PHP info there as well and the error log location is showing as /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log.
Does that make any sense?
AITpro Admin
KeymasterDon’t use the phpinfo tool or the phpinfo() function for checking things. BPS has a diagnostic tool on the PHP.ini Options page > Diagnostic Checks|Recommendations, but that does not matter at this point because something is not setup correctly with your custom php.ini file. I think the best thing to do would be to contact SiteGround support again.
Living Miracles
ParticipantOk, thanks. Here’s the full content of my php.ini file:
log_errors = On
error_log = /home/mysite/public_html/wp-content/bps-backup/logs/bps_php_error.log
display_errors = Off
display_startup_errors = OffDo you see anything wrong with it? When I contacted SiteGround, they kind of relied on the information that you gave me; they almost sent me back to you to figure this out.
Again, if this is simply beyond the scope of your support, please let me know!
AITpro Admin
KeymasterYour custom php.ini file directives looks fine. The problem is that your server is not seeing the custom php.ini file and is still seeing the default server php.ini file. So you will need to contact SiteGround support and have them fix this for you. I did some Google searches for SiteGround custom php.ini files and did not find anything useful.
Living Miracles
ParticipantUnderstood. Thank you very much!
Living Miracles
ParticipantHi again,
I’ve been in contact with SiteGround about this issue, but so far nothing conclusive has come from it. I just wanted to say that for some reason, even though BPS Pro is showing that the server is seeing the error log location as “php_errorlog”, this file, I’ve found, is actually located at /wp-admin/php_errorlog. And all errors do seem to be getting logged in this file.
Any idea why the php_errorlog file would be in the /wp-admin folder? SiteGround mentioned that there is an error log file “present in your wp-admin folder as this is where the plugin is being accessed from.” However, I’m not sure what they mean by this.
Any thoughts are greatly appreciated!
Thank you!AITpro Admin
KeymasterNope, no idea at all why SiteGround is doing what they are doing with PHP error logs, but if you can use the path to the SiteGround PHP error log then I recommend that you do that. Not sure why the SiteGround tech told you that is “where the plugin is being accessed from” – that does not make any sense to me. I’m a bit surprised that the SiteGround tech did not know how to do something as simple as changing the PHP error log path in a custom php.ini file. That is a very basic and standard thing.
-
AuthorPosts
- You must be logged in to reply to this topic.