How To Troubleshoot PHP Errors, php errors in your php error log

Home Forums BulletProof Security Pro How To Troubleshoot PHP Errors, php errors in your php error log

This topic contains 226 replies, has 38 voices, and was last updated by  AITpro Admin 1 year, 2 months ago.

Viewing 15 posts - 16 through 30 (of 227 total)
  • Author
    Posts
  • #7949

    Lys
    Participant

    Forgot to add: ARQ Cron is currently turned off.

    #7950

    AITpro Admin
    Keymaster

    The general idea and the important things are these:

    “Repetitive or continuous php errors usually means that there is a problem with some coding in a plugin or theme.”

    “The important thing to note with php errors is that intermittent php errors are considered normal and repetitive or continuous php errors are not normal.”

    What is meant by repetitive is a php error that is occurring over and over again every few seconds.  It is completely normal to see random intermittent php errors.  These errors mean that some database query or something else did not complete successfully and there are literally 100’s of different reasons why that could be.  Since you are not seeing repetitive errors then you can consider these normal random/intermittent errors.  Also when hackers, spammers and scrapers attempt exploits on your site php errors will occur.  This is also normal.

    #7960

    Lys
    Participant

    Thanks for the info. These errors are definitely not occurring every few seconds. Instead they’re once a day (or twice) the past few days. Haven’t had any php errors in awhile so wasn’t sure. Thx again for outlining.

    #7961

    AITpro Admin
    Keymaster

    And there is a new factor to consider these days – the ongoing Brute Force Login attacks cause all sorts of problems and we have seen an increase in random php errors due to the Host Server being overloaded at times.  The volume of these Brute Force Login attacks is very high.  We are blocking over 280,000 Brute Force Login attacks per month with no sign of them slowing down.

    #8010

    Lys
    Participant

    Hi Again AITPro & thx ahead for your wisdom:

    Noticing that we are getting the same PHP error each time we make (immediately following) a new post on WordPress. Essentially it’s the same error log that looks like this:

    [29-Jul-2013 16:09:59 UTC] WordPress database error MySQL server has gone away for query
    SELECT option_value FROM wpnew_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock
    [29-Jul-2013 18:02:49 UTC] WordPress database error MySQL server has gone away for query SELECT option_value FROM wpnew_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock

    Should we have any concern about this?

    Thx again

    #8012

    AITpro Admin
    Keymaster

    @ Lys – your topic has been merged into this main PHP error troubleshooting topic.  WordPress database php errors usually mean you Server hiccuped temporarily and the connection to your MySQL temporarily failed.  If the error is intermittent then there is nothing to worry about – this is considered normal.  If the php errors are constant then it could be any one of 1,000 different things.  There really is not any way to troubleshoot these particular generic WordPress database php errors that I am aware of.  If the errors are constant then it could have something to do with Server memory, Server hard drive, connectivity issues with the host and another 997 other possible causes that I can think of off the top of my head.  If you are lucky then there are other php errors around this generic error that will give you some clues, but once again only worry about these generic errors if they are happening constantly and do nothing if they are happening intermittenly.

    We are seeing a significant increase in these WordPress generic database errors on our site due to the ongoing Brute Force Login attacks.

    #8016

    AITpro Admin
    Keymaster

    There is one clue in the error that you can track down.  This option wpnew_options under the wp_options database table is an option for one of your installed plugins or your theme.  You can access your database with phpMyAdmin and find out what plugin or theme this option is for and then either try and troubleshoot that plugin or theme or contact the plugin author or theme author about this error.

    Or you can also search your Database using the BPS Pro Tools DB String Finder tool using:  wpnew_options as the search string to figure out which plugin or theme this option is for.

    #8059

    Dep5
    Participant

    Hi, I’m running BPS v6 (yes 6) and am getting a reoccurring error:

    [30-Jul-2013 15:09:44 UTC] PHP Fatal error:  Call to undefined function wp_get_current_user() in /nfs/c10/h01/mnt/142223/domains/xxxxx.com/html/wp-includes/capabilities.php on line 1281

    I don’t know if this issues has only been identified by BPS or is a result of the installation. Online research indicates that it may be related to a plug-in call function. However, the only recently installed one is BPS.

    Thanks for looking,

    Mark

    #8061

    AITpro Admin
    Keymaster

    Your post has been merged into this relevant topic.

    The php error does not tell you specific clues as to which plugin or theme this may be that is having the coding issue/problem.  Try deactivating plugins one by one until you find out which plugin it may be.  You can use the BPS Pro Pro Tools String Finder tool to search for this function to narrow down the plugins that are using this function in their code.

    Search String:  wp_get_current_user

    Search Path:  /path/to/your/plugins/folder

    The results will show you all of the plugins that are using this function in their coding.  BPS Pro uses this function so if you have an older version of BPS Pro installed then download the latest version from the Secure Download Area.  I believe we did have a bug not too long ago regarding this function that has been fixed in the most current version of BPS Pro in the Secure Download Area.  When installing the BPS Pro zip file – use the BPS Pro built-in Upload Zip installer – DO NOT use the WordPress Upload Zip installer.

    #8069

    Dep5
    Participant

    The pro tools are awesome. I hadn’t really looked at them before.

    The string search completed with no finds and a reinstall of pre-6 did not correct the issue. I’ll continue a step by step track-down though. Thanks for the feedback.

    Mark

    #8070

    AITpro Admin
    Keymaster

    Yep, Pro Tools is the “tool” shed that no one ever looks in.  Are you searching the right website?  The php error could be for another website depending on how you have your php error file setup.  Some folks want to log php errors for all sites in one php error log and other folks usually have a separate php error log for each website.

    And I guess we are not using that function in BPS Pro anywhere.  I just did a search in the plugins folder on a XAMPP site and the function does not exist in BPS Pro.  Must be thinking of another WordPress function.  😉

    • C:\\xampp2\\htdocs7\\aitpro/wp-content/plugins/cforms/cforms.php, line 225
      if ( function_exists(‘wp_get_current_user‘) )
    • C:\\xampp2\\htdocs7\\aitpro/wp-content/plugins/cforms/cforms.php, line 226
      $user = wp_get_current_user();
    • C:\\xampp2\\htdocs7\\aitpro/wp-content/plugins/cforms/lib_ajax.php, line 83
      if ( function_exists(‘wp_get_current_user‘) )
    • C:\\xampp2\\htdocs7\\aitpro/wp-content/plugins/cforms/lib_ajax.php, line 84
      $user = wp_get_current_user();
    • C:\\xampp2\\htdocs7\\aitpro/wp-content/plugins/cforms/lib_aux.php, line 427
      $CurrUser = wp_get_current_user();

    You can also search other folders like your /themes folder.  It is possible that your theme is using this function.

    The error could be very tricky to track down because if any of these similar/related/dependent functions/variables/globals in the link below are used then this php error will be generated because the parent function fails/Fatal Error based on the “other” function that is calling it.

    http://codex.wordpress.org/Function_Reference/wp_get_current_user

    #8233

    Andre
    Participant

    Hi,

    I find some php errors in my multisite also when I install a plugin. Are there more exclusions to make, then in a normal installation (arq excludes plugin theme etc.) ?

    This is the log:

    [03-Aug-2013 19:03:08 UTC] PHP Warning: copy(/var/www/virtual/mydomain.com/htdocs/wp-blog-header.php): failed to open stream: Permission denied in /var/www/virtual/mydomain.com/htdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 200
    [03-Aug-2013 19:03:08 UTC] PHP Warning: copy(/var/www/virtual/mydomain.com/htdocs/index.php): failed to open stream: Permission denied in /var/www/virtual/mydomain.com/htdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 200
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_users' already exists für Abfrage CREATE TABLE wp_users (
    ID bigint(20) unsigned NOT NULL auto_increment,
    user_login varchar(60) NOT NULL default '',
    user_pass varchar(64) NOT NULL default '',
    user_nicename varchar(50) NOT NULL default '',
    user_email varchar(100) NOT NULL default '',
    user_url varchar(100) NOT NULL default '',
    user_registered datetime NOT NULL default '0000-00-00 00:00:00',
    user_activation_key varchar(60) NOT NULL default '',
    user_status int(11) NOT NULL default '0',
    display_name varchar(250) NOT NULL default '',
    spam tinyint(2) NOT NULL default '0',
    deleted tinyint(2) NOT NULL default '0',
    PRIMARY KEY (ID),
    KEY user_login_key (user_login),
    KEY user_nicename (user_nicename)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_usermeta' already exists für Abfrage
    CREATE TABLE wp_usermeta (
    umeta_id bigint(20) unsigned NOT NULL auto_increment,
    user_id bigint(20) unsigned NOT NULL default '0',
    meta_key varchar(255) default NULL,
    meta_value longtext,
    PRIMARY KEY (umeta_id),
    KEY user_id (user_id),
    KEY meta_key (meta_key)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_blogs' already exists für Abfrage
    CREATE TABLE wp_blogs (
    blog_id bigint(20) NOT NULL auto_increment,
    site_id bigint(20) NOT NULL default '0',
    domain varchar(200) NOT NULL default '',
    path varchar(100) NOT NULL default '',
    registered datetime NOT NULL default '0000-00-00 00:00:00',
    last_updated datetime NOT NULL default '0000-00-00 00:00:00',
    public tinyint(2) NOT NULL default '1',
    archived enum('0','1') NOT NULL default '0',
    mature tinyint(2) NOT NULL default '0',
    spam tinyint(2) NOT NULL default '0',
    deleted tinyint(2) NOT NULL default '0',
    lang_id int(11) NOT NULL default '0',
    PRIMARY KEY (blog_id),
    KEY domain (domain(50),path(5)),
    KEY lang_id (lang_id)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_blog_versions' already exists für Abfrage
    CREATE TABLE wp_blog_versions (
    blog_id bigint(20) NOT NULL default '0',
    db_version varchar(20) NOT NULL default '',
    last_updated datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY (blog_id),
    KEY db_version (db_version)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_registration_log' already exists für Abfrage
    CREATE TABLE wp_registration_log (
    ID bigint(20) NOT NULL auto_increment,
    email varchar(255) NOT NULL default '',
    IP varchar(30) NOT NULL default '',
    blog_id bigint(20) NOT NULL default '0',
    date_registered datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY (ID),
    KEY IP (IP)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_site' already exists für Abfrage
    CREATE TABLE wp_site (
    id bigint(20) NOT NULL auto_increment,
    domain varchar(200) NOT NULL default '',
    path varchar(100) NOT NULL default '',
    PRIMARY KEY (id),
    KEY domain (domain,path)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_sitemeta' already exists für Abfrage
    CREATE TABLE wp_sitemeta (
    meta_id bigint(20) NOT NULL auto_increment,
    site_id bigint(20) NOT NULL default '0',
    meta_key varchar(255) default NULL,
    meta_value longtext,
    PRIMARY KEY (meta_id),
    KEY meta_key (meta_key),
    KEY site_id (site_id)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [03-Aug-2013 19:03:56 UTC] WordPress-Datenbank-Fehler Table 'wp_signups' already exists für Abfrage
    CREATE TABLE wp_signups (
    domain varchar(200) NOT NULL default '',
    path varchar(100) NOT NULL default '',
    title longtext NOT NULL,
    user_login varchar(60) NOT NULL default '',
    user_email varchar(100) NOT NULL default '',
    registered datetime NOT NULL default '0000-00-00 00:00:00',
    activated datetime NOT NULL default '0000-00-00 00:00:00',
    active tinyint(1) NOT NULL default '0',
    activation_key varchar(50) NOT NULL default '',
    meta longtext,
    KEY activation_key (activation_key),
    KEY domain (domain)
    ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci von wp_upgrade, make_db_current_silent, dbDelta
    [05-Aug-2013 21:01:29 UTC] WordPress-Datenbank-Fehler Unknown column 'language' in 'field list' für Abfrage SELECT language FROM wp_5_wp4fb_general von do_action('wp4fb_page_wp4fb_admin'), call_user_func_array, wp4fb_admin, include('/plugins/wp4fb/settings/wp4fb_admin.php')
    #8236

    AITpro Admin
    Keymaster

    PHP Errors and the PHP Error log are an on/off or level of error logging thing.  In P-Security >>> ini_set Options you can set the level of php errors that you want to log or if you do not want to log php errors you can turn off php error logging.

    You can disregard the first 2 errors:  http://forum.ait-pro.com/forums/topic/error-in-php-after-wordpress-3-6-upgrade/

    The other php errors are WordPress Database errors, which are usually difficult to troubleshoot.  If this is only occurring when you install plugins then I would just ignore them.  Read the top of this Forum Topic to see what matters and what does not matter regarding php errors.

    #8250

    Andre
    Participant

    Hi, thanks.

    It happened just on installation of a plugin.

    #8350

    Lys
    Participant

    Hi & thanks ahead for your assist –

    I’ve been having some timeout issues each time I put a new post on. The error messages appear a few seconds following each posting and look like this:

    [09-Aug-2013 02:52:26 UTC] WordPress database error MySQL server has gone away for query SELECT option_value FROM wpnew_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock
    [09-Aug-2013 12:48:11 UTC] WordPress database error MySQL server has gone away for query SELECT option_value FROM wpnew_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock

    Have tried to work with my server host (on a shared server currently), but no fix offered. In PHP Variables manager I’m just about to add more seconds to the mysql.connect_timeout. Right now it’s set for 30. Want to put up to 40 to see if this will solve the problem.

    Here’s my question: Do I need to do anything to BPSpro settings before I make this change in the PHP settings?Thanks for your ideas.

Viewing 15 posts - 16 through 30 (of 227 total)

You must be logged in to reply to this topic.