apache won't suexec php
| From: | Andrew A. Neuschwander | Date: | Wed, 11 Oct 2000 21:01:52 +0000 |
| Subject: | apache won't suexec php | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-272@lists.php.net to get a copy of this message | ||
Hi all,
I'm trying to get php running with suEXEC. I've tested suexec with some
perl scripts, and it works fine. I can't get apache to suexec php
when someone calls a php script. As a test, I put this script in
/home/user/public_html/test.php:
<?
touch("/usr/local/apache/htdocs/index.html");
touch("/home/user/public_html/test.php");
phpinfo()
?>
I can touch /usr/local/apache/htdocs/index.html which is owned by the
apache user (nobody), but I can't touch the test.php file because it is
owned my user. I have a similar perl script which behaves correctly.
I'm on Linux-Mandrake 7.1, with a hand build apache and php. I've
built php as a stand alone CGI, with this configure line:
./configure --with-mysql=/usr --enable-force-cgi-redirect --enable-ftp
--with-dom --with-mcrypt --with-mhash --with-gd --enable-sockets
--with-mm --enable-track-vars --enable-trans-sid --enable-magic-quotes
--enable-calendar --enable-memory-limit
I placed it in my apache tree as /cgi-bin/php.cgi. I build apache with
this configure line:
./configure --enable-suexec --suexec-caller=nobody --suexec-uidmin=500
--suexec-gidmin=500 --suexec-userdir=public_html
--suexec-logfile=/usr/local/apache/logs/suexec_log
--suexec-docroot=/usr/local/apache/htdocs
So php.cgi is in /usr/local/apache/htdoc/cgi-bin/php.cgi. Also, here
are the pertanent lines in httpd.conf:
AddHandler cgi-script .cgi .pl
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php /cgi-bin/php.cgi
ScriptAlias /cgi-bin/ "/usr/local/apache/htdocs/cgi-bin/"
<Directory "/usr/local/apache/htdocs/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
I'm stumped. If someone could help me out, that would be awesome. Or,
if anyone has every gotten the php to suexec, please let me know.
Thanks,
Andrew
--
'Round the firewall, | Andrew A. Neuschwander
Out the switch, | andrew@neuschwander.org
Through the router, | ITRC
Down the wire, | University of Montana
NOTHING BUT NET. | Missoula, Montana, USA