MySQL undefined function error - php.ini looks right, but phpinfo() says otherwise

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gamereality
    New Member
    • Oct 2008
    • 3

    MySQL undefined function error - php.ini looks right, but phpinfo() says otherwise

    Hello, this is my first post here. W00T. (Forgive me for using leet speak, it's not my fault.)

    Here's the rundown:

    I have MySQL.
    I have configured the PHP.INI to the correct settings, including allowing the extension, and changing the extensions directory to the correct path.
    I have configured Apache to gather information from the correct PHP.INI (C:/PHP/PHP.INI).
    I have the "libmysql.D LL" in both the System and System32 folders in the WINDOWS directory.

    However, what happens is I receive not a wink of information about MySQL when I run the PHPInfo() function, and if I use Apache to test the script, it returns a fatal error: "undefined function," whenever I try and utilize a MySQL command.

    It works when hosted on a remote server, like an FTP server, obviously, but when I use localhost to test the script it returns the aforementioned error.

    My versions are as follows:
    PHP 5.2.6
    Apache 2.0.63
    MySQL 5.0

    Hopefully someone can help.
    Last edited by gamereality; Oct 9 '08, 08:23 AM. Reason: Grammatical errors
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Try adding your PHP installation directory to the PATH variable and rebooting the server. That, and uncommenting the extension dll in the PHP.INI, usually works for me.

    Comment

    • gamereality
      New Member
      • Oct 2008
      • 3

      #3
      The PHPIniDir variable is already set to the installation folder's path, and I have already uncommented the MySQL DLL in PHP.INI.

      Not sure about the registry path, but I'd assume that the installation of MySQL 5.0 would handle that automatically?

      Okay, there isn't a registry path for PHP, since I did not install it, I extracted it to a folder. That means that it runs by either the Apache server, or the Windows folder.

      Sooo... What the heck?

      Comment

      • gamereality
        New Member
        • Oct 2008
        • 3

        #4
        Help really appreciated, I'd like to be able to test scripts like these locally, instead of having to upload it before...

        Comment

        Working...