Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

mysql_connect & EA4

Discussion in 'EasyApache' started by abdelhost77, Sep 21, 2017.

  1. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Hello ,

    I recently migrate to easyapache4 , PHP5.4 , and then i receive error :
    PHP Fatal error: Call to undefined function mysql_connect()


    In Cpanel EA4 documentation i found this in FAQ :

    I received a mysql_connect () error when I upgraded to EasyApache 4.

    EasyApache 4 uses the mysqlnd native driver. This driver does not support old pre-MySQL 4.1 passwords. We strongly recommend that you update all of your MySQL database password hashes before you upgrade to EasyApache 4.

    So Question :
    How can i update all of MySQL database password hashes ?
    It is around 200 cpanels accounts in that server
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Hello ,

    this not apply to me , i do not have .httaccess on that accounts , and this accounts are caming from Mysql 4.1 , so i think the issue is some incompatibility between Easy apache4 and mysql4.1 , as explained in this paragraph :

    EasyApache 4 uses the mysqlnd native driver. This driver does not support old pre-MySQL 4.1 passwords. We strongly recommend that you update all of your MySQL database password hashes before you upgrade to EasyApache 4.



    But the question how to fix this please ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Thanks for your reply , but this is not solving my issue ,

    i ever create a new database called "dbname" within Mysql 5.6 and launch this:


    <?php
    $db="dbname";
    $bdus="db_user";
    $pwdus="password";
    $link = mysql_connect('localhost',$bdus, $pwdus);
    $db_selected = mysql_select_db($db, $link);
    ?>

    But still giving this error :
    PHP Fatal error: Call to undefined function mysql_connect()
     
  6. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    i also try by mysqli and pdo but gotting errors

    Class 'mysqli' not found
    PHP Fatal error: Class 'PDO' not found

    i'm using EasyApache4 , PHP 5.4 with suphp and suhosin

    Here attached my php.ini ( from WHM)
     

    Attached Files:

  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
  8. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Thanks , ticket opened :

    Your support request ID: 8886229
     
  9. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    90
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    I fix it , here is the solution in case someone find same issue :

    i'm using SuPHP and i'm avoinding using customs php.ini file by uncommenting this line :

    application/x-httpd-ea-php54 = /opt/cpanel/ea-php54/root/etc

    in /etc/suphp.conf

    but this case , php.ini is imcomplete and should be completed by running :

    cat /opt/cpanel/ea-php54/root/etc/php.d/*.ini > /opt/cpanel/ea-php54/root/etc/php.ini

    And then the issue is fixed as all library are now present in php.ini .
     
  10. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    So is it possible to use EA4 with pre-4.1 MySQL passwords?

    Still working away at converting these.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The availability of the "old-passwords" value in your /etc/my.cnf file relates to the version of MySQL installed on the server as opposed to the version of EasyApache. Can you verify which version of MySQL is installed on your system?

    Thank you.
     
  12. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    I did a test on a dev server running PHP 5.4 & MySQL 5.5 with old-passwords and after the conversion from EA3 to EA4, all sites could no longer connect to their databases after, unless I switched them to use CloudLinux's alt-php.

    I was under the impression that EA4 was not compatible with MySQL old-passwords.

    Could this have just been a php.ini issue or something causing this and old-password support with MySQL 5.5 still be possible after conversion to EA4?
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Actually, you are correct that EasyApache 4 does not support the pre-MySQL 4.1 password format. Here's the corresponding entry on our EasyApache 4 FAQ document:

    Thank you.
     
  14. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    Thanks for confirming.

    Do you have any insight on whether v70, which is scheduled for the next LTS release, will still support EA3?

    The biggest hold up for our conversion to EA4 has been getting older servers off of pre-4.1 MySQL passwords. As we're running v66 currently, it would be great to be able to get those servers on a current LTS release until that work is complete and we can proceed with the EA4 conversions.

    It would be really helpful to have one last scheduled LTS release with EA3 support, since I'm sure you're aware that migrating from pre-4.1 MySQL passwords can be a massive job.
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Here's the most recent update from the July 2017 Development Update:

    Thank you.
     
  16. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    I'm aware that "early 2018" is still planned for its deprecation. Just wanted to note that one more LTS release with final support of EA3 would be greatly appreciated since many of us are running the stable build and have already upgraded passed v62. As migrating from pre-4.1 MySQL passwords is so time consuming, having one last opportunity to complete this while on the LTS tier would be a relief, so we don't have to rush the job.
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,424
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    A specific time frame on when systems using EasyApache 3 will be prevented from updating to a newer version of cPanel is not yet available, however note that generally the deprecation of a feature doesn't mean you can't use it. It typically means that it's no longer supported and will no longer receive updates. I encourage you to follow the cPanel blog for updates to the EA3 deprecation schedule:

    cPanel Blog | From the Inside

    Thank you.
     
Loading...

Share This Page