April 20, 2012

Php script stops after long time and no error could be found on the error_log

Question by Miki Amit

Im running a long php script which handles large amounts of data.

The problem is that the script suddenly stops and no exception is thrown or could be found on the error_log.
I have set the display_errors and the error_logging to 1 in the .ini config file.

Few more details:
1) The scripts executes the ‘file_get_contents’ function for many times.
2) The scripts contains recursion when the file_get_contents fails.
Any help would be appriciated.

Answer by Starx

It might have hit the max execution time.

set_time_limit(0); // to increase the timelimit to infinity

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+


Please fill the form - I will response as fast as I can!