Welcome Guest, Not a member yet? Register   Sign In
Default controller not working
#4

[eluser]wallern[/eluser]
Here is my configuration:
my code is in the htdoc root folder, I use xampp. I have a few other websites in subfolders they worked fine, and I just moved them out leave only this website.

config.php

Code:
$config['base_url'] = "http://127.0.0.1/";
$config['base_path'] = FCPATH;
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";


.htaccess

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteBase /
    RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|js|css|pdf|txt) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1
</IfModule>

I use this code to test my DB connection,

Code:
echo '<pre>';
print_r($db['default']);
echo '</pre>';

echo 'Trying to connect to database: ' .$db['default']['database'];
$dbh=mysql_connect
(
  $db['default']['hostname'],
  $db['default']['username'],
  $db['default']['password'])
  or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db['default']['database']);

echo '<br />   Connected OK:'  ;
die( 'file: ' .__FILE__ . '--&gt; Line: ' .__LINE__);

and it shows:

Code:
Array
(
    [hostname] => localhost
    [username] => root
    [password] => pass
    [database] => dbname
    [dbdriver] => mysql
    [dbprefix] =>
    [pconnect] => 1
    [db_debug] =>
    [cache_on] =>
    [cachedir] =>
    [char_set] => utf8
    [dbcollat] => utf8_general_ci
)

Trying to connect to database: dbname
Connected OK:file: C:\xampp\htdocs\system_newsite\application\config\database.php--&gt; Line: 80

So I think the database connection is ok. If need any other info please let me know, I'm really run out of juice on this one. Once again, thanks for help!


Messages In This Thread
Default controller not working - by El Forum - 03-18-2012, 09:50 PM
Default controller not working - by El Forum - 03-18-2012, 10:46 PM
Default controller not working - by El Forum - 03-18-2012, 11:12 PM
Default controller not working - by El Forum - 03-18-2012, 11:26 PM
Default controller not working - by El Forum - 03-19-2012, 12:27 AM
Default controller not working - by El Forum - 03-19-2012, 03:18 PM
Default controller not working - by El Forum - 03-19-2012, 04:01 PM
Default controller not working - by El Forum - 03-19-2012, 04:40 PM
Default controller not working - by El Forum - 03-19-2012, 06:41 PM
Default controller not working - by El Forum - 03-22-2012, 02:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB