• Resolved amedic

    (@amedic)


    I’m currently testing locally (but same error is also on live site).

    It is a common form with Ajax and PHP. I have enabled error reporting in PHP:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

    All errors were fixed, but there is still 500 error that Ajax is catching.

    I have checked log on my WAMP server. There are no errors logged any more.
    Network tab in the browser is showing: admin-ajax.php 500 (Internal Server Error)

    If necessary I can post all my code.

    I’m really stuck for days on this because I cannot upgrade PHP version now.
    What can be causing this issue?
    Any help will be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Dion

    (@diondesigns)

    You should check the PHP and Apache error logs in Wampserver. The error will be listed in one of those logs.

    Make sure to check the Apache error log and not the Apache access log. They are not the same!

    Thread Starter amedic

    (@amedic)

    Nothing in the Apache error log also.

    Moderator bcworkz

    (@bcworkz)

    Try ini_set('log_errors', 1);
    Display and log are two different things ?? Error display with Ajax often disappears. You must rely upon logs.

    You can often zero into the cause by selectively placing exit(); calls at various places in your code. Just don’t leave things hanging like open files or something. If the Ajax request reaches the exit without error, the problem lies afterwards. If you still get an error, the problem is before.

    Thread Starter amedic

    (@amedic)

    xdebug has helped me to solve this issue.
    The problem was in google recaptcha function and eregi function (for email regex).
    After fixing the errors the problem was solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ajax 500 error after upgrading to php7’ is closed to new replies.