php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81182 Could not create a MySQLi connection
Submitted: 2021-06-20 22:03 UTC Modified: 2021-06-20 22:39 UTC
From: list at understudy dot net Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 7.4.20 OS: FreeBSD 12.2
Private report: No CVE-ID: None
 [2021-06-20 22:03 UTC] 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. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-20 22:10 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2021-06-20 22:10 UTC] 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:39 UTC] list at understudy dot net
Thank you for your time. I apologize if this is the wrong place.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 02:02:52 2024 UTC