Solved

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

Posted on 2014-12-26
16
3,036 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
  • 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
 

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 61

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 61

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now