Page 1 of 1

Add db socket in setup and db_connect

Posted: 2022-10-28 11:32
by grimblefritz
I have an odd situation. It is the first time I've encountered it after many years using AppGini.

I have been provided a set of servers that run various versions of Linux, including multiple versions of MySQL and MariaDB. I'm told this represents the configurations found in the field. Easy enough, except (and I'm not sure why) they have elected for each db version to run on a non-standard port AND socket. I discovered this the hard way the first time I deployed the app out of my dev system to their test system.

In short, to make this project work, I need to be able to tell AppGini both the port and socket to use.

There are ways to work around this, of course.

However, I was thinking it might be useful if the initial setup and config.php supported defining socket in addition to port. Especially as db_connect() already supports socket. None of the calls to db_connect(), however, provide the socket - only the port - and the default socket per ini_get() is used.