简体   繁体   中英

Symfony - An exception has been thrown during the rendering of a template

I have been using Codeigniter for sometime now and thought I would try out Symfony. I am very new to Symfony and working from the demo project. When I launch the demo project in my browser I get this error:

An exception has been thrown during the rendering of a template ("An exception occured in driver: could not find driver") in blog/index.html.twig at line 6.
500 Internal Server Error - Twig_Error_Runtime
3 linked Exceptions: DriverException » PDOException » PDOException »

I am not sure where to begin. Can someone please help me in the right direction?

This is your problem: An exception occured in driver: could not find driver

It means that you haven't installed a proper driver for PDO for the RDBMS, which you are using. Or there is specified some invalid value in the config file.

Ubuntu 16.04 doesn't come with php7 and sqlite3. Please run the following command

sudo apt-get install php7.0-sqlite3

一旦我运行sudo apt-get install php5-sqlite ,然后composer install一切就开始起作用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM