Hi,
Are there any howto's for cPanel with PHP5 and SuPHP?![]()
Hi,
Are there any howto's for cPanel with PHP5 and SuPHP?![]()
In order for suPHP to work on a CPanel server you need to apply a lot of patches. You also have to edit the VirtualHost template and insure that the template does not get overwritten.
I really think suPHP is a better offering than the phpsuexec offering that CPanel currently offers. I wish they would investigate incorporating suPHP instead of phpsuexec into the CPanel application. But it would require some work to get it working. I have gotten it to work on a couple of our CPanel servers, but unfortunately, I just do not have a how to guide on how to do it. I know there were a lot of patches applied and some of these patches conflicted with other patches, meaning you had to manually edit the suPHP code.
If I ever get enough free time, I will see if I can do a how to guide.
They have. suPHP is available in the new easyapache2 available in EDGE at the moment![]()
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
I am testing out the latest edge and easyapache right now. SO far it LOOKS really nice. I'll post a reply of how well it works. Trying latest php 5 with apache 2.0 (since 2.2 doesn't support suPHP...yet).
Really? Thats great. But is easyapache2 for Apache 2 only? Or what is the significance of the 2? I'd be interested in seeing how they integrated it. I don't currently have a test server where I can install Edge, but if I can get a server where I can play around, I'll have to try Edge and see how suPHP works.Originally Posted by chirpy
easyapache2 is simply the latest version of easyapache which will build apache v1.37 v2.0* and v2.2*. suPHP is an option for apache v2.0* at present (among a very long list of new options).
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
eger, waiting for your reply how suphp is working with apache2 and php5.
I wonder if there is any way to change php.ini settings per user in httpd.conf or any other way in this php5+suphp configuration.
The new easy apache is for both 1 and 2 and 2.2. It is a complete rewrite and I must say it is very nice and clean (surprised since most cPanel scripts don't have very clean output).Originally Posted by sparek-3
Was going well for my test. But I guess it was too good to be true. Here was the error I was returned right as it was finished:
There are some new options to put everything into a .bad dir if postcheck fails so I will try that next run and see if I can spot the problem. I am also testing on a machine that I was testing betas on with Dan and may have something very askew...Code:**** Done building apache 2, starting post run tasks ** Cleaning up build directories... Done Resolving possible problems caused by apache 2.0's apxs adding apache 1 style entries to an apache 2 config httpd.conf SRC: 2 TRG: 1 Done! Done! Error: postcheck() returned a failed status Restoring previously working apache Done!
Did a second round with Verbose building and got the error causing postcheck to fail.
Trying now with a removed httpd.conf to see if it will rebuild it for apache 2. Strange it did not autofix this error making it fail when trying to go from a 2.2 config file to 2.0.Code:Cleaning up build directories... Done Resolving possible problems caused by apache 2.0's apxs adding apache 1 style entries to an apache 2 config httpd.conf SRC: 2 TRG: 2 Done! Syntax error on line 310 of /usr/local/apache/conf/httpd.conf: Port was replaced with Listen in Apache 2.0 Error: postcheck() returned a failed status Restoring previously working apache Copying postcheck() failed build to .bad... Done!
Will try removing the httpd.conf and then just removing line 310 next and see what happens.
EDIT: Just also noticed that the httpd.conf SRC says 2 and the TRG says 2 where the source should have been 2_2. Possibly the error in postcheck...
EDIT2: Couldn't get it to work with missing httpd.conf, or edited httpd.conf. Fails then on something about ssl.conf. Calling it a day, if interested I will try to update this thread tomorrow when I try some more =)
Last edited by eger; 08-29-2006 at 08:19 PM.
Well I have given up for now. I have probably run easyapache about 20 times now and everytime it is something else wrong... ssl.conf, httpd.conf, mod_auth_passthrough, mod_ssl, log folders not being found, can't bind to ports even when 80 and 443 are free, etc..
Also tried going back to apache 1.3 and 2.2 with no luck. Definitely not working at least without some manual configuration hacking.
edit the /usr/local/apache/conf/httpd.conf and change the line that says Port 80 to Listen 80 and apache will start
That's just regular CGI with some bells and whistles? What's the point then?Originally Posted by chirpy
Go with FastCGI and you'll have PHP5 running at proper speed in comparison to running it as a slow, wasteful CGI: http://timdorr.com/archives/2006/02/php4_and_php4_s.php
That may be the case, I haven't checked. But the point I think was more that it was a solution created and supported by cPanel in easyapache so no 'external hacking' should be required. Though there is always going to be some hacking to get the new things working.Originally Posted by timdorr
Here is what I had to do to get suPHP working with apache 2.0.x and php 4.4.4
edit the httpd.conf and add this line to the LoadModules section
LoadModule suphp_module modules/mod_suphp.so
and then comment out this line in the below section
<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_ConfigPath /opt/suphp_php_bin
------> #suPHP_AddHandler x-httpd-php
<Directory /home*/*/public_html>
suPHP_AddHandler x-httpd-php
</Directory>
AddHandler x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php .php .phtml .php3 .php4
</IfModule>
<IfModule !mod_suphp.c>
AddHandler x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php .php .phtml .php3 .php4
</IfModule>
restart apache and you should have suPHP enabled apache2
Here is a link to a phpinfo page on the test server
http://test.isitetech.com/php.php
Dave,
I noticed that too. Looks like it doesn't belong there and the one below it is the correct one. Here is what I had to do to get 2.0 with suPHP up and running.
First, leave when running easyapache you will need to leave build as is and manually resolve errors.
Then I had to:
1. Change the 'Port 80' line to 'Listen 80' in httpd.conf
2. Remove 'ClearModuleList' from httpd.conf
3. Change 'SSLLog' to 'ErrorLog' in httpd.conf
4. Change 'SSLLogLevel' to 'LogLevel' in httpd.conf
5. Comment or remove the first suPHP_AdddHandler line (as stated by dave's post above)
Then it was up and running for me. Guess once they fix those kinks out it should be good. I would think these are things the postcheck is supposed to be doing since it even detects which config version it is coming from and moving to.
Hope this might help someone.
EDIT: removed last step. not sure how to get the main hostname working. defaults to the first virtualhost on the IP for me. Not a big deal.
Last edited by eger; 08-31-2006 at 11:52 PM.