Re: JSON1 extension for SQLite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Christoph M. Becker" in php.general (Wed, 20 Feb 2019 20:47:16 +0100):
>On 20.02.2019 at 20:23, Yves Goergen wrote:
>
>> $this->connection->loadExtension('json1');   // or json1.dll
>> 
>> --> Not supported in multithreaded Web servers
>
>This is not particularly an XAMPP issue, but rather a limitation of the
>SQLite3 extension[1].  Anyhow, the simplest solution would be to use PHP
>7.3, where the JSON1 extension of SQLite3 is supposed to be available in
>the Windows builds by default[2].  If you need an older PHP version, you
>likely have to compile ext/sqlite3 yourself.

In a way it is a XAMPP issue, because XAMPP sticks to mod_php and PHP
threadsafe (ZTS). Upgrading to PHP 7.3 will not help:
https://github.com/php/php-src/blob/PHP-7.3/ext/sqlite3/sqlite3.c#L358

#ifdef ZTS
    if ((strncmp(sapi_module.name, "cgi", 3) != 0) &&
        (strcmp(sapi_module.name, "cli") != 0) &&
        (strncmp(sapi_module.name, "embed", 5) != 0)
    ) {
        php_sqlite3_error(db_obj, "Not supported in multithreaded Web
servers");
        RETURN_FALSE;
    }
#endif

This code did not change from PHP 7.0:
https://github.com/php/php-src/blob/PHP-7.0/ext/sqlite3/sqlite3.c#L366
-- 
Jan



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux