Welcome Guest, Not a member yet? Register   Sign In
Help! needed with a database problem.
#1

[eluser]kidrok[/eluser]
Hi, everyone!

I´m new user of CI, found it just couple of days ago and was really
excited about it because I have done PHP without any framework and Jeffrey Way´s video tutorials hit me how much efficient it will be with CI. But now I got this really annoying problem with databases. I can´t get connection between CI and database. I´m using my school's server via SSH from my home and this server supports sqlite3 but I just can´t get it work.

I got the latest version of CI(1.7.2.) so do i still have to make a special setup like this:

http://codeigniter.com/wiki/PDO_SQLite3/

I have tried it, but it doesn´t work. I just could not find PHP.ini from my computer, so I made it with text editor and save it to c:/windows/system32 It just got these two lines:

extension=php_pdo.dll
extension=php_pdo_sqlite.dll

Is that right?

My setups in applications/gonfig/database.php are like this at the moment:

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = 'sqlite:/treeni';
$db['default']['dbdriver'] = "pdo";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

"treeni" is the name of my sqlite3 database and it´s located in a same folder where a CI index.php is in my server. I have tried honestly maybe 100 different combinations for those settings..no luck. Most of the time I get just a blank page, but with these settings
I get error like this:


A Database Error Occurred

SQLSTATE[HY000] [14] unable to open database file

I know my server supports sqlite3 & PHP5 and I got all the rights(read/write/execute for owner/group/other) for this database file.

Got so frustrated with the sqlite that I downloaded postgreSQL, can´t make that work either. I guess the problem with postgreSQL is that it´s located in my computer not in the server where the CI files are?

I would be very happy if someone could figure this out. It would be a shame stop my CI learning here just because this little problem that I can´t make any connection with CI and database.

Thanks


Messages In This Thread
Help! needed with a database problem. - by El Forum - 09-12-2009, 05:08 PM
Help! needed with a database problem. - by El Forum - 09-12-2009, 05:38 PM
Help! needed with a database problem. - by El Forum - 09-12-2009, 05:59 PM
Help! needed with a database problem. - by El Forum - 09-13-2009, 01:35 AM
Help! needed with a database problem. - by El Forum - 09-13-2009, 04:04 AM
Help! needed with a database problem. - by El Forum - 09-13-2009, 04:26 AM
Help! needed with a database problem. - by El Forum - 09-13-2009, 05:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB