HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   suPHP 0.7.0 compatible with ISPConfig2 ? (http://www.howtoforge.com/forums/showthread.php?t=29801)

Hans 27th December 2008 15:33

suPHP 0.7.0 compatible with ISPConfig2 ?
 
On 25-12-2008 suPHP 0.7.0 has been released. Within this release, some major items has slightly changed and for this reason, i was wondering if it is compatible with the current ISPConfig version 2.2.29.

On a Debian test-server with ISPConfig 2.2.29 and suPHP 0.6.3 installed, i did the following to upgrade suPHP to version 0.7.0:

cd /tmp
wget http://www.suphp.org/download/suphp-0.7.0.tar.gz
tar xvfz suphp-0.7.0.tar.gz
cd suphp-0.7.0
./configure --prefix=/usr --sysconfdir=/etc --with-apache-user=www-data --with-setid-mode=paranoid --with-apxs=/usr/bin/apxs2
make
make install

The result:
sites which make use of suPHP did not work anymore and an Internal server error occurred. Within the log file of the web i saw errors like:

SecurityException in Application.cpp:511: Unknown Interpreter: php
Premature end of script headers: index.php

Within the log file /var/log/suphp.log nothing appears.

Probably, to use suPHP 0.7.0 on an ISPConfig 2 server some items need to be configured. Anyway, after puzzling for some time, i don't get it to work the normal way.

Maybe this problem is because suPHP_AddHandler and suPHP_RemoveHandler directives can now be used on per vhost level, but i'm not sure.

Can you ISPConfig developers have a look at this behaviour and find a solution. Until then, i don't recommend to upgrade to suPHP 0.7.0 yet. (Remember that ít is not a security release).

Thanks in advance!

dtrotter 27th December 2008 20:27

Can you post your /etc/suphp.conf file for me (us) to examine? I have not tried 0.7.0 yet, but can look through the config to look for inconsistencies...

dtrotter

Hans 27th December 2008 21:34

1 Attachment(s)
Thanks for your reply.
Within the attachment, you find the config file. (I renamed it suphp.conf to suphp.txt).

usul 9th January 2009 17:06

I had the same problem with version 0.7.0 is suPHP, which I have just solved.
The problem lies in the configuration file, you enter "" as shown below.

suphp.conf
Quote:

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

Hans 9th January 2009 21:01

Quote:

Originally Posted by usul (Post 163753)
I had the same problem with version 0.7.0 is suPHP, which I have just solved.
The problem lies in the configuration file, you enter "" as shown below.

suphp.conf

Thanks for your reply!
I will try your solution on a test server. :)

usul 9th January 2009 21:51

Quote:

Originally Posted by Hans (Post 163782)
Thanks for your reply!
I will try your solution on a test server. :)



Wait to thank me ... hihi:D:rolleyes:;)
sorry but there is still a mistake made on my part, this is the correct version is tested for ISPCONFIG.

Quote:

[handlers]
;Handler for php-scripts
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"


;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
Code:

[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
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/php-cgi"
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"


Hans 9th January 2009 22:01

Ok then i will use that solution! :)
I'll let you know if it works for me as well.

*EDIT*
In the mean time i've installed suPHP 0.7.0 on a Debian test server with ISPConfig 2.2.29, and i can confirm it works great!

Thanks again for your solution.

megabitdragon 30th January 2009 04:54

How exactly did yo make it work. Any special settings?I tried to install ispconfig svn version and suphp 0.7.0 on an ubuntu 8.04 LTS server. The ubuntu installation was fresh following the perfect ubuntu server 8.04 tutorial:
http://www.howtoforge.com/perfect-server-ubuntu8.04-lts
To compile suphp I used the tutorial from:
http://www.howtoforge.com/install-su...2.20-and-above.

When I try to access index.php I get 500 error internal server error.

Any ideas?

Hans 30th January 2009 13:04

Make sure you have the following lines at the end of your suphp.conf:

[handlers]
;Handler for php-scripts
;x-httpd-php="php:/usr/bin/php-cgi"
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

Then it should work.

megabitdragon 30th January 2009 13:52

Thanks for your help.
I think that small details make all the difference. I had the same lines in my suphp.conf file but without the quotes.
Now everything works as expected

Thank you


All times are GMT +2. The time now is 06:53.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.