WordPress.org

Ready to get started?Download WordPress

Forums

Akismet no longer functioning (31 posts)

  1. Parafly9
    Member
    Posted 3 years ago #

    As far as I know nothing chnaged in the server configuration, but I get this error:

    The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration.

    I have Akismet on a few other blogs and those are working, any idea what "server configuration" I need to check?

    I found something about fopen and I asked my host, this was their response:

    can see that "fopen" is enabled in the server. Please see the snippet below.

    ================
    [root@www01 ~]# php -i | grep "fopen"
    allow_url_fopen => On => On
    ================

    Also I can see that port 80 is open in the server.

    ================
    nmap -p80 67.228.3.58

    Starting Nmap 4.76 ( http://nmap.org ) at 2011-02-11 00:17 IST
    Interesting ports on 67.228.3.58-static.reverse.softlayer.com (67.228.3.58):
    PORT STATE SERVICE
    80/tcp open http
    ================

    The site is http://www.shortsaleartisan.com/blog

  2. Joseph Scott
    Member
    Posted 3 years ago #

    I was going to suggest you drop a note at akismet.com/contact/ but I see you already did that :-)

  3. arielacosta
    Member
    Posted 3 years ago #

    I am having the same problem

  4. arielacosta
    Member
    Posted 3 years ago #

    I was using the last version 2.5.3 and had the same problem on one site, but on other sites on the same server works fine, so started trying older versions of the plugin:
    2.3 works
    2.4 works
    2.5.2 works partially I get this message as when I used version 2.5.3

    The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration.

    But the server status shows for the 4 ip that are accessible, if i Install version 2.5.3 I get the message and the 4 ip are not reachable.

  5. arielacosta
    Member
    Posted 3 years ago #

    Finally I tested 2.5.1 and 2.5.0 without success, the version that worked is 2.4
    I will like to use the latest version, but it is givin me problems

  6. Parafly9
    Member
    Posted 3 years ago #

    Hi Joseph,

    Yes I think I was communicating with you. My host is convinced it isn't them, but I"m not really buying it. I have some other issues too - for example when browsing plugins in WordPress I get connection errors. I'm convinced they are somehow related.

    I want to try out that plugin that you sent me per:

    We have a plugin that will log some of the details about HTTP requests that your WordPress install makes - http://plugins.svn.wordpress.org/akismet/debug/wp-http-error-log.php - you can give that a try and see if it provides any helpful info. Specifically we'd want to look for which transport it uses (which PHP functions it makes use of to send the HTTP requests) and the exact URL that it is requesting to make sure it is going to the right place.

    But I must be crazy. The plugin is just code. Normally when I install plugins they come as ZIPs and I extract to the plugins folder and then install through the wordpress admin panel. I'm going to see if i can find the actual folders now ... thanks so far. I'm not having any luck with prior versions of Akismet either.

  7. Joseph Scott
    Member
    Posted 3 years ago #

    @arielacosta -

    Starting with 2.5 there were several changes made to the plugin code, one of which was a change to use the WordPress HTTP API for HTTP requests. Given what you describe I think that is where I'd look first.

    @Parafly9 -

    To install the debug plugin you'll need to create a folder, something like wp-content/plugins/http-debug/, on your WordPress install and then upload the code to that directory. From there you just need to activate it in wp-admin.

  8. Parafly9
    Member
    Posted 3 years ago #

    @Joseph do I need to name the file something specific?

    I got this error when attempting to activate it:

    Fatal error: Cannot use object of type WP_Error as array in /home/shortsal/public_html/blog/wp-content/plugins/error_log/akismet_test.php on line 14

    I just named the file akismet_test.php , dunno if that is OK or not.

  9. arielacosta
    Member
    Posted 3 years ago #

    @Joseph I installed the plugin for debug, but i get the following logs, it seems it is not working:

    [16-Feb-2011 13:08:33] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/website/public_html/wp-content/plugins/http-debug/index.php:1) in /home/website/public_html/wp-includes/pluggable.php on line 890
    [16-Feb-2011 13:08:36] 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 1 de la base de datos de WordPress para la consulta SELECT ID, post_title, post_date, comment_count, COUNT(wp_comments.comment_post_ID) AS 'popular' FROM wp_posts, wp_comments WHERE comment_approved = '1' AND wp_posts.ID=wp_comments.comment_post_ID AND post_status = 'publish' AND post_date < '2011-02-16 19:08:36' AND comment_status = 'open' GROUP BY wp_comments.comment_post_ID ORDER BY popular DESC LIMIT  realizada por require, require_once, include, require, include

    I don't know what to do now.
    thank you for your help

  10. Joseph Scott
    Member
    Posted 3 years ago #

    The debug plugin doesn't have any SQL queries in it, so I suspect that error is coming from something else.

  11. arielacosta
    Member
    Posted 3 years ago #

    @Joseph and about the first PHP Warning: Cannot modify header information ...

    I thought the sql error was related to this plugin, but the first line I still think it is something of this debug plugin.

  12. Joseph Scott
    Member
    Posted 3 years ago #

    That headers error indicates that some output has happened, when it shouldn't have. This can be something as simple a stray newline character outside of the PHP code.

  13. arielacosta
    Member
    Posted 3 years ago #

    @Joseph I did fix this problem "PHP Warning: Cannot modify header information ..."

    But I can't see any log related to akismet

    any thing i can do?

  14. Joseph Scott
    Member
    Posted 3 years ago #

    The debug should be showing you a message inside wp-admin indicating where the log file is.

    See the Logging HTTP request messages to <code>%s</code> line in the debug plugin.

  15. Parafly9
    Member
    Posted 3 years ago #

    I'm still struggling with this. I get this error when attempting to install the error log:

    Fatal error: Cannot use object of type WP_Error as array in /home/shortsal/public_html/blog/wp-content/plugins/http-debug/akismet_test.php on line 14

  16. Parafly9
    Member
    Posted 3 years ago #

    Although it DOES say at the top of the page:

    Logging HTTP request messages to error_log

    but I can't find error_log anywhere

  17. Parafly9
    Member
    Posted 3 years ago #

    Here is line 14 btw:

    `Logging HTTP request messages to error_log

  18. Parafly9
    Member
    Posted 3 years ago #

    Sorry bad copy, it was this:

    error_log( "$transport: {$response['response']['code']} {$response['response']['message']}" );

  19. Parafly9
    Member
    Posted 3 years ago #

    Nevermind I found the error_log it was in the root /blog directory... here are some of the most current contents:

    [03-Mar-2011 04:23:24] GET http://api.wordpress.org/core/version-check/1.5/?version=3.0.5&php=5.2.9&locale=en_US&mysql=5.0.91&local_package=&blogs=1&users=3&multisite_enabled=0 HTTP/1.0
    [03-Mar-2011 04:23:24] 200 OK
    [03-Mar-2011 04:23:25] WP_Http_Curl: 200 OK
    [03-Mar-2011 04:23:25] 	server: nginx
    [03-Mar-2011 04:23:25] 	date: Thu, 03 Mar 2011 10:23:25 GMT
    [03-Mar-2011 04:23:25] 	content-type: text/plain; charset=utf-8
    [03-Mar-2011 04:23:25] 	connection: close
    [03-Mar-2011 04:23:25] 	content-length: 842
    [03-Mar-2011 04:23:25] Response body: a:3:{s:25:"add-to-any/add-to-any.php";O:8:"stdClass":5:{s:2:"id";s:3:"429";s:4:"slug";s:10:"add-to-any";s:11:"new_version";s:8:".9.9.7.7";s:3:"url";s:47:"http://wordpress.org/extend/plugins/add-to-any/";s:7:"package";s:62:"http://downloads.wordpress.org/plugin/add-to-any.0.9.9.7.7.zip";}s:23:"tweetmeme/tweetmeme.php";O:8:"stdClass":5:{s:2:"id";s:4:"6808";s:4:"slug";s:9:"tweetmeme";s:11:"new_version";s:3:"2.3";s:3:"url";s:46:"http://wordpress.org/extend/plugins/tweetmeme/";s:7:"package";s:55:"http://downloads.wordpress.org/plugin/tweetmeme.2.3.zip";}s:31:"wp-to-twitter/wp-to-twitter.php";O:8:"stdClass":5:{s:2:"id";s:4:"5140";s:4:"slug";s:13:"wp-to-twitter";s:11:"new_version";s:5:"2.2.7";s:3:"url";s:50:"http://wordpress.org/extend/plugins/wp-to-twitter/";s:7:"package";s:55:"http://downloads.wordpress.org/plugin/wp-to-twitter.zip";}}
    [03-Mar-2011 04:23:25] POST http://api.wordpress.org/plugins/update-check/1.0/ HTTP/1.0
    [03-Mar-2011 04:23:25] 200 OK
    [03-Mar-2011 04:23:25] WP_Http_Curl: 200 OK
    [03-Mar-2011 04:23:25] 	server: nginx
    [03-Mar-2011 04:23:25] 	date: Thu, 03 Mar 2011 10:23:25 GMT
    [03-Mar-2011 04:23:25] 	content-type: text/plain; charset=utf-8
    [03-Mar-2011 04:23:25] 	connection: close
    [03-Mar-2011 04:23:25] 	content-length: 6
    [03-Mar-2011 04:23:25] Response body: a:0:{}
    [03-Mar-2011 04:23:25] POST http://api.wordpress.org/themes/update-check/1.0/ HTTP/1.0
    [03-Mar-2011 04:23:25] 200 OK
    [03-Mar-2011 04:24:55] WP_Http_Curl:
    [03-Mar-2011 04:24:55] Response body:
    [03-Mar-2011 04:24:55] POST http://www.shortsaleartisan.com/blog/wp-cron.php?doing_wp_cron HTTP/1.0
    [03-Mar-2011 04:24:55]
    [03-Mar-2011 05:11:27] PHP Fatal error:  Cannot use object of type WP_Error as array in /home/shortsal/public_html/blog/wp-content/plugins/error_log/akismet_test.php on line 14
    [03-Mar-2011 05:25:19] WP_Http_Curl:
    [03-Mar-2011 05:25:19] Response body:
    [03-Mar-2011 05:25:19] POST http://www.shortsaleartisan.com/blog/wp-cron.php?doing_wp_cron HTTP/1.0
    [03-Mar-2011 05:25:19]
    [03-Mar-2011 06:25:45] WP_Http_Curl:
    [03-Mar-2011 06:25:45] Response body:
    [03-Mar-2011 06:25:45] POST http://www.shortsaleartisan.com/blog/wp-cron.php?doing_wp_cron HTTP/1.0
    [03-Mar-2011 06:25:45]
    [03-Mar-2011 07:33:41] WP_Http_Curl:
    [03-Mar-2011 07:33:41] Response body:
    [03-Mar-2011 07:33:41] POST http://www.shortsaleartisan.com/blog/wp-cron.php?doing_wp_cron HTTP/1.0
    [03-Mar-2011 07:33:41]

    There's a lot of stuff there..... it goes for > 3000 lines.

  20. Joseph Scott
    Member
    Posted 3 years ago #

    Do you have any log entries for akismet.com?

  21. Parafly9
    Member
    Posted 3 years ago #

    Hmm I found this:
    [08-Dec-2010 14:35:51] PHP Warning: Missing argument 1 for akismet_cron_recheck() in /home/shortsal/public_html/blog/wp-content/plugins/akismet/akismet.php on line 422

    and this:
    [16-Feb-2011 12:06:51] PHP Fatal error: Cannot use object of type WP_Error as array in /home/shortsal/public_html/blog/wp-content/plugins/error_log/akismet_test.php on line 14

    Nothing for akismet.com specifically; though. Is this the correct error log to be reviewing, or should there be one somewhere else?

    Thanks so much for the help Joseph, I'm really scratching my head here and am nearing my limits of technical knowledge :)

  22. Joseph Scott
    Member
    Posted 3 years ago #

    That error from 2010 has been fixed in more recent versions of the plugin.

    Can you adjust line 14 to be:

    error_log( print_r( $resposne, TRUE );

    That will give us the details on $response no matter what data it contains.

  23. Parafly9
    Member
    Posted 3 years ago #

    I changed to this:

    error_log(print_r($response, TRUE)); //( "$transport: {$response['response']['code']} {$response['response']['message']}" );

    (note commenting out what it said before)

    And now I'm getting this error:
    Fatal error: Cannot use object of type WP_Error as array in /home/shortsal/public_html/blog/wp-content/plugins/http-debug/akismet_test.php on line 15

    Line 15:
    foreach ( $response['headers'] as $header => $value )

  24. Joseph Scott
    Member
    Posted 3 years ago #

    Ok, time for a direct, brute force approach. Lets just replace the wp_http_request_log function:

    function wp_http_request_log( $response, $type, $transport=null ) {
        error_log( "transport: {$transport}" );
        error_log( print_r( $type, TRUE ) );
        error_log( print_r( $response, TRUE ) );
    }

    This isn't as elegant, but it shouldn't have any problems logging data.

  25. Parafly9
    Member
    Posted 3 years ago #

    Well I updated the file, went to my comments and tried to recheck my spam queue. I get timed out after a while. I went and looked at the error log and didn't see anything of note, then again i'm not 100% sure what I'm looking at.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  26. Joseph Scott
    Member
    Posted 3 years ago #

    "name lookup timed out" is interesting. It isn't for an akismet.com request, but it could be an indication that your DNS servers aren't doing their job. That could impact other things, like requests to akismet.com.

  27. Parafly9
    Member
    Posted 3 years ago #

    I'm going to contact my domain registrar... see if they can figure something out. I did notice earlier I'm having timeout issues on other things besides just Akismet

  28. arielacosta
    Member
    Posted 3 years ago #

    Hi, I followed the instructions on modifying the wp_http_request_log function and also fixed a sql query that was wrong and preventing this log to work.
    I get http logs when posts are submited to google, bing, ask but nothing when I try to check the askimet servers. With this last modification on wp_http_request_log function I started getting something but it doesnt help:

    04-Mar-2011 14:47:59] transport:
    [04-Mar-2011 14:47:59] transports_list
    [04-Mar-2011 14:47:59]
    [04-Mar-2011 14:47:59] transport:
    [04-Mar-2011 14:47:59] transports_list
    [04-Mar-2011 14:47:59]
    [04-Mar-2011 14:47:59] transport:
    [04-Mar-2011 14:47:59] transports_list
    [04-Mar-2011 14:47:59]
    [04-Mar-2011 14:47:59] transport:
    [04-Mar-2011 14:47:59] transports_list
    [04-Mar-2011 14:47:59]
    [04-Mar-2011 14:47:59] transport:
    [04-Mar-2011 14:47:59] transports_list
    [04-Mar-2011 14:47:59]

    the function that I am usign now is:

    function wp_http_request_log( $response, $type, $transport=null ) {
        error_log( "transport: {$transport}" );
        error_log( print_r( $type, TRUE ) );
        error_log( print_r( $response, TRUE ) );
    }
  29. Joseph Scott
    Member
    Posted 3 years ago #

    Not having a transport selected would be a problem, but also extremely odd. It looks for several functions to see if they are available for use, going all the way down to fsockopen.

    The Akismet request is regular HTTP, so it shouldn't be any different than any other other requests your WP install might make.

    If you for the plugin (in akismet.php) to use fsockopen instead of the WP HTTP API does it work?

  30. arielacosta
    Member
    Posted 3 years ago #

    @joseph I forced akismet.php to use fsockopen changing the name of the wp http on line 134 - 135 and named it wp_remote_post2

    // use the WP HTTP class if it is available
    	if ( function_exists( 'wp_remote_post2' ) ) {

    When akismet started using fsockopen it worked. What is strange is that in this same server I have many others sites with wordpress and dont have this problem.

    Where can I look to find why wp_remote_post doesnt work?

    thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags