suexec and php5

Hi all,

I tried to install php4 and php5 parallel on my cPanel server and it drives me crazy.
I have php4 as an apache module and php5 installed as a cgi.

Here comes what I did:

PHP Code:
./configure --with-xml --enable-bcmath --enable-calendar --with-curl --with-dom --with-dom-xslt --with-dom-exslt --enable-exif --with-swf=/usr/local/flash --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --with-ming=../ming-0.2a --enable-magic-quotes --with-mysql --with-openssl --enable-discard-path --with-pear --with-pspell --enable-xslt --with-xslt-sablot --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --enable-wddx --with-xmlrpc --with-zip --with-zlib --disable-debug --prefix=/usr/local/php5 --enable-force-cgi-redirect --with-config-file=/usr/local/php5/lib/php.ini --with-config-file-path=/usr/local/php5/lib
then

# make

and

# make install


I added the following lines into my httpd.conf (and tried many variatons of it):

Code:
ScriptAlias /php5/ "/usr/local/php5/bin/"
AddType application/x-httpd-php5 .php5
Action application/x-httpd-php5 "/php5/php"
I have a file called phpinfo.php5 in my public_html.
It works if I acces it via serverX.hostname.tld/~username/phpinfo.php5, but www.domain.tld/phpinfo.php5 gives a 500 internal server error.

The apache error_log says:
Code:
[Wed Jan 12 11:22:19 2005] [error] [client x.x.x.x] Premature end of script headers: /usr/local/php5/bin/php
and the suexec_log says:
Code:
 
[2005-01-25 19:15:57]: info: (target/actual) uid: (netspace/netspace) gid: (username/username) cmd: php
[2005-01-25 19:15:57]: error: target uid/gid (32005/32005) mismatch with directory (99/99) or program (0/0) or trusted user (0/10)
But it works, when I do one of the following:
-Disable the User and Group entry in the virtualhost in the httpd.conf
-Chown the php binary to the user who calls the script (32005:32005 in my example)
-Access it via hostname.tld/~username/phpinfo.php5 (which calls the file as nobody)

So the problem seems to be a permission thing which is somehow linked with suexec stuff.

Does anybody have an idea where the problem could be?
Thank you in advance!

 

 

 

 

Top