NotionCommotion Posted January 14, 2018 Share Posted January 14, 2018 Running php7 on centos7 and get error PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file. db.sqlite3 as well as the folder containing it has write permission by Apache. <?php $x=new PDO('sqlite: db.sqlite3'); phpinfo() provides the following: Additional .ini files parsed ... /etc/php.d/20-sqlite3.ini, ..., /etc/php.d/30-pdo_sqlite.ini, /etc/php.d/30-wddx.ini, /etc/php.d/30-xmlreader.ini, /etc/php.d/30-xmlrpc.ini, /etc/php.d/40-zip.ini ... PDO support enabled PDO drivers mysql, sqlite pdo_mysql PDO Driver for MySQL enabled Client API version mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $ Directive Local Value Master Value pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock pdo_sqlite PDO Driver for SQLite 3.x enabled SQLite Library 3.7.17 Phar sqlite3 SQLite3 support enabled SQLite3 module version 7.1.12 SQLite Library 3.7.17 Directive Local Value Master Value sqlite3.extension_dir no value no value standard php.ini is: [sqlite3] ;sqlite3.extension_dir = Link to comment Share on other sites More sharing options...
NotionCommotion Posted January 14, 2018 Author Share Posted January 14, 2018 What a difference a space makes! $x=new PDO('sqlite:db.sqlite3'); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.