Welcome Guest, Not a member yet? Register   Sign In
DB Connection Issue

Hi all... I got a DB connection problem..
this is my DB config

$active_group = "default";

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "root";
$db['default']['database'] = "test";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";

the autoload.php

$autoload['libraries'] = array('database');

And the Problem?? Blank Screen...
I install phpmyadmin.. and is working with the same params in the config...

any ideas??

ubuntu feisty, php5, mysql5


Can you connect using standard php mysql_connect() function?

mmm.. I put this in the controller
function index()
        $link = mysql_connect('localhost:3306', 'root', 'root');
        if (!$link) {
            die('Could not connect: ' . mysql_error());
        echo 'Connected successfully';

and I get this error

Fatal error: Call to undefined function mysql_connect() in /var/www/code/system/application/controllers/welcome.php on line 14

ups... in phpinfo() there is no mysql.... but I got installed the php-mysql module

na.. now works... but with the mysql_connect manually....

Ok, solved... I edit the php.ini and add this line



Thanks for following up with your solution. Glad you got it fixed.

Theme © iAndrew 2016 - Forum software by © MyBB