Bug #5815 php function_exists('mysql_query') returns false
Submitted: 29 Sep 2004 22:23 Modified: 1 Oct 2004 8:35
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.20a-nt OS:Windows (Win 2000 SBS)
Assigned to: CPU Architecture:Any

[29 Sep 2004 22:23] [ name withheld ]
Description:
I have installed MySQL to support a product called Ashop. Ashop has a test routine to determine if it and all of its components are happily installed. It is a PHP script. The MySQL portion fails. The PHP code is:
// Check MySQL...
if (!function_exists('mysql_query')) echo "<li>No MySQL Functions - <font color=\"#FF0000\">FAILED</font></li>";
else echo "<li>MySQL Functions Available - <font color=\"#009900\">PASSED</font></li>";

I don't see anything in the MySQL directory tree named 'mysql_query'. Is it missing or is it invisible to PHP for some reason?

Thanks!

How to repeat:
Run the Ashop test on a Windows machine with Ashop, PHP, and MySQL loaded.

Suggested fix:
Possible fixes:
1. Provide mysql_query()
2. If it is provided already, document how to make it visible to a PHP script.
[1 Oct 2004 8:35] Hartmut Holzgraefe
The MySQL extension for PHP is not activated in your PHP installation.
Please check the PHP documentation on how to activate PHP extensions 
on Windows:

http://www.php.net/manual/en/install.windows.php

http://www.php.net/manual/en/install.windows.extensions.php
[5 Oct 2004 17:37] [ name withheld ]
Thank you for your comment that PHP extensions are not enabled. Actually, I did everything suggested in the PHP documentation to enable MySQL extensions. Still no success. The one thing I did note on one of the websites that you recommended is that PHP 5 does not have MySQL support by default; it must be compiled with a switch setting to include it. The documentation I got with my PHP download says nothing about this.
I'm considering uninstalling PHP 5, and downloading and installing PHP 4, which is alleged to have MySQL support compiled in by default. Does this seem like a good idea?
Thanks!