Re: Using Exec on windows
| From: | David | Date: | Tue, 01 Jan 2002 07:35:00 +0000 |
| Subject: | Re: Using Exec on windows | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11248@lists.php.net to get a copy of this message | ||
>
> Laserjetter said something on 30 Dec 2001, in php.windows:
>
>> WinZip will need parameters to run from the command line for example
>> to tell it what file to unzip. Did you include these in the command
>> string? WinZip might be waiting for you to press a key or enter some
>> information. It might not be able to find files because the dos window
>> could open at any folder. Did you use absolute path names like
>> c:\winzip\folder (not ..\winzip)?
>> Try using the other executing commands, I think passthru() might work.
>>
>> LJ
>> "David" <php@warpedweb.net> wrote in message
>> news:Xns9186C588B368Dphpwarpedwebnet@216.92.131.4...
>>> Hi,
>>> I'm trying to execute a command line program using exec.
>>> I am tring to run a command line interface of Winzip, simpily by
>>> executing a string which works when it is typed into the command
>>> line.
>>>
>>> However, PHP just hangs there, I can see the program running the the
>>> background, but it does not do anything.
>>>
>>> When it is run from the command line it takes about 2 seconds to run,
>>> but using exec, it will never finish...
>>>
>>> Does anyone have any idea with this problem?
>>>
>>> Regards,
>>> David
>>
In responce to my own question, I believe the problem was some thing with
the fact the the webserver didn't have permission to perform that
operation.
If I run the same script on the command line it works like a charm.
Regarsd,
David