Home › Forums › BulletProof Security Pro › How To Troubleshoot PHP Errors, php errors in your php error log
Tagged: PHP Error Log, php errors
- This topic has 258 replies, 43 voices, and was last updated 1 year, 3 months ago by Iris.
-
AuthorPosts
-
AITpro AdminKeymaster
These were separate issues. The BPS Pro issues are fixed. The other problem is being caused by the WP-Client plugin. It appears that someone accidently changed the WP-Client plugin settings to a Members Only site type.
lad kiiParticipanti guess my next question is, how do you find someone who knows something about security plugins that can tell you WHAT TO DO once you get into phpadmin? (i’m supposing that’s the garage where all the repairs take place).
AITpro AdminKeymaster@ lad kii – PHP errors are usually caused by code in files, but some php errors are caused by database problems. Other php errors can be caused by host server problems.
lad kiiParticipantThe other problem is being caused by the WP-Client plugin. It appears that someone accidently changed the WP-Client plugin settings to a Members Only site type panoramacharter.ltd
IrisParticipantHi,
I have the following entry in my PHP Error Log. It occurs when I click the Reset Last Modified Time in DB button. The times in the DB and File don’t synchronise/match.
How can I fix this? Or is this something for my hosting provider?
Thank you for your time.
[21-May-2023 21:50:59 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 13 for query CREATE TABLE wp_bpspro_folder_lock ( id bigint(20) NOT NULL auto_increment, folder_name text NOT NULL, status varchar(60) NOT NULL default '', curr_perms varchar(4) NOT NULL default '', orig_perms varchar(4) NOT NULL default '', path text NOT NULL, last_mod varchar(10) NOT NULL default '', ulock_time varchar(10) NOT NULL default '', hlock_time datetime NOT NULL default '0000-00-00 00:00:00', UNIQUE KEY id (id) ) COLLATE made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, bulletproof_security_admin_init, dbDelta
AITpro AdminKeymaster@ Iris – The PHP error is for the BPS Pro Folder Lock feature. Turn the Folder Lock feature Off if it is turned On. If you are saying that the “Last Modified Time in DB” and “Last Modified Time in File” below never synchronize then that is a common ModSecurity problem. ModSecurity blocks internal and external forms, GET and POST requests, Source Code, etc. etc. etc. Your web host support may be able to create whitelist rules or maybe they can turn off ModSecurity. Most web hosts do not allow the website owner to have access to turn off ModSecurity, but they website owner can request that be done by the web host.
Last Modified Time in DB: May 21 2023 16:54:13
Last Modified Time in File: May 21 2023 16:54:13Note: If php errors are occurring repeatedly then it will appear the reset button is not working.
IrisParticipantThank you for your reply. The Folder Lock feature was Off.
Yes recently the “Last Modified Time in DB” and “Last Modified Time in File” times have not been synchronizing after clicking the reset button. I will contact my host support about it and ModSecurity.
IrisParticipantHi BPS Security Support,
Thank you for your reply. I am still having the above problem synchronising the “Last Modified Time In DB” and “LMT in File” when I click the “Reset the Last Modified Time in DB” button, example of the error message below. I have BPS Pro.
My hosting provider said they tested the BPS Security Plugin from my website and confirmed the issue still occurs “without hitting any ModSec rules related to this plugin.”
They thought possibly an issue with the code of the database according to the error message and not connected to the ModSecurity measures put in place on their servers.
Also they asked whether or not the BPS Security plugin uses any external servers for my website? If so they asked whether BPS would mind providing the IP address of that server so they could check their server logs again.
You noted last message that if the php error occurs repeatedly (it occurs whenever I click the reset button), it could be that the reset button is not working. If so how do I test that and/or fix?
Thank you for your time.
[25-May-2023 23:15:12 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 13 for query CREATE TABLE wp_bpspro_folder_lock ( id bigint(20) NOT NULL auto_increment, folder_name text NOT NULL, status varchar(60) NOT NULL default '', curr_perms varchar(4) NOT NULL default '', orig_perms varchar(4) NOT NULL default '', path text NOT NULL, last_mod varchar(10) NOT NULL default '', ulock_time varchar(10) NOT NULL default '', hlock_time datetime NOT NULL default '0000-00-00 00:00:00', UNIQUE KEY id (id) ) COLLATE made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, bulletproof_security_admin_init, dbDelta
AITpro AdminKeymaster@ Iris – Maybe it’s this problem > https://forum.ait-pro.com/forums/topic/setup-wizard-unable-to-install-bps-pro-db-tables/#post-41423
Could also be caused by an older version of MariaDB. Go to the BPS Pro Logs|Info menu > System Info page. What do you see for this > DB Version:
The current maintained versions are: 10.3, 10.4, 10.5, 10.6, 10.11 (maintained for 5 years), 10.8, 10.9, 10.10, 11.0 (maintained for one year), and the development version is 11.1.
Might still be ModSecurity though. My API server IP address is: 107.180.40.142, but this type of problem is internal to your server/host/website and is not related to anything external.
IrisParticipantHi BPS Security Support,
Thank you. My DB Version is <span class=”system-info-text”>10.5.19-MariaDB-cll-lve</span>. I don’t see this on the above list? Does it fall under the 10.5?
I went back to my Hosting Provider. They tested the above IP address and found no results from that. They have escalated my issue/ticket to senior admins for further investigation. I will let you know what transpires.
I also ran the BPS Pro Pre-Installation Wizard – all green. Then the Setup Wizard – one red Error: Unable to create DB Table wp_bpspro_folder_lock.
My ‘File Lock Override’ is OFF. Everything is OFF on my File/Folder Lock page and the Folder Lock is OFF. I note the message that this has been retired so I presume this error is not important?
I look forward to your comments, suggestions when convenient.
Thank you.
AITpro AdminKeymaster@ Iris – Try this > Go to the Folder Lock page > click the Rescan|Add Hosting Account Root Folders button. If that does not work then send a WordPress Administrator login to your site to: info@ait-pro.com.
IrisParticipantHi BPS Security Support,
Thank you again. Clicking the Rescan|Add Hosting Account Root Folders button did not work unfortunately.
However I noticed this: on the ini_set Options page on clicking the Save/Enable Options button, the save is fine and then on checking the PHP Error Log tab I see the Last Modified Times are synchronized for both the DB and the File. On Clicking Reload Display the times are become unsynchronized again and the red PHP Error message remains.
In addition I note other PHP entries today, below including the PHP error first reported above.
I following the link you posted above ..#post-41423 and checked my wp-config.php file finding the two constants you referred to there were present DB_CHARSET and DB_COLLATE.
I also noticed this message on the File Lock page: “Server API: Litespeed – Your host Server is using CGI. Use the CGI File Lock and Unlock options.’ The CGI Permissions & Status Table shows all are turned OFF.
And on the php.ini security status directives I note for variables_order EGPCS displayed, and a recommendation to remove the E. I don’t know if this is relevant to my issue here but how should I go about doing that?
Hoping this might shed some light before the admin step. My Hosting Provider report they conducted a thorough investigation and could not find any indications that the IP address above is blocked or is experiencing any issues their end.
Thank you again for your time.
[29-May-2023 07:00:39 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 13 for query CREATE TABLE wp_bpspro_folder_lock ( id bigint(20) NOT NULL auto_increment, folder_name text NOT NULL, status varchar(60) NOT NULL default '', curr_perms varchar(4) NOT NULL default '', orig_perms varchar(4) NOT NULL default '', path text NOT NULL, last_mod varchar(10) NOT NULL default '', ulock_time varchar(10) NOT NULL default '', hlock_time datetime NOT NULL default '0000-00-00 00:00:00', UNIQUE KEY id (id) ) COLLATE made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan, dbDelta [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROM
wp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROMwp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROMwp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROMwp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROMwp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SHOW FULL COLUMNS FROMwp_bpspro_folder_lock
made by include('/plugins/bulletproof-security/admin/lock/flock.php'), bpsPro_flock_folder_scan [29-May-2023 07:00:39 UTC] WordPress database error Table 'willshub_wp898.wp_bpspro_folder_lock' doesn't exist for query SELECT * FROM wp_bpspro_folder_lock WHERE folder_name != '%%' ORDER BY folder_name ASC made by include('/plugins/bulletproof-security/admin/lock/flock.php') [29-May-2023 07:01:15 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 13 for query CREATE TABLE wp_bpspro_folder_lock ( id bigint(20) NOT NULL auto_increment, folder_name text NOT NULL, status varchar(60) NOT NULL default '', curr_perms varchar(4) NOT NULL default '', orig_perms varchar(4) NOT NULL default '', path text NOT NULL, last_mod varchar(10) NOT NULL default '', ulock_time varchar(10) NOT NULL default '', hlock_time datetime NOT NULL default '0000-00-00 00:00:00', UNIQUE KEY id (id) ) COLLATE made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, bulletproof_security_admin_init, dbDeltaAITpro AdminKeymaster@ Iris – ah ok then the problem is not that the timestamp is not synching. The problem is that php errors are occurring continuously so it appears the timestamps are not synching. I know what the problem is now > you have a damaged/corrupt folder somewhere under your hosting account, which the Folder Lock scanner is unable to scan, which then prevents the Folder Lock DB table from being created. Damaged/corrupt folders typically can only be fixed using a root administrator account on the server, which only your web host support techs have. If you would like for me to find the damaged/corrupt folder then send me a web host control panel login to your hosting account.
Note: I will be adding a new option in BPS Pro 17.3 > Disable Folder Lock Scanner. This new option will prevent the Folder Lock Scanner from attempting to automatically scan website folders.
IrisParticipantHi BPS Support,
Thank you for your help. I communicated your comments to my web host support together with screenshots of the php error log as above.
I am not sure to what extent they investigated. They report there is no block for my ip on the server on which my site is hosted. Nor was there any malware/corrupt or damaged files following a virus scan. Yet the same error keeps going.
I am not sure what to do next before going back to them specifically on this. (It was with other issues at the time, now resolved.) I note the error message says there is an “error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ” at line 13 for query CREATE TABLE wp_bpspro_folder_lock …”.
I could ask them is it possible for them to amend that. If not is it detrimental to leave it until BPS adds its new disable option you mention, hopefully not too far off? (Meantime I keep deleting the log file.) I note the Setup Wizard in the DB Tables setup only flags an error to the folder lock: “Unable to create DB Table wp_bpspro_folder_lock”.
On BPS’ php.ini security status directives I see “EGPS” is shown for variables_order. There is a recommendation to remove the “E” (ENV). Does this affect the above syntax error? How should I go about removing the “E” or is that irrelevant here?
Thank you again for your time.
Kind regardsAITpro AdminKeymaster@ Iris – the problem is caused by a damaged folder. They would have to check the permissions of folders to figure that out. Typically the folder will have 0000 permissions instead of 0755 permissions. Anyway I will be releasing BPS Pro 17.3 sometime this weekend with the new option to disable Folder Lock scanning.
-
AuthorPosts
- You must be logged in to reply to this topic.