Not signed in (Sign In)


Register here to join the discussions.

    • CommentAuthortopazlabs
    • CommentTimeFeb 5th 2010
     
    I get this error whenever I try to submit a comment with Akismet enabled after it hangs for a while:

    "AJAX Error: There is something wrong with ../comments/add-comment.php. Please contact website administrator!"

    When I disable akismet and enable captcha, there is no such error and it seems to work fine.

    Please let me know what I can do to make it work with akismet. Thanks!
    • CommentAuthortopazlabs
    • CommentTimeFeb 5th 2010 edited
     
    It seems that the comment still gets through - it just displays the error message. But when I refresh the page, the comment is there. Still, would appreciate a solution to make it work more smoothly.

    Thanks,
    Eric
    • CommentAuthorAvram
    • CommentTimeFeb 5th 2010
     
    Staff
    Hello,

    Please try to disable ajax (enable debug mode) and let me know if you get any errors after that?
    • CommentAuthortopazlabs
    • CommentTimeFeb 5th 2010
     
    Thanks for the quick response!

    I enabled debug mode and it loads for a long time (although without the loading message) and then times out. When refreshing page, comment does show up, just like before.

    Thanks again for the help.
    • CommentAuthorAvram
    • CommentTimeFeb 5th 2010
     
    Staff
    At first I thought it was our AJAX call timeout which shows same message if there is no response from AJAX call in 30 seconds, but if your page times out when using script without AJAX, then the problem is not in our script. Do you have personal or commercial Akismet API key? Personal keys have lower priority and with personal keys it could take more time for Akismet server to reply to your (comment validation) request. Most web servers are set to terminate page execution (time out) if it is taking more than 30-60 seconds. You (or your web hosting provider) should first increase page load time limit on your web server until you get response from Akismet (no error message, no time out), but although this will make it work, it could still be non-user-friendly if it takes e.g. 60 seconds for Akismet server to reply, and there isn't anything we can do about that.

    After you increase server max execution time, it will be a breeze to increase this limit within our script (from default 30 seconds to whatever value is needed).

    Useful links:
    http://php.net/manual/en/info.configuration.php#ini.max-execution-time
    http://php.net/manual/en/function.set-time-limit.php
    • CommentAuthortopazlabs
    • CommentTimeFeb 5th 2010
     
    Thanks Avram. Your help is much appreciated. I guess if it's on akismet's end, I'll just have to use the captcha instead.