I dont know what to do anymore, I have searched the forums, and they all say the same thing.

Added this:
extension_dir = "C:/PHP/ext/"

Uncommented this:
extension=php_mysql.dll

Copied the following dll's to my system32:
php5ts.dll
libmysql.dll
php_mysql.dll

I still get undefined function mysql_connect().

Please help, what am I doing wrong?

Jason

    Hi,

    you don't need to copy php_mysql.dll to the system32 folder. First of all make sure that the php.ini file is in the Windows folder.
    I don't know if it makes a difference but change
    extension_dir = "C:/PHP/ext/"
    to
    extension_dir = "C:\PHP\ext"

    Then restart the Apache2 server.
    Create a little phpinfo() script and check if the php.ini file could be found.

    Which php5 version do you use ?

    Thomas

      Hi,

      I'm also getting the same problem and its driving me nuts. I've searched the forum for the solution, but it appears that I've done everything exactly the same.

      I'm using PHP5.0.1, IIS 5.1, WinXP Pro (without SP2) and MySQL 4.0.

      What I've done:

      Uncommented the line extension=php_mysql.dll

      Changed to extension_dir = "C:\svr\php\ext"
      I installed PHP5 in c:\svr\php.

      Copied libmysql.dll to c:\windows\system32

      Added "c:\svr\php;c:\svr\php\ext" to the PATH environment.

      I'm still getting UNDEFINED FUNCTION error.

      Anything I'm missing here or did wrongly? Thanks.

        Hi heylan,

        as a first step create a little phpinfo() script and check the output for the following info:

        • location of the php.ini (near the top of the output)
        • value of the extension_dir configuration parameter
        • any MySQL section (I don't think so)

        Please post the values. Do you have a valid php.ini file in the windows directory ?

        Thomas

          Hi Thomas,

          Woa, you are good man. My php.ini file was NOT the one I was using. Stupidly, I had another php.ini file in my c:\svr\php directory and that's why the undefined function kept popping up. Anyway, I've changed that now, so I'm using the correct one in windows directory now.

          My extension_dir is thus now set to c:\svr\php\etc.

          However, the problem now is that it says "Unable to load dynamic library ... The specified module could not be found."

          How to resolve this one?

          Thanks! 🙂

            A typo in your post ? Shouldn't that be c:\svr\php\ext instead of c:\svr\php\etc ?

            Thomas

              Arrgghh!!! :bemused:

              You are right. I named the path wrongly. Cos I was confused with Linux's etc directories. Don't know what in the world I was thinking!:queasy:

              Anyway it works now. Thanks so much for the help Thomas!🆒

                Write a Reply...