Executing an external program

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ulysse
Forum Newbie
Posts: 2
Joined: Fri Jun 07, 2002 2:56 am
Location: Lille, France

Executing an external program

Post 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.
Last edited by ulysse on Mon Jun 10, 2002 3:09 am, edited 1 time in total.
User avatar
phphead
Forum Newbie
Posts: 12
Joined: Tue May 28, 2002 11:03 pm
Location: California

Are you sure that pkunzip is in that directory.

Post 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]`;
Post Reply