Hello,

I have screwed up something on my php.ini file on a windows server and now I am getting this error:  "unable to load dynamic library C:\php5\php_mysql.dll".   Now, my PHP installation actually resides here: C:\PHP\  so, obviously, it's pointing to the wrong address.

Where do I change this so the program is looking in the right directory?

Thanks,
Clem C

    Look for something like this in the php.ini:

    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = c:\php5\

    Change the extension_dir path to the correct path; most likely this is c:\php\extensions .

      Well - looked in the php.ini file and it didn't even have the line "extension_dir" in it so I added it, checked to see if the php_mysql.dll was actually in the C:\PHP\extensions\ directory (which it was) and now I get the general error of: "Cannot load mysql extension".

      Any ideas as to what to do now?

        I would recommend you take a look at this guide: [man]install.windows.manual[/man] as you basically need to do two things:

        1. Add the c:\php directory to the system PATH environment variable
        2. Note: In PHP 4, you should move all files located in the dll and sapi folders to the main folder (e.g. C:\php).

          I've set the PATH variable before using the autoexec.bat but on this windows server 2003, I can't locate that program.

          I suspect that the PATH variable is correctly set because PHP was running fine before I blew it up.

            AUTOEXEC.BAT hasn't been used since Windows 9x AFAIK...

            Anyway, there was a link in the manual on how to do this...

            Read more about how to add your PHP directory to PATH in the corresponding FAQ entry (and then don't forget to restart the computer - logoff isn't enough).

              Ok - got it!!

              Actually mysql and PHP were running fine after I changed the extension_dir to the correct directory.

              The Problem after that was w/ phpMyAdmin and it's configuration.

              Here's what I did to fix that:

              'host' from localhost to the machine host name
              'extension' to 'mysqli'
              'user' to a user who has access to MySQL, i.e. can log onto MySQL on the server
              'password' to the password of the user
              
                Write a Reply...