Forward slashes don't work but astonish me

From: Date: Thu, 18 Oct 2007 08:08:51 +0000
Subject: Forward slashes don't work but astonish me
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-28573@lists.php.net to get a copy of this message
(This is a respond "again" message because I think I made it wrong the first time: my first respond message isn't in the news since yesterday.) There is some changes compared to using backslahes but it doesn't work. Using backslashes php.ini safe_mode_exec_dir = "c:\wwwroot\tests\bin" myphp.php $retstr = exec('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval); $retstr = system('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval); When safe_mode=0 exec() $retval is "Hello World" and system() $retval is False (although "Hello World" is displayed). When safe_mode=1 both $retval are False and there isn't any echo. Using forward slashes When safe_mode=0 The same as above. When safe_mode=1 exec() $retval is False BUT system() $retval is True. There is no echo anyway :( So system() $retval is False always when there is echo and sometimes when there isn't, and is True sometimes when there isn't echo. Does this make any sense for anyone!?

« previous php.windows (#28573) next »