WordPress database error since upgrading to WordPress 3.5.2
-
Hello,
Since I upgraded to WP 3.5.2, I started getting a bunch of errors:
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 ” at line 7 for query
SELECT COUNT(comment_ID) FROM 514wpcomments WHERE comment_type = “” AND comment_approved=”1″ AND comment_parent=”0″ AND comment_post_ID= made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/graphene/404.php’), get_header, locate_template, load_template, require_once(‘/themes/graphene/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, wp_enqueue_scripts, do_action(‘wp_enqueue_scripts’), call_user_func_array, graphene_localize_scripts, graphene_get_comment_count
Has this already been reported? Is there a fix?
Many thanks and regards,
Phil
Admin
Try adding this code to the top of the
graphene_get_comment_count()function in the theme’sincludes/theme-comments.phpfile and see if the error is still showing up:if ( ! get_the_ID() ) return;Hello,
Yes, it removes the error.
Cheers,
Phil
Hello guys , please help me with this error 🙁 , a cant find graphene_get_comment_count() in /themes/graphene/includes/theme-comments.php
Only this 4 lines ..
if ( ! function_exists( 'graphene_get_comment_count' ) ) :
$result = graphene_get_comment_count( $type );
if ( ! function_exists( 'graphene_get_comment_count' ) ) :
function graphene_get_comment_count( $type = 'comments', $only_approved_comments = true, $top_level = false ){Where exactly i need to add this fix ?
Thanks.
Admin
Add it right after this line (should be around line 163):
function graphene_get_comment_count( $type = 'comments', $only_approved_comments = true, $top_level = false ){I started seeing this error also. It turns out that the requests are from an IP in the Netherlands that shows up in a ProjectHoneyPot.org exploit list. There is one of these errors noted for each request listed below in a partial entry from the Apache log (with the domain removed). I’ll add your fix to stop the errors but I thought you might want to know the cause, at least in my case.
=================================================================
[30-Jun-2013 16:16:35 UTC] 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 ” at line 7 for query
SELECT
COUNT(comment_ID)
FROM
wpww_comments
WHERE
comment_type = “” AND comment_approved=”1″ AND comment_parent=”0″ AND
comment_post_ID= made by require(‘wp-blog-header.php’), require_once(‘wp-includes/templ
ate-loader.php’), include(‘/themes/graphene/404.php’), get_header, locate_template, load_template, r
equire_once(‘/themes/graphene/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, wp_
enqueue_scripts, do_action(‘wp_enqueue_scripts’), call_user_func_array, graphene_localize_scripts, g
raphene_get_comment_count
================================================================
213.211.148.135 – – [30/Jun/2013:09:16:30 -0700] “POST example.org/wp-content/themes/graphene/third-party/uploadify/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:31 -0700] “POST example.org/wp-content/themes/graphene/lib/uploadify/custom.php HTTP/1.1” 404 15275 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:31 -0700] “POST example.org/wp-content/themes/graphene/lib/js/old/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:32 -0700] “POST example.org/wp-content/themes/graphene/uploadify/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:33 -0700] “POST example.org/wp-content/themes/graphene/uploader/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:33 -0700] “POST example.org/wp-content/themes/graphene/uploadify/upload.php HTTP/1.1” 404 15276 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:34 -0700] “POST example.org/wp-content/themes/graphene/uploadify/scripts/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:35 -0700] “POST example.org/wp-content/themes/graphene/upload.php HTTP/1.1” 404 15275 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
213.211.148.135 – – [30/Jun/2013:09:16:35 -0700] “POST example.org/wp-content/themes/graphene/uploadify.php HTTP/1.1” 404 15284 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23”
Admin
Looks to me like the origin of the bogus requests is checking if your site has been compromised, with bad intent. The theme definitely does not have anything to do with
uploadify, whatever that is.
Viewing 8 posts - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.
