Page 1 of 1

exec() or system() on Windows

Posted: Thu Dec 05, 2002 1:21 pm
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.

Posted: Thu Dec 05, 2002 1:24 pm
by volka
try
exec("c:\\winnt\\system32\\ping.exe 192.168.2.90");
or
exec("c:/winnt/system32/ping.exe 192.168.2.90");

Posted: Thu Dec 05, 2002 1:37 pm
by samdec
Thanks but I get the same error. Any other suggestions.