EA3 Concurrent PHP4/5 Compile - no MySQL Support in PHP5

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
WHM 11.11.0 cPanel 11.15.0-R17665
CENTOS Enterprise 4.5 i686 on virtuozzo - WHM X v3.1.0

Ran EasyApache3 to install concurrent PHP4/PHP5 - Frontpage / SuPHP / Mod Security / MySQL support compiled in on both.

Below are the compile options I selected.

I can't bring up a previous website on the server with PHP5 - but with PHP4 it works fine. With PHP5 set as default, if I check phpinfo, there is no MySQL section - it did not compile it in.

In order for MySQL support to be available in PHP5 when you compile concurrent PHP4/PHP5, do you need to select more than just 'Mysql of the system' ? Does 'Mysql' and/or 'MysqlI' also need to be checked?

Mike


- apache 1.3
- PHP 4
- 4.4.7

Frontpage
Mod SuPHP
Unique ID
Mod Security

Asis
CGI
Include
Mod SuPHP
Env
Expires
Fileprotect
Raise FD Setsize
Raise Hard Server Limit
Unique ID
Frontpage
Headers
Mod Security

PHP 4.4.7
Bcmath
CGI
Calendar
Curl
CurlSSL
Mysql of the system
OpenSSL
DiscardPath
POSIX
Path Info Check
Pcre Regex
Pear
FTP
Force CGI Redirect
GD
Magic Quotes
Mbregex
Mbstring
Mcrypt
Sockets
TTF
Wddx
XmlRPC
Zip
Zlib

PHP 5.2.3
- same options as PHP 4.4.7, when available
- selected 'mysql of the system'
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
I'll answer my own question.

If I had PHP 4.4.7 'Mysql of the system' option set in EA3 and it worked for 4.4.7, it does not mean this will work for PHP 5.x.x (at least not on concurrent compile).

I went through and compiled again, this time setting both 'mysql' and 'Mysql of the system' in the PHP5 compile options of EA3, and the PHP5 compiled with MySQL support - and of course PHP4 compiled with MySQL support using only the 'MySQL of the system' option.

So far I'm liking this concurrent install jazz. It's easy via command line to switch which PHP is the default. When I do this for our big system, I'll probably set PHP4 as default. But I have PHP5 set as default so that I can do some testing with a few existing PHP/MySQL applications on the server.

Mike
 

Angel78

Well-Known Member
May 9, 2002
413
1
318
I'll answer my own question.

If I had PHP 4.4.7 'Mysql of the system' option set in EA3 and it worked for 4.4.7, it does not mean this will work for PHP 5.x.x (at least not on concurrent compile).

I went through and compiled again, this time setting both 'mysql' and 'Mysql of the system' in the PHP5 compile options of EA3, and the PHP5 compiled with MySQL support - and of course PHP4 compiled with MySQL support using only the 'MySQL of the system' option.

So far I'm liking this concurrent install jazz. It's easy via command line to switch which PHP is the default. When I do this for our big system, I'll probably set PHP4 as default. But I have PHP5 set as default so that I can do some testing with a few existing PHP/MySQL applications on the server.

Mike
how do you change the default version to php4?

tnx
:)
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
how do you change the default version to php4?

tnx
:)
Assuming you are running EA3 and have compiled PHP4 and PHP5 both into Apache using EA3, you use this:

/usr/local/cpanel/bin/rebuild_phpconf

I run suphp for both php4 and php5. I set it to default to PHP4. I enable Suexec (a value of 1 is enable suexec, a value of 0 is disable), so my line is:

/usr/local/cpanel/bin/rebuild_phpconf 5 suphp suphp 1

Just run /usr/local/cpanel/bin/rebuild_phpconf all by itself to get some help.

Mike
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
You can also change the default version in WHM using the Configure PHP and Suexec function.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
I'll answer my own question.

If I had PHP 4.4.7 'Mysql of the system' option set in EA3 and it worked for 4.4.7, it does not mean this will work for PHP 5.x.x (at least not on concurrent compile).

I went through and compiled again, this time setting both 'mysql' and 'Mysql of the system' in the PHP5 compile options of EA3, and the PHP5 compiled with MySQL support - and of course PHP4 compiled with MySQL support using only the 'MySQL of the system' option.
Cpanel - this is extremely unhelpful and confusing as it is - for MySQL to be required in PHP5 but not in 4.4.7. Could you PLEASE fix this by either adding meaningful help, or a note that MySQL needs to be selected for PHP5 - you'll only be saving yourself support calls :)

I know easyapache3 was hard to get out the door, and you've done some great things with it, really! But please, please get the documentation right - all you have at the moment is just redirection to the php.net doco which isn't really useful at all as it's just too general. What we need is a small line on the page, or better still an "overlib" popup that explains what each option does for the key options.
So far I'm liking this concurrent install jazz. It's easy via command line to switch which PHP is the default. When I do this for our big system, I'll probably set PHP4 as default. But I have PHP5 set as default so that I can do some testing with a few existing PHP/MySQL applications on the server.
I'm actually liking it too, seems to work really well from what I can tell so far. The only "trap" to be aware of is that the PHP include path varies between versions of PHP - which is actually logical when you think about it, but still something to be careful of.
 
Last edited:

internetfab

Well-Known Member
PartnerNOC
Feb 20, 2003
337
1
168
Gothenburg, Sweden
cPanel Access Level
DataCenter Provider
There should also be a warning for those who still use MySQL 4.0 - that for instance mysqli extension won't work. Noticed this yesterday, on one of our older servers who was the only one left with MySQL 4.0 ;)

Other than that - everything ran smoothly :) Be sure to make a checklist and follow it when upgrading.
 

manokiss

Well-Known Member
Mar 31, 2002
576
1
318
I run suphp for both php4 and php5.
Just wondering if thsi is something you have to work out manually? In another post a cpanbel staff said you only could run 1 suphp through EA3?

Thanx!
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
Just wondering if thsi is something you have to work out manually? In another post a cpanbel staff said you only could run 1 suphp through EA3?

Thanx!
Well, I have PHP4 and PHP5 installed via EA3.

I did not choose Concurrent Mod_PHP Patch though .

When it was done, it gave me a choice of the handlers to use for PHP4 and PHP5, and I chose suphp for both. It seems to work fine.

I have PHP5 set as default. And I can bring up my sites just fine and I can test and see that suphp is working by tailing /usr/local/apache/logs/suphp_log

Then I can go to one of the sites that is running PHP5 and add the following in its .htaccess file:

AddHandler application/x-httpd-php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php4 .php .php3 .php2 .phtml

Then I can go to the site URL and it comes up functioning just fine and I can see the new entry in /usr/local/apache/logs/suphp_log

I'm running PHP 4.4.7 and PHP 5.2.3 with suphp, Zend Optimizer, and Ioncube.

Mike
 
Last edited:

manokiss

Well-Known Member
Mar 31, 2002
576
1
318
Thanx for the post, wondering why a cpanel staff said such thing then, is good to know we are able to run both on suphp.

Thanx!
 

manokiss

Well-Known Member
Mar 31, 2002
576
1
318
As far as i know should be the same....644 for files and 755 for directories.
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
Are the ownership and permission requirements of files and dirs pretty much the same for suphp as they were for phpsuexec?
Yes, nothing at all has changed on that Front. If you were running phpsuexec before, suphp is a direct replacement with no individual directory/file permission or ownership changes needed.

Mike
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
Yes, nothing at all has changed on that Front. If you were running phpsuexec before, suphp is a direct replacement with no individual directory/file permission or ownership changes needed.
Does anyone know whether PHP_AUTH_USER and PHP_AUTH_PW are correctly passed with suphp? (They were broken in phpsuexec and a .htaccess workaround had to be used)
 

verdon

Well-Known Member
Nov 1, 2003
946
18
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Yes, nothing at all has changed on that Front. If you were running phpsuexec before, suphp is a direct replacement with no individual directory/file permission or ownership changes needed.

Mike
I wasn't before, but I want to set up my server now with dual vanilla php4 and php5/suphp/apache2.2 and gradually move my accounts from one to the other.

Thanks :)
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
I wasn't before, but I want to set up my server now with dual vanilla php4 and php5/suphp/apache2.2 and gradually move my accounts from one to the other.

Thanks :)
I haven't had the guts to try to go from 1.3.39 to 2.2. I think I'll hold off on that for quite a while. But it's really nice to be up to MySQL 5 and have PHP4/5 available.

Mike
 

mtindor

Well-Known Member
Sep 14, 2004
1,516
142
343
inside a catfish
cPanel Access Level
Root Administrator
I know this threads wandering all over the place, but... what are you worried about in terms of the apache upgrade?
First off all, I hear people say 2.2 is not stable. I hear things about either Zend or Ioncube maybe not working (although I realize those are PHP things). I just worry about things not working. I haven't defaulted to PHP5 yet only because I'm not sure Fantastico will continue to work. I use HostMerit mod security rules and I dont' want to have to convert them to work with Apache2, and I don't think there is another set of mod security rules that works as good.

I wish that all these threads discussing MySQL 5, PHP 5, and Apache 2.x would start afresh, with people's experiences from now instead of from a year or two ago.

Mike
 
Thread starter Similar threads Forum Replies Date
R Databases 5
A Databases 6