diff options
| author | Scott MacVicar <scottmac@php.net> | 2009-05-07 16:49:26 +0000 | 
|---|---|---|
| committer | Scott MacVicar <scottmac@php.net> | 2009-05-07 16:49:26 +0000 | 
| commit | 81e3b74188111722e8db85cce66b3f72cf4bbe9c (patch) | |
| tree | ec46f90329022746b2bf48bf39373585df520d32 | |
| parent | 782644535fc4494a181332a186fb884fe9785583 (diff) | |
| download | php-git-81e3b74188111722e8db85cce66b3f72cf4bbe9c.tar.gz | |
Print warning when using loadExtension on non cli, cgi and embeded
| -rw-r--r-- | ext/sqlite3/sqlite3.c | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 70464576ae..f2e625d4e0 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -308,6 +308,15 @@ PHP_METHOD(sqlite3, loadExtension)  		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; | 
