Re: Execute a shell command using thttpd-php

From: Date: Wed, 15 Mar 2006 19:22:20 +0000
Subject: Re: Execute a shell command using thttpd-php
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-231966@lists.php.net to get a copy of this message
Nelson Carreira wrote:
James E Hicks III wrote:
Nelson Carreira wrote:
Yes, I've tried using both absolute and relative paths. The system output is 0 when I execute, for example, "nvram show" from the php. From what I know this output means success. Although there's no output on php. Nelson Carreira
From your original post it looks like the function you want to use is passthru(). I just noticed the following note on php.net: Note: When safe mode is enabled, you can only execute executables within the safe_mode_exec_dir. For practical reasons it is currently not allowed to have .. components in the path to the executable. Could this be your problem? James
This version of php doesn't have a php.ini file for configuration, so there's no safe_mode_exec_dir. I tried to create the one mentioned in php_info() and copy the executables there but it didn't work. Nelson Carreira
Hmmm. I'm all out of ideas. James

« previous php.general (#231966) next »