467,212 Members | 1,061 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,212 developers. It's quick & easy.

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.DLL" 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.
Oct 9 '08 #1
  • viewed: 2146
3 Replies
Expert 4TB

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.
Oct 9 '08 #2
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?
Oct 9 '08 #3
Help really appreciated, I'd like to be able to test scripts like these locally, instead of having to upload it before...
Oct 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by fabriZio | last post: by
10 posts views Thread by Patrick | last post: by
8 posts views Thread by Schmalz | last post: by
18 posts views Thread by Bruce A. Julseth | last post: by
9 posts views Thread by christopher_board@yahoo.co.uk | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.