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

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Reason for needing SQLite3

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.

This question has been answered.

JJJJJJ2010 | 10/08/11 at 7:56am Edit


(5) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    10/08/11
    8:00am
    sn says:

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

    yum install php-pdo

  • avatar
    Last edited:
    10/08/11
    8:58am
    Jakub Zalas says:

    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.

  • avatar
    Last edited:
    10/08/11
    9:51am
    Luis Cordova says:

    What does Symfony use the SQLite database for?

    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 http://www.sqlite.org/whentouse.html.

    Is it possible to use another database?
    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.

    If not, does anyone have experience with getting Symfony running with Centos and installing the required PHP extensions?
    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:
    http://stackoverflow.com/questions/2320644/how-do-i-enable-pdo-using-centos
    http://karoshiethos.com/2008/07/24/installing-pdo_mysql-on-centos/

    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 @ https://github.com/symfony/symfony-standard/commits/master/app/check.php

    rock solid you will solve all your problems, thanks!

    Previous versions of this answer: 10/08/11 at 9:49am | 10/08/11 at 9:49am | 10/08/11 at 9:51am | 10/08/11 at 9:51am

  • avatar
    Last edited:
    10/08/11
    8:43am
    JJJJJJ2010 says:

    yum install php53-pdo did the trick, thanks.

    But could you answer why Symfony needs SQLite, please?

  • avatar
    Last edited:
    10/08/11
    8:53am
    sn says:

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

    rpm -qa | grep php | grep sqlite

This question has expired.



JJJJJJ2010 voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.