php_mysql.dll works, php_mysqli.dll does not

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bobthebuilder
Forum Commoner
Posts: 32
Joined: Tue Mar 22, 2011 5:06 pm

php_mysql.dll works, php_mysqli.dll does not

Post by bobthebuilder »

Hello

When I uncomment

Code: Select all

;extension=php_mysqli.dll
in my php.ini file, mySQL doesn't work (Fatal error: Call to undefined function mysql_connect()) despite the ext dir being set up and php_mysqli.dll existing in that directory.

But when instead I uncomment

Code: Select all

extension=php_mysql.dll
mySQL works fine!

All I can think of is that php_mysqli.dll has got corrupted, but that's pretty unlikely. Does anyone have any ideas?

Many thanks
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: php_mysql.dll works, php_mysqli.dll does not

Post by AbraCadaver »

Well, they are different extensions and provide different functions. If you use php_mysqli then you use mysqli_connect() and related functions and if you use php_mysql then you use mysql_connect() and related functions.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
bobthebuilder
Forum Commoner
Posts: 32
Joined: Tue Mar 22, 2011 5:06 pm

Re: php_mysql.dll works, php_mysqli.dll does not

Post by bobthebuilder »

Oops, well that's embarrassing. Thanks!
Post Reply