php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42733 Additional information about windows error 10106
Submitted: 2007-09-22 09:41 UTC Modified: 2007-11-21 15:46 UTC
From: andrey@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2007-09-22 09:41 UTC] andrey@php.net
Description:
------------
Hi,
one can find this information on the web and it's not libmysql's problem but PHP one, but still in most cases mysql connections fail and the community starts to blame MySQL. Could the following be added to ext/mysql and ext/mysqli's documentation

"If you get this error :
'Warning: mysql_connect(): Can't create TCP/IP socket (10106)'
please check the value of variables_order in your php.ini file. Ensure that the environment variables are copied, namely $_ENV is not empty. You should have 'E' as part of variables_order. On Windows, if the environment is not copied the SYSTEMROOT environment variable won't be available and PHP will have problems loading Winsock.



Reproduce code:
---------------
Check for the error message on the internet. Quite few hits.

Expected result:
----------------
 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-21 15:46 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"Error "Can't create TCP/IP socket (10106)" usually means that the variables_order configure directive doesn't contain character E. On Windows, if the environment is not copied the SYSTEMROOT environment variable won't be available and PHP will have problems loading Winsock."
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 10:00:01 2026 UTC