1

I'm trying to upgrade php 5.4.14 from php 5.4.3 in wamp server 2.2e.

  • I have downloaded php-5.4.14-Win32-VC9-x86 (thread safe).
  • Extracted it under C:\wamp\bin\php.
  • Copied wampserver.conf from C:\wamp\bin\php\php5.4.3 to C:\wamp\bin\php\php5.4.14.
  • Renamed php.ini-development to phpForApache.ini. -The port number the wamp server has been changed in the http.conf file to 8087 from its default 80.

This is mentioned here though it is about upgrading from php 5.3.5 to php 5.4.0.

After this, Restarting of the wamp server and services all over again has all been done and those two versions appeared in the menu php->versions (which is opened when the icon of the server is clicked).

But when I attempt to enable a library like php_mysql or php_mysqli, a warning message box appears.

PHP Startup: Unable to load dynamic library 'C:"\php\php_mysql.dll' - The specified module could not be loaded.

I have also tried to removing the semicolon before them in the php.ini file but to no avail.

I'm running Microsoft Windows XP Professional Version 2002, service pack 3.

Where might be the problem?


EDIT:

I have changed extension_dir from C:\php to c:\wamp\bin\php\php5.4.14\ext\ in php.ini as the answer below indicates and the library is now loaded correctly but it says,

1045 - Access denied for user 'root'@'localhost' (using password: YES)

though the user name and the password are the same as they are in MySQL in the config.inc.php file under phpmyadmin. I have also tried to restart MySQL56 service from Control Panel->Services(Local) but it keeps giving the same error. Does someone know why this happens?

3
  • Why do you want to enable ext/mysql anyway? The PHP development explicitly discourages it's use for new projects.
    – Gordon
    May 6, 2013 at 7:16
  • @Gordon : It is because my project was initially built in php 5.2.x using mysql_* functions. I also wanted to keep it running.
    – Tiny
    May 6, 2013 at 9:17
  • If the project is worth the effort, change to mysqli or pdo to be future proof.
    – Gordon
    May 6, 2013 at 9:22

3 Answers 3

1

Run phpinfo(). Find line: Loaded Configuration File and look at extension_dir too. If it is c:\php and it is not the folder you have your php installed in then open the loaded conf file and edit the line

extension_dir = C:\php

to

extension_dir = C:\wamp\bin\php\php5.4\ext

or something similar. Restart WAMP.

1
  • Yes this has been changed to extension_dir = "c:/wamp/bin/php/php5.4.14/ext/" in php.ini and the library is now loaded correctly but it says, "#1045 - Access denied for user 'root'@'localhost' (using password: YES)" though the user name and the password are the same as they are in MySQL in the config.inc.php file in phpmyadmin. I have also tried to restart MySQL56 service from Control Panel->Services(Local) but it keeps giving the same error. Do you know why does this happen?
    – Tiny
    May 6, 2013 at 9:15
1

you should make sure libmysql.dll is installed on your computer, you can look for it under C:\Windows\System32 (in Windows 7, or the equivalent in other windows versions). This is specified in the php manual. You can download libmysql.dll here. This bug took me quite some time to solve. hope it helps.

1
  • I can't remember right now but perhaps I gave a wrong path somewhere. Otherwise, everything was fine. Thanks. :)
    – Tiny
    Jul 14, 2013 at 12:15
1

Run phpinfo(). Find line: Loaded Configuration File and look at extension_dir too. If it is c:\php and it is not the folder you have your php installed in then open the loaded conf file and edit the line

extension_dir = C:\php

to

extension_dir = C:\wamp\bin\php\php5.4\ext

or something similar. Restart WAMP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .