W2003-IIS6 ignore safe_mode=0

W2003-IIS6 ignore safe_mode=0

am 23.11.2007 10:58:16 von javalpi

Hello.

I try to execute a batch file by using a php with the fuction system()
but I am unable although safe_mode=0.
I am using a very simple example.bat that only makes echo hello and an
example.php that should call that batch, but system() allways returns -1.

These things have been checked.
-Users IUSR_xxx, IWAM_xxx and group IIS_WPG have privileges (read and
execute) on the directory.
-The example.php works in comand line >php example.php
-phpifo(); says me that safe_mode is off for sure.

Have you any idea?

Version of PHP is 4.4.2.

Thanks for your help.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: W2003-IIS6 ignore safe_mode=0

am 23.11.2007 12:36:35 von javalpi

Hello again.

I have read that cmd.exe is involved
Now I have given privileges to IUSR_xxx on cmd.exe too and the return
value is 1.

Before that, when ISR_xxx had only privileges on example.bat the return
value was -1.

Does anybody know what is the difference in the meaning of those return
values?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: W2003-IIS6 ignore safe_mode=0

am 26.11.2007 16:12:36 von James Crow

On Fri, 2007-11-23 at 12:36 +0100, Joaquín wrote:
> Hello again.
>
> I have read that cmd.exe is involved
> Now I have given privileges to IUSR_xxx on cmd.exe too and the return
> value is 1.
>
> Before that, when ISR_xxx had only privileges on example.bat the return
> value was -1.
>
> Does anybody know what is the difference in the meaning of those return
> values?
>

I don't have any direct insight, but a .bat file is simply a script.
Much like .php files .bat files need an interpreter to execute them.
For .bat files it is cmd.exe. For .php files it is the PHP engine either
as php.exe or one of the web server modules.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: W2003-IIS6 ignore safe_mode=0

am 12.12.2007 15:52:46 von javalpi

Well, I don't finally know why but the problem is the "echo hello" in
the batch (?!).
If I don't use system("example.bat") but system("cmd") then I can see in
the browser the two first lines of the shell: "Microsoft Windows 2003..."
It also works to call an executable.

Contrary to what was expected "ejemplo.bat" confuses rather than simplify.
I don't know why echo in a batch doesn't work but I don't want to waste
more time with it.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php