scottmac                Thu May  7 16:49:27 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/sqlite3        sqlite3.c 
  Log:
  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.1.2.35&r2=1.1.2.36&diff_format=u
Index: php-src/ext/sqlite3/sqlite3.c
diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.35 
php-src/ext/sqlite3/sqlite3.c:1.1.2.36
--- php-src/ext/sqlite3/sqlite3.c:1.1.2.35      Mon Apr 27 18:16:46 2009
+++ php-src/ext/sqlite3/sqlite3.c       Thu May  7 16:49:26 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: sqlite3.c,v 1.1.2.35 2009/04/27 18:16:46 scottmac Exp $ */
+/* $Id: sqlite3.c,v 1.1.2.36 2009/05/07 16:49:26 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -308,6 +308,15 @@
                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

Reply via email to