Page 1 of 1

Executing an external program

Posted: Fri Jun 07, 2002 2:56 am
by ulysse
Hello,

I'm running under Windows 2000 and I can't execute external programs on my server from PHP, only system commands can be excuted.

A command like this runs:

Code: Select all

exec("dir *.exe");
But this command doesn't run:

Code: Select all

exec("pkunzip test.zip"); //(I' m in the right directory)
Can anyone explain me why?

Thanks.

Are you sure that pkunzip is in that directory.

Posted: Sat Jun 08, 2002 11:54 am
by phphead
Is pkunzip in the SET PATH= varible in autoexec.bat.
you might also want to try this

Code: Select all

\\ try using the batick operator
echo `pkunzip $argvї0]`;