Ok folks.. trying to get php 5.2.6 to play nice with mysql 5.0 (for localhost). But I am getting the dreaded ‘Fatal error: Call to undefined function mysqli_connect()’ message.
I have examined the following thread:
http://www.phpbuilder.com/board/showpost.php?p=10805646&postcount=3
(I only paid attention to this one as it is the most recent [2007])...
There seems to be some potential info discrepancy. When I look in my C:\PHP folder, I only see one dll: php5ts.dll.
The link calles for uncommenting "extension=php_mysql.dll". As you'll see below in my php.ini snippets, I do not have this line to comment out.
Here is a breakdown of my system variables path, as well as some snippets from my php.ini file.
System Variables in Control Panel -> System -> Advanced tab -> Environment Variables:
C:\PHP\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\PHP
In php.ini:
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; Paths and Directories ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; Directory in which the loadable extensions (modules) reside.
extension_dir ="C:\PHP\ext"
I'm not sure if this is part of the problem or not.. there is no ext folder within C:\PHP
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; Dynamic Extensions ;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
; For example, on Windows:
;
; extension=msql.dll
This seems to be the only extension line with any kind of sql in it (I found this by hitting control+f to bring up the 'find' dialogue box and used 'extension=' as my search.. only found a small few lines with this in it.. and the "extension=php_mysql.dll" wasn't found.
[MySQLi]
; Maximum number of links. -1 means no limit.
mysqli.max_links = -1
; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysqli.default_port = 3306
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysqli.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysqli.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysqli.default_user =
; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a bad idea to store passwords in this file.
; Any user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysqli.default_pw =
; Allow or prevent reconnect
mysqli.reconnect = Off
Clearly I'm missing something. As you can see, I am not a 'server configuration' kind of guy :queasy:
Any help regarding this matter would be greatly appreciated (before my laptop earns free flying lessons through the rain).
Cheers,
NRG