Autoblog showing mysql errors

I just purchased Autoblog and am very concerned that the plugin is very unstable.

Checking my FTP logs, the plugin is throwing numerous mysql errors.

Please advise

  • Mark Wallace

    hello @semrocc

    Could you post the errors you are getting please?

    I am using the Auto blog too! I just figured out how to set up, and it is working fine. I have not received any errors, but did have trouble processing feeds at first. I have been following other Auto Blog threads, and compare your error messages with any threads i have saved to see if there is a quick fix!

    Thanks semrocc!
    Be Blessed!

  • semrocc

    Thanks, here's a sampling:

    Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/m/wpfiles/wp-includes/wp-db.php on line 885
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/pluggable.php on line 876
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 568
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 569
    
    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT * FROM  WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 0, 25 made by do_action('toplevel_page_autoblog'), call_user_func_array, autoblogpremium->handle_dash_page, do_action('autoblog_dashboard_left'), call_user_func_array, autoblogpremium->dashboard_report
    
    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT meta_id FROM  WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 25, 100 made by do_action('load-autoblog_page_autoblog_admin'), call_user_func_array, autoblogpremium->add_admin_header_autoblog_admin, autoblogpremium->update_admin_page, ab_process_feed, autoblogcron->process_the_feed, autoblogcron->record_msg, clear_autoblog_logs
    
    Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/pluggable.php on line 876
    
    Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 568
    
    Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 569
  • Mark Wallace

    A sample huh! lol

    1. What theme are you using, and are you using a child theme!

    2. could you post a snap shot of your auto blog feed settings, it may take two snap shots to get the whole page.

    3. Have you changed any files relating to your SLQ? a syntax error is usually just improper text format.

    4. the header error for me are usually conflicts, or setting up a child theme improperly!

    So get hose snap shots in and the few questions answered, and we can go from there!

    thanks!
    Be Blessed!

  • semrocc

    When activating the plugin:

    [01-Jan-2013 04:46:02] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT * FROM WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 0, 25 made by do_action('toplevel_page_autoblog':wink:, call_user_func_array, autoblogpremium->handle_dash_page, do_action('autoblog_dashboard_left':wink:, call_user_func_array, autoblogpremium->dashboard_report

    Screen shots of settings and errors below:

  • Mark Wallace

    oh u! lol

    Going to leave me in suspense? lol j/k

    Sleep well, i have a few hours of work to do before i crash out for day or two. lol

    Staff must reply to all threads, so there will probably be a Staffer replying before we speak again.

    So have a great New Year, and best wishes for all your projects. :slight_smile:

    But please do post back the results so we know this is resolved or needs further looking into!

  • semrocc

    Ok...I went ahead and made the changes as requested and unfortunately they made no difference.

    When acitvating the plugin:

    [01-Jan-2013 17:17:21] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT * FROM WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 0, 25 made by do_action('toplevel_page_autoblog'), call_user_func_array, autoblogpremium->handle_dash_page, do_action('autoblog_dashboard_left'), call_user_func_array, autoblogpremium->dashboard_report

    When processing the feed:

    [01-Jan-2013 17:24:00] PHP Warning:  mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/m/wpfiles/wp-includes/wp-db.php on line 885
    [01-Jan-2013 17:24:00] PHP Warning:  mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/m/wpfiles/wp-includes/wp-db.php on line 885
    [01-Jan-2013 17:24:00] PHP Warning:  mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/m/wpfiles/wp-includes/wp-db.php on line 885
    [01-Jan-2013 17:24:00] PHP Warning:  mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/m/wpfiles/wp-includes/wp-db.php on line 885
    [01-Jan-2013 17:24:00] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT meta_id FROM  WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 25, 100 made by do_action('load-autoblog_page_autoblog_admin'), call_user_func_array, autoblogpremium->add_admin_header_autoblog_admin, autoblogpremium->update_admin_page, ab_process_feed, autoblogcron->process_the_feed, autoblogcron->record_msg, clear_autoblog_logs
    [01-Jan-2013 17:24:00] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/pluggable.php on line 876
    [01-Jan-2013 17:24:00] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 568
    [01-Jan-2013 17:24:00] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/user/public_html/m/wpfiles/wp-includes/wp-db.php:885) in /home/user/public_html/m/wpfiles/wp-includes/option.php on line 569
    [01-Jan-2013 17:24:29] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT meta_id FROM  WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 25, 100 made by do_action('load-autoblog_page_autoblog_admin'), call_user_func_array, autoblogpremium->add_admin_header_autoblog_admin, autoblogpremium->update_admin_page, ab_process_feed, autoblogcron->process_the_feed, autoblogcron->record_msg, clear_autoblog_logs

    I should mention that the site is pulling and displaying the feeds properly as far as I can tell. My concern is all the backend errors that these plugins are giving.

  • semrocc

    Hi, I have made no changes at all to any files (stock, fresh install on both WP and Plugins).

    A couple of scenarios that seem to be consistent:

    1. When clicking on the Autoblog Menu Button (left side WP admin) throws the following error:

    [01-Jan-2013 20:17:43] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT * FROM WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 0, 25 made by do_action('toplevel_page_autoblog'), call_user_func_array, autoblogpremium->handle_dash_page, do_action('autoblog_dashboard_left'), call_user_func_array, autoblogpremium->dashboard_report

    2. When manually processing feeds, the following error shows:

    [01-Jan-2013 20:20:45] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT' at line 1 for query SELECT meta_id FROM WHERE site_id = 0 AND meta_key LIKE 'autoblog_log_%' ORDER BY meta_id DESC LIMIT 25, 100 made by do_action('load-autoblog_page_autoblog_admin'), call_user_func_array, autoblogpremium->add_admin_header_autoblog_admin, autoblogpremium->update_admin_page, ab_process_feeds, autoblogcron->process_feeds, autoblogcron->record_msg, clear_autoblog_logs

    I now have some test feeds set to process once an hour...I will see if I get the errors this way as well.

  • Tom Eagles

    @semrocc

    Just to confirm that you have set a start date on this feed? Please let me know if the plugin pulls the feed correctly and i will take a look further into the problem.

    The Header already sent message normally occurs when there is an empty line somewhere in the code normally before the opening <?php tag.

    Sometimes when wordpress saves a a setting etc it can cause this to happen. Could you check the files mentioned in lines 885, 876, 568 and 569 for a blank line please.

    Kindest Regards

    Tom

  • semrocc

    Just checked and I guess we're not quite out of the woodwork yet.

    After checking my FTP logs, I once again came across this error:

    [02-Jan-2013 22:31:28] PHP Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/path-to-wp/wp-includes/wp-db.php on line 885

    I can't say for sure, but it looks like the error occurred when processing the feed.

  • semrocc

    I did another test which produced errors:

    Step 1. Created a new feed
    Step 2. Tested the feed.
    Step 3. Processed feed manually

    The following errors were produced:

    Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/path-to-wp/wp-includes/wp-db.php on line 885
    
    Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/path-to-wp/wp-includes/wp-db.php on line 885
    
    Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/user/public_html/path-to-wp/wp-includes/wp-db.php on line 885
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/path-to-wp/wp-includes/wp-db.php:885) in /home/user/public_html/path-to-wp/wp-includes/pluggable.php on line 876
  • jasonjulien

    I'm posting here in hopes I'll reach Barry sooner than in my thread he hasn't been able to get to yet (https://premium.wpmudev.org/forums/topic/mysql_real_escape_string-error-may-be-timing-out-my-feed-processing?replies=3#post-334567)

    I've spent hours debugging the mysql_real_escape_string problem because I need to get rid of it for a project I'm working on. I found that when passing the author into wp_insert_post, the whole author object is getting passed in rather than the author ID.

    Fixing this is as easy as adding

    $author = $author->ID;

    right after the $author = get_user_by( 'login',$author);

    call in autoblogprocess.php.

    The error doesn't happen all the time because sometimes Autoblog is using a variable it's holding onto for the author (which has the ID), but when it uses get_user_by an object is returned.

  • semrocc

    Ok...I noticed more errors again. The plugin seems to be functioning without errors with feeds that have been set up.

    For testing purposes, I decided to clear all feeds and start from scratch. After deleting all feeds, I once again received more errors as follows:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/mystein1/public_html/m/wpfiles/wp-content/plugins/autoblog/autoblogincludes/classes/autoblogadmin.php on line 1604 and defined in /home/path-to/wp-includes/wp-db.php on line 990
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/mystein1/public_html/m/wpfiles/wp-content/plugins/autoblog/autoblogincludes/classes/autoblogadmin.php on line 1604 and defined in /home/path-to/wp-includes/wp-db.php on line 990

  • aecnu

    Greetings semrocc :slight_smile:

    We have not heard back from you as to the status of this issue and it appears and according to the system you have not updated to the latest version in which Barry says a fix will be included.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.