Page 1 of 1
exec() and PWS
Posted: Sat May 11, 2002 7:59 am
by Skorpion
Just out of curiosity, does PWS not allow any system script calls?
Using exec("perl /cgi-bin/myperlscript.pl") works fine on linux, but gets "unable to fork" under PWS.
So then I tried to let Windows know the full path to the script and to perl, as in:
exec("d:perlinperl.exe d:inetpubwwwrootcgi-binmyperlscript.pl");
Same result.
Posted: Sat May 11, 2002 10:52 am
by EvilWalrus
check the manual for virtual()....
Posted: Sat May 11, 2002 1:26 pm
by Skorpion
Is virtual not an Apache specific function?
I'm getting the error on PWS running on W98, not Apache.
Posted: Sat May 11, 2002 1:40 pm
by EvilWalrus
1) Get a new server platform... ditch Win98 and PWS and get Apache with at least Win2k... (linux is better)
2) read the manual on shell_exec()... it works perfectly on windows, and another thing... try double-backslashing your paths... \
Posted: Sat May 11, 2002 7:05 pm
by Skorpion
1) Agreed. The actual server uses Apache on a linux platform. I'm just goofing around with PWS/W98 at home, and encountered this little exec() conundrum.
2) Good thought on shell_exec() - I missed that one. Now I get a new error message! At last - progress!

"PHP has encountered an Access Violation at BFF7B992"
Hmmm...something to do with the php.ini file?
Or does everything come down to PWS...as in it sucks, and simply does not allow system calls? I'm thinking this is the real culprit. I've now read of others having some trouble with this, but was hoping some clever lad had discovered a work-around.
(Double back slashing does nothing new - ie same old "cannot fork").