Welcome Guest, Not a member yet? Register   Sign In
SQLite3, Debian, PHP, and Apache
#1

[eluser]winter[/eluser]
Hi all, I just wanted to post here what I've found out about the following combination:
SQLite3, Debian, PHP, and Apache

Of course I'm using CI. I want to use a SQLite3 DB for holding some config data.

In general, it won't work.

From what I can gather:
The way to access SQLite2 DBs and SQLite3 DBs from PHP differs.
Currently, the only way to access a SQLite3 DB from PHP using Debian packages is to use the PDO driver(which is installed when installed php5_sqlite; you also need to install php5_sqlite3 for SQLite3 support). CI does not use this. CI might only support SQLite2 functions and not the SQLite3 class.

Please correct me if I'm wrong. I think CI + SQLite is a fantastic combination for small apps, prototypes, and portability - though not so portable if SQLite has unequal support on various platforms. :/
#2

[eluser]kgill[/eluser]
If you can't connect using the CI sqlite database driver there's nothing stopping you from not loading it and instead using PDO, you'll miss out on using Active Record but in my opinion you aren't missing much.

I'm sure others here will have a different opinion on the matter but personally I dislike AR, when you start getting into complex queries it tends to hit its limits pretty fast and you end up having to jump through hoops just to satisfy its limitations. When I found myself interrupting my workflow just to make AR happy I dumped it & the DB class and instead loaded a PDO object to get at my Oracle DB.
#3

[eluser]winter[/eluser]
Good point. I'll keep that in mind. I think I might hit the limits of AR on my MSSQL project. :/ Though, for learning purposes, I'll see how far I get. So far so good. I think that is really the best thing about CI. It doesn't limit you or hide PHP from you. CakePHP was so limiting. Talk about jumping through hoops just to satisfy it's limitations... Grrr...




Theme © iAndrew 2016 - Forum software by © MyBB