Re: exec
| From: | AJDIN BRANDIC | Date: | Fri, 12 Oct 2001 09:16:54 +0000 |
| Subject: | Re: exec | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70908@lists.php.net to get a copy of this message | ||
On Thu, 11 Oct 2001, ReDucTor wrote:
> you use
>
> exec("cmd /c c:\\mydir\\unzip myfile.zip -d c:\\mydir\\mydata");
This fails with Unable to fork
If I use it without cmd /c then it unzips but it hangs.
I have tried to execute this line through the Run window.
the one with cmd /c says "Cannot find the file 'cmd' or one of its
components.
Without cmd c/ executes OK but dos window opens and stays open. thgis is
I guess why my script hangs.
What would be a windows command to close a dos window? I have found
exec(exit(0)); but this didn't help.
Ajdin
>
>
> ----- Original Message -----
> From: "AJDIN BRANDIC" <abrandic@coventry.ac.uk>
> To: <php-general@lists.php.net>
> Sent: Thursday, October 11, 2001 2:12 AM
> Subject: [PHP] exec
>
>
> > Hi
> >
> > I am trying to use exec command (php4 + Win98 + apache).
> >
> > exec('c:\mydir\unzip myfile.zip -d c:\mydir\mydata\');
> >
> > I executes without errors but nothing is unzipped. When I run the same
> > command from the dos prompt it unzips OK. c:\mydir and mydata are
> > outside the httpdocs directory!
> >
> > I have over 300 .zip files which all contain a .mdb file with same table
> > structure and same name. I wrote script that will read all of them (one
> > by one) but wish to automate the unzipping process.
> >
> > Any ideas.
> >
> > Ajdin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>