[nycphp-talk] Timing out in php batch
drydell at att.net
drydell at att.net
Thu Jun 16 10:49:09 EDT 2005
I've gotten some strange results invoking scripts from bash shells on some hosts, but wrapping the request with env always seems to fix it:
env -i /path/to/php -q -f /path/to/script.php args > log
-------------- Original message ----------------------
From: "Eric Gewirtz" <egewirtz at suscom.net>
> Dan,
>
> Thanks for the info, we will try your suggestions and see what we get -
>
> Regarding, the questions as to how we are invoking prodscript.php, we
> are executing a shell script via cron on a nightly basis. The contents
> of the shell script looks like this;
>
> ###################################
> #!/bin/sh
> #Load Daily
> #Modified for Unix
> #Modified by: Maggie Cassidy
> #Last Modified: 12/18/2004
> ###################################
>
> php /home/xxxxxx/public_html/ffffff/p2/prod/prodscript.php arg1 arg2
> arg3 arg4 > /home/xxxxxx/batch/yyyyyyy/p2/prod/logs/ProdScriptLoad.log
>
>
>
> Eric Gewirtz
> SolutionOne
> Phone - 845-729-7800
> Fax - 845-279-5502
> egewirtz at rcn.com
>
>
> >-----Original Message-----
> >From: talk-bounces at lists.nyphp.org
> [mailto:talk-bounces at lists.nyphp.org] On
> >Behalf Of Daniel Convissor
> >Sent: Thursday, June 16, 2005 8:23 AM
> >To: NYPHP Talk
> >Subject: Re: [nycphp-talk] Timing out in php batch
> >
> >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";
> > exit;
> >
> >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.
> >
> >--Dan
> >
> >--
> > 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
> > http://www.AnalysisAndSolutions.com/
> > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
> >_______________________________________________
> >New York PHP Talk Mailing List
> >AMP Technology
> >Supporting Apache, MySQL and PHP
> >http://lists.nyphp.org/mailman/listinfo/talk
> >http://www.nyphp.org
>
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
More information about the talk
mailing list