Solved

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

Posted on 2014-12-26
16
4,560 Views
Last Modified: 2014-12-27
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?
0
Comment
Question by:St_Aug_Beach_Bum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 2
  • 2
  • +1
16 Comments
 
LVL 4

Assisted Solution

by:hulsebosch
hulsebosch earned 200 total points
ID: 40518593
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40518614
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40518615
Sorry, that should have read: /var/log/httpd/access_log
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 

Author Comment

by:St_Aug_Beach_Bum
ID: 40518624
Would the ' jquery.js?ver=1.11.1:1' suggest a jquery version conflict?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 150 total points
ID: 40518712
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
 
LVL 4

Assisted Solution

by:hulsebosch
hulsebosch earned 200 total points
ID: 40518724
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 150 total points
ID: 40519071
Check timestamps. Maybe error was yesterday.
0
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520019
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 150 total points
ID: 40520024
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520040
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520062
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520073
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520074
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520122
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
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40520159
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
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40520201
I was wondering about that same thing, I've contacted the plugin author to ask about that,

Thanks Jason,

Chris
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question