The XAMPP Control Panel Application tells me that Apache and MySQL services are both running. I can pull up the sample page on "http://localhost/xampp/", but when I try the demo "CD Collection" I get this error message from PHP:
- Code: Select all
Fatal error: Call to undefined function mysql_connect()
in C:\Program Files\xampp\htdocs\xampp\cds.php on line 64
Since I know that mysql_connect() is a valid PHP function, I searched the message forums here to see about reported similar problems. Someone mentioned the problem of having multiple "php.ini" files. Using the 4NT utility ffind, I located 3 of them ... installed by default (why??):
- Code: Select all
[c:\program files\xampp]
[0]> ffind /dc php.ini
C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini
The top 2 files in "~\apache" and "~\php" are identical, but the one in "~\php\php4" is quite different from the others. When I run phpinfo() from within the localhost demo pages, it reports that PHP is using this config file: "C:\Program Files\xampp\apache\bin\php.ini" and PHP v5.2.1.
I searched the output of phpinfo() and the string "mysql" does not occur in it anywhere (case-insensitive search, btw). The string "sql" occurs only once, here:
- Code: Select all
Directive Local value Master value
...
sql.safe_mode Off Off
So, what's wrong? It appears that PHP is not set up with support for MySQL, which seems strange. What other diagnostics can I do? Any help would be truly appreciated.
Kind regards,
Eric Pement