[eluser]DominixZ[/eluser]
I have unable to connect to the DB too in CodeIgniter 2 [Download from Repo at Nov 24]
but I cannot connect to the DB only from commandline
In commandline use like this
Code:
php cli.php "welcome/index"
and it happen like this
Code:
<div id="content">
<h1>A Database Error Occurred</h1>
<p>Unable to connect to your database server using the provided settings.</p><p>Filename: /Users/dominixz/Sites/onebitframework/controllers/welcome.php</p><p>Line Number: 19</p> </div>
but If I open with browser no error.
cli.php I use from NetTuts this is code
Code:
#!/usr/bin/php
<?php
if (isset($_SERVER['REMOTE_ADDR'])) {
die('Command Line Only!');
}
set_time_limit(0);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'] = $argv[1];
require dirname(__FILE__) . '/index.php';
This is work fine in CI 1.7.2
and I have another question CI 2.0 autoload "database" doesn't show error like CI1.7.2 isn't it ? because in CI 1.7.2 if i enter wrong username or password or database and i'm autoload it it will unable to connect instantly but in CI2.0 doesn't i must use some $this->db->get() and then it will be show error.
My Question is "Is it change behavior of this ? or it only me that have something like this ?"
Thank in advance