[nycphp-talk] Timing out in php batch

Daniel Convissor danielc at
Thu Jun 16 09:23:25 EDT 2005

Hey Eric:

On Wed, Jun 15, 2005 at 08:42:19PM -0400, Eric Gewirtz wrote:

> and invoking mySQL msqlimport - I'm thinking that maybe the sever
> conection to MySQL is timing out

The error message you saw was definitely from PHP's max execution time.
Are you sure you're running the script against the CLI build?  You may be 
hitting the CGI build.  I saw you tested this with php -v, but put in an

    echo php_sapi_name() . "\n";

at the top of your prodscript.php and see what it says.  Make sure you 
invoke this test of prodscript.php the same exact way you did when the 
timeout errors came up.  Out of curiosity, when you got the timeout error, 
how were you invoking prodscript.php?  Sometimes, different means of 
invocation result in a different version of PHP being used.

Regardless, throwing in a call to set_time_limit(0) at the top of the 
script should solve the problem.


 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

More information about the talk mailing list