#1  
Old 14th October 2006, 11:51
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
Question Phpsuexec ?

Hi All,

I'm new to this hosting thing, so sorry for the n00b question. I've got ISPConfig 2.2.7 on CentOs 4.4.

I've read that PHPSUEXEC is a good thing to have, but can't find any CentOs packages (rpms) to install. Is this something I need to worry about ? Has all the "magic" ISPConfig done, already sorted this for me ?

Thanks v.much.
Nick.
Reply With Quote
Sponsored Links
  #2  
Old 14th October 2006, 13:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The software is named SuPHP and not PHPSUEXEC. But I guess there is no SuPHP package for Centos available. You will have to compile and install it manually and then activate it in the ISPConfig configuration file: /home/admispconfig/ispconfig/lib/config.inc.php.

Here is a guide for Debian, the installation steps for sentos will be similar, but the package installation command s will differ.

http://www.howtoforge.com/apache2_suphp_php4_php5
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 14th October 2006, 13:44
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi Till,

Aaaaaaahhh, I guess it helps to be searching for the right thing !

Code:
[root@server root]# yum search suphp
Searching Packages:
Setting up repositories
Reading repository metadata in from local files

mod_suphp.i386                           0.5.2-8.el4.kb         kbs-CentOS-Extra
Matched from:
mod_suphp
suPHP is an apache module for executing PHP scripts with the permissions of
their owners. It consists of an Apache module (mod_suphp) and a setuid root
binary (suphp) that is called by the Apache module to change the uid of the
process executing the PHP interpreter.
http://www.suphp.org/
You have new mail in /var/spool/mail/root
[root@linickx ssh]#
thanks v.much, I'll take a look your guide, and give it a go.

rgds,
Nick
Reply With Quote
  #4  
Old 14th October 2006, 15:06
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
Default Solved

As I've marked it as solved, it has been edited to make it more accurate. Edits are in bold, I hope it's not too confusing. (If you read the thread below, you'll see I didn't get it quite right 1st time) - thanks to the people that helped me.


It turns out this was really easy

If you use CentOS..... (& followed this guide)

Code:
 cd /root 
wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
rpm -ivh rpmforge-release-0.3.4-1.el4.rf.i386.rpm 
yum  --disablerepo=kbs-CentOS-Extras install mod_suphp
then edit /etc/httpd/conf.d/suphp.conf & comment out these lines like this...

Code:
#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml
#suPHP_Engine on
and tell ISPConfig about what you've done, edit /home/admispconfig/ispconfig/lib/config.inc.php find the line:

Code:
$go_info["server"]["apache2_php"] = 'both';
and change to:

Code:
$go_info["server"]["apache2_php"] = 'suphp';
to get ISPConfig to read the change, login to the web admin gui panel thing, find a website, and change the quota or something ( you can always change it back), and hit save

finally you'll need to fix your php permissions....

Code:
updatedb
locate .php | grep /var/www > /root/phpfiles.txt
for i in `cat /root/phpfiles.txt ` ; do chmod -v 644 $i;done
(you might also have to chmod 755 the "web" directory for each of your users )

you may also want to fix proftp so that new files get the right permissions, I edited /etc/proftpd_ispconfig.conf and changed Umask to ....

Code:
Umask                   022
you can then create a small php file to check it's working,

Code:
<? print "hello world<p>\n"; system("id"); ?>
enjoy

Last edited by linickx; 16th October 2006 at 20:03.
Reply With Quote
  #5  
Old 14th October 2006, 16:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Thats not completely correct. You disabled the ability to configure php in ISPConfig.

1) comment out the addhandler directives in the file /etc/httpd/conf.d/suphp.conf.

2) Edit the file /home/admispconfig/ispconfig/lib/config.inc.php and enable suphp there.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 14th October 2006, 17:05
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Doh ! n00b mistake !

Done the "comment out the addhandler" thing & in /home/admispconfig/ispconfig/lib/config.inc.php I've set....

Code:
$go_info["server"]["apache2_php"] = 'suphp'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled
but now, my ID shows as apache

have I missed something ?
Reply With Quote
  #7  
Old 14th October 2006, 17:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Have you created a administrator user for the website?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 14th October 2006, 17:14
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi Till,

Just checked, yes & it exists in /etc/passwd.... shell is /bin/false ... don't know if that makes a difference ?
Reply With Quote
  #9  
Old 14th October 2006, 17:23
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Just forgot one thing, please change a value in one of your websites, e.g. quota and hit safe to let ISPConfig rewrite you Vhost_ispconfig.conf file with the suphp settings.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 14th October 2006, 17:31
linickx linickx is offline
Member
 
Join Date: Oct 2006
Location: UK
Posts: 52
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

humm did that (changed the quota & hit save), and restarted apache (just in case)... still no joy, I've had a look at /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf should "AddHandler x-httpd-php .php" be in there ? (it's not)
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


All times are GMT +2. The time now is 11:31.


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