#31746 [Opn->Csd]: mysql_connect returns: Can't create TCP/IP socket (10041)
| From: | gianni at comi dot it | Date: | Fri, 28 Jan 2005 19:26:09 +0000 |
| Subject: | #31746 [Opn->Csd]: mysql_connect returns: Can't create TCP/IP socket (10041) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72998@lists.php.net to get a copy of this message | ||
ID: 31746
User updated by: gianni at comi dot it
Reported By: gianni at comi dot it
-Status: Open
+Status: Closed
Bug Type: MySQL related
Operating System: Windows 2003
PHP Version: 5.0.3
New Comment:
Forget my last post.
Yes, it's not a bug. :)
It is an anonymous web user security policy matter.
Sorry.
Thank you all.
Previous Comments:
------------------------------------------------------------------------
[2005-01-28 18:38:37] gianni at comi dot it
Hi, thank you for reply.
No, it's a bug.
Only on windows 2003 server I have this problem.
It is not an anonymous web user security policy problem: anonymous web
user can use network layer. For example: fopen(url) works fine, and it
creates a tcp/ip socket like mysql_connect.
It is not a mysql problem:
From command prompt:
telnet localhost 3306 -> works
telnet 127.0.0.1 3306 -> works
telnet remoteserver 33060 -> works also on remote mysql server.
If is not a bug, what is it? PHP installations on other server other
than windows 2003 with the same php.ini (the reccommended settings)
work fine.
Only on w2k3 I have this issue.
Why changing from "localhost" to "127.0.0.1" the error doesn't change?
With localhost it should use named pipes, with 127.0.0.1 tcp/ip. This
is very strange.
Is there a different syntax for mysql_connect on windows 2003 system.
From the manual parameter seems parameter are identical for all OSs.
Regards.
------------------------------------------------------------------------
[2005-01-28 18:13:10] georg@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2005-01-28 17:17:51] gianni at comi dot it
Description:
------------
On Windows 2003 and IIS6, using php in cgi mode.
mysql_connect returns this "warning": Warning: Can't create TCP/IP
socket (10041) in....
This happens only on Windows 2003.
Example:
mysql_connect( "localhost", "rightuser", "rightpass" );
mysql_connect( "127.0.0.1", "rightuser", "rightpass" );
mysql_connect( "remotehosname", "rightuser", "rightpass" );
I get always the same error
Reproduce code:
---------------
if (!($m_link = mysql_connect( $DBhostname, $DBuserName, $DBpassword
))) {
db_err ("db connect error");
}
Actual result:
--------------
Warning: mysql_connect() [function.mysql-connect]: Can't create TCP/IP
socket (10041) in F:\Webs\test.php on line 21
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31746&edit=1