Re: Program execution stops at exec()
| From: | Michael Virnstein | Date: | Fri, 24 May 2002 16:30:50 +0000 |
| Subject: | Re: Program execution stops at exec() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99098@lists.php.net to get a copy of this message | ||
note:
i think the exec in your php waits for the shell to return, but before the
shell can answer, php terminates the script, because of the max_exection.
Michael
"Michael Virnstein" <michael.virnstein@web.de> schrieb im Newsbeitrag
news:20020524162712.70617.qmail@pb1.pair.com...
> check your max_execution_time settings in php.ini
>
> Michael
>
> "Tom Mikulecky" <tm@caldera.fr> schrieb im Newsbeitrag
> news:3CEE4260.7DC9C044@caldera.fr...
> > Hello
> >
> > In one script I use exec() to execute a shell script which takes 2-3
> > hours to run. I disabled user abort and set time limit to more than one
> > day. The shell script finishes well but no instruction after exec() is
> > run. The script finishes with no error nor warnings.
> > Some of you know hwat happens?
> > Thanx in advance.
> >
> > Tom
> >
> > Code snaps:
> >
> >
> > ignore_user_abort(1);
> >
> > set_time_limit(100000);
> >
> > (...)
> >
> > exec('/home/tom/build.sh >ouput 2>errlog'); //takes 3 hours to
> complete
> >
> > // *** Nothing from here gets executed, 'build.sh' script completed
with
> succes ***
> >
> > (...)
> >
> > I'm using php 4.0.4pl1(can't upgrade) with Apache 1.3.19 on Mandrake
> >
>
>