Can’t create TCP/IP socket (10106)
Posted in Windows Apache MySQL PHP on November 4th, 2008 by Les – Be the first to commentThis post may help some other Windows/Apache/Mod-fcgid users out.
We recently migrated a windows 2000 Apache install to a Windows Server 2003 box.
Despite having all the mysql libs, the pho_sockets module etc configured php kept failing to connect to a mysql localhost with the error “Can’t create TCP/IP socket (10106)”
After much googling and little answers (though many others having the same problem) I realised that in my httpd.conf in the section where we set runtime values for the PHP (such as PHP_RC, TEMP FOLDER etc.) included the path C:\WINNT which of course was fine on windows 200 but on Server 2003 should have been C:\WINDOWS.
Once all these paths were changed and apache started, all was well.
My guess is that php_sockets is dependent upon windows winsock implementation and with duff paths being passed to php-cgi.exe the winsock library could not be loaded and hence all socket stuff failed.
I’m only guessing though. Whatever the reason it’s unimportant since there was a clear problem with the paths.
Hope this saves someone else a couple of hours!