Welcome Guest, Not a member yet? Register   Sign In
load->database() issue - sits at "waiting for localhost"
#1

[eluser]DevTyme[/eluser]
Hi there --

I've set up my database configuration files to how exactly MySQL settings are set.
I've placed this command ($this->load->database()) in my Controller before the load view.

Anyways, whenever load database is reached the browser just sits there with the loading icon on the tab and the progress text saying "Waiting for localhost...", showing that it is sitting on/awaiting a connection, but it never does anything.

Obviously when i comment this section out, the static page loads fine. When it's uncommented, the page never loads, just sits there attempting to load.

The page itself has no active queries, just static html, so there's no other possible issues other than the database loading.

I have XAMPP up to date running both Apache and MySQL. Also note that I can access phpMyAdmin fine, that works and loads at a fast speed, so MySQL is active.

Important pieces of database.php:
Code:
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost:8080";
$db['default']['username'] = "root";
$db['default']['password'] = "root";
$db['default']['database'] = "test";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE; //tried both T/F
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

My Controller:
Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();
        $this->load->database();        
    }
    
    function index()
    {
        //$this->load->database(); //open connection
        $this->load->view('welcome_message');
        
    }
}

Database info:
Code:
/*
Server: localhost via TCP/IP
User: root@localhost
charset: UTF-8
MySQL client version: 5.1.37
Database name: test

*/


Messages In This Thread
load->database() issue - sits at "waiting for localhost" - by El Forum - 12-21-2009, 07:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB