• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

multiple php not working with installed mysql

Hi Ahmad12,

it's hard to guess what causes an error, if you don't provide any error - message, when using mysqli. You can always try to implement an error - catch in your PHP - code, to get some informations about possible issues/problems/errors.
 
Hi, I have the same problem. I installed PHP 5.6.4 using that guide. Everything works except mysqli. For example in Joomla I get: "Error displaying the error page: Application Instantiation Error: The MySQL adapter mysqli is not available". But if I use "mysql" in configuration file Joomla works.
 
Mysql, mysqli, and mysqlnd are available in the PHP Panda packages as well:

http://talk.plesk.com/threads/php-panda-multi-php-installer-for-plesk.293750/

By default it will install the mysqlnd module, and the mysql/mysqli packages (available separately) are linked against the default version of mysql for that specific platform. My recommendation would be to stick with the mysqlnd module unless you have a specific reason to use the locally linked versions.
 
i have the exact same problem. here is a little bit more information in case somebody can think of a solution
i have php 5.3.3 (centos default) and installed 5.4.38 and 5.5.12
mysqli is enable in each every one of them but still it doesn't work.

here are the phpinfo

for 5.3.3
MysqlI Supportenabled
Client API library version 5.1.73
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Client API header version 5.1.73
MYSQLI_SOCKET /var/lib/mysql/mysql.sock


for 5.4.38
MysqlI Supportenabled
Client API library version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0

(for 5.5 is the same with 5.4 but with mysqlnd 5.0.11 instead)

now except of Joomla and the "Error displaying the error page: Application Instantiation Error: The MySQL adapter mysqli is not available" error, for custom coded staff with mysqli i get "Warning: mysqli_connect(): (HY000/2002):No such file or directory in /var/www/vhosts/..../..../.../....php on line 6
Failed to connect to MySQL: No such file or directory"

line 6 for example is just a simple query
$mysqli = mysqli_connect("localhost", "DBusername", "DBpsw", "DBname");

any ideas?
 
Update on my experience with this issue, I ran into the issue of mysqli not working with multiple php versions when I followed these instructions http://kb.odin.com/en/118378 but when I installed the multiple php versions using the autoinstaller (
/usr/local/psa/admin/sbin/autoinstaller) or through the Plesk Panel "Updates and Upgrades" interface everthing is working as it should.
 
For reference I had this issue with joomla and it took me a day to sort out.

"Database connection error (1): The MySQL adapter 'mysql' is not available. Database connection error (1): The MySQL adapter 'mysql' is not available."

The problems started when I moved a copy of the joomla site from our staging server to our live server both of the servers have plesk 12.5 and I imported full Plesk backup in order to update the live server.

On importing the Plesk backup this caused the error as a different version of PHP was selected on the live server. I then proceeded to waste a whole day trying different versions of PHP and checking which mysql handlers were working. Eventually I notice that the php.ini file did not match another Joomla site on the same server resetting version in plesk PHP fixed that problem. I had versions Joomla Akeeba backups to use so I deleted the domain and reinstall from scratch using the akeeba backup. This got the site working and I then reinstated my nginx settings and the problem recurred.

I was using nginx and I had the proxy_cache enabled so what was happening was that once the error had occurred I could never get past the error page because nginx had cached it. Effectively every time I made the change and got errors the error pages were cached by nginx and then served for future requests. Here are the additional nginx settings that caused the problem.

proxy_cache qms;
proxy_cache_valid 200 1d;

All very annoying.
Paul
 
For reference I had this issue with joomla and it took me a day to sort out.

"Database connection error (1): The MySQL adapter 'mysql' is not available. Database connection error (1): The MySQL adapter 'mysql' is not available."

The problems started when I moved a copy of the joomla site from our staging server to our live server both of the servers have plesk 12.5 and I imported full Plesk backup in order to update the live server.

On importing the Plesk backup this caused the error as a different version of PHP was selected on the live server. I then proceeded to waste a whole day trying different versions of PHP and checking which mysql handlers were working. Eventually I notice that the php.ini file did not match another Joomla site on the same server resetting version in plesk PHP fixed that problem. I had versions Joomla Akeeba backups to use so I deleted the domain and reinstall from scratch using the akeeba backup. This got the site working and I then reinstated my nginx settings and the problem recurred.

I was using nginx and I had the proxy_cache enabled so what was happening was that once the error had occurred I could never get past the error page because nginx had cached it. Effectively every time I made the change and got errors the error pages were cached by nginx and then served for future requests. Here are the additional nginx settings that caused the problem.

proxy_cache qms;
proxy_cache_valid 200 1d;

All very annoying.
Paul
Most probably that it is Joomla related issue. I suggest you forward this issue to our Joomla expert here - https://talk.plesk.com/threads/joom...-regarding-the-open-source-cms-joomla.339111/
 
Back
Top