abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
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
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
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 ?
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
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()
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
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)
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

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

Thank you.
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
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 .
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
So is it possible to use EA4 with pre-4.1 MySQL passwords?

Still working away at converting these.
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.
 

Varial

Member
Oct 17, 2008
23
5
53
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I was under the impression that EA4 was not compatible with MySQL old-passwords.
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:

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.
Thank you.
 

Varial

Member
Oct 17, 2008
23
5
53
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Do you have any insight on whether v70, which is scheduled for the next LTS release, will still support EA3?
Here's the most recent update from the July 2017 Development Update:

EasyApache 3 Deprecation
As of late last year, EasyApache 3 is no longer in what would be called “active development”. That means we are no longer building new features for it, and that we only ship security updates. EasyApache 3 is currently scheduled for deprecation early in 2018. We will send out a notification giving providers at least three months notice prior to official deprecation. After that, though, EasyApache 3 will no longer receive any updates.

If you’re still using EasyApache 3 for a specific reason, and there’s something holding you back from moving to EasyApache 4, I want to hear from you! Comment below or send me an email.
Thank you.
 

Varial

Member
Oct 17, 2008
23
5
53
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.