troubleshooting 500 internal server error in wp-admin/admin-ajax.php

I have a wordpress plugin that has been working for months without any problems, suddenly stop working. There have been no plugins updated and wp has not been updated since it was last working (yesterday).

When I open the chrome browser's javascript console, I find this:

http://www.mysite.com/wp-admin/admin-ajax.php 500 (Internal Server Error)      jquery.js?ver=1.11.1:1

I looked in my httpd/error_log and don't find any errors there.

No php errors are showing.

Any suggestions on how to troubleshoot this?
St_Aug_Beach_BumAsked:
Who is Participating?
 
Jason C. LevineConnect With a Mentor No oneCommented:
Conflict: maybe...but that should have been apparent from day one.  If nothing changed, why does it die now?

Sorry, that should have read: /var/log/httpd/access_log

Is there an error_log in there?

Also, go into wp-config.php and turn Debug Mode on...
0
 
hulseboschConnect With a Mentor System administratorCommented:
Take a look at the overall server logs (i.e apache.)
It isnt said that this is a php error.
the http request to the server produced a server error, which is why you're getting a 500 error.
0
 
St_Aug_Beach_BumAuthor Commented:
I'm not getting any errors in /var/log/httpd  is that the one you mean? (sorry, don't have much experience with these logs)
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
St_Aug_Beach_BumAuthor Commented:
Sorry, that should have read: /var/log/httpd/access_log
0
 
St_Aug_Beach_BumAuthor Commented:
Would the ' jquery.js?ver=1.11.1:1' suggest a jquery version conflict?
0
 
hulseboschConnect With a Mentor System administratorCommented:
Standard log locations :

•RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log
•Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log
•FreeBSD Apache error log file location - /var/log/httpd-error.log

Nothing has changed, also on your server side?
0
 
gheistConnect With a Mentor Commented:
Check timestamps. Maybe error was yesterday.
0
 
St_Aug_Beach_BumAuthor Commented:
Thank you all for your help on this.

Still trying to diagnose the problem - but at least I'm now doing it from home, not from the inlaws house with family all around!

Ok, I'm not getting any errors in /var/log/httpd/error_log  nor in the wordpress debug log after enabling it in wp-config.

I've also learned the 501 error involving admin-ajax is affecting other scripts as well. I'm using wp 4.0 and can't access images or upload images through the media manager (I get an 'HTTP error.' from wordpress when I attempt to upload an image).

Again, no new plugins or changes were added before the error started occurring, no fiddling with scripts. On Christmas day it was working, the day after Christmas things were broken...,

Shouldn't I be getting errors in the error log, or do they not get written to the log sometimes?

Chris
0
 
gheistConnect With a Mentor Commented:
Error 500 should be in some error log
Look for ErrorLog directives around all httpd config files.

Can you share which distribution you are using?
0
 
St_Aug_Beach_BumAuthor Commented:
yes - centOS 6.5

I'm currently tailing var/log/httpd/error_log   my wp debug.log and my php.log and not getting any errors when I run the pages that are triggering the 501 error.
0
 
St_Aug_Beach_BumAuthor Commented:
ah, ok, I had to set the wp_debut to true, now I'm getting info written to the wp debug.log, looking through it now...
0
 
St_Aug_Beach_BumAuthor Commented:
hmm, lots of:

PHP Notice:  Use of undefined constant

on various things, and a:

PHP Notice:  wp_register_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.) in /home/mysite/public_html/wp-includes/functions.php on line 3370

but that references a core wp file, I have not messed with any of those.

All 'notices' though, no 'errors', '501' or references to 'admin-ajax'.
0
 
St_Aug_Beach_BumAuthor Commented:
Though I can't add new images, I can save posts, but when I do, I get this in the javascript console (chrome browser):

 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
http://www.mysite.com/wp-admin/admin-ajax.php Failed to load resource: the server responded with a status of 500 (Internal Server Error)
http://www.mysite.com/wp-admin/post.php?post=34213&action=edit&message=10 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,json2,sack&ver=4.0.1:4 POST http://www.mysite.com/wp-admin/admin-ajax.php 500 (Internal Server Error)
0
 
St_Aug_Beach_BumAuthor Commented:
Ok, finally tracked it down to a plugin that I've been using for years. Don't know why it suddenly become a problem with nothing else going on. I don't have them automatically update, so it wasn't that.

Odd, but true.

I'm going to spread some points out here and appreciate all the assistance,

Chris
0
 
Jason C. LevineNo oneCommented:
My best guess: the plugin was making a call remotely (hence ajax invoked) and probably got a malformed response which then took out your site.
0
 
St_Aug_Beach_BumAuthor Commented:
I was wondering about that same thing, I've contacted the plugin author to ask about that,

Thanks Jason,

Chris
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.