All,
I'm a newbie trying to learn PHP and MySQL (following examples in a book "PHP and
MySQL by Larry Ullman". I am running:
Windows XP SP1
Norton Antivirus and Internet Security
Apache 2
PHP 5
MySQL 4.0.16
All seem to work. I can run PHP scripts on the Apache server without any trouble. I
have MySQL running as a service and the basic SQL command line commands and
winmysqladmin shows all ok (to my limited knowledge so far).
So as the PHP installation instructions stated :
Since PHP 4.0.5 MySQL, ODBC, FTP, Calendar, BCMath, COM, PCRE,
Session, WDDX and XML support is built-in. You don't need to
load any additional extensions in order to use these functions.
and I have basic PHP scripts running I though making a call to mysql_connect would be
pretty straight forward. The script I'm running is simply
where [EMAIL PROTECTED] has been granted select privileges on a test database. I
receive the following error message:
Fatal error: Call to undefined function mysql_connect() in C:\WebSpace\mysql_test.php
on line 3
I was surprised to see mysql_connect was underfined given that the installation notes
stated support for MySQL was built in from 4.0.5 onwards.
So I went to the php.ini file in my windows directory and tried to manually load the
mysql dll by uncommenting (removing the semi colon) the following line:
;extension=php_mysql.dll
When I restart Apache I get the following error:
PHP Startup: Unable to load dynamic library 'c:\PHP\ext\php_mysql.dll' - The
specified module could not be found
I then get an error window wanting to send a report then another pop up stating "The
requested operation failed!"
I tried uncommenting the dbase library instead and restarting the server worked and
phpinfo in the additional modules section showed dbase as loaded.
Any ideas?
thanks in advance
Chris