Hi I have configured successfully a PHP application to run as a CGI application with apache/suexec. The following program runs as expected: #!/usr/bin/php -q <?php print ("Content-type: text/html\n\n"); print (`id`); //outputs the correct uid/gid as sepcified with apache's User and Group directives ?>
this program can be run from the command line, as a regular CGI script, or as a suexec CGI script. If we modify it like this: #!/usr/bin/php -q <?php print ("Content-type: text/html\n\n"); print (`/usr/bin/php -v`); //does not work under suexec ?> it works as a regular cgi program, or when run directly from the command line or when run thru mod_php4. But it does NOT work as a suexec CGI script. It seems that you cannot launch another PHP interpreter process from within a suexec CGI PHP script. Any suggestions? /usr/bin/httpd -v Apache/1.3.27 (Unix) (Red-Hat/Linux) /usr/bin/php -v PHP 4.3.3 (cgi) (built: Sep 17 2003 15:57:16) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies p.s. the same program written in perl: #!/usr/bin/perl -w print ("Content-type: text/html\n\n"); print (`/usr/bin/php -v`); works perfectly as expected without any problems under suexec. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php