Hello,
I have a problem with safe_mode. I want to execute some program while in
safe_mode=1 but I cann't. To make it as simple as possible I'm now using
myprogram.exe that is the typical "hello world" program.
It only works with safe_mode=0 and with safe_mode=1 nothing happens and
it returns nothing: no echo, no error message, althoug
error_reporting=E_ALL.
I try it with exec() and system() and it is the same (both execute it or
both don't).
After having read some blogs and newsgroups I have set all these things:
-myprogram.exe is placed in C:\wwwroot\tests\bin. IUSR_SERV, IWAM_SERV
and ALL can read and execute it.
-a copy of CMD.exe is placed in C:\wwwroot\tests\bin. IUSR_SERV,
IWAM_SERV and ALL can read and execute it.
-C:\wwwroot\tests\bin is in the PATH
-safe_mode_exec_dir = "c:\wwwroot\tests\bin"
-with IIS manager I have set both "Anonymous"_and_"Windows integrated"
authentication and only "Windows integrated" authentication in
C:\wwwroot\tests.
¿Have you any idea?
This is my php
##########################################################
<?php
$retstr = exec('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval);
echo "<p>retstr: ".$retstr;
echo "<p>retval: ";
if ((bool)$retval!=False){
foreach ($retval as $nombre => $valor){
echo $valor."<br>";
}
} else {
echo "False<br>";
}
echo "<hr>";
$retstr = system('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval);
echo "<p>retstr: ".$retstr;
echo "<p>retval: ";
if ((bool)$retval!=False){
echo "True<br>";
} else {
echo "False<br>";
}
?>
##########################################################
And this my server:
Windows 2000
IIS 5
PHP 4.4.3, ISAPI
I have tried it in a W2003, IIS6, PHP 4.4.2 with the sema result :(
Thanks for your help.
--- Begin Message ---
Hello,
I have a problem with safe_mode. I want to execute some program while in
safe_mode=1 but I cann't. To make it as simple as possible I'm now using
myprogram.exe that is the typical "hello world" program.
It only works with safe_mode=0 and with safe_mode=1 nothing happens and
it returns nothing: no echo, no error message, althoug
error_reporting=E_ALL.
I try it with exec() and system() and it is the same (both execute it or
both don't).
After having read some blogs and newsgroups I have set all these things:
-myprogram.exe is placed in C:\wwwroot\tests\bin. IUSR_SERV, IWAM_SERV
and ALL can read and execute it.
-a copy of CMD.exe is placed in C:\wwwroot\tests\bin. IUSR_SERV,
IWAM_SERV and ALL can read and execute it.
-C:\wwwroot\tests\bin is in the PATH
-safe_mode_exec_dir = "c:\wwwroot\tests\bin"
-with IIS manager I have set both "Anonymous"_and_"Windows integrated"
authentication and only "Windows integrated" authentication in
C:\wwwroot\tests.
¿Have you any idea?
This is my php
##########################################################
<?php
$retstr = exec('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval);
echo "<p>retstr: ".$retstr;
echo "<p>retval: ";
if ((bool)$retval!=False){
foreach ($retval as $nombre => $valor){
echo $valor."<br>";
}
} else {
echo "False<br>";
}
echo "<hr>";
$retstr = system('C:\wwwroot\tests\bin\myprogram.exe 2>&1',$retval);
echo "<p>retstr: ".$retstr;
echo "<p>retval: ";
if ((bool)$retval!=False){
echo "True<br>";
} else {
echo "False<br>";
}
?>
##########################################################
And this my server:
Windows 2000
IIS 5
PHP 4.4.3, ISAPI
I have tried it in a W2003, IIS6, PHP 4.4.2 with the sema result :(
Thanks for your help.
--- End Message ---
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php