The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by mtindor, Oct 17, 2007.

  1. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    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'
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    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
     
  3. Angel78

    Angel78 Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    413
    Likes Received:
    1
    Trophy Points:
    16
    how do you change the default version to php4?

    tnx
    :)
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    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
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You can also change the default version in WHM using the Configure PHP and Suexec function.
     
  6. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    I'd love to see a cPanel option for php4/php5 in the customers control panel - maybe like password protected directories or similar.
     
  7. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    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.
    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.
     
    #7 brianoz, Oct 19, 2007
    Last edited: Oct 19, 2007
  8. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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.
     
  9. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    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!
     
  10. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    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
     
    #10 mtindor, Oct 20, 2007
    Last edited: Oct 20, 2007
  11. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    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!
     
  12. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    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?
     
  13. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    As far as i know should be the same....644 for files and 755 for directories.
     
  14. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    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
     
  15. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    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)
     
  16. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    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 :)
     
  17. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    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
     
  18. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    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?
     
  19. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    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
     
  20. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Does this apply to MySQL 4.1.22 also or just 4.0?
     
Loading...

Share This Page