By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,747 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,747 IT Pros & Developers. It's quick & easy.

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

P: 3
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
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 5,058

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

P: 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?
Oct 9 '08 #3

P: 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.