Re: PHP 4.0 Bug #5823: PHP assumes MySQL unix socket is always available
| From: | Rasmus Lerdorf | Date: | Mon, 31 Jul 2000 00:45:44 +0000 |
| Subject: | Re: PHP 4.0 Bug #5823: PHP assumes MySQL unix socket is always available | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-26993@lists.php.net to get a copy of this message | ||
> > It is not slightly modified, and it is maintained by the MySQL
> > developers.
> > It is extremely handy to have built-in support on Windows,
> > for example.
>
> MySQL doesn't ship with Windows dll ? If it's really just for
> windows people, why it is not distibuted separately ?
>
> > Which OS are you on that does not have Unix Domain sockets? And why isn't
>
> The problem is not in the OS. NetBSD does support unix sockets, of sourse.
> The problem is in threading package used for MySQL, i.e. mit-pthreads.
> mit-pthreads don't support unix sockets, period. MySQL-native mysqlclient
> library is not using them, as well. So everything which is linked
> against MySQL own mysqlclient just works, too.
>
> > It makes installation simpler for people who need to connect to a MySQL
> > database somewhere. They don't need to install the client libs on their
> > own machine.
>
> So why is PHP not shipping with client libraries for other
> extensions ?
It does ship with some. Like both Posix and PCRE regex libraries for
example.
However, you are changing the discussion. I don't like your patch because
it will adversely affect a lot of people. An extra stat() and the
obscurity of falling back to slow TCP connections. In your case you could
work around it by simply connecting to 127.0.0.1 instead of localhost.
-Rasmus