[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sqlite3 config0.m4
scottmacSun Mar 29 21:34:13 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sqlite3config0.m4 Log: MFH Fix bug #47826 - Building with system sqlite3 can miss a symbol. http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/config0.m4?r1=1.1.2.12&r2=1.1.2.13&diff_format=u Index: php-src/ext/sqlite3/config0.m4 diff -u php-src/ext/sqlite3/config0.m4:1.1.2.12 php-src/ext/sqlite3/config0.m4:1.1.2.13 --- php-src/ext/sqlite3/config0.m4:1.1.2.12 Tue Mar 17 02:45:12 2009 +++ php-src/ext/sqlite3/config0.m4 Sun Mar 29 21:34:13 2009 @@ -1,4 +1,4 @@ -dnl $Id: config0.m4,v 1.1.2.12 2009/03/17 02:45:12 scottmac Exp $ +dnl $Id: config0.m4,v 1.1.2.13 2009/03/29 21:34:13 scottmac Exp $ dnl config.m4 for extension sqlite3 dnl vim:et:ts=2:sw=2 @@ -51,8 +51,9 @@ AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support]) ]) -PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,[ - AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension support]) +PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension, +[], +[AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension support]) ]) else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/sqlite3 config0.m4 sqlite3.c /ext/sqlite3/tests sqlite3_22_loadextension.phpt
Hello Scott, actually we cannot enable loadextension, when we disallow dl already. However, if dl is enabled, we might still disable this one. This is imo true for both build configuration as well as runtime configuration. marcus Tuesday, March 17, 2009, 3:45:12 AM, you wrote: > scottmacTue Mar 17 02:45:12 2009 UTC > Modified files: (Branch: PHP_5_3) > /php-src/ext/sqlite3config0.m4 sqlite3.c > /php-src/ext/sqlite3/tests sqlite3_22_loadextension.phpt > Log: > MFH Fix bug #47678 - Allow loadExtension to be disabled in SQLite3 > > > http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/config0.m4?r1=1.1.2.11&r2=1.1.2.12&diff_format=u > Index: php-src/ext/sqlite3/config0.m4 > diff -u php-src/ext/sqlite3/config0.m4:1.1.2.11 > php-src/ext/sqlite3/config0.m4:1.1.2.12 > --- php-src/ext/sqlite3/config0.m4:1.1.2.11 Tue Jan 13 02:50:54 2009 > +++ php-src/ext/sqlite3/config0.m4 Tue Mar 17 02:45:12 2009 > @@ -1,4 +1,4 @@ > -dnl $Id: config0.m4,v 1.1.2.11 2009/01/13 02:50:54 scottmac Exp $ > +dnl $Id: config0.m4,v 1.1.2.12 2009/03/17 02:45:12 scottmac Exp $ > dnl config.m4 for extension sqlite3 > dnl vim:et:ts=2:sw=2 > > @@ -51,6 +51,10 @@ >AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto > support]) > ]) > > +PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,[ > + AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension > support]) > +]) > + >else > AC_MSG_CHECKING([bundled sqlite3 library]) > AC_MSG_RESULT([yes]) > http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.1.2.33&r2=1.1.2.34&diff_format=u > Index: php-src/ext/sqlite3/sqlite3.c > diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.33 > php-src/ext/sqlite3/sqlite3.c:1.1.2.34 > --- php-src/ext/sqlite3/sqlite3.c:1.1.2.33 Wed Feb 18 20:07:40 2009 > +++ php-src/ext/sqlite3/sqlite3.c Tue Mar 17 02:45:12 2009 > @@ -16,7 +16,7 @@ > > +--+ > */ > > -/* $Id: sqlite3.c,v 1.1.2.33 2009/02/18 20:07:40 iliaa Exp $ */ > +/* $Id: sqlite3.c,v 1.1.2.34 2009/03/17 02:45:12 scottmac Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -266,6 +266,7 @@ > } > /* }}} */ > > +#ifndef SQLITE_OMIT_LOAD_EXTENSION > /* {{{ proto bool SQLite3::loadExtension(String Shared Library) > Attempts to load an SQLite extension library. */ > PHP_METHOD(sqlite3, loadExtension) > @@ -328,6 +329,7 @@ > RETURN_TRUE; > } > /* }}} */ > +#endif > > /* {{{ proto int SQLite3::changes() >Returns the number of database rows that were changed (or inserted or > deleted) by the most recent SQL statement. */ > @@ -1607,9 +1609,11 @@ > ZEND_ARG_INFO(0, encryption_key) > ZEND_END_ARG_INFO() > > +#ifndef SQLITE_OMIT_LOAD_EXTENSION > ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_loadextension, 0) > ZEND_ARG_INFO(0, shared_library) > ZEND_END_ARG_INFO() > +#endif > > ZEND_BEGIN_ARG_INFO_EX(arginfo_sqlite3_escapestring, 0, 0, 1) > ZEND_ARG_INFO(0, value) > @@ -1685,7 +1689,9 @@ > PHP_ME(sqlite3, lastInsertRowID, > arginfo_sqlite3_void, ZEND_ACC_PUBLIC) > PHP_ME(sqlite3, lastErrorCode, > arginfo_sqlite3_void, ZEND_ACC_PUBLIC) > PHP_ME(sqlite3, lastErrorMsg, > arginfo_sqlite3_void, ZEND_ACC_PUBLIC) > +#ifndef SQLITE_OMIT_LOAD_EXTENSION > PHP_ME(sqlite3, loadExtension, > arginfo_sqlite3_loadextension, ZEND_ACC_PUBLIC) > +#endif > PHP_ME(sqlite3, changes, > arginfo_sqlite3_void, ZEND_ACC_PUBLIC) > PHP_ME(sqlite3, escapeString, > arginfo_sqlite3_escapestring, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) > PHP_ME(sqlite3, prepare, > arginfo_sqlite3_query, ZEND_ACC_PUBLIC) > http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u > Index: php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt > diff -u php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.3 > php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.4 > --- php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.3 Wed > Aug 6 14:07:37 2008 > +++ php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt Tue Mar 17 > 02:45:12 2009 > @@ -1,7 +1,13 @@ > --TEST-- > SQLite3 load extension > --SKIPIF-- > - > + +require_once(dirname(__FILE__) . '/skipif.inc'); > +$r = new ReflectionClass("sqlite3"); > +if (!$r->hasMethod("loadExtension")) { > + die("skip - sqlite3 doesn't have loadExtension enabled"); > +} +?>> > --INI-- > open_basedir=. > sqlite3.extension_dir=. Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sqlite3 config0.m4 sqlite3.c /ext/sqlite3/tests sqlite3_22_loadextension.phpt
scottmacTue Mar 17 02:45:12 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sqlite3config0.m4 sqlite3.c /php-src/ext/sqlite3/tests sqlite3_22_loadextension.phpt Log: MFH Fix bug #47678 - Allow loadExtension to be disabled in SQLite3 http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/config0.m4?r1=1.1.2.11&r2=1.1.2.12&diff_format=u Index: php-src/ext/sqlite3/config0.m4 diff -u php-src/ext/sqlite3/config0.m4:1.1.2.11 php-src/ext/sqlite3/config0.m4:1.1.2.12 --- php-src/ext/sqlite3/config0.m4:1.1.2.11 Tue Jan 13 02:50:54 2009 +++ php-src/ext/sqlite3/config0.m4 Tue Mar 17 02:45:12 2009 @@ -1,4 +1,4 @@ -dnl $Id: config0.m4,v 1.1.2.11 2009/01/13 02:50:54 scottmac Exp $ +dnl $Id: config0.m4,v 1.1.2.12 2009/03/17 02:45:12 scottmac Exp $ dnl config.m4 for extension sqlite3 dnl vim:et:ts=2:sw=2 @@ -51,6 +51,10 @@ AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support]) ]) +PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,[ + AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension support]) +]) + else AC_MSG_CHECKING([bundled sqlite3 library]) AC_MSG_RESULT([yes]) http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.1.2.33&r2=1.1.2.34&diff_format=u Index: php-src/ext/sqlite3/sqlite3.c diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.33 php-src/ext/sqlite3/sqlite3.c:1.1.2.34 --- php-src/ext/sqlite3/sqlite3.c:1.1.2.33 Wed Feb 18 20:07:40 2009 +++ php-src/ext/sqlite3/sqlite3.c Tue Mar 17 02:45:12 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite3.c,v 1.1.2.33 2009/02/18 20:07:40 iliaa Exp $ */ +/* $Id: sqlite3.c,v 1.1.2.34 2009/03/17 02:45:12 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -266,6 +266,7 @@ } /* }}} */ +#ifndef SQLITE_OMIT_LOAD_EXTENSION /* {{{ proto bool SQLite3::loadExtension(String Shared Library) Attempts to load an SQLite extension library. */ PHP_METHOD(sqlite3, loadExtension) @@ -328,6 +329,7 @@ RETURN_TRUE; } /* }}} */ +#endif /* {{{ proto int SQLite3::changes() Returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement. */ @@ -1607,9 +1609,11 @@ ZEND_ARG_INFO(0, encryption_key) ZEND_END_ARG_INFO() +#ifndef SQLITE_OMIT_LOAD_EXTENSION ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_loadextension, 0) ZEND_ARG_INFO(0, shared_library) ZEND_END_ARG_INFO() +#endif ZEND_BEGIN_ARG_INFO_EX(arginfo_sqlite3_escapestring, 0, 0, 1) ZEND_ARG_INFO(0, value) @@ -1685,7 +1689,9 @@ PHP_ME(sqlite3, lastInsertRowID,arginfo_sqlite3_void, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, lastErrorCode, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, lastErrorMsg, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) +#ifndef SQLITE_OMIT_LOAD_EXTENSION PHP_ME(sqlite3, loadExtension, arginfo_sqlite3_loadextension, ZEND_ACC_PUBLIC) +#endif PHP_ME(sqlite3, changes, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, escapeString, arginfo_sqlite3_escapestring, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME(sqlite3, prepare, arginfo_sqlite3_query, ZEND_ACC_PUBLIC) http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt diff -u php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.3 php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.4 --- php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt:1.1.2.3 Wed Aug 6 14:07:37 2008 +++ php-src/ext/sqlite3/tests/sqlite3_22_loadextension.phpt Tue Mar 17 02:45:12 2009 @@ -1,7 +1,13 @@ --TEST-- SQLite3 load extension --SKIPIF-- - +hasMethod("loadExtension")) { + die("skip - sqlite3 doesn't have loadExtension enabled"); +} +?> --INI-- open_basedir=. sqlite3.extension_dir=. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php