Bug #81182 [Nab]: Could not create a MySQLi connection

From: Date: Sun, 20 Jun 2021 22:39:40 +0000
Subject: Bug #81182 [Nab]: Could not create a MySQLi connection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234564@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81182&edit=1

 ID:                 81182
 User updated by:    list at understudy dot net
 Reported by:        list at understudy dot net
 Summary:            Could not create a MySQLi connection
 Status:             Not a bug
 Type:               Bug
 Package:            MySQLi related
 Operating System:   FreeBSD 12.2
 PHP Version:        7.4.20
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for your time. I apologize if this is the wrong place.


Previous Comments:
------------------------------------------------------------------------
[2021-06-20 22:10:03] requinix@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

If you installed PHP and MariaDB/"MySQL" through standard FreeBSD mechanisms (like pkg)
and did not install anything yourself manually (for example, by compiling locally) then you may need
to report this issue to FreeBSD and/or whoever maintains those packages.

But first, consider asking on StackOverflow or elsewhere to see if you made a mistake somewhere
during installation or configuration.

------------------------------------------------------------------------
[2021-06-20 22:03:31] list at understudy dot net

Description:
------------
Specs on system:
FBSD 12.2 
PHP 7.4.20 
MariaDB 10.5.10
Coppermine 1.6.10
phpmyadmin 4.9.7

Error from coppermine when trying to connect to database on install step 6 
Could not create a MySQLi connection, please check the MySQLi details entered
Database error: No such file or directory

Through CLI DB is confirmed and working. 
Tests on CLI and with port 3306 on localhost and 127.0.0.1 show ok. 

Test also preformed with phpmyadmin which gave similar errors in their setup. 

Issue: failure to connect to DB via mysqli through "localhost" 

Possible solution implemented:

edit the following file:
/usr/local/etc/php/ext-20-mysqli.ini

add the following lines:
pdo_mysql.default_socket="/var/run/mysql/mysql.sock"
mysqli.default_socket="/var/run/mysql/mysql.sock"


This solution may only work for FBSD. It is uncertain if this solution will work with Linux or
Windows or if they are having this issue. 


Test script:
---------------
NA

Expected result:
----------------
I would like to see if the ext-20-mysqli.ini needs to be modified in the ports/pkg for FBSD or if
this is an issue that may pertain to other OS systems out there. 



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81182&edit=1


Thread (3 messages)

« previous php.bugs (#234564) next »