Re: Shell used by system()
| From: | Tijnema ! | Date: | Tue, 24 Apr 2007 13:55:20 +0000 |
| Subject: | Re: Shell used by system() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253581@lists.php.net to get a copy of this message | ||
On 4/24/07, Marco Michelino <michelinux@gmail.com> 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