Re: two mysql installations php_mysql.dll extension and libmysql.dll question
| From: | ANR Daemon | Date: | Mon, 10 Nov 2008 20:53:21 +0000 |
| Subject: | Re: two mysql installations php_mysql.dll extension and libmysql.dll question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283194@lists.php.net to get a copy of this message | ||
Greetings, Daniel Kolbo.
In reply to Your message dated Thursday, November 6, 2008, 1:19:50,
> This question may be more for the MySQL community. If so, my
> apologies, please let me know.
> I am using php v 5.2.6.
> I have two versions of MySQL running on my server (windows xp home sp3).
> MySQL v6 is running on localhost:3306
> MySQL v5.0.41 is running on localhost:3307
> I have two installations of phpmyadmin (latest version 3.0.1.1) to
> manage both of these (i am running a local apache 2.2 server on the same
> machine on port 8080). Let's call these two installations phpmy5admin
> and phpmy6admin.
> I am able to login and create tables on both versions of mysql. Thus, i
> suspect the installation of both of these is okay.
> When i view both phpmyadmin installations it gives me the correct
> corresponding mysql version number on the homepage.
> However, the phpmy6admin gives me a warning saying:
> "Your PHP MySQL library version 5.0.51a differs from your MySQL server
> version 6.0.7. This may cause unpredictable behavior."
> When i copy the libmysql.dll from the mysql 6 installation directory
> into the php directory i get a pop up saying apache must shutdown when
> any php script invokes the mysql module.
> my windows path variables have
> C:\php;C:\Program Files\MySQL
> in that order.
> my mysql installations are at
> C:\Program Files\MySQL\MySQL Server 5.0
> C:\Program Files\MySQL\MySQL Server 6.0
Look, your %PATH% points to nowhere. There's no libMySQL.dll in C:\Program Files\MySQL
It should be
C:\php;C:\Program Files\MySQL\MySQL Server 6.0\bin
at least.
> I do suspect the c:\php is being read first, as when i change the
> libmysql.dll in this folder, i experience different results.
You're right, but it is poor idea to install PHP in C:/php I think :)
> I do not have any libmysql.dll files in my system path.
that's because your %PATH% is wrong. See above.
> My question are:
> 1) Is there a libmysql.dll for version 6? If so, where do i get it?
Above, look above. I told ya, it's in MySQL /bin directory.
> 2) Does libmysql.dll for version 6 only function properly with an
> updated php_mysql.dll extension? If so, where do i get this updated
> extension?
No, it should work well with any server, even 3.23
> 3) If I get the correct library for version 6 working, will i then have
> issues running version 5?
Shouldn't have any issues, aside from potential bugs of course.
> 4) Perhaps I can ignore the warning? (i don't like this option ;)
You'd better find it's root and eliminate it.
On a side note (not much of a side), I highly recommend to download Mysql
Connector/PHP from MySQL site.
php_mysql.dll/libmysql.dll shipped with PHP has known bug, which still not
fixed in 5.2.6 for me.
P.S.
Other way of doing this (solving DLL-hell issue, I mean), is what I'm using
all the way since... let me guess... 1998 may be.
This file being included into Apache httpd.conf:
> LoadFile C:/usr/sbin/php-5.2.2-Win32/libeay32.dll
> LoadFile C:/usr/sbin/php-5.2.2-Win32/ssleay32.dll
>
> LoadFile C:/usr/sbin/php-5.2.2-Win32/libmysql.dll
>
> LoadFile C:/usr/sbin/php-5.2.2-Win32/php5ts.dll
>
> LoadModule php5_module "C:/usr/sbin/php-5.2.2-Win32/php5apache2_2_filter.dll"
>
> <IfModule php5_module>
> php_admin_value extension_dir "C:/usr/sbin/php-5.2.2-Win32/ext"
> PHPIniDir "C:/usr/sbin/php-5.2.2-Win32"
> </IfModule>
That said, I always know which library i've loaded, and if something weird
occur, I know who to blame about that.
--
Sincerely Yours, ANR Daemon <anrdaemon@freemail.ru>