Solved

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

Posted on 2014-12-26
16
3,474 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

920 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

14 Experts available now in Live!

Get 1:1 Help Now