I am trying to get php with sqlite working on my fedora server. In the phpinfo is see that ./configure was set with the option --without-sqlite3. From what I have read these means that I might have to recompile or reinstall php with with sqlite. I was wondering how I would go about installing or configuring php with sqlite.(possibly a yum command?) thanks
All over the Internet you can find questions and answers regarding sqlite support in PHP on Fedora Core, Red Hat, and CentOS distributions. While many of them have differences in how to go about enabling support, all of them say the same thing about the cause: packages for PHP on those distributions are compiled without support for SQLite. To my knowledge there are no current RPM's for easily installing php-sqlite3.
I recommend you take a look at the comments found on PHP's SQLite Installation page that detail how to get it working as painlessly as possible. The short version is to ensure that you have php-devel installed (if not then run
yum install php-devel) and do the following:
Download the source for PHP from http://php.net/downloads.php and compile it with support for the SQLite module.
tar xfvj php-5.3.2.tar.bz2 cd php-5.3.2/ext/sqlite/ phpize ./configure make make install /etc/init.d/httpd restart
You do not need to recompile anything. In fedora you can get the sqlite php module by installing the php-pdo module. The following should do the trick.
yum install php-pdo
The reason your seeing php as having been built without sqlite is so fedora can split the php package and thus not force a big string of dependencies on people who don't want them. For instance you need sqlite and thus likely you do not need postgresql. If fedora was to build the main mod_php application with all --with's turned on you would end up installing postgresql without needing or wanting it. This helps people concerned with both security (only install exactly the software needed) and people concerned with package download bandwidth.