tipsy
21st July 2006, 16:26
hi,
i was trying to follow the "How To Set Up suPHP With PHP4 And PHP5" but i ran into trouble when i tried to test my configuration :(
i managed to install the php cgi's and compiled the suPHP according to the instructions and my virtualhost config is as follows:
NameVirtualHost *
<VirtualHost *>
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www
ErrorLog /var/log/apache2/error.log
suPHP_Engine on
suPHP_UserGroup testuser test
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
</VirtualHost>
my suphp.conf file:
[global]
;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php4-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
php installations:
# php5-cgi -v
PHP 5.1.4-1.dotdeb.2 (cgi-fcgi) (built: Jun 2 2006 10:26:45)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# php4-cgi -v
PHP 4.3.10-16 (cgi-fcgi) (built: Aug 24 2005 20:10:22)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
now as for the error..
i am getting a http500 on every page (even with the simple phpinfo(); ) and when i look into /var/log/apache/error.log i see these lines:
[Fri Jul 21 20:25:49 2006] [error] [client x.x.x.x] (2)No such file or directory: couldn't create child process: /usr/sbin/suphp for /var/www/index.php
suphp exists in /usr/sbin
# /usr/sbin/suphp
suPHP version 0.6.1
(c) 2002-2005 Sebastian Marsching
suPHP has to be called by mod_suphp to work.
i have read that it is a bug (and apparently fixed according to: http://issues.apache.org/bugzilla/show_bug.cgi?id=30137 ).
what can i do to overcome this, i thought of compiling the latest 2.0 code but then it will break the apt-get..
thanks.
i was trying to follow the "How To Set Up suPHP With PHP4 And PHP5" but i ran into trouble when i tried to test my configuration :(
i managed to install the php cgi's and compiled the suPHP according to the instructions and my virtualhost config is as follows:
NameVirtualHost *
<VirtualHost *>
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www
ErrorLog /var/log/apache2/error.log
suPHP_Engine on
suPHP_UserGroup testuser test
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
</VirtualHost>
my suphp.conf file:
[global]
;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php4-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
php installations:
# php5-cgi -v
PHP 5.1.4-1.dotdeb.2 (cgi-fcgi) (built: Jun 2 2006 10:26:45)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# php4-cgi -v
PHP 4.3.10-16 (cgi-fcgi) (built: Aug 24 2005 20:10:22)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
now as for the error..
i am getting a http500 on every page (even with the simple phpinfo(); ) and when i look into /var/log/apache/error.log i see these lines:
[Fri Jul 21 20:25:49 2006] [error] [client x.x.x.x] (2)No such file or directory: couldn't create child process: /usr/sbin/suphp for /var/www/index.php
suphp exists in /usr/sbin
# /usr/sbin/suphp
suPHP version 0.6.1
(c) 2002-2005 Sebastian Marsching
suPHP has to be called by mod_suphp to work.
i have read that it is a bug (and apparently fixed according to: http://issues.apache.org/bugzilla/show_bug.cgi?id=30137 ).
what can i do to overcome this, i thought of compiling the latest 2.0 code but then it will break the apt-get..
thanks.