Connecting Tech Pros Worldwide Forums | Help | Site Map

MySQL not working on PHP 5.2.4 zip based install

Cool Dude
Guest
 
Posts: n/a
#1: Oct 2 '07
I installed PHP 5.2.4 on Apache 2.2.6 with MySQL 6.0.2 alpha on
Windows XP Professional Service Pack 2 and everything is working fine
but the MySQL extension for PHP. The error log in Apache says:

PHP Warning: PHP Startup: Unable to load dynamic library 'H:\
\php-5.2.4-Win32\\ext\\php_mysql.dll' - Invalid access to memory
location.\r\n in Unknown on line 0

Why does this happen? And, how can I cure this?
Please reply at the earliest. Thanks in advance.


macca
Guest
 
Posts: n/a
#2: Oct 2 '07

re: MySQL not working on PHP 5.2.4 zip based install


This usually happens due to an old version of php_mysql.dll on your
system somewhere.

When this bit me it was because i had a copy of php_mysql.dll in my
apache folder, even though i had configured php.ini to read it from
the new php directory.


Search your system (e.g. start->search) for "php_mysql.dll" and delete
them all except for the one in the php/ext directory (the up-to-date
one).

Make sure you have a copy of php_mysql.dll in the php/ext directory
and php.ini has the correct path to your php/ext directory.


Regards,

Paul

Cool Dude
Guest
 
Posts: n/a
#3: Oct 30 '07

re: MySQL not working on PHP 5.2.4 zip based install


On Oct 2, 11:43 pm, macca <ptmcna...@googlemail.comwrote:
Quote:
This usually happens due to an old version of php_mysql.dll on your
system somewhere.
>
When this bit me it was because i had a copy of php_mysql.dll in my
apache folder, even though i had configured php.ini to read it from
the new php directory.
>
Search your system (e.g. start->search) for "php_mysql.dll" and delete
them all except for the one in the php/ext directory (the up-to-date
one).
>
Make sure you have a copy of php_mysql.dll in the php/ext directory
and php.ini has the correct path to your php/ext directory.
>
Regards,
>
Paul
Thanks Paul/macca. Although I have seen this reply after a long time,
I guess it will be helpful when I do a fresh install of WAMP some
other time. My problem was solved by copying the "libmysql.dll" file
inside the "php\." directory to the "windows\system32\" Someone on IRC
told me to do that.

AnrDaemon
Guest
 
Posts: n/a
#4: Oct 30 '07

re: MySQL not working on PHP 5.2.4 zip based install


Greetings, Cool Dude.
In reply to Your message dated Wednesday, October 31, 2007, 00:32:31,
Quote:
Thanks Paul/macca. Although I have seen this reply after a long time,
I guess it will be helpful when I do a fresh install of WAMP some
other time. My problem was solved by copying the "libmysql.dll" file
inside the "php\." directory to the "windows\system32\" Someone on IRC
told me to do that.
That was a bad solution.
Right one is to preload library before loading PHP extension.
Following example is from my live Apache installation:

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/mysql/bin/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>

Notice that I use libMySQL shipped with MySQL server rather than one bundled
with PHP. I've recently discovered problem in bundled libMySQL.dll slowing
down server and cause high system load. Details on bugtracker, if You want
more info.

Other solution is to use Connector/PHP from MySQL website. (One for
PHP5/MySQL5, I've got twice increase in server responsivity from time I
change connector from bundled with PHP 5.2.4 to one suppied by MySQL)


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

Closed Thread