Hi
I need to resolve 500 Internal Server Errors before the site goes live. Ticket was raised with support and they concluded that its because I had more than 2k products within a section. I've gone through removed half my products i.e. down from 17K to 8K. Split all sections into subsections & none have more than 600 in each. Reverted almost all layouts back to factory defaults and still the error persists. According to my hosts (1and1), I need to create a file with the code as detailed below. I've put the code in a file called siteincludes.php and located in site1 folder.
Refreshed the websites couple of times & recreated the errors. However, I still can't seem to generate the errors.csv file for diagnosis.
What I need is to confirm if I'm on the right track to diagnose the problem or if anyone can think of anything that could cause the 500 Internal Server errors. Any help would be most appreciated.
Many Thanks in Advance
Nilesh
I need to resolve 500 Internal Server Errors before the site goes live. Ticket was raised with support and they concluded that its because I had more than 2k products within a section. I've gone through removed half my products i.e. down from 17K to 8K. Split all sections into subsections & none have more than 600 in each. Reverted almost all layouts back to factory defaults and still the error persists. According to my hosts (1and1), I need to create a file with the code as detailed below. I've put the code in a file called siteincludes.php and located in site1 folder.
Refreshed the websites couple of times & recreated the errors. However, I still can't seem to generate the errors.csv file for diagnosis.
What I need is to confirm if I'm on the right track to diagnose the problem or if anyone can think of anything that could cause the 500 Internal Server errors. Any help would be most appreciated.
Many Thanks in Advance
Nilesh
Code:
error_reporting(0); $old_error_handler = set_error_handler("userErrorHandler"); function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { $time=date("d M Y H:i:s"); // Get the error type from the error number $errortype = array (1 => "Error", 2 => "Warning", 4 => "Parsing Error", 8 => "Notice", 16 => "Core Error", 32 => "Core Warning", 64 => "Compile Error", 128 => "Compile Warning", 256 => "User Error", 512 => "User Warning", 1024 => "User Notice"); $errlevel=$errortype[$errno]; //Write error to log file (CSV format) $errfile=fopen("errors.csv","a"); fputs($errfile,"\"$time\",\"$filename: $linenum\",\"($errlevel) $errmsg\"\r\n"); fclose($errfile); if($errno!=2 && $errno!=8) { //Terminate script if fatal error die("A fatal error has occurred. Script execution has been aborted"); } }