scottmac Thu May 7 16:52:40 2009 UTC Modified files: /php-src/ext/sqlite3 sqlite3.c Log: MFB Print warning when using loadExtension on non cli, cgi and embeded http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.39&r2=1.40&diff_format=u Index: php-src/ext/sqlite3/sqlite3.c diff -u php-src/ext/sqlite3/sqlite3.c:1.39 php-src/ext/sqlite3/sqlite3.c:1.40 --- php-src/ext/sqlite3/sqlite3.c:1.39 Thu May 7 16:50:54 2009 +++ php-src/ext/sqlite3/sqlite3.c Thu May 7 16:52:40 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite3.c,v 1.39 2009/05/07 16:50:54 scottmac Exp $ */ +/* $Id: sqlite3.c,v 1.40 2009/05/07 16:52:40 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -324,6 +324,16 @@ return; } +#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 + if (!SQLITE3G(extension_dir)) { php_sqlite3_error(db_obj, "SQLite Extension are disabled"); RETURN_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php