|
Posted by Jerry Stuckle on 02/07/07 11:45
Siegfreed wrote:
> My PHP version is obviously not compiled with MySQL support,
> consequently I get the following message:-
>
> Fatal error: Call to undefined function mysql_connect() in
> C:\http-dir\board\connect.php on line 3
>
> Question:- How do I instruct PHP to support MySQL?
>
> Please note:-
>
> extension=php_mysql.dll
> extension=php_pdo_mysql.dll
>
> in php.ini are enabled, and php.ini is located in the php root directory.
>
> Thank you.
First of all, there's no need to change the registry if you have your
php.ini file in the right place.
Secondly, there are three extensions you could be interested in.
extension=php_mysql.dll // (older) mysql_xxx interface
extension=php_mysqli.dll // (newer) mysqli_xxx objects
extension=php_pdo_mysql.dll // (newest) PDO interface for MySQL
extension=php_pdo.dll // also required for PDO
(note: the last, PHP Data Objects, is an abstraction layer for data
access. It's relatively new, so you probably won't see much existing
code using it.
Most sites use the mysql_xxx interface, while there are some going to
the mysqli_interface.
And the interfaces are quite compatible - you can load all three and
pick whichever one you want to use in your code.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|