954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Turn off 500 Error

Anyway I can turn off the 500 error? I have a recursive function that is being set to be called a few hundred times if possible, but before that can happen and proceed with the rest of the code it calls a 500 error. (For those interested its a dynamic XML to MySQL script that is set to go how ever many levels deep it needs to.)

Anyway I can force the script to run and not get the 500 error?

leprakhauns
Newbie Poster
12 posts since Nov 2005
Reputation Points: 10
Solved Threads: 0
 

Set the display_errors value to off in php.ini config file

display_errors = Off
rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 
<?php

error_reporting(0);

?>
vaultdweller123
Posting Pro
554 posts since Sep 2009
Reputation Points: 42
Solved Threads: 75
 

Nope, that doesn't turn off 500 errors.

leprakhauns
Newbie Poster
12 posts since Nov 2005
Reputation Points: 10
Solved Threads: 0
 
rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

I know why it's doing that, too much memory/CPU being used.

leprakhauns
Newbie Poster
12 posts since Nov 2005
Reputation Points: 10
Solved Threads: 0
 

Like the above link said, why dont you try with the log files to identify the reason for the error?

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

I know why, it's using too much memory, same file, same circumstances will run 1/10 times, but 500 9/10 times. Can I change this in Apache or PHP.ini somewhere?

leprakhauns
Newbie Poster
12 posts since Nov 2005
Reputation Points: 10
Solved Threads: 0
 

Why you not change your recursive function to utlize the low memory?

Keep some interval for every 50 times

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 
rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: