Re: Shell used by system()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/24/07, Marco Michelino <michelinux@xxxxxxxxx> wrote:
Hi *,
is it possible to change the shell used by system() , exec() and
similar PHP funtions?

I'm running mod_php in apache on Linux.

Apache shell is set to /sbin/nologin but PHP insists to call /bin/sh...

First, I guess this isn't the fault of PHP, but the very first line in
your shell script.
It contains something like
#!/bin/sh
And yes, it will execute /bin/sh.

You might want to force execution with another shell by adding that to
the system/exec command:
system("/bin/anothersh /path/to/myscript.sh");

Tijnema


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux