Hello!
I'm a newbie with php and I'm having trouble attempting to connect to MySQL:

My OS is Windows XP.
MySQL version is 4.1

I installed php5.0.2 (installer version) and copied both php_mysql.dll and libmySQL.dll into C:\programmi\php directory.

I removed comment from line extension=php_mysql.dll
in php.ini

I've added C:\programmi\php to the path.

but I still get the error "PHP Warning: PHP Startup: Unable to load dynamic library './php_mysql.dll' "

Where I fail?
Thanks!
Antonio

    I don't know the answer to Win32 installation problems off the top of my head, but I have seen similar questions posted and answered in the past. You may want to just save yourself some time by searching the forum archives with a few keywords. Hope this helped.

      check the

      extension_dir

      directive in your php.ini script

      it should point to the directory in which
      the php_mysql.dll is.

        Sorry but...

        OS: Windows XP Professional
        MySQL: 4.1
        php: 5.0.2

        I searched in the forum, but I cannot find other suggestions. Here are my settings:

        • Installation directory for php is C:\Programmi\PHP
        • My php.ini (attached) has the uncommented options:
          extension_dir = "C:\Programmi\PHP\"
          ...
          extension=php_mysql.dll
        • both libmySQL.dll and php_mysql.dll are in the directories: C:\WINDOWS\System32 and C:\Programmi\PHP
        • Php works, in fact I can run phpinfo() BUT, refreshing my page (the source is simply: <?php phpinfo(); ?>) I get the error message:
          "PHP Startup: Unable to load dynamic library 'C:\Programmi\PHP\php_mysql.dll' - The specified module could not be found."

        php.ini is correctly read in fact modifications to 'extension_dir' reflects to the error message.

        Can someone help me?
        Thanks!
        Antonio

          Well, my PHP 5 is installed in directory :

          C:\php

          the extension directory is (by default) :

          c:\php\ext

          so I have to set up the extension_dir
          directive to it, not to "c:\php"
          (which was the default value for the
          extension_dir)

          may be you should try :

          extension_dir = "C:\Programmi\PHP\ext"

          ?

          Restarting Apache may be a good idea too.

          I have not copy php_mysql.dll anywhere
          (it is only in my c:\php\ext directory)

            Hello!

            I created the directory C:\Programmi\PHP\ext with both libmySQL.dll and php_mysql.dll
            next, I modified php.ini in:
            extension_dir = "C:\Programmi\PHP\ext"
            but the only effect is that the message comes slightly different:
            "PHP Startup: Unable to load dynamic library 'C:\Programmi\PHP\ext\php_mysql.dll' - The specified module could not be found."

            php_mysql.dll has been removed by C:\windows\system32

            In addition, the structure created by php installation is the following:
            Directory di C:\Programmi\PHP
            24/09/2004 01.31 63.203 install.txt
            22/10/2004 22.33 <DIR> BACKUP
            24/09/2004 01.31 53.248 php-cgi.exe
            24/09/2004 01.31 3.276 license.txt
            24/09/2004 01.31 3.481.600 php5ts.dll
            22/10/2004 22.33 <DIR> uploadtemp
            22/10/2004 22.33 <DIR> sessiondata
            [25/10/2004 10.01 <DIR> ext] ------added by myself today

            Directory di C:\Programmi\PHP\BACKUP
            25/06/1999 10.55 149.504 UNWISE.EXE
            13/08/2004 09.43 28.672 IISConfig.exe

            Directory di C:\Programmi\PHP\uploadtemp
            0 File 0 byte

            Directory di C:\Programmi\PHP\sessiondata
            0 File 0 byte

            [ Directory di C:\Programmi\PHP\ext] ---added by myself today
            24/09/2004 01.31 49.152 php_mysql.dll
            14/10/2004 20.26 1.069.056 libmySQL.dll

            Is it OK?
            Bye!

              It's strange, you seem to have a very different installation than me 🙂 !

              I have not created myself the "ext"
              directory, it was created by default with all the DLL files inside.

              I think you should try to de-install
              and re-install PHP 5.

              On this page :

              http://www.php.net/downloads.php#v5

              get the first link under "Windows binaries",
              the one with :

              PHP 5.0.2 zip package [7,538Kb] - 23 Sep 2004

                Hello!

                I solved the problem by removing and manually re-installing php 5.

                Thanks anyway!
                Antonio

                  Write a Reply...