Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12853 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17802 invoked by uid 1010); 16 Sep 2004 07:45:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17545 invoked from network); 16 Sep 2004 07:45:22 -0000 Received: from unknown (HELO iko.gotobg.net) (80.168.8.116) by pb1.pair.com with SMTP; 16 Sep 2004 07:45:22 -0000 Received: from pd95e9e91.dip.t-dialin.net ([217.94.158.145] helo=[192.168.0.36]) by iko.gotobg.net with asmtp (Exim 4.41) id 1C7qxG-0001Z5-VQ; Thu, 16 Sep 2004 10:45:23 +0300 Message-ID: <4149444A.9000503@hristov.com> Date: Thu, 16 Sep 2004 09:44:10 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040817 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Hobbs CC: internals@lists.php.net References: <20040916040105.25425.qmail@pb1.pair.com> In-Reply-To: <20040916040105.25425.qmail@pb1.pair.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] mysql_connect using version 5.0.1 accesses the internet when host and client are the same system From: php@hristov.com (Andrey Hristov) Sam Hobbs wrote: > I am using PHP Version 5.0.1, MySQL 5.0.1-alpha-nt, and Apache/2.0.48 with > Windows XP with SP2. When I use mysql_connect in a php page in Apache to > connect to the "localhost" I get: > > Warning: mysql_connect() [function.mysql-connect.chm]: Can't connect to > MySQL server on 'localhost' (10061) > > I get that when the firewall does not allow Apache and MySQL to access the > internet. When I do allow Apache to access the internet, mysql_connect with > the same parameters works. Is that waht is supposed to happen? > > I assume this is a PHP problem but I can't be sure it is, so I apologize if > it is not. > > I realize that I have not provided much information. If access to the > internet is normal when the server and client are in the same system, then I > won't spend much more time on this. If however it sounds like a bug, then I > will gather as much information that I can and submit a bug report. > Hi, AFAIK MySQL on windows by default tries to use TCP/IP, this differs from the default behavior on *nix, where it tries to Unix socket and after that TCP/IP. On windows nt one can use named pipes, however they are not enabled by default. Use --enable-named-pipe, or just --skip-networking. The latter instructs MySQL not to use TCP/IP. More info here : http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html HTH, Andrey