Enabling Sqlite3 with Nginx on Debian 8

December 18, 2017 797 views
Nginx Debian

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-pdosqlite.ini with `extension=pdosqlite.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.

1 Answer

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

Have another answer? Share your knowledge.