Report this

What is the reason for this report?

Enabling Sqlite3 with Nginx on Debian 8

Posted on December 18, 2017

Hi, I’m following a tuto and got error with Doctrine Dbal when I try to migrate. I believe it’s because I don’t have sqlite enable in nginx. But i’m not sure at all, I tried to see if sqlite is enabled with this :

			if (extension_loaded('sqlite3')) {
				   $content = 'Sqlite PHP extension loaded';
			}

And it return nothing. But if I check fpm/conf.d I see 20-pdo_sqlite.ini with extension=pdo_sqlite.so

My error when trying to migrate:

PHP Fatal error:  Uncaught TypeError: Return value of Migrations\Migration201712181210::createSubmissionsTable() must be an instance of Migrations\void, none returned in migrations/Migration201712181210.php:35
Stack trace:
#0 migrations/Migration201712181210.php(21): Migrations\Migration201712181210->createSubmissionsTable(Object(Doctrine\DBAL\Schema\Schema))
#1 /bin/Migrate.php(14): Migrations\Migration201712181210->migrate()
#2 {main}
  thrown in migrations/Migration201712181210.php on line 35

If you have an idea! Thanks for reading.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I found my solution. I installed php 7.1 and php-sqlite3 everythings fine now.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.