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 4 years ago by AITpro Admin.
-
AuthorPosts
-
Living MiraclesParticipant
Hi again,
So, the techs at SiteGround did find something:
We have some other WordPress sites on this same server, however, they are add-on domains to our main domain on the server (which means they don’t come with their own cPanel account, for example). The SiteGround tech noticed that the add-on domain WordPress sites have the following code in the wp-config.php file:
/** BEGIN BPS Pro ini_set Settings **/ @error_reporting(E_ALL|E_STRICT); @ini_set('log_errors','On'); @ini_set('error_log','/home/account/example.org/public_html/wp-content/bps-backup/logs/bps_php_error.log'); // add the path to your php error log
One the other hand, the WordPress site that I’ve been writing to you about (which is not an add-on domain, but instead is set up in its own cPanel, but on the same server) didn’t have that kind of block of code in its wp-config.php file.
The SiteGround added the following:
@error_reporting(E_ALL|E_STRICT); @ini_set('log_errors','On'); @ini_set('error_log','/home/account/public_html/wp-content/bps-backup/logs/bps_php_error.log'); // add the path to your php error log
After this, the PHP Error Log path was recognized and everything started working.
I have another site just like this one and I made the same change to it and the PHP Error Log was after that as well and all backend errors disappeared. With this setup we also don’t need custom php.ini files, by the way.
Do you have any idea what could be happening here? Is it safe to manually add this code to the wp-config.php file?
Thank you so much!
AITpro AdminKeymasterThe SiteGround tech appears to have fixed the original issue with the default server PHP Error Log setting of: php_errorlog. You can add any PHP Error Log path that you want to use as long as the file path is valid. You should use the BPS Pro > P-Security > ini_set Options settings to add or change any ini_set() code/settings in your wp-config.php file and should not need to manually edit your wp-config.php file.
Living MiraclesParticipantThank you that’s good to know. You said, “You should use the BPS Pro > P-Security > ini_set Options settings to add or change any ini_set() code/settings in your wp-config.php file and should not need to manually edit your wp-config.php file.” I was trying that actually; it’s what I normally use for all my WordPress sites to set up all the PHP settings. However, for these 2 new cPanel sites, even thought it looked like the settings were saving, it appears that they never actually saved. Can you imagine a reason why they wouldn’t truly save (and add the necessary code to the wp-config.php file)?
Appreciate your help!
AITpro AdminKeymasterThe only 3 things I can think of for why the ini_set Options form settings were not successfully saved would be:
#1. You have moved your wp-config.php file to another folder location under your hosting account. If you have done that then you will need to manually edit your wp-config.php file.
#2. Mod Security is enabled on your website and is interfering with the ini_set Options form > https://forum.ait-pro.com/forums/topic/mod-security-common-known-problems/
#3. There is some sort of database issue that is occurring that is not allowing the ini_set Options form settings to be saved to your WordPress database.
Living MiraclesParticipantThank you, that’s very helpful! Looks like Mod Security is enabled. Will talk to SiteGround to see what they can tell me about that (or look at the server error log for Mod Security errors).
Living MiraclesParticipantHi again,
SiteGround checked on their end, including logging into one of our problematic WordPress sites, and testing out saving the settings on the BPS Pro > P-Security > ini_set Options page, to see if it would generate Mod Security-related errors. Unfortunately no errors were triggered.
I asked them if they could think of another reason that the BPS Pro code for the wp-config.php file would not be able to be added to the wp-config.php file.
They said, “The only thing that could possibly prevent the plugin from writing in the wp-config.php is the .htaccess file located in wp-admin. You need to check the content of .htaccess with the plugin’s developers and let us know if anything specific needs to be setup.”
I’ve added the code of my /wp-admin/.htaccess file here.
Would you be open to taking a look at it?
Thank you!
AITpro AdminKeymasterI looked at the wp-admin htaccess file code and it is the standard BPS wp-admin htaccess file. So there is not any code in the wp-admin file that could cause the problem. I guess for these 2 cPanel sites that have this issue you are just going to have to manually edit the wp-config.php file. Not a real big deal since this is just a one time edit and not an ongoing editing thing.
LucaParticipant[Topic has been merged into this relevant Topic]
Hello!
I have this alert:
PHP Error Log Path Does Not Match
The PHP Error Log Location Set To: folder path does not match the Error Log Path Seen by Server: folder path.
Click Here to go to the PHP Error Log page and click the Htaccess Protected Secure PHP Error Log Read Me button for troubleshooting stepsPHP Error Log Location and ini_set PHP Error Log Location (Recommended) are the same.
I tried to follow some instructions on other Topics, but I didn’t get how to solve it …
Any suggestions?Many thanks
AITpro AdminKeymaster@ Luca – What do you see for this – “Error Log Path Seen by Server:”? Is it blank or is there a value?
LucaParticipantHello!
It is written:Error Log Path Seen by Server: php_errorlog
Thank You
AITpro AdminKeymaster@ Luca – Use 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. Then turn off the “PHP Error Log Path Does Not Match” alert by going to the BPS Pro > S-Monitor page > change this option setting > PHP Error Log: Check Folder Path Location Alert > to Turn Off Displayed Alerts.
abonne31Participant[Topic has been merged into this relevant Topic]
Hi
On every page there is a warning :
PHP Error Log Path Does Not Match
The PHP Error Log Location Set To: folder path does not match the Error Log Path Seen by Server: folder path.
Click Here to go to the PHP Error Log page and click the Htaccess Protected Secure PHP Error Log Read Me button for troubleshooting steps.On the “php error log” page after using the “test error log” button
File Open and Write test successful! Your PHP Error Log file is writable.
To Complete the PHP Error Log Test. Click the Refresh Status button below.After refreshing
File Open and Write test successful! Your PHP Error Log file is writable.
and the warning is still there…I have search the forum without solution.
So what’s up doc ?
Best regards
AITpro AdminKeymaster@ abonne31 – Use the Error Log Seen by Server value that is displayed to you. Your server’s php.ini file is configured to use the server’s default php error log file. Copy the Error Log Seen by Server value that is displayed to you into the PHP Error Log Location Set To text box and click the Set Error Log Location button.
TerryParticipant[Topic has been merged into this relevant Topic]
I keep getting the “PHP Error Log Path Does Not Match” error on a new site that I am setting up. I checked and it has the recommended settings in the ini_)options settings. https://www.screencast.com/t/YBmCL0mmE
Any suggestion on what might be preventing it. Other sites on my server are not showing this error.
AITpro AdminKeymaster@ Terry – Go to the PHP Error Log tab page. What do you see for “Error Log Path Seen by Server:”?
-
AuthorPosts
- You must be logged in to reply to this topic.