exec() or system() on Windows

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
samdec
Forum Newbie
Posts: 2
Joined: Thu Dec 05, 2002 1:21 pm
Location: Fort Lauderdale, FL

exec() or system() on Windows

Post by samdec »

I am using php 4.0.4pl1 on Windows 2000 server with IIS 5.

I am trying to execute the command to ping a certain ip address but every variation of exec() and system() that I try gives me an 'Unable to Fork' error. I have tried including the path:
exec("c:\winnt\system32\ping.exe 192.168.2.90");

Any suggestions would be greatly appreciated.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

try
exec("c:\\winnt\\system32\\ping.exe 192.168.2.90");
or
exec("c:/winnt/system32/ping.exe 192.168.2.90");
samdec
Forum Newbie
Posts: 2
Joined: Thu Dec 05, 2002 1:21 pm
Location: Fort Lauderdale, FL

Post by samdec »

Thanks but I get the same error. Any other suggestions.
Post Reply