william@TechServSys.com Posted October 20, 2011 Share Posted October 20, 2011 I have a complex web application that loads fragments into DIVs using Ajax. All works except... On the development server a php file loads and executes fine. I uploaded it to the production server and I get a 500 error and a blank page (naturally). The permissions are correct as a 2nd fragment that lives in the same directory loads and executes fine and the permissions on the one that doesn't are 644 (as are the permissions on the file that does work). The script in question is "mileage.php". Works on the development server, not on the production server. AFAIK, the scripts are identical, I reuploaded it with no joy. I use firebug and the console just says: GET http://192.168.10.101/MP2010-v2/admin/mileage.php 500 Internal Server Error 172ms "NetworkError: 500 Internal Server Error - http://192.168.10.101/MP2010-v2/admin/mileage.php" Any suggestions on how to debug this ? bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/ Share on other sites More sharing options...
william@TechServSys.com Posted October 20, 2011 Author Share Posted October 20, 2011 I forgot to mention, both servers are Ubuntu 10.04 LTS and fairly identical. bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1280851 Share on other sites More sharing options...
PFMaBiSmAd Posted October 20, 2011 Share Posted October 20, 2011 You are probably either getting a fatal php parse error (usually caused by using short-open tags in your code) or you are getting a fatal php runtime error. Set error_reporting to E_ALL and either set display_errors to ON (causes errors to be sent to the browser) or set log_errors to ON (causes errors to be sent to the error log file.) For a fatal parse error in your main file, you will need to set those settings either in the master php.ini, in a local php.ini (when php is running as a cgi application) or in a .htaccess file (when php is running as an Apache Module.) For all other errors, you can set those settings in the code in your main file. Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1280853 Share on other sites More sharing options...
william@TechServSys.com Posted October 20, 2011 Author Share Posted October 20, 2011 I should be so lucky. Error reporting is set to E_ALL as is display errors. And, it runs fine on the development server. I frequently get errors when I code and always see them, not so much here. bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1280941 Share on other sites More sharing options...
requinix Posted October 20, 2011 Share Posted October 20, 2011 So what does Apache's error log say about this? Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1280959 Share on other sites More sharing options...
william@TechServSys.com Posted October 21, 2011 Author Share Posted October 21, 2011 Thank you. It was a class library that had not been updated. Now I need to find out why errors were not being displayed, suspect that there is a difference in php.ini. bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1281094 Share on other sites More sharing options...
PFMaBiSmAd Posted October 21, 2011 Share Posted October 21, 2011 Having output_buffering on in the php.ini or using output buffering in your script will hide any php errors that are output to the browser if you are doing a header() redirect on the page. The 500 error could have been in response to the page that redirected to, not the original page request. Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1281106 Share on other sites More sharing options...
william@TechServSys.com Posted October 21, 2011 Author Share Posted October 21, 2011 from php.ini on both systems, error reporting is 22527 and output buffering is 4096. I do not do a header redirect, this is an AJAX fragment that is loaded into a div. The first two lines of the script are: session_start (); error_reporting(E_ALL); Any other ideas of why no error is reported ? The error (in the apache log) was that a called procedure did not exist and that was the correct problem. bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1281138 Share on other sites More sharing options...
PFMaBiSmAd Posted October 21, 2011 Share Posted October 21, 2011 Is display_errors ON? If you browse directly to the URL being requested by the ajax, do you get the error displayed? Unless your ajax code literally puts everything that comes back with the http response into the HTML of the page, the browser won't render anything and you won't see any php produced errors. Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1281141 Share on other sites More sharing options...
william@TechServSys.com Posted October 22, 2011 Author Share Posted October 22, 2011 Whoops, was not ON Thanks bill Quote Link to comment https://forums.phpfreaks.com/topic/249465-going-quietly-nuts-500-error/#findComment-1281336 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.