I need to add support for SQLite on my LAMP. I just don't find the way to install PDO Sqlite for PHP via apt-get...
Thanks a lot!
i think apt-get install php5-sqlite does the trick.
Just uploaded to the forums: http://www.turnkeylinux.org/forum/general/20100218/tklpatch-lasp-stack
How can I go about just recompiling the additional extensions and not the whole shabang?
"apt-get install php5-sqlite" also installs a bunch of other packages it depends on and that may or may not be what you want. For example the installation of PHP is also modified to its latest version. You might want to be cautious when you do this.
At the point of writing this post, SQLite (and thus the PDO-implementation, which I needed it for) is still not supported on the current LAMP stack.
The following is a copy/paste from the output generated when executing this specific apt-get command:
The following extra packages will be installed:
libapache2-mod-php5 lsof php5-cli php5-common php5-mcrypt php5-mysql
The following NEW packages will be installed:
The following packages will be upgraded:
libapache2-mod-php5 php5-cli php5-common php5-mcrypt php5-mysql
5 upgraded, 2 newly installed, 0 to remove and 22 not upgraded.
Need to get 6366 kB of archives.
After this operation, 1340 kB of additional disk space will be used.
Do you want to continue [Y/n]?
After typing "Y" you get a notice from the package manager:
┌─────────────────────┤ Modified configuration file ├──────────────────────┐
│ A new version of configuration file /etc/php5/cli/php.ini is available, │
│ but the version installed currently has been locally modified. │
│ What do you want to do about modified configuration file php.ini? │
│ install the package maintainer's version │
│ keep the local version currently installed │
│ show the differences between the versions │
│ show a side-by-side difference between the versions │
│ start a new shell to examine the situation │
│ <Ok> │
This choice was kind of hard for me to make so I 'd appreciate input from TurnKey on what would be the best choice here.
/etc/php5/cli/php.ini is the config file for php5-cli; which essentially allows php programs to be run from the commandline. Generally the 'normal' php.ini (/etc/php5/apache2/php.ini) is more important as it will affect the way that php apps run in the web browser. My personal take would be that unless you have configured php to do anything specific on the commandline then install the new config file. You can always tweak it later. FWIW TurnKey includes etckeeper by default so your old php.ini will be saved within the /etc git repo anyway.
Update : I dove into the code and compared the different php.ini files that the package manager was yammering about.
After this, I felt sure enough to pick the "Install the package maintainers version" - option, which is, after all, the version that belongs with the new PHP version.
It seems silly to have a php.ini from one PHP version to go with the other, so installing the new version would be the logical thing to do.
I've been further developing and testing a SQLite PHP application which I git-pulled onto the box and everything seems to work nicely (and as a plus, the error stack looks much better in a browser now ;-) ).
Hoping this might save someone some confusion.
Sounds like you answered the question yourself! :) Anyway I hope the extra info I posted above will be useful for future reference (and/or for anyone else...).
More information about text formats