Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th December 2008, 14:33
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Exclamation 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!
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 27th December 2008 at 15:05.
Reply With Quote
Sponsored Links
  #2  
Old 27th December 2008, 19:27
dtrotter dtrotter is offline
Member
 
Join Date: Aug 2006
Location: Colorado
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to dtrotter Send a message via MSN to dtrotter Send a message via Yahoo to dtrotter
Default

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
Reply With Quote
  #3  
Old 27th December 2008, 20:34
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Thanks for your reply.
Within the attachment, you find the config file. (I renamed it suphp.conf to suphp.txt).
Attached Files
File Type: txt suphp.txt (856 Bytes, 379 views)
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 27th December 2008 at 20:37.
Reply With Quote
  #4  
Old 9th January 2009, 16:06
usul usul is offline
Junior Member
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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"
Reply With Quote
The Following User Says Thank You to usul For This Useful Post:
Hans (9th January 2009)
  #5  
Old 9th January 2009, 20:01
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Quote:
Originally Posted by usul View Post
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.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #6  
Old 9th January 2009, 20:51
usul usul is offline
Junior Member
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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


Wait to thank me ... hihi
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"
Reply With Quote
The Following User Says Thank You to usul For This Useful Post:
bernholdt (17th January 2009)
  #7  
Old 9th January 2009, 21:01
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Thumbs up

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.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 9th January 2009 at 21:16.
Reply With Quote
The Following 2 Users Say Thank You to Hans For This Useful Post:
falko (10th January 2009), little_oak (11th January 2009)
  #8  
Old 30th January 2009, 03:54
megabitdragon megabitdragon is offline
Junior Member
 
Join Date: Jan 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #9  
Old 30th January 2009, 12:04
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

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.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #10  
Old 30th January 2009, 12:52
megabitdragon megabitdragon is offline
Junior Member
 
Join Date: Jan 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
suPHP file permission catalyst General 14 7th March 2010 01:16
Problem installing and configuring suPHP on Debian 4.0 Etch DirtyMonkey Installation/Configuration 5 2nd October 2008 12:18
Goal: user separation (but apache can't read what suPHP wrote) berny Installation/Configuration 1 26th April 2008 18:22
suPHP Problem with user webs Lobanak Installation/Configuration 2 1st October 2007 23:29


All times are GMT +2. The time now is 16:42.


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