SOLVED so i forgot to sudo apt-get php5-sqlite
also. downvoters gonna downvote 😀
(fyi, i feel bad everytime i use “StackOverload”. bad as in, ‘i have been hammering for five hours and the nail doesnt seem to fit. but it does! i seez it does!’.)
Summed up, because people might think i’m ranting. (and i wasnt, it was something like 2~3am when i wrote this. i had kind of a fantastical mind at that time)
I cannot, for the love of god, install this shinanigan. I use apache2.
http://www.github.com/cakephp/datasources
So, i know that cake doesnt support sqlite [or didn’t, back in 2010] but i’ve seen the Datasources plugin.
Appart from cakephp, when extracted, having 3 seperate plugin folders and the readme.md (seriously, they named the file MD. MD!) stating “extract to plugins folder” and me starting to get all jawed down on first approach;
I tried. i bounced around, i read and tried; i tried every possible configuration, i’ve mixed configuration steps (hey, one gets desperate.), i’ve even screamed [and that didnt work either, surprisingly]
Nothing. Besides reading reports of people (wizards, probably!) successfully connecting cakePHP and SQLite3 (with datasources plugin) i myself cannot replicate such marvelous magick. Even with the recipe.
And, here’s the plugin i’m using http://www.github.com/cakephp/datasources
Also, i fly around using an Apache2. normal Apaches don’t cut it.
Could someone, by the love of $input(“your god here”), explain me how to make this mumbo jumbo connect and rock mah server sideways?
Very much apreciated 🙂
var $default = array(
'driver' => 'Datasources.DboSqlite3',
'persistent' => false,
'database' => '../config/db.sqlite',
'connect' => 'sqlite',
);
Also, no error besides the “Cake is NOT able to connect to the database.” yellow line.
I do have sqlite AND sqlite3 installed, by sudoaptget method.
Don’t know about other connections scripts tho.
Personally I haven’t worked with Cake + Sqlite yet, but I surmised the following:
app/pluginsso you have the folder structureapp/plugins/datasources/models/...configure a source in
app/config/database.phpto use thedriverDatasources.DboSqlite3, as described in http://book.cakephp.org/view/922/Database-Configurationan example should look like this:
The
connectsetting may be tricky, since PHP has different Sqlite drivers for different versions which may or may not be installed. Try to establish a connection using a non-Cake script to test which driver works for you (or if you have any installed at all), then choosesqliteorsqlite2(as per the comment in the source).If that doesn’t work, please give some concrete information on what you tried, what didn’t work, errors etc.