Ulf,
The error that is reported (10106) is documented as
WSAEPROVIDERFAILEDINIT. This is a WinSock 2 specific error and is
documented as: -
The requested service provider could not be loaded or initialised.
I would imagine that the problem is an NT thing. I am making the
assumption that you are using NT. What web server are you using?
The point is, if you where using IIS, then the PHP.EXE would get
executed in the security context of the account IIS_USER. This account
may have insufficient privs to do what you want. I believe that you can
execute a PHP script on the command line, don't know how, I just read it
somewhere. You may want to try that. This will test the security theory.
Another thing on Windows 9x/NT is there is Winsock 1.1 and Winsock 2.0.
These are two different DLL's. Winsock 1.1 is done through wsock32.dll
while Winsock 2.0 is done through ws2_32.dll. I have had many problems
with using the ws2_32.dll, but these are mainly on Win9x. Not NT.
As you can see I don't have an answer, just some info that may help you
track down the problem. I believe that you would get this error if you
made a call to socket(...) passing in a transport that was not installed
on the system. for example socket(AF_IPX....) where no IPX was on the
system. It could be that you have a faulty TCP/IP installation and
WinMySQL works because is uses Winsock 1.1 but the libmysql module does
not because it uses Winsock 2.0.
I hope that you can get something useful out of this lot
Regards
Gerry Sweeney
-----Original Message-----
From: Ulf Wendel [mailto:ulf@stripped]
Sent: 05 March 2000 16:00
To: sinisa@stripped
Cc: win32@stripped; mysql@stripped
Subject: Re: Can't create IP socket (10106)
sinisa@stripped wrote:
> This is some PHP related question. May be you did not install PHP with
> mysql support ??
>
> Check out your PHP installation, and may be re-install it !
Dear Sinisa,
usually I'm the guy that tells beginners to look for their php
configuration... If php wouldn't be properly installed I would get a
message similar to "unsupported function".
PHP works fine. The error message "MySQL Connection Failed: Can't
create IP socket (10106)" comes directly from the MySQL API. There is
just one place in the php 3.0.14 source where the String "MySQL
Connection Failed" appears: functions/mysql.c. Here's the snippet:
mysql = (MYSQL *) emalloc(sizeof(MYSQL));
#if MYSQL_VERSION_ID > 32199 /* this lets us set the port number */
mysql_init(mysql);
if
(mysql_real_connect(mysql,host,user,passwd,NULL,port,socket,0)==NULL) {
#else
if (mysql_connect(mysql,host,user,passwd)==NULL) {
#endif
php3_error(E_WARNING,"MySQL Connection Failed:
%s\n",mysql_error(mysql));
efree(hashed_details);
efree(mysql);
RETURN_FALSE;
}
PHP (phpinfo) says its using "Client API version: 3.22.9-beta". My MySQL
Version is: "Ver 9.38 Distrib 3.22.32, for Win95/98 (i586)". The point
that I can't understand is: why is WinMySQL 1.03 working fine? What's
the difference between the TCP connection WinMySQL makes and that one
PHP makes?
In the end it must be a problem with TCP/IP on my NT, but I have no idea
what's causing the trouble.
Thanks in advice,
Ulf
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
before
posting. To request this thread, e-mail win32-thread1704@stripped
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail win32-unsubscribe@stripped instead.