EllisLab text mark
Advanced Search
     
db.php line 124 erroe
Posted: 10 November 2012 05:31 PM   [ Ignore ]
Joined: 2012-11-10
3 posts

hello

after i installed the sql driver the message now

http://46.43.79.191/ci
Not Found

The requested URL /ci/login was not found on this server.

if i make the debug true
it gives me
db.php line 124

please help

 
Posted: 10 November 2012 05:33 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-11-10
3 posts

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: C:\Apache2.2\htdocs\ci\system\database\DB_driver.php

Line Number: 124

 
Posted: 11 November 2012 02:33 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-11-08
5 posts

Mohammad, be sure your SQL driver is working.

First, I created for you a script to verify if your SQL is working with you PHP.

<?php

//Configuration of your database
$config = array(
 
"server" => "YOUR_SERVER_ADDRES",
 
"user" => "YOUR_USER",
 
"password" => "YOUR_PASSWORD",
 
"database" => "YOUR_DATABASE"
);

//Creating connection
$dbhandle mssql_connect($config["server"]$config["user"]$config["password"]) or die("Error on database connection");

//Selecting database
$selected mssql_select_db($config["database"]$dbhandle) or die("Error in select database {$config["database"]}");

//Your Query
$query "SELECT * FROM your_table";

//Executing query
$result mssql_query($query);
#$numRows = mssql_num_rows($result);
#echo "{$numRows} rows";

//Showing results
while($row mssql_fetch_array($result)){
 
echo "YOUR RESULT {$row["your_table_field"]}";
}

//Closing conection
mssql_close($dbhandle);

?> 

Send me a feedback to know what happened!

 Signature 

LDS Online - Software Development
Israel Pereira
E-mail: .(JavaScript must be enabled to view this email address)
Website: http://www.ldsonline.com.br

 
Posted: 25 November 2012 04:49 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2012-09-20
15 posts

open the database.php file
just make it like this :

$active_group 'default';
$active_record TRUE;

$db['default']['hostname''localhost';
$db['default']['username''root';
$db['default']['password''';
$db['default']['database''your db name';
$db['default']['dbdriver''mysql';
$db['default']['dbprefix''';
$db['default']['pconnect'TRUE;
$db['default']['db_debug'TRUE;
$db['default']['cache_on'FALSE;
$db['default']['cachedir''';
$db['default']['char_set''utf8';
$db['default']['dbcollat''utf8_general_ci';
$db['default']['swap_pre''';
$db['default']['autoinit'TRUE;
$db['default']['stricton'FALSE