mevdschee / php-crud-api

Single file PHP script that adds a REST API to a SQL database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLSTATE[HY000]: General error: 1 near \"(\": syntax error [New Versions]

drveresh opened this issue · comments

I am facing the below error despite trying multiple versions of PHP (7.2, 7.3, 8.1) and ensuring the required Sqlite versions(PDO Driver 3.7.17), on shared cPanel servers.

{
"code": 9999,
"message": "SQLSTATE[HY000]: General error: 1 near \"(\": syntax error"
}

Below is its config:

$config = new Config([
        'driver' => 'sqlite',
        'address' => './logs.db',
        // 'address' => 'localhost',
        // 'port' => '3306',
        //'username' => '',
        //'password' => '',
        'database' => 'php-crud-api',
        // 'debug' => false
    ]);

Please help me out.

Hi Veeresh, SQLite 3.22 or higher is required, see tests. What version are you running? Kind regards, Maurits