Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

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

    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. #2
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #3
    Member
    Join Date
    May 2002
    Posts
    429

    Default

    Quote Originally Posted by mtindor View Post
    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

  4. #4
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Angel78 View Post
    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

  5. #5
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    You can also change the default version in WHM using the Configure PHP and Suexec function.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    I'd love to see a cPanel option for php4/php5 in the customers control panel - maybe like password protected directories or similar.

    twitter: oderland_david

  7. #7
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mtindor View Post
    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 by brianoz; 10-19-2007 at 02:56 AM.

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    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.

    twitter: oderland_david

  9. #9
    Member manokiss's Avatar
    Join Date
    Mar 2002
    Posts
    536

    Default

    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!

  10. #10
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by manokiss View Post
    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 by mtindor; 10-20-2007 at 10:37 AM.

  11. #11
    Member manokiss's Avatar
    Join Date
    Mar 2002
    Posts
    536

    Default

    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. #12
    Member verdon's Avatar
    Join Date
    Nov 2003
    Location
    Northern Ontario, Canada
    Posts
    792

    Default

    Are the ownership and permission requirements of files and dirs pretty much the same for suphp as they were for phpsuexec?

  13. #13
    Member manokiss's Avatar
    Join Date
    Mar 2002
    Posts
    536

    Default

    As far as i know should be the same....644 for files and 755 for directories.

  14. #14
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by verdon View Post
    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

  15. #15
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mtindor View Post
    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)

Similar Threads & Tags
Similar threads

  1. Compile Exim with MySQL lookup support
    By cpanda in forum E-mail Discussions
    Replies: 3
    Last Post: 11-06-2008, 07:28 AM
  2. EA3 Concurrent PHP4/5 Compile - PHP Acceleration
    By verdon in forum cPanel and WHM Discussions
    Replies: 18
    Last Post: 12-05-2007, 04:29 AM
  3. How to php4 and php5 (.php5) in same server?
    By strikinado in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2007, 11:01 AM
  4. Redhat ES 3 support php5 + mysql 4? on cpanel?
    By aboyz in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-09-2004, 08:03 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube