Mysqli on WAMP, error - connection attempt failed |
Hello Everybody,
I am working on my first Codeigniter project. Recently I migrated this project to Windows 10 from Windows 7, in Windows 7, I was working with manual installation of Apache, PHP, Mysql but in Windows 10 I installed WAMP. And I am getting following error message in this new setup. The page keeps on loading and loading and then fails with the error message. The mysqli extention is installed and loaded. Quote:A PHP Error was encountered Further done the page this is the message I get : Quote:Unable to connect to your database server using the provided settings. If I change 'dbdriver' => 'mysqli', part of the config to 'dbdriver' => 'mysql', then it works but shows a warning of deprecated mysql extension. Code: $db['default'] = array( I checked my phpinfo and the mysqli is installed. I checked it with the following code and it is working. Code: <?php 1. wamp icon > php > php_extensions > php_mysqli 2. extension=php_mysqli.dll in php ini is un-commented. 3. The extension_dir" c:/wamp/bin/php/php5.5.12/ext/ is correct for my php version install. 4. I tried it with the fresh install of the codeigniter, simply adding $this->load->database ( ) to the default controller triggers the same error. I created a virtual host for this project do here is info about it. HOST file : Code: 127.0.0.1 localhost Apache httpd-vhosts.conf file : Code: <VirtualHost *:80> Project .htaccess file : Code: <IfModule mod_rewrite.c> So, how do I make mysqli work for codeigniter ?
I had the same problem when I upgraded to Windows 10 on XAMPP If your running any kind of remote software like Skype and Team Viewer you need to change the port number to something other then port 80.
Also try re-installing WAMP and see if it will connect. After re-installing XAMPP several times it did finally work. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |