Closed jacrasmussen closed 9 months ago
I do not think this change is necessary...
Laravel uses the PDO library, which will connect using a socket automatically when you specify localhost
as the server.
I use this on my own server. I disable the MySQL network protocol (skip-networking
), and specify localhost
as the server name. It works!
As far as I can tell this PR would only be useful if your server is mis-configured, and the php.ini
setting for pdo_mysql.default_socket
is incorrect.
See https://www.php.net/manual/en/ref.pdo-mysql.connection.php
When the host name is set to "localhost", then the connection to the server is made through a domain socket.
I appreciate the link and I confirm that it does work with only having localhost as dbname and the socket path in php.ini, my mistake was having the complete DSN as dbname at first as this is the way to go for some PHP applications.
I still think the change can be useful for users that prefers to configure the application through the setup wizard, but I'll be happy to drop the PR as well
I seriously doubt anyone is using socket path strings in their webtrees config. Sounds like there is no traction from fisharebest. Recommend closing the PR and, if needed, starting a forum thread.
There has been confusion in the past between localhost
and 127.0.01
.
Port is a required field, but not used with localhost
.
I kept this open as a reminder to update the database-options page in the setup.
I have re-worked the input form to make clear the difference between localhost
and a network connection.
This changes enable the configuration of UNIX socket connections for MySQL/MariaDB. It adds an additional configuration field for the socket path.
The change has been tested locally and on a running Webtrees instance using Webtrees 2.1.17.