Re: PHP not supporting MySQL
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Wed, 07 Feb 2007 06:45:51 -0500
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@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: PHP not supporting MySQL
- From: Siegfreed
- Re: PHP not supporting MySQL
- References:
- PHP not supporting MySQL
- From: Siegfreed
- PHP not supporting MySQL
- Prev by Date: Re: I have sub-categories but want to display full category path
- Next by Date: Re: include problem
- Previous by thread: Re: PHP not supporting MySQL
- Next by thread: Re: PHP not supporting MySQL
- Index(es):
Relevant Pages
|