php-windows Digest 16 Jul 2008 15:50:48 -0000 Issue 3504
Topics (messages 28996 through 28997):
Compiling PHP on Windows as static lib produces a dynamic lib
28996 by: Bernhard Schulz
Trouble connecting to MySQL using mysqli extension on XP
28997 by: anonymous
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hello!
SORRY - I do not know why the last mail was cut off. Here my mail again:
I am trying to compile PHP 5.2.5 on Windows (XP) with VC 6, Windows
Server 2003 SDK. I have downloaded the winbuild zip file and the zip
from http://files.edin.dk.
I am using this configure Flags:
###########
cscript /nologo configure.js --disable-all --with-mime-magic
--enable-calendar --with-gmp --enable-com-dotnet --with-t1lib
--enable-hash --enable-ftp --with-mysql --enable-json
--enable-reflection --with-tidy --enable-tokenizer --with-pdo-mysql
--enable-zlib --enable-zip --with-iconv --with-bz2 --enable-soap
--with-xsl --enable-pdo --with-pdo-sqlite --with-sqlite
--enable-zend-multibyte --enable-spl --with-mcrypt --with-mhash
--enable-mbregex --enable-exif --with-xml --with-wddx --with-simplexml
--with-openssl --enable-cli-win32 --enable-embed=static --with-dom
--with-libxml --with-gd --with-curl --disable-cgi --disable-fastcgi
--enable-bcmath --enable-mbstring --with-xmlrpc --enable-object-out-dir=..
###########
As you can see I am using --enable-embed=static so I am expecting a LIB
file with the object code so I can link against it.
But instead I get only a small import library and a huge DLL file.
Detailed current result:
php5ts.lib (about 750KB)
php5ts.dll (about 8.5MB)
php5embed.lib (about 750KB)
What I expect:
1 or 2 LIBs and no DLL.
Is there any (hidden) configure/compiler flag?
Thank you,
Bernhard
--- End Message ---
--- Begin Message ---
I had a tough time getting PHP to connect to MySQL using mysqli on XP.
The following code from the php documentation on mysqli failed to work.
$mysqli = new mysqli( "localhost", "user", "password", "database" );
Where localhost, user, password, and database were replaced with the
appropriate values.
I left the host parameter as "localhost" because that's what I wanted,
however that did not work.
So I changed it to NULL, which defaults to localhost as per the
documentation, but this still did not work.
After some googling, I found the answer on another forum, which stated
that the host should be a dot ".", but no other explanation was given.
Is there anyone that can shed some light on the situation?
Everything works fine now, but I would really like to know why I can't use
"localhost", and why this isn't documented.
I've tried every mysqli option imaginable in the php.ini file.
It seems that host must be a dot.
--- End Message ---