Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53512 invoked by uid 1010); 3 Oct 2004 01:27:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53425 invoked by uid 1007); 3 Oct 2004 01:27:06 -0000 Message-ID: <20041003012705.53423.qmail@pb1.pair.com> To: internals@lists.php.net References: <20041003023913.23b1841e@desktop.rtnet> Date: Sat, 2 Oct 2004 18:26:57 -0700 Lines: 15 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Posted-By: 64.142.6.231 Subject: Re: mysql_connect('localhost') should use tcp/ip instead of socket From: pollita@php.net ("Sara Golemon") > When using 'localhost' in mysql_connect(), php tries to > use a socket to connect to the mysql daemon. Is there > a way to force php to resolve the hostname of localhost, > maybe by patching some source file? The reason is that > a socket is not avaible because mysql and apache are > running in different chroot jails on my server. > Actually that's libmysql doing that, not PHP. The way around that "shortcut" is to connect to 127.0.0.1 (by ip) rather than localhost (by name) which of course you can handle in your script code without having to patch PHP or libmysql directly. -Sara