Hi, I'm having some problems loading the mysqli extension in my local installation of PHP and am getting the 'Fatal error: Call to undefined function mysqli_connect()' error. I've read around a bit on the internet and have tried numerous things.
First things first my current set-up is: Windows 7 Home Premium SP1 64 bit IIS is not disabled - but this is mainly because when I went looking for it I could not find it so suspect Win 7 home premium does not come with it. In spite of this point I'm connecting to Apache through port 8080 as I could not get it working through the default port (80?) Apache 2.2.21 (Win 32) PHP 5.2.17 (vc6 thread safe version) MySQL 5.5.19 My SQL seems to be running fine as I've been in and run stuff using the command line interface. Also my IDE (JetBrains PhpStorm) has a database connector to allow for control and maintenance of the DB within the IDE. This also connects up just fine and I've run some SQL scripts through the IDE. Right then so stuff I've tried (in approximate temporal order) I restated the Apache server after each of these and have also totally re-booted the system at least once: I followed all the instructions in Kevin Yank's book: Build Your Own Database Driven Website using PHP & MySQL (4th Edition) Check the php.ini file in 'C: PHP' I have the right path to the extensions folder 'C: PHP ext' the semi-colon in front of 'extension=php_mysqli.dll' is removed the semi-colon in front of the similarly titled 'extension=php_mysql.dll' above is not removed Run There is no section for mysqli module. There are 8 references to MySQL but in each case they are due to the inclusion of 'C: Program Files (x86) MySQL MySQL Server 5.5 bin' in the PATH environment variable.
Tutorial:Learning MySQLi extension in PHP. Beginner PHP Tutorial - 7 - The php.ini File - Duration. MySql and PHP on Windows 10 - Duration.
Under PHP Core I can see that doc_root = 'C: Program Files (x86) Apache Software Foundation Apache2. Download Canon Utilities Zoombrowser Ex. 2 htdocs' and that extension_dir = 'C: PHP ext'. These are both the values I set in my PHP.ini file so I'm pretty sure the right one is being used. Php 5 3 8 For Readynas X86 Registers more.
Also the loaded configuration file at the top confirms the same. I added C: PHP to the PATH environment variable. I can see this in phpinfo() so I know this has worked.
I heard it might be a versioning issue with libmysql.dll so I copied the version of this file from the MySQL installation (in 'C: Program Files (x86) MySQL MySQL Server 5.5 lib') over the version in 'C: PHP'. This replaced a 1 meg file with a 4 meg file, which seems like quite a movement. I've also tried moving this file up into 'C: PHP ext', 'C: Windows', 'C: Windows System32' to no avail. The file is deleted from these locations now.
I've seen some old posts suggesting you need to get the connector software from MySQL rather than the bundled software with the PHP installation, however these all point to the following page [is now dead. If I go to [URL='then I don't see a download option for PHP connector. I saw another post [red&p=4721657#post4721657 that claimed to have fixed this issue by installing PHP 5.3. However when I go to [URL='red&p=4721657#post4721657) the guidance there was to only use the vc6 versions with apache. Currently the vc6 versions are under PHP 5.2 (the PHP 5.3 versions are both vc9).
As you can see above I used the thread safe version, I wasn't totally sure on the difference but on reading around I gathered it shouldn't make too much difference. Any other thoughts on what to do (or undo) would be gratefully accepted. I really need to get this set up as it's holding up some development I need to do. I previously had the whole thing up and running on my old laptop but it died and so I'm having to get everything up and running on a new computer.
Regards, James. Maccas said: Hi, I'm having some problems loading the mysqli extension in my local installation of PHP and am getting the 'Fatal error: Call to undefined function mysqli_connect()' error. I've read around a bit on the internet and have tried numerous things. First things first my current set-up is: Check the php.ini file in 'C: PHP' I have the right path to the extensions folder 'C: PHP ext' the semi-colon in front of 'extension=php_mysqli.dll' is removed the semi-colon in front of the similarly titled 'extension=php_mysql.dll' above is not removed My setup has both extension=php_mysql.dll and extension=php_mysqli.dll uncommented.