Ask your Symfony questions! Pay money and get answers fast! (more info)

Reason for needing SQLite3 Symfony


Hi there,

I am trying to install Symfony on my Centos 5.6 server. When, as suggested in the README document, I run "php app/check.php" I get a failure on line 31 saying that class PDO does not exist. Looking at the line in question, it seems that neither SQLite3 nor PDO_SQLite PHP extensions can have been installed. I haven't been able to find these classes in any repositories and I have read a post on StackOverflow that suggests that Centos are not supporting SQLite anymore.

So my questions are:

What does Symfony use the SQLite database for?
Is it possible to use another database?
If not, does anyone have experience with getting Symfony running with Centos and installing the required PHP extensions?

Many thanks in advance.

Answers (3)


sn answers:

It should work, if you install the php-pdo package on your Linux shell: yum install php-pdo

JJJJJJ2010 comments:

yum install php53-pdo did the trick, thanks.

But could you answer why Symfony needs SQLite, please?

sn comments:

I don't think, it needs SQLite. Could you please check, if it is installed?

rpm -qa | grep php | grep sqlite


Jakub Zalas answers:

Symfony's debug toolbar requires sqlite to work. It stores debugging information in it. As far as I know this requirement will be dropped in Symfony 2.1.


Luis Cordova answers:

<em><strong>What does Symfony use the SQLite database for?</strong></em>

It has been said above that it uses it for the profile debug bar, since this is for Centos site I don't think you need it because it sounds this is a prod server and you will not do debugging on a prod server.
However, SQLite is also used by some apps and testing. So if it is a Continuous Integration server then you may need it if you use a CI App like Sismo. Symfony2 devs use CI like Sensio does for some of the components. This is just to detect errors and for testing their components.
Other needs for SQLite is for apps that want to do some file db operations. The need for SQLite is especial and can find certain niches as shown here [[LINK href="null"]][[/LINK]].

<em><strong>Is it possible to use another database?</strong></em>
Yes, SQLite is not the default choice when it comes to a medium size big app. So the choice is optional. You should know that the check.php will check for several things thinking also as a dev machine, however some things are not mandatory.

<em><strong>If not, does anyone have experience with getting Symfony running with Centos and installing the required PHP extensions?</strong></em>
If you want to clear the check.php for the warnings anyway and if you have understood it yet want to just get it passing anyway, then follow these tricks:
[[LINK href="null"]][[/LINK]]
[[LINK href="null"]][[/LINK]]

Last thing if you have succeeded in installing PDO on centOS and still get the warning showing then the reason is simple. check.php is updated often for this type of scenarios, it is not perfect so sometimes it will check for generic or too specific things, the common environment and not specific environments, so in that case you would check specifically for the component in your system's case and flag an issue or do a PR like shown on github @ [[LINK href="null"]][[/LINK]]

rock solid you will solve all your problems, thanks!