[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend.h zend_API.c zend_API.h zend_builtin_functions.c zend_constants.c zend_execute.c zend_ini.c zend_list.c zend_list.h zend_modules.h zend_opcode.c zend_opera
hholzgra Thu, 14 Oct 2010 21:33:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304407 Log: marked char pointer arguments as const in lots of places where strings pointed to are not modified to prevent compiler warnings about discarded qualifiers ... Changed paths: U php/php-src/trunk/Zend/zend.h U php/php-src/trunk/Zend/zend_API.c U php/php-src/trunk/Zend/zend_API.h U php/php-src/trunk/Zend/zend_builtin_functions.c U php/php-src/trunk/Zend/zend_constants.c U php/php-src/trunk/Zend/zend_execute.c U php/php-src/trunk/Zend/zend_ini.c U php/php-src/trunk/Zend/zend_list.c U php/php-src/trunk/Zend/zend_list.h U php/php-src/trunk/Zend/zend_modules.h U php/php-src/trunk/Zend/zend_opcode.c U php/php-src/trunk/Zend/zend_operators.h U php/php-src/trunk/Zend/zend_stream.c U php/php-src/trunk/Zend/zend_string.c U php/php-src/trunk/Zend/zend_string.h U php/php-src/trunk/Zend/zend_strtod.c U php/php-src/trunk/Zend/zend_strtod.h Modified: php/php-src/trunk/Zend/zend.h === --- php/php-src/trunk/Zend/zend.h 2010-10-14 19:58:54 UTC (rev 304406) +++ php/php-src/trunk/Zend/zend.h 2010-10-14 21:33:10 UTC (rev 304407) @@ -461,7 +461,7 @@ struct _zend_class_entry { char type; - char *name; + const char *name; zend_uint name_length; struct _zend_class_entry *parent; int refcount; Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2010-10-14 19:58:54 UTC (rev 304406) +++ php/php-src/trunk/Zend/zend_API.c 2010-10-14 21:33:10 UTC (rev 304407) @@ -248,7 +248,7 @@ /* }}} */ /* returns 1 if you need to copy result, 0 if it's already a copy */ -ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */ +ZEND_API int zend_get_object_classname(const zval *object, const char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HT_P(object)-get_class_name == NULL || Z_OBJ_HT_P(object)-get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) { @@ -302,9 +302,9 @@ } /* }}} */ -static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */ +static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, const char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */ { - char *spec_walk = *spec; + const char *spec_walk = *spec; char c = *spec_walk++; int return_null = 0; @@ -659,7 +659,7 @@ } /* }}} */ -static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet TSRMLS_DC) /* {{{ */ +static int zend_parse_arg(int arg_num, zval **arg, va_list *va, const char **spec, int quiet TSRMLS_DC) /* {{{ */ { char *expected_type = NULL, *error = NULL; int severity = E_WARNING; @@ -689,9 +689,9 @@ } /* }}} */ -static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */ +static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */ { - char *spec_walk; + const char *spec_walk; int c, i; int min_num_args = -1; int max_num_args = 0; @@ -861,7 +861,7 @@ }\ } -ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...) /* {{{ */ +ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, const char *type_spec, ...) /* {{{ */ { va_list va; int retval; @@ -876,7 +876,7 @@ } /* }}} */ -ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...) /* {{{ */ +ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, const char *type_spec, ...) /* {{{ */ { va_list va; int retval; @@ -891,11 +891,11 @@ } /* }}} */ -ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...) /* {{{ */ +ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...) /* {{{ */ { va_list va; int retval; - char *p = type_spec; + const char *p = type_spec; zval **object; zend_class_entry *ce; @@ -927,11 +927,11 @@ } /* }}} */ -ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...) /* {{{ */ +ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...) /* {{{ */ { va_list va; int retval; - char *p = type_spec; + const char *p = type_spec; zval **object; zend_class_entry *ce; int quiet = flags ZEND_PARSE_PARAMS_QUIET; @@ -1922,7 +1922,7 @@ zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL,
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pgsql/tests 27large_object_oid.phpt 28large_object_import_oid.phpt
hholzgraWed Jul 23 09:06:59 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/pgsql/tests28large_object_import_oid.phpt Modified files: /php-src/ext/pgsql/tests27large_object_oid.phpt Log: splitted test cases for lo_create and lo_import, added version aware SKIP tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/27large_object_oid.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/pgsql/tests/27large_object_oid.phpt diff -u php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.1 php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.2 --- php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.1 Wed Jul 23 00:17:19 2008 +++ php-src/ext/pgsql/tests/27large_object_oid.phpt Wed Jul 23 09:06:59 2008 @@ -1,7 +1,12 @@ --TEST-- -PostgreSQL large object with given oid +PostgreSQL create large object with given oid --SKIPIF-- -?php include(skipif.inc); ? +?php +include(skipif.inc); +$v = pg_version($conn); +if (version_compare(8.3, $v[client]) 0) die(skip - requires pg client = 8.3\n); +if (version_compare(8.3, $v[server]) 0) die(skip - requires pg server = 8.3\n); +? --FILE-- ?php @@ -33,38 +38,10 @@ pg_lo_unlink ($oid); pg_exec (commit); -echo import LO from int\n; -pg_exec($db, 'begin'); -$oid = pg_lo_import($db, __FILE__, 21003); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21003) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($db, $oid); -pg_exec($db, 'commit'); - -echo import LO from string\n; -pg_exec($db, 'begin'); -$oid = pg_lo_import($db, __FILE__, 21004); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21004) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($db, $oid); -pg_exec($db, 'commit'); - -echo import LO using default connection\n; -pg_exec('begin'); -$oid = pg_lo_import($db, __FILE__, 21005); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21005) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($oid); -pg_exec('commit'); - - echo OK; ? --EXPECT-- create LO from int create LO from string create LO using default connection -import LO from int -import LO from string -import LO using default connection OK http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/28large_object_import_oid.phpt?view=markuprev=1.1 Index: php-src/ext/pgsql/tests/28large_object_import_oid.phpt +++ php-src/ext/pgsql/tests/28large_object_import_oid.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql config.m4 pgsql.c /ext/pgsql/tests 27large_object_oid.phpt 28large_object_import_oid.phpt
hholzgraWed Jul 23 09:27:01 2008 UTC Modified files: /php-src/ext/pgsql config.m4 pgsql.c /php-src/ext/pgsql/tests27large_object_oid.phpt 28large_object_import_oid.phpt Log: MFB + Unicode: added support for object ids in pg_lo_create() and pg_lo_import() where available (based on code provided by Tatsuo Ishii) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.52r2=1.53diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.52 php-src/ext/pgsql/config.m4:1.53 --- php-src/ext/pgsql/config.m4:1.52Wed Jul 11 21:51:10 2007 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 09:27:01 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.52 2007/07/11 21:51:10 jani Exp $ +dnl $Id: config.m4,v 1.53 2008/07/23 09:27:01 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -92,6 +92,8 @@ AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, PQescapeByteaConn, AC_DEFINE(HAVE_PQESCAPE_BYTEA_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte])) + AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or later])) + AC_CHECK_LIB(pq, lo_import_with_oid, AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later])) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.381r2=1.382diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.381 php-src/ext/pgsql/pgsql.c:1.382 --- php-src/ext/pgsql/pgsql.c:1.381 Wed Jul 2 00:13:26 2008 +++ php-src/ext/pgsql/pgsql.c Wed Jul 23 09:27:01 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.381 2008/07/02 00:13:26 felipe Exp $ */ +/* $Id: pgsql.c,v 1.382 2008/07/23 09:27:01 hholzgra Exp $ */ #include stdlib.h @@ -350,6 +350,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_create, 0, 0, 0) ZEND_ARG_INFO(0, connection) + ZEND_ARG_INFO(0, large_object_id) ZEND_END_ARG_INFO() static @@ -392,6 +393,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_import, 0, 0, 0) ZEND_ARG_INFO(0, connection) ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, large_object_oid) ZEND_END_ARG_INFO() static @@ -2978,42 +2980,86 @@ } /* }}} */ -/* {{{ proto int pg_lo_create([resource connection]) +/* {{{ proto mixed pg_lo_create([resource connection],[mixed large_object_oid]) Create a large object */ PHP_FUNCTION(pg_lo_create) { - zval *pgsql_link = NULL; - PGconn *pgsql; - Oid pgsql_oid; - int id = -1, argc = ZEND_NUM_ARGS(); + zval *pgsql_link = NULL, *oid = NULL; + PGconn *pgsql; + Oid pgsql_oid, wanted_oid = InvalidOid; + int id = -1, argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, |r, pgsql_link) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, |zz, pgsql_link, oid) == FAILURE) { return; } + + if ((argc == 1) (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { + oid = pgsql_link; + pgsql_link = NULL; + } - if (argc == 0) { + if (pgsql_link == NULL) { id = PGG(default_link); CHECK_DEFAULT_LINK(id); + if (id == -1) { + RETURN_FALSE; + } } - if (pgsql_link == NULL id == -1) { - RETURN_FALSE; - } - ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, le_link, le_plink); - /* NOTE: Archive modes not supported until I get some more data. Don't think anybody's - using it anyway. I believe it's also somehow related to the 'time travel' feature of - PostgreSQL, that's on the list of features to be removed... Create modes not supported. - What's the use of an object that can be only written to, but not read from, and vice - versa? Beats me... And the access type (r/w) must be specified again when opening - the object, probably (?) overrides this. (Jouni) - */ + if (oid) { +#ifndef HAVE_PG_LO_CREATE + php_error_docref(NULL TSRMLS_CC, E_NOTICE, OID value passing not supported); +#else + switch (Z_TYPE_P(oid)) { + case IS_STRING: + { + char *end_ptr; + wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), end_ptr, 10); + if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) { + /* wrong integer format */ + php_error_docref(NULL
[PHP-CVS] cvs: php-src /ext/pgsql config.m4
hholzgraWed Jul 23 21:41:27 2008 UTC Modified files: /php-src/ext/pgsql config.m4 Log: corrected library search path order in tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.53r2=1.54diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.53 php-src/ext/pgsql/config.m4:1.54 --- php-src/ext/pgsql/config.m4:1.53Wed Jul 23 09:27:01 2008 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 21:41:27 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.53 2008/07/23 09:27:01 hholzgra Exp $ +dnl $Id: config.m4,v 1.54 2008/07/23 21:41:27 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -66,7 +66,7 @@ AC_DEFINE(HAVE_PGSQL,1,[Whether to build PostgreSQL support or not]) old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS - LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR + LDFLAGS=-L$PGSQL_LIBDIR $LDFLAGS AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.3.0 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) -- 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/pgsql config.m4
hholzgraWed Jul 23 21:44:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pgsql config.m4 Log: MFH: corrected library search path order in tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.46.2.1.2.5.2.1r2=1.46.2.1.2.5.2.2diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.1 php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.2 --- php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.1Wed Jul 23 00:17:19 2008 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 21:44:25 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.46.2.1.2.5.2.1 2008/07/23 00:17:19 hholzgra Exp $ +dnl $Id: config.m4,v 1.46.2.1.2.5.2.2 2008/07/23 21:44:25 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -66,7 +66,7 @@ AC_DEFINE(HAVE_PGSQL,1,[Whether to build PostgreSQL support or not]) old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS - LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR + LDFLAGS=-L$PGSQL_LIBDIR $LDFLAGS AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.3.0 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) -- 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/pgsql config.m4 pgsql.c /ext/pgsql/tests 27large_object_oid.phpt
hholzgraWed Jul 23 00:17:19 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/pgsql/tests27large_object_oid.phpt Modified files: /php-src/ext/pgsql config.m4 pgsql.c Log: added support for object ids in pg_lo_create() and pg_lo_import() where available (based on code provided by Tatsuo Ishii) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.46.2.1.2.5r2=1.46.2.1.2.5.2.1diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.46.2.1.2.5 php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.1 --- php-src/ext/pgsql/config.m4:1.46.2.1.2.5Wed Jul 11 21:51:55 2007 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 00:17:19 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.46.2.1.2.5 2007/07/11 21:51:55 jani Exp $ +dnl $Id: config.m4,v 1.46.2.1.2.5.2.1 2008/07/23 00:17:19 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -92,6 +92,8 @@ AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, PQescapeByteaConn, AC_DEFINE(HAVE_PQESCAPE_BYTEA_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte])) + AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or later])) + AC_CHECK_LIB(pq, lo_import_with_oid, AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later])) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.24.2.9r2=1.331.2.13.2.24.2.10diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.9 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.10 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.9 Wed Jul 2 00:10:54 2008 +++ php-src/ext/pgsql/pgsql.c Wed Jul 23 00:17:19 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.24.2.9 2008/07/02 00:10:54 felipe Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.24.2.10 2008/07/23 00:17:19 hholzgra Exp $ */ #include stdlib.h @@ -350,6 +350,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_create, 0, 0, 0) ZEND_ARG_INFO(0, connection) + ZEND_ARG_INFO(0, large_object_id) ZEND_END_ARG_INFO() static @@ -392,6 +393,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_import, 0, 0, 0) ZEND_ARG_INFO(0, connection) ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, large_object_oid) ZEND_END_ARG_INFO() static @@ -2992,42 +2994,75 @@ } /* }}} */ -/* {{{ proto int pg_lo_create([resource connection]) +/* {{{ proto mixed pg_lo_create([resource connection],[mixed large_object_oid]) Create a large object */ PHP_FUNCTION(pg_lo_create) { - zval *pgsql_link = NULL; - PGconn *pgsql; - Oid pgsql_oid; - int id = -1, argc = ZEND_NUM_ARGS(); + zval *pgsql_link = NULL, *oid = NULL; + PGconn *pgsql; + Oid pgsql_oid, wanted_oid = InvalidOid; + int id = -1, argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, |r, pgsql_link) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, |zz, pgsql_link, oid) == FAILURE) { return; } + + if ((argc == 1) (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { + oid = pgsql_link; + pgsql_link = NULL; + } - if (argc == 0) { + if (pgsql_link == NULL) { id = PGG(default_link); CHECK_DEFAULT_LINK(id); + if (id == -1) { + RETURN_FALSE; + } } - if (pgsql_link == NULL id == -1) { - RETURN_FALSE; - } - ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, le_link, le_plink); - /* NOTE: Archive modes not supported until I get some more data. Don't think anybody's - using it anyway. I believe it's also somehow related to the 'time travel' feature of - PostgreSQL, that's on the list of features to be removed... Create modes not supported. - What's the use of an object that can be only written to, but not read from, and vice - versa? Beats me... And the access type (r/w) must be specified again when opening - the object, probably (?) overrides this. (Jouni) - */ + if (oid) { +#ifndef HAVE_PG_LO_CREATE + php_error_docref(NULL TSRMLS_CC, E_NOTICE, OID value passing not supported); +#else + switch (Z_TYPE_P(oid)) { + case IS_STRING: + { + char *end_ptr; + wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), end_ptr, 10); + if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) !=
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/mysqli mysqli_api.c /ext/mysqli/tests bug42548.phpt
hholzgraTue Jan 1 16:51:09 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/mysqli/tests bug42548.phpt Modified files: /php-srcNEWS /php-src/ext/mysqli mysqli_api.c Log: MFH: Fix for bug #42548 PROCEDURE xxx can't return a result set http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1044r2=1.2027.2.547.2.1045diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1044 php-src/NEWS:1.2027.2.547.2.1045 --- php-src/NEWS:1.2027.2.547.2.1044Sun Dec 30 17:59:30 2007 +++ php-src/NEWSTue Jan 1 16:51:08 2008 @@ -59,6 +59,7 @@ - Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony) - Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer). (Dmitry) +- Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (hartmut) - Fixed bug #42272 (var_export() incorrectly escapes char(0)). (Derick) - Fixed bug #42261 (Incorrect lengths for date and boolean data types). (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.19r2=1.118.2.22.2.20diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.19 php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.20 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.19 Mon Dec 31 07:20:08 2007 +++ php-src/ext/mysqli/mysqli_api.c Tue Jan 1 16:51:09 2008 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.118.2.22.2.19 2007/12/31 07:20:08 sebastian Exp $ + $Id: mysqli_api.c,v 1.118.2.22.2.20 2008/01/01 16:51:09 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H @@ -1438,6 +1438,9 @@ MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, mysql_link, mysqli_link, MYSQLI_STATUS_INITIALIZED); + + /* set some required options */ + flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */ /* remove some insecure options */ flags = ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ if ((PG(open_basedir) PG(open_basedir)[0] != '\0') || PG(safe_mode)) { http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug42548.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/bug42548.phpt +++ php-src/ext/mysqli/tests/bug42548.phpt --TEST-- Bug #42548 PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!) --SKIPIF-- ?php if (!extension_loaded(mysqli)) print skip; ? --FILE-- ?php $mysqli = mysqli_init(); $mysqli-real_connect('localhost', 'root', '', 'test'); if (mysqli_connect_errno()) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } $mysqli-query(DROP PROCEDURE IF EXISTS p1) or die($mysqli-error); $mysqli-query(CREATE PROCEDURE p1() BEGIN SELECT 23; SELECT 42; END) or die($mysqli-error); if ($mysqli-multi_query(CALL p1();)) { do { if ($objResult = $mysqli-store_result()) { while ($row = $objResult-fetch_assoc()) { print_r($row); } $objResult-close(); if ($mysqli-more_results()) { print - next result ---\n; } } else { print no results found; } } while ($mysqli-more_results() $mysqli-next_result()); } else { print $mysqli-error; } $mysqli-query(DROP PROCEDURE p1) or die($mysqli-error); $mysqli-close(); ? --EXPECT-- Array ( [23] = 23 ) - next result --- Array ( [42] = 42 ) - next result --- no results found -- 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/mysqli mysqli_api.c
hholzgraTue Jan 1 18:13:14 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqli mysqli_api.c Log: fixed binary arithmetic (MF5.2) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.16.2.10r2=1.118.2.22.2.16.2.11diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.10 php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.11 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.10Mon Dec 31 07:17:10 2007 +++ php-src/ext/mysqli/mysqli_api.c Tue Jan 1 18:13:14 2008 @@ -17,7 +17,7 @@ | Ulf Wendel [EMAIL PROTECTED] | +--+ - $Id: mysqli_api.c,v 1.118.2.22.2.16.2.10 2007/12/31 07:17:10 sebastian Exp $ + $Id: mysqli_api.c,v 1.118.2.22.2.16.2.11 2008/01/01 18:13:14 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H @@ -1626,7 +1626,7 @@ /* remove some insecure options */ flags = ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ if (PG(open_basedir) PG(open_basedir)[0] != '\0') { - flags ^= CLIENT_LOCAL_FILES; + flags = ~CLIENT_LOCAL_FILES; } #if !defined(HAVE_MYSQLND) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c /ext/mysqli/tests bug42548.phpt
hholzgraTue Dec 25 18:23:07 2007 UTC Added files: /php-src/ext/mysqli/tests bug42548.phpt Modified files: /php-src/ext/mysqli mysqli_api.c Log: Fix for bug #42548 PROCEDURE xxx can't return a result set http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.155r2=1.156diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.155 php-src/ext/mysqli/mysqli_api.c:1.156 --- php-src/ext/mysqli/mysqli_api.c:1.155 Fri Nov 9 12:13:15 2007 +++ php-src/ext/mysqli/mysqli_api.c Tue Dec 25 18:23:07 2007 @@ -17,7 +17,7 @@ | Ulf Wendel [EMAIL PROTECTED] | +--+ - $Id: mysqli_api.c,v 1.155 2007/11/09 12:13:15 andrey Exp $ + $Id: mysqli_api.c,v 1.156 2007/12/25 18:23:07 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H @@ -1696,6 +1696,8 @@ MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, mysql_link, mysqli_link, MYSQLI_STATUS_INITIALIZED); + /* set some required options */ + flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */ /* remove some insecure options */ flags = ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ if (PG(open_basedir) PG(open_basedir)[0] != '\0') { http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug42548.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/bug42548.phpt +++ php-src/ext/mysqli/tests/bug42548.phpt --TEST-- Bug #42548 PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!) --SKIPIF-- ?php if (!extension_loaded(mysqli)) print skip; ? --FILE-- ?php $mysqli = mysqli_init(); $mysqli-real_connect('localhost', 'root', '', 'test'); if (mysqli_connect_errno()) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } $mysqli-query(DROP PROCEDURE IF EXISTS p1) or die($mysqli-error); $mysqli-query(CREATE PROCEDURE p1() BEGIN SELECT 23; SELECT 42; END) or die($mysqli-error); if ($mysqli-multi_query(CALL p1();)) { do { if ($objResult = $mysqli-store_result()) { while ($row = $objResult-fetch_assoc()) { print_r($row); } $objResult-close(); if ($mysqli-more_results()) { print - next result ---\n; } } else { print no results found; } } while ($mysqli-more_results() $mysqli-next_result()); } else { print $mysqli-error; } $mysqli-query(DROP PROCEDURE p1) or die($mysqli-error); $mysqli-close(); ? --EXPECT-- Array ( [23] = 23 ) - next result --- Array ( [42] = 42 ) - next result --- no results found -- 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) / NEWS /ext/mysqli/tests bug42548.phpt
hholzgraTue Dec 25 18:54:29 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/mysqli/tests bug42548.phpt Modified files: /php-srcNEWS Log: MFH: Fix for bug #42548 PROCEDURE xxx can't return a result set http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.59r2=1.2027.2.547.2.965.2.60diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.59 php-src/NEWS:1.2027.2.547.2.965.2.60 --- php-src/NEWS:1.2027.2.547.2.965.2.59Mon Dec 17 10:02:12 2007 +++ php-src/NEWSTue Dec 25 18:54:29 2007 @@ -77,6 +77,7 @@ - Fixed bug #42657 (ini_get() returns incorrect value when default is NULL). (Jani) - Fixed bug #42637 (SoapFault : Only http and https are allowed). (Bill Moran) +- Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (hartmut) - Fixed bug #42509 (gmp leaks memory when gmp_init() not used). (Stas) - Fixed bug #42284 (duplicate of #39700). (Lars W) - Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug42548.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/bug42548.phpt +++ php-src/ext/mysqli/tests/bug42548.phpt --TEST-- Bug #42548 PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!) --SKIPIF-- ?php if (!extension_loaded(mysqli)) print skip; ? --FILE-- ?php $mysqli = mysqli_init(); $mysqli-real_connect('localhost', 'root', '', 'test'); if (mysqli_connect_errno()) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } $mysqli-query(DROP PROCEDURE IF EXISTS p1) or die($mysqli-error); $mysqli-query(CREATE PROCEDURE p1() BEGIN SELECT 23; SELECT 42; END) or die($mysqli-error); if ($mysqli-multi_query(CALL p1();)) { do { if ($objResult = $mysqli-store_result()) { while ($row = $objResult-fetch_assoc()) { print_r($row); } $objResult-close(); if ($mysqli-more_results()) { print - next result ---\n; } } else { print no results found; } } while ($mysqli-more_results() $mysqli-next_result()); } else { print $mysqli-error; } $mysqli-query(DROP PROCEDURE p1) or die($mysqli-error); $mysqli-close(); ? --EXPECT-- Array ( [23] = 23 ) - next result --- Array ( [42] = 42 ) - next result --- no results found -- 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/mysqli mysqli_api.c
hholzgraTue Dec 25 18:55:40 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqli mysqli_api.c Log: MFH: Fix for bug #42548 PROCEDURE xxx can't return a result set http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.16.2.8r2=1.118.2.22.2.16.2.9diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.8 php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.9 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.8 Fri Nov 9 10:56:28 2007 +++ php-src/ext/mysqli/mysqli_api.c Tue Dec 25 18:55:40 2007 @@ -17,7 +17,7 @@ | Ulf Wendel [EMAIL PROTECTED] | +--+ - $Id: mysqli_api.c,v 1.118.2.22.2.16.2.8 2007/11/09 10:56:28 andrey Exp $ + $Id: mysqli_api.c,v 1.118.2.22.2.16.2.9 2007/12/25 18:55:40 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H @@ -1621,6 +1621,8 @@ MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, mysql_link, mysqli_link, MYSQLI_STATUS_INITIALIZED); + /* set some required options */ + flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */ /* remove some insecure options */ flags = ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */ if (PG(open_basedir) PG(open_basedir)[0] != '\0') { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests connect.inc skipifnotemb.inc
hholzgraTue Jul 11 23:41:41 2006 UTC Added files: /php-src/ext/mysqli/tests skipifnotemb.inc Modified files: /php-src/ext/mysqli/tests connect.inc Log: make sure embedded server is correctly initialized http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/connect.inc?r1=1.6r2=1.7diff_format=u Index: php-src/ext/mysqli/tests/connect.inc diff -u php-src/ext/mysqli/tests/connect.inc:1.6 php-src/ext/mysqli/tests/connect.inc:1.7 --- php-src/ext/mysqli/tests/connect.inc:1.6Wed Jun 22 13:41:59 2005 +++ php-src/ext/mysqli/tests/connect.incTue Jul 11 23:41:40 2006 @@ -15,7 +15,8 @@ --datadir=$path, --innodb_data_home_dir=$path, --innodb_data_file_path=ibdata1:10M:autoextend, - --log-error=$path/testrun.log + --log-error=$path/testrun.log, + --init-connect='CREATE DATABASE IF NOT EXISTS test;' ); $driver-embedded_server_start(TRUE, $args, NULL); } http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/skipifnotemb.inc?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/skipifnotemb.inc +++ php-src/ext/mysqli/tests/skipifnotemb.inc ?php $driver = new mysqli_driver(); if (!$driver-embedded) die(skip test for with embedded server only); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli/tests connect.inc
hholzgraTue Jul 11 23:43:55 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli/tests connect.inc Log: MFH make sure that embedded database is correctly initialized http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/connect.inc?r1=1.6.2.1.2.1r2=1.6.2.1.2.2diff_format=u Index: php-src/ext/mysqli/tests/connect.inc diff -u php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.1 php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.2 --- php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.1Tue Jul 11 23:42:58 2006 +++ php-src/ext/mysqli/tests/connect.incTue Jul 11 23:43:55 2006 @@ -16,7 +16,8 @@ --datadir=$path, --innodb_data_home_dir=$path, --innodb_data_file_path=ibdata1:10M:autoextend, - --log-error=$path/testrun.log + --log-error=$path/testrun.log, +--init-connect='CREATE DATABASE IF NOT EXISTS test;' ); $driver-embedded_server_start(TRUE, $args, NULL); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli/tests connect.inc
hholzgraTue Jul 11 23:42:58 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli/tests connect.inc Log: debug output was breaking all tests http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/connect.inc?r1=1.6.2.1r2=1.6.2.1.2.1diff_format=u Index: php-src/ext/mysqli/tests/connect.inc diff -u php-src/ext/mysqli/tests/connect.inc:1.6.2.1 php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.1 --- php-src/ext/mysqli/tests/connect.inc:1.6.2.1Fri Mar 24 09:32:24 2006 +++ php-src/ext/mysqli/tests/connect.incTue Jul 11 23:42:58 2006 @@ -18,8 +18,7 @@ --innodb_data_file_path=ibdata1:10M:autoextend, --log-error=$path/testrun.log ); - $x = $driver-embedded_server_start(TRUE, $args, NULL); - var_dump($x); + $driver-embedded_server_start(TRUE, $args, NULL); } ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli/tests 072.phpt 073.phpt
hholzgraWed Jul 12 08:01:44 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/mysqli/tests 072.phpt 073.phpt Log: MFH new test cases http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/072.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/072.phpt +++ php-src/ext/mysqli/tests/072.phpt --TEST-- mysqli warning_count, get_warnings --SKIPIF-- ?php require_once('skipif.inc'); ? ?php die('skip mysqli_warning class not functional yet?'); ? --FILE-- ?php include connect.inc; $mysql = new mysqli($host, $user, $passwd, test); $mysql-query(DROP TABLE IF EXISTS not_exists); var_dump($mysql-warning_count); $w = $mysql-get_warnings(); var_dump($w-errno); var_dump($w-message); # var_dump($w-sqlstate); $mysql-close(); ? --EXPECT-- 1 1051 Unknown table 'not_exists' http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/073.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/073.phpt +++ php-src/ext/mysqli/tests/073.phpt --TEST-- mysqli_driver properties --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php include connect.inc; var_dump( $driver-embedded); var_dump( $driver-client_version); var_dump( $driver-client_info); var_dump( $driver-driver_version); var_dump( $driver-reconnect); var_dump( $driver-report_mode); ? --EXPECTF-- bool(%s) int(%d) string(%d) %s int(%d) bool(%s) int(%d) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli_embedded.c
hholzgraWed Jul 12 07:00:48 2006 UTC Modified files: /php-src/ext/mysqli mysqli_embedded.c Log: fixed CP errors in groups handling, activated groups feature http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_embedded.c?r1=1.5r2=1.6diff_format=u Index: php-src/ext/mysqli/mysqli_embedded.c diff -u php-src/ext/mysqli/mysqli_embedded.c:1.5 php-src/ext/mysqli/mysqli_embedded.c:1.6 --- php-src/ext/mysqli/mysqli_embedded.c:1.5Sun Jan 1 13:09:52 2006 +++ php-src/ext/mysqli/mysqli_embedded.cWed Jul 12 07:00:48 2006 @@ -75,14 +75,14 @@ /* get groups */ if ((zend_hash_num_elements(HASH_OF(*grps { groups = safe_emalloc(sizeof(char *), zend_hash_num_elements(HASH_OF(*grps)) + 1, 0); - arguments[0] = NULL; + groups[0] = NULL; - zend_hash_internal_pointer_reset_ex(HASH_OF(*args), pos); + zend_hash_internal_pointer_reset_ex(HASH_OF(*grps), pos); - for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*args), pos)) { + for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*grps), pos)) { zval ** item; - if (zend_hash_get_current_data_ex(HASH_OF(*args), (void **) item, pos) == FAILURE) { + if (zend_hash_get_current_data_ex(HASH_OF(*grps), (void **) item, pos) == FAILURE) { break; } @@ -96,7 +96,7 @@ groups[0] = NULL; } - rc = mysql_server_init(argc, arguments, NULL); + rc = mysql_server_init(argc, arguments, groups); if (argc) { efree(arguments); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli_embedded.c
hholzgraWed Jul 12 07:01:04 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli mysqli_embedded.c Log: fixed CP errors in groups handling, activated groups feature http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_embedded.c?r1=1.4.2.1r2=1.4.2.1.2.1diff_format=u Index: php-src/ext/mysqli/mysqli_embedded.c diff -u php-src/ext/mysqli/mysqli_embedded.c:1.4.2.1 php-src/ext/mysqli/mysqli_embedded.c:1.4.2.1.2.1 --- php-src/ext/mysqli/mysqli_embedded.c:1.4.2.1Sun Jan 1 12:50:09 2006 +++ php-src/ext/mysqli/mysqli_embedded.cWed Jul 12 07:01:04 2006 @@ -75,14 +75,14 @@ /* get groups */ if ((zend_hash_num_elements(HASH_OF(*grps { groups = safe_emalloc(sizeof(char *), zend_hash_num_elements(HASH_OF(*grps)) + 1, 0); - arguments[0] = NULL; + groups[0] = NULL; - zend_hash_internal_pointer_reset_ex(HASH_OF(*args), pos); + zend_hash_internal_pointer_reset_ex(HASH_OF(*grps), pos); - for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*args), pos)) { + for (index = 0;; zend_hash_move_forward_ex(HASH_OF(*grps), pos)) { zval ** item; - if (zend_hash_get_current_data_ex(HASH_OF(*args), (void **) item, pos) == FAILURE) { + if (zend_hash_get_current_data_ex(HASH_OF(*grps), (void **) item, pos) == FAILURE) { break; } @@ -96,7 +96,7 @@ groups[0] = NULL; } - rc = mysql_server_init(argc, arguments, NULL); + rc = mysql_server_init(argc, arguments, groups); if (argc) { efree(arguments); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 019.phpt
hholzgraTue Jul 11 07:02:02 2006 UTC Modified files: /php-src/ext/mysqli/tests 019.phpt Log: test was not covering DOUBLE bindings http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/019.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/mysqli/tests/019.phpt diff -u php-src/ext/mysqli/tests/019.phpt:1.5 php-src/ext/mysqli/tests/019.phpt:1.6 --- php-src/ext/mysqli/tests/019.phpt:1.5 Sat Dec 4 08:50:33 2004 +++ php-src/ext/mysqli/tests/019.phpt Tue Jul 11 07:02:02 2006 @@ -20,12 +20,13 @@ col10 varchar(50), col11 char(20))); - $stmt= mysqli_prepare($link,INSERT INTO insert_read(col1,col10, col11) VALUES(?,?,?)); - mysqli_bind_param($stmt, iss, $c1, $c2, $c3); + $stmt= mysqli_prepare($link,INSERT INTO insert_read(col1,col10, col11, col6) VALUES(?,?,?,?)); + mysqli_bind_param($stmt, issd, $c1, $c2, $c3, $c4); $c1 = 1; $c2 = foo; $c3 = foobar; + $c4 = 3.14; mysqli_execute($stmt); mysqli_stmt_close($stmt); @@ -56,7 +57,7 @@ [4]= NULL [5]= - NULL + float(3.14) [6]= NULL [7]= -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 047.phpt
hholzgraTue Jul 11 07:02:50 2006 UTC Modified files: /php-src/ext/mysqli/tests 047.phpt Log: test was only covering fetch_fields(), added fetch_field() and fetch_field_direct() http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/047.phpt?r1=1.8r2=1.9diff_format=u Index: php-src/ext/mysqli/tests/047.phpt diff -u php-src/ext/mysqli/tests/047.phpt:1.8 php-src/ext/mysqli/tests/047.phpt:1.9 --- php-src/ext/mysqli/tests/047.phpt:1.8 Fri Jan 7 14:59:59 2005 +++ php-src/ext/mysqli/tests/047.phpt Tue Jul 11 07:02:50 2006 @@ -20,15 +20,28 @@ mysqli_execute($stmt); $result = mysqli_get_metadata($stmt); - $fields = mysqli_fetch_fields($result); + echo \n=== fetch_fields ===\n; + var_dump(mysqli_fetch_fields($result)); + + echo \n=== fetch_field_direct ===\n; + var_dump(mysqli_fetch_field_direct($result, 0)); + var_dump(mysqli_fetch_field_direct($result, 1)); + + echo \n=== fetch_field ===\n; + while ($field = mysqli_fetch_field($result)) { + var_dump($field); + } + + print_r(mysqli_fetch_lengths($result)); + mysqli_free_result($result); - var_dump($fields); mysqli_stmt_close($stmt); mysqli_close($link); ? --EXPECTF-- +=== fetch_fields === array(2) { [0]= object(stdClass)#5 (11) { @@ -81,3 +94,103 @@ int(0) } } + +=== fetch_field_direct === +object(stdClass)#6 (11) { + [name]= + string(3) foo + [orgname]= + string(3) foo + [table]= + string(13) test_affected + [orgtable]= + string(13) test_affected + [def]= + string(0) + [max_length]= + int(0) + [length]= + int(11) + [charsetnr]= + int(63) + [flags]= + int(32768) + [type]= + int(3) + [decimals]= + int(0) +} +object(stdClass)#6 (11) { + [name]= + string(3) bar + [orgname]= + string(3) bar + [table]= + string(13) test_affected + [orgtable]= + string(13) test_affected + [def]= + string(0) + [max_length]= + int(0) + [length]= + int(10) + [charsetnr]= + int(8) + [flags]= + int(0) + [type]= + int(253) + [decimals]= + int(0) +} + +=== fetch_field === +object(stdClass)#6 (11) { + [name]= + string(3) foo + [orgname]= + string(3) foo + [table]= + string(13) test_affected + [orgtable]= + string(13) test_affected + [def]= + string(0) + [max_length]= + int(0) + [length]= + int(11) + [charsetnr]= + int(63) + [flags]= + int(32768) + [type]= + int(3) + [decimals]= + int(0) +} +object(stdClass)#5 (11) { + [name]= + string(3) bar + [orgname]= + string(3) bar + [table]= + string(13) test_affected + [orgtable]= + string(13) test_affected + [def]= + string(0) + [max_length]= + int(0) + [length]= + int(10) + [charsetnr]= + int(8) + [flags]= + int(0) + [type]= + int(253) + [decimals]= + int(0) +} \ No newline at end of file -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 068.phpt
hholzgraTue Jul 11 07:03:31 2006 UTC Added files: /php-src/ext/mysqli/tests 068.phpt Log: get_client_info() test http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/068.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/068.phpt +++ php-src/ext/mysqli/tests/068.phpt --TEST-- mysqli get_client_info --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php $s = mysqli_get_client_info(); echo gettype($s); ? --EXPECT-- string -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 069.phpt
hholzgraTue Jul 11 07:04:16 2006 UTC Added files: /php-src/ext/mysqli/tests 069.phpt Log: test multi_query(), next_result(), more_results() (only partially covered by a bug testcase yet) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/069.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/069.phpt +++ php-src/ext/mysqli/tests/069.phpt --TEST-- mysqli multi_query, next_result, more_results --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php include connect.inc; $mysql = new mysqli($host, $user, $passwd, test); $mysql-multi_query('SELECT 1;SELECT 2'); do { $res = $mysql-store_result(); if ($mysql-errno == 0) { while ($arr = $res-fetch_assoc()) { var_dump($arr); } $res-free(); } if ($mysql-more_results()) { echo ---\n; } } while ($mysql-next_result()); $mysql-close(); ? --EXPECT-- array(1) { [1]= string(1) 1 } --- array(1) { [2]= string(1) 2 } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 070.phpt
hholzgraTue Jul 11 07:04:31 2006 UTC Added files: /php-src/ext/mysqli/tests 070.phpt Log: test ping() http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/070.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/070.phpt +++ php-src/ext/mysqli/tests/070.phpt --TEST-- mysqli ping --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php include connect.inc; $mysql = new mysqli($host, $user, $passwd, test); var_dump($mysql-ping()); $mysql-close(); ? --EXPECT-- bool(true) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 071.phpt
hholzgraTue Jul 11 07:04:44 2006 UTC Added files: /php-src/ext/mysqli/tests 071.phpt Log: test kill() http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/071.phpt +++ php-src/ext/mysqli/tests/071.phpt --TEST-- mysqli kill --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php include connect.inc; $mysql = new mysqli($host, $user, $passwd, test); $result = $mysql-query(SELECT CONNECTION_ID() AS id); $row = $result-fetch_assoc(); $result-free(); var_dump($mysql-ping()); var_dump($mysql-kill($row[id])); var_dump($mysql-ping()); $mysql-close(); ? --EXPECT-- bool(true) bool(true) bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 071.phpt
hholzgraTue Jul 11 07:10:18 2006 UTC Modified files: /php-src/ext/mysqli/tests 071.phpt Log: modified test to use (and cover) mysqli-thread_id http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/mysqli/tests/071.phpt diff -u php-src/ext/mysqli/tests/071.phpt:1.1 php-src/ext/mysqli/tests/071.phpt:1.2 --- php-src/ext/mysqli/tests/071.phpt:1.1 Tue Jul 11 07:04:44 2006 +++ php-src/ext/mysqli/tests/071.phpt Tue Jul 11 07:10:18 2006 @@ -1,5 +1,5 @@ --TEST-- -mysqli kill +mysqli thread_id kill --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- @@ -8,15 +8,9 @@ $mysql = new mysqli($host, $user, $passwd, test); - $result = $mysql-query(SELECT CONNECTION_ID() AS id); - - $row = $result-fetch_assoc(); - -$result-free(); - var_dump($mysql-ping()); - var_dump($mysql-kill($row[id])); + var_dump($mysql-kill($mysql-thread_id)); var_dump($mysql-ping()); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 071.phpt
hholzgraTue Jul 11 07:21:27 2006 UTC Modified files: /php-src/ext/mysqli/tests 071.phpt Log: check both OO and procedural style as thread_id is a property and not a method in the OO interface http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/mysqli/tests/071.phpt diff -u php-src/ext/mysqli/tests/071.phpt:1.2 php-src/ext/mysqli/tests/071.phpt:1.3 --- php-src/ext/mysqli/tests/071.phpt:1.2 Tue Jul 11 07:10:18 2006 +++ php-src/ext/mysqli/tests/071.phpt Tue Jul 11 07:21:27 2006 @@ -15,8 +15,21 @@ var_dump($mysql-ping()); $mysql-close(); + + $mysql = new mysqli($host, $user, $passwd, test); + + var_dump(mysqli_ping($mysql)); + + var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql))); + + var_dump(mysqli_ping($mysql)); + + $mysql-close(); ? --EXPECT-- bool(true) bool(true) bool(false) +bool(true) +bool(true) +bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests 071.phpt
hholzgraTue Jul 11 23:34:28 2006 UTC Modified files: /php-src/ext/mysqli/tests 071.phpt Log: no need to test ping and kill with embedded server http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/mysqli/tests/071.phpt diff -u php-src/ext/mysqli/tests/071.phpt:1.3 php-src/ext/mysqli/tests/071.phpt:1.4 --- php-src/ext/mysqli/tests/071.phpt:1.3 Tue Jul 11 07:21:27 2006 +++ php-src/ext/mysqli/tests/071.phpt Tue Jul 11 23:34:27 2006 @@ -2,6 +2,7 @@ mysqli thread_id kill --SKIPIF-- ?php require_once('skipif.inc'); ? +?php require_once('skipifemb.inc'); ? --FILE-- ?php include connect.inc; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli/tests 071.phpt
hholzgraTue Jul 11 23:35:38 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/mysqli/tests 071.phpt Log: MFH test for ping and kill methods http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/071.phpt +++ php-src/ext/mysqli/tests/071.phpt --TEST-- mysqli kill --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- ?php include connect.inc; $mysql = new mysqli($host, $user, $passwd, test); $result = $mysql-query(SELECT CONNECTION_ID() AS id); $row = $result-fetch_assoc(); $result-free(); var_dump($mysql-ping()); var_dump($mysql-kill($row[id])); var_dump($mysql-ping()); $mysql-close(); ? --EXPECT-- bool(true) bool(true) bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests bug33263.phpt
hholzgraTue Jul 11 23:37:41 2006 UTC Modified files: /php-src/ext/mysqli/tests bug33263.phpt Log: skip when testing embedded server http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug33263.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/mysqli/tests/bug33263.phpt diff -u php-src/ext/mysqli/tests/bug33263.phpt:1.1 php-src/ext/mysqli/tests/bug33263.phpt:1.2 --- php-src/ext/mysqli/tests/bug33263.phpt:1.1 Fri Jun 17 16:32:43 2005 +++ php-src/ext/mysqli/tests/bug33263.phpt Tue Jul 11 23:37:41 2006 @@ -2,6 +2,7 @@ bug #33263 (mysqli_real_connect in __construct) --SKIPIF-- ?php require_once('skipif.inc'); ? +?php require_once('skipifemb.inc'); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo/tests pdo_test.inc
hholzgraMon Jul 10 07:39:23 2006 UTC Modified files: /php-src/ext/pdo/tests pdo_test.inc Log: SHOW ENGINES is only available in PHP 4.1.2 and above (and the output format slightly changed between 4.1 and 5.0, too), SHOW VARIABLES LIKE 'have_%' is the more portable alternative here http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_test.inc?r1=1.14r2=1.15diff_format=u Index: php-src/ext/pdo/tests/pdo_test.inc diff -u php-src/ext/pdo/tests/pdo_test.inc:1.14 php-src/ext/pdo/tests/pdo_test.inc:1.15 --- php-src/ext/pdo/tests/pdo_test.inc:1.14 Wed Mar 8 00:43:28 2006 +++ php-src/ext/pdo/tests/pdo_test.inc Mon Jul 10 07:39:23 2006 @@ -64,9 +64,9 @@ } static function detect_transactional_mysql_engine($db) { - foreach ($db-query('show engines') as $row) { - if ($row[1] == 'YES' ($row[0] == 'INNOBASE' || $row[0] == 'BDB')) { - return $row[0]; + foreach ($db-query(show variables like 'have%') as $row) { + if ($row[1] == 'YES' ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { + return str_replace(have_, , $row[0]); } } return false; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests pdo_test.inc
hholzgraMon Jul 10 07:39:35 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo/tests pdo_test.inc Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_test.inc?r1=1.9.2.4r2=1.9.2.4.2.1diff_format=u Index: php-src/ext/pdo/tests/pdo_test.inc diff -u php-src/ext/pdo/tests/pdo_test.inc:1.9.2.4 php-src/ext/pdo/tests/pdo_test.inc:1.9.2.4.2.1 --- php-src/ext/pdo/tests/pdo_test.inc:1.9.2.4 Sun Dec 11 15:29:14 2005 +++ php-src/ext/pdo/tests/pdo_test.inc Mon Jul 10 07:39:35 2006 @@ -65,9 +65,9 @@ } static function detect_transactional_mysql_engine($db) { - foreach ($db-query('show engines') as $row) { - if ($row[1] == 'YES' ($row[0] == 'INNOBASE' || $row[0] == 'BDB')) { - return $row[0]; + foreach ($db-query(show variables like 'have%') as $row) { + if ($row[1] == 'YES' ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { + return str_replace(have_, , $row[0]); } } return false; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo/tests pdo_033.phpt /ext/pdo_mysql/tests last_insert_id.phpt
hholzgraMon Jul 10 14:05:46 2006 UTC Added files: /php-src/ext/pdo/tests pdo_033.phpt /php-src/ext/pdo_mysql/testslast_insert_id.phpt Log: two additional tests improving pdo/pdo_mysql test code coverage http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_033.phpt?view=markuprev=1.1 Index: php-src/ext/pdo/tests/pdo_033.phpt +++ php-src/ext/pdo/tests/pdo_033.phpt --TEST-- PDO Common: PDO::quote() --SKIPIF-- ?php # vim:ft=php if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ? --FILE-- ?php if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); $unquoted = ' !#$%\'()*+,-./0123456789:;=[EMAIL PROTECTED]|}~'; $quoted = $db-quote($unquoted); $db-query(CREATE TABLE test (t char(100))); $db-query(INSERT INTO test (t) VALUES($quoted)); $stmt = $db-prepare('SELECT * from test'); $stmt-execute(); print_r($stmt-fetchAll(PDO::FETCH_ASSOC)); ? --EXPECT-- Array ( [0] = Array ( [t] = !#$%'()*+,-./0123456789:;=[EMAIL PROTECTED]|}~ ) ) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/last_insert_id.phpt?view=markuprev=1.1 Index: php-src/ext/pdo_mysql/tests/last_insert_id.phpt +++ php-src/ext/pdo_mysql/tests/last_insert_id.phpt --TEST-- PDO MySQL auto_increment / last insert id --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); require dirname(__FILE__) . '/config.inc'; require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ? --FILE-- ?php require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); print_r($db-query(CREATE TABLE test (id int auto_increment primary key, num int))); print_r($db-query(INSERT INTO test (id, num) VALUES (23, 42))); print_r($db-query(INSERT INTO test (num) VALUES (451))); print_r($db-lastInsertId()); --EXPECT-- PDOStatement Object ( [queryString] = CREATE TABLE test (id int auto_increment primary key, num int) ) PDOStatement Object ( [queryString] = INSERT INTO test (id, num) VALUES (23, 42) ) PDOStatement Object ( [queryString] = INSERT INTO test (num) VALUES (451) ) 24 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests pdo_033.phpt /ext/pdo_mysql/tests last_insert_id.phpt
hholzgraMon Jul 10 14:06:13 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/pdo/tests pdo_033.phpt /php-src/ext/pdo_mysql/testslast_insert_id.phpt Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_033.phpt?view=markuprev=1.1 Index: php-src/ext/pdo/tests/pdo_033.phpt +++ php-src/ext/pdo/tests/pdo_033.phpt --TEST-- PDO Common: PDO::quote() --SKIPIF-- ?php # vim:ft=php if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ? --FILE-- ?php if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); $unquoted = ' !#$%\'()*+,-./0123456789:;=[EMAIL PROTECTED]|}~'; $quoted = $db-quote($unquoted); $db-query(CREATE TABLE test (t char(100))); $db-query(INSERT INTO test (t) VALUES($quoted)); $stmt = $db-prepare('SELECT * from test'); $stmt-execute(); print_r($stmt-fetchAll(PDO::FETCH_ASSOC)); ? --EXPECT-- Array ( [0] = Array ( [t] = !#$%'()*+,-./0123456789:;=[EMAIL PROTECTED]|}~ ) ) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/last_insert_id.phpt?view=markuprev=1.1 Index: php-src/ext/pdo_mysql/tests/last_insert_id.phpt +++ php-src/ext/pdo_mysql/tests/last_insert_id.phpt --TEST-- PDO MySQL auto_increment / last insert id --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); require dirname(__FILE__) . '/config.inc'; require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ? --FILE-- ?php require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); print_r($db-query(CREATE TABLE test (id int auto_increment primary key, num int))); print_r($db-query(INSERT INTO test (id, num) VALUES (23, 42))); print_r($db-query(INSERT INTO test (num) VALUES (451))); print_r($db-lastInsertId()); --EXPECT-- PDOStatement Object ( [queryString] = CREATE TABLE test (id int auto_increment primary key, num int) ) PDOStatement Object ( [queryString] = INSERT INTO test (id, num) VALUES (23, 42) ) PDOStatement Object ( [queryString] = INSERT INTO test (num) VALUES (451) ) 24 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo/tests pdo_017.phpt
hholzgraMon Jul 10 16:29:24 2006 UTC Modified files: /php-src/ext/pdo/tests pdo_017.phpt Log: transaction tests should test commit, too, not only rollback http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_017.phpt?r1=1.9r2=1.10diff_format=u Index: php-src/ext/pdo/tests/pdo_017.phpt diff -u php-src/ext/pdo/tests/pdo_017.phpt:1.9 php-src/ext/pdo/tests/pdo_017.phpt:1.10 --- php-src/ext/pdo/tests/pdo_017.phpt:1.9 Mon Oct 3 15:06:06 2005 +++ php-src/ext/pdo/tests/pdo_017.phpt Mon Jul 10 16:29:24 2006 @@ -23,7 +23,7 @@ ? --FILE-- ?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); @@ -56,8 +56,17 @@ echo countRows('rollback'); +$db-beginTransaction(); +$delete-execute(); +echo countRows('delete'); +$db-commit(); + +echo countRows('commit'); + ? --EXPECT-- Counted 3 rows after insert. Counted 0 rows after delete. Counted 3 rows after rollback. +Counted 0 rows after delete. +Counted 0 rows after commit. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests pdo_017.phpt
hholzgraMon Jul 10 16:29:50 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo/tests pdo_017.phpt Log: (MFH) transaction tests should test commit, too, not only rollback http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_017.phpt?r1=1.6.2.3r2=1.6.2.3.2.1diff_format=u Index: php-src/ext/pdo/tests/pdo_017.phpt diff -u php-src/ext/pdo/tests/pdo_017.phpt:1.6.2.3 php-src/ext/pdo/tests/pdo_017.phpt:1.6.2.3.2.1 --- php-src/ext/pdo/tests/pdo_017.phpt:1.6.2.3 Mon Oct 3 15:06:27 2005 +++ php-src/ext/pdo/tests/pdo_017.phpt Mon Jul 10 16:29:50 2006 @@ -56,8 +56,17 @@ echo countRows('rollback'); +$db-beginTransaction(); +$delete-execute(); +echo countRows('delete'); +$db-commit(); + +echo countRows('commit'); + ? --EXPECT-- Counted 3 rows after insert. Counted 0 rows after delete. Counted 3 rows after rollback. +Counted 0 rows after delete. +Counted 0 rows after commit. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/calendar/tests cal_from_jd.phpt cal_info.phpt easter_date.phpt gregoriantojd.phpt jddayofweek.phpt jdmonthname.phpt jdtofrench.phpt jdtogregorian.phpt jdtojulian.phpt jdtou
hholzgraSun Jul 9 16:30:02 2006 UTC Added files: /php-src/ext/calendar/tests cal_from_jd.phpt cal_info.phpt easter_date.phpt gregoriantojd.phpt jddayofweek.phpt jdmonthname.phpt jdtofrench.phpt jdtogregorian.phpt jdtojulian.phpt jdtounix.phpt jewishtojd.phpt juliantojd.phpt unixtojd.phpt Log: additional test cases added, should now cover all functions and modes allthough still not all edge cases http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/cal_from_jd.phpt?view=markuprev=1.1 Index: php-src/ext/calendar/tests/cal_from_jd.phpt +++ php-src/ext/calendar/tests/cal_from_jd.phpt --TEST-- cal_from_jd() --SKIPIF-- ?php include 'skipif.inc'; ? --FILE-- ?php print_r(cal_from_jd(1748326, CAL_GREGORIAN)); print_r(cal_from_jd(1748324, CAL_JULIAN)); print_r(cal_from_jd( 374867, CAL_JEWISH)); print_r(cal_from_jd( 0, CAL_FRENCH)); ? --EXPECT-- Array ( [date] = 8/26/74 [month] = 8 [day] = 26 [year] = 74 [dow] = 0 [abbrevdayname] = Sun [dayname] = Sunday [abbrevmonth] = Aug [monthname] = August ) Array ( [date] = 8/26/74 [month] = 8 [day] = 26 [year] = 74 [dow] = 5 [abbrevdayname] = Fri [dayname] = Friday [abbrevmonth] = Aug [monthname] = August ) Array ( [date] = 8/26/74 [month] = 8 [day] = 26 [year] = 74 [dow] = 4 [abbrevdayname] = Thu [dayname] = Thursday [abbrevmonth] = Nisan [monthname] = Nisan ) Array ( [date] = 0/0/0 [month] = 0 [day] = 0 [year] = 0 [dow] = 1 [abbrevdayname] = Mon [dayname] = Monday [abbrevmonth] = [monthname] = ) http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/cal_info.phpt?view=markuprev=1.1 Index: php-src/ext/calendar/tests/cal_info.phpt +++ php-src/ext/calendar/tests/cal_info.phpt --TEST-- cal_info() --SKIPIF-- ?php include 'skipif.inc'; ? --FILE-- ?php print_r(cal_info()); print_r(cal_info(1)); print_r(cal_info(9)); ? --EXPECT-- Array ( [0] = Array ( [months] = Array ( [1] = January [2] = February [3] = March [4] = April [5] = May [6] = June [7] = July [8] = August [9] = September [10] = October [11] = November [12] = December ) [abbrevmonths] = Array ( [1] = Jan [2] = Feb [3] = Mar [4] = Apr [5] = May [6] = Jun [7] = Jul [8] = Aug [9] = Sep [10] = Oct [11] = Nov [12] = Dec ) [maxdaysinmonth] = 31 [calname] = Gregorian [calsymbol] = CAL_GREGORIAN ) [1] = Array ( [months] = Array ( [1] = January [2] = February [3] = March [4] = April [5] = May [6] = June [7] = July [8] = August [9] = September [10] = October [11] = November [12] = December ) [abbrevmonths] = Array ( [1] = Jan [2] = Feb [3] = Mar [4] = Apr [5] = May [6] = Jun [7] = Jul [8] = Aug [9] = Sep [10] = Oct [11] = Nov [12] = Dec ) [maxdaysinmonth] = 31 [calname] = Julian [calsymbol] = CAL_JULIAN ) [2] = Array ( [months] = Array ( [1] = Tishri [2] = Heshvan [3] = Kislev [4] = Tevet [5] = Shevat [6] = AdarI [7] = AdarII [8] = Nisan [9] = Iyyar [10] = Sivan [11] = Tammuz [12] = Av [13] = Elul ) [abbrevmonths] = Array ( [1] = Tishri [2] = Heshvan [3] = Kislev [4] = Tevet
[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
hholzgraFri May 19 10:44:34 2006 UTC Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c file.c file.h Log: Name change: php_get_tmpdir() renamed to sys_get_temp_dir() http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2115r2=1.2116diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2115 php-src/NEWS:1.2116 --- php-src/NEWS:1.2115 Sat May 6 09:59:02 2006 +++ php-src/NEWSFri May 19 10:44:34 2006 @@ -52,7 +52,7 @@ defined using reflection API. (Johannes) - Added second optional parameter to stream_context_create() to set params during context creation. (Sara) -- Added php_get_tmpdir() function that returns the default directory for +- Added sys_get_temp_dir() function that returns the default directory for temporary files (as requested in bug #35380). (Hartmut) - Fixed bug #36630 (umask not reset at the end of the request). (Ilia) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.772r2=1.773diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.772 php-src/ext/standard/basic_functions.c:1.773 --- php-src/ext/standard/basic_functions.c:1.772Fri May 19 06:11:02 2006 +++ php-src/ext/standard/basic_functions.c Fri May 19 10:44:34 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.772 2006/05/19 06:11:02 dmitry Exp $ */ +/* $Id: basic_functions.c,v 1.773 2006/05/19 10:44:34 hholzgra Exp $ */ #include php.h #include php_streams.h @@ -846,7 +846,7 @@ PHP_FE(output_add_rewrite_var, NULL) PHP_FE(output_reset_rewrite_vars, NULL) - PHP_FE(php_get_tmpdir, NULL) + PHP_FE(sys_get_temp_dir, NULL) {NULL, NULL, NULL} }; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.441r2=1.442diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.441 php-src/ext/standard/file.c:1.442 --- php-src/ext/standard/file.c:1.441 Sat May 6 09:59:02 2006 +++ php-src/ext/standard/file.c Fri May 19 10:44:34 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.441 2006/05/06 09:59:02 hholzgra Exp $ */ +/* $Id: file.c,v 1.442 2006/05/19 10:44:34 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2555,9 +2555,9 @@ /* }}} */ #endif -/* {{{ proto string php_get_tmpdir() +/* {{{ proto string sys_get_temp_dir() Returns directory path used for temporary files */ -PHP_FUNCTION(php_get_tmpdir) +PHP_FUNCTION(sys_get_temp_dir) { RETURN_STRING((char *)php_get_temporary_directory(), 1); } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.h?r1=1.98r2=1.99diff_format=u Index: php-src/ext/standard/file.h diff -u php-src/ext/standard/file.h:1.98 php-src/ext/standard/file.h:1.99 --- php-src/ext/standard/file.h:1.98Sat May 6 09:59:02 2006 +++ php-src/ext/standard/file.h Fri May 19 10:44:34 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: file.h,v 1.98 2006/05/06 09:59:02 hholzgra Exp $ */ +/* $Id: file.h,v 1.99 2006/05/19 10:44:34 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ @@ -66,7 +66,7 @@ #endif PHP_NAMED_FUNCTION(php_if_ftruncate); PHP_NAMED_FUNCTION(php_if_fstat); -PHP_FUNCTION(php_get_tmpdir); +PHP_FUNCTION(sys_get_temp_dir); PHP_MINIT_FUNCTION(user_streams); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h
hholzgraSat May 6 09:59:02 2006 UTC Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c file.c file.h Log: Added php_get_tmpdir() function that returns the default directory for temporary files (as requested in bug #35380) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2114r2=1.2115diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2114 php-src/NEWS:1.2115 --- php-src/NEWS:1.2114 Wed May 3 19:52:48 2006 +++ php-src/NEWSSat May 6 09:59:02 2006 @@ -52,6 +52,8 @@ defined using reflection API. (Johannes) - Added second optional parameter to stream_context_create() to set params during context creation. (Sara) +- Added php_get_tmpdir() function that returns the default directory for + temporary files (as requested in bug #35380). (Hartmut) - Fixed bug #36630 (umask not reset at the end of the request). (Ilia) - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.769r2=1.770diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.769 php-src/ext/standard/basic_functions.c:1.770 --- php-src/ext/standard/basic_functions.c:1.769Mon Apr 3 13:46:35 2006 +++ php-src/ext/standard/basic_functions.c Sat May 6 09:59:02 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.769 2006/04/03 13:46:35 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.770 2006/05/06 09:59:02 hholzgra Exp $ */ #include php.h #include php_streams.h @@ -846,6 +846,8 @@ PHP_FE(output_add_rewrite_var, NULL) PHP_FE(output_reset_rewrite_vars, NULL) + PHP_FE(php_get_tmpdir, NULL) + {NULL, NULL, NULL} }; http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.440r2=1.441diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.440 php-src/ext/standard/file.c:1.441 --- php-src/ext/standard/file.c:1.440 Tue May 2 18:23:32 2006 +++ php-src/ext/standard/file.c Sat May 6 09:59:02 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.440 2006/05/02 18:23:32 pollita Exp $ */ +/* $Id: file.c,v 1.441 2006/05/06 09:59:02 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2555,6 +2555,14 @@ /* }}} */ #endif +/* {{{ proto string php_get_tmpdir() + Returns directory path used for temporary files */ +PHP_FUNCTION(php_get_tmpdir) +{ + RETURN_STRING((char *)php_get_temporary_directory(), 1); +} +/* }}} */ + /* * Local variables: * tab-width: 4 http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.h?r1=1.97r2=1.98diff_format=u Index: php-src/ext/standard/file.h diff -u php-src/ext/standard/file.h:1.97 php-src/ext/standard/file.h:1.98 --- php-src/ext/standard/file.h:1.97Fri Jan 13 04:10:32 2006 +++ php-src/ext/standard/file.h Sat May 6 09:59:02 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: file.h,v 1.97 2006/01/13 04:10:32 pajoye Exp $ */ +/* $Id: file.h,v 1.98 2006/05/06 09:59:02 hholzgra Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ @@ -66,6 +66,7 @@ #endif PHP_NAMED_FUNCTION(php_if_ftruncate); PHP_NAMED_FUNCTION(php_if_fstat); +PHP_FUNCTION(php_get_tmpdir); PHP_MINIT_FUNCTION(user_streams); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/gd gd.c php_gd.h
hholzgraSun Mar 5 18:23:48 2006 UTC Modified files: /php-srcNEWS /php-src/ext/gd gd.c php_gd.h Log: added ImageColorHistogram function http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2091r2=1.2092diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2091 php-src/NEWS:1.2092 --- php-src/NEWS:1.2091 Fri Mar 3 13:09:13 2006 +++ php-src/NEWSSun Mar 5 18:23:47 2006 @@ -30,3 +30,4 @@ - Added possibility to check in which extension an internal function was defined using reflection API. (Johannes) - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus) +- Added ImageColorHistogram() to gd extension. (Hartmut) http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.345r2=1.346diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.345 php-src/ext/gd/gd.c:1.346 --- php-src/ext/gd/gd.c:1.345 Sun Feb 19 04:29:40 2006 +++ php-src/ext/gd/gd.c Sun Mar 5 18:23:47 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.345 2006/02/19 04:29:40 andi Exp $ */ +/* $Id: gd.c,v 1.346 2006/03/05 18:23:47 hholzgra Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -144,6 +144,7 @@ PHP_FE(imagechar, NULL) PHP_FE(imagecharup, NULL) PHP_FE(imagecolorat, NULL) + PHP_FE(imagecolorhistogram, NULL) PHP_FE(imagecolorallocate, NULL) PHP_FE(imagepalettecopy, NULL) PHP_FE(imagecreatefromstring, NULL) @@ -2349,6 +2350,53 @@ } /* }}} */ +/* {{{ proto array imagecolorhistogram(resource im) + Return color histogram for an image */ +PHP_FUNCTION(imagecolorhistogram) +{ + zval **IM; + gdImagePtr im; + int num_colors, x, y, n; + long *color_count; + + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, IM) == FAILURE) { + ZEND_WRONG_PARAM_COUNT(); + } + + ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); + + if (!im-pixels) { + RETURN_FALSE; + } + + num_colors = gdImageColorsTotal(im); + + if (num_colors = 0) { + RETURN_FALSE; + } + + color_count = (long *)calloc(num_colors, sizeof(long)); + + for (x = 0; x gdImageSX(im); x++) { + for (y = 0; y gdImageSY(im); y++) { +#if HAVE_LIBGD13 + color_count[im-pixels[y][x]]++; +#else + color_count[im-pixels[x][y]]++; +#endif + } + } + + array_init(return_value); + + for (n = 0; n num_colors; n++) { + add_index_long(return_value, n, color_count[n]); + } + + efree(color_count); +} +/* }}} */ + /* {{{ proto int imagecolortransparent(resource im [, int col]) Define a color as transparent */ PHP_FUNCTION(imagecolortransparent) http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/php_gd.h?r1=1.66r2=1.67diff_format=u Index: php-src/ext/gd/php_gd.h diff -u php-src/ext/gd/php_gd.h:1.66 php-src/ext/gd/php_gd.h:1.67 --- php-src/ext/gd/php_gd.h:1.66Sun Feb 19 05:05:42 2006 +++ php-src/ext/gd/php_gd.h Sun Mar 5 18:23:47 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.66 2006/02/19 05:05:42 andi Exp $ */ +/* $Id: php_gd.h,v 1.67 2006/03/05 18:23:47 hholzgra Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -86,6 +86,7 @@ PHP_FUNCTION(imagecolorset); PHP_FUNCTION(imagecolorstotal); PHP_FUNCTION(imagecolorsforindex); +PHP_FUNCTION(imagecolorhistogram); PHP_FUNCTION(imagecolortransparent); PHP_FUNCTION(imagecopy); PHP_FUNCTION(imagecopymerge); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c php_gd.h
hholzgraSun Mar 5 18:26:12 2006 UTC Modified files: /php-src/ext/gd gd.c php_gd.h Log: - fixed size information for _php_sig_png array - removed extra memcmp step in signature comparison, this seemed to have been inherited from ext/standard/image.c but is not needed here as the provided buffer is big enough from the start http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.346r2=1.347diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.346 php-src/ext/gd/gd.c:1.347 --- php-src/ext/gd/gd.c:1.346 Sun Mar 5 18:23:47 2006 +++ php-src/ext/gd/gd.c Sun Mar 5 18:26:12 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.346 2006/03/05 18:23:47 hholzgra Exp $ */ +/* $Id: gd.c,v 1.347 2006/03/05 18:26:12 hholzgra Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1254,10 +1254,8 @@ return PHP_GDIMG_TYPE_GD2; } else if (!memcmp(data, php_sig_jpg, 3)) { return PHP_GDIMG_TYPE_JPG; - } else if (!memcmp(data, php_sig_png, 3)) { - if (!memcmp(data, php_sig_png, 8)) { - return PHP_GDIMG_TYPE_PNG; - } + } else if (!memcmp(data, php_sig_png, 8)) { + return PHP_GDIMG_TYPE_PNG; } else if (!memcmp(data, php_sig_gif, 3)) { return PHP_GDIMG_TYPE_GIF; } http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/php_gd.h?r1=1.67r2=1.68diff_format=u Index: php-src/ext/gd/php_gd.h diff -u php-src/ext/gd/php_gd.h:1.67 php-src/ext/gd/php_gd.h:1.68 --- php-src/ext/gd/php_gd.h:1.67Sun Mar 5 18:23:47 2006 +++ php-src/ext/gd/php_gd.h Sun Mar 5 18:26:12 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_gd.h,v 1.67 2006/03/05 18:23:47 hholzgra Exp $ */ +/* $Id: php_gd.h,v 1.68 2006/03/05 18:26:12 hholzgra Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H @@ -56,7 +56,7 @@ PHPAPI extern const char php_sig_gif[3]; PHPAPI extern const char php_sig_jpg[3]; -PHPAPI extern const char php_sig_png[3]; +PHPAPI extern const char php_sig_png[8]; extern zend_module_entry gd_module_entry; #define phpext_gd_ptr gd_module_entry -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard levenshtein.c
hholzgraThu Jan 12 15:37:56 2006 UTC Modified files: /php-src/ext/standard levenshtein.c Log: typo fix http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/levenshtein.c?r1=1.37r2=1.38diff_format=u Index: php-src/ext/standard/levenshtein.c diff -u php-src/ext/standard/levenshtein.c:1.37 php-src/ext/standard/levenshtein.c:1.38 --- php-src/ext/standard/levenshtein.c:1.37 Tue Jan 10 10:51:39 2006 +++ php-src/ext/standard/levenshtein.c Thu Jan 12 15:37:56 2006 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED]| +--+ */ -/* $Id: levenshtein.c,v 1.37 2006/01/10 10:51:39 tony2001 Exp $ */ +/* $Id: levenshtein.c,v 1.38 2006/01/12 15:37:56 hholzgra Exp $ */ #include php.h #include stdlib.h @@ -23,7 +23,7 @@ #include ctype.h #include php_string.h -#define LEVENSHTEIN_MAX_LENTH 255 +#define LEVENSHTEIN_MAX_LENGTH 255 /* {{{ reference_levdist * reference implementation, only optimized for memory usage, not speed */ @@ -40,7 +40,7 @@ if (cp1 == 0) return cp2*cost_ins; if (cp2 == 0) return cp1*cost_del; - if ((cp1LEVENSHTEIN_MAX_LENTH)||(cp2LEVENSHTEIN_MAX_LENTH)) { + if ((cp1LEVENSHTEIN_MAX_LENGTH)||(cp2LEVENSHTEIN_MAX_LENGTH)) { return -1; } @@ -49,7 +49,7 @@ } else { if (l1 == 0) return l2*cost_ins; if (l2 == 0) return l1*cost_del; - if ((l1LEVENSHTEIN_MAX_LENTH)||(l2LEVENSHTEIN_MAX_LENTH)) { + if ((l1LEVENSHTEIN_MAX_LENGTH)||(l2LEVENSHTEIN_MAX_LENGTH)) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cli php_cli.c
hholzgraMon Aug 8 04:45:39 2005 EDT Modified files: /php-src/sapi/cli php_cli.c Log: fix extension loading from command line, resources didn't work (still related to Bug #33899) http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.127r2=1.128ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.127 php-src/sapi/cli/php_cli.c:1.128 --- php-src/sapi/cli/php_cli.c:1.127Mon Jun 20 20:12:35 2005 +++ php-src/sapi/cli/php_cli.c Mon Aug 8 04:45:33 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.127 2005/06/21 00:12:35 iliaa Exp $ */ +/* $Id: php_cli.c,v 1.128 2005/08/08 08:45:33 hholzgra Exp $ */ #include php.h #include php_globals.h @@ -438,7 +438,7 @@ if (!strcasecmp(name, extension)) { /* load function module */ zval extension, zval; ZVAL_STRING(extension, value, 0); - php_dl(extension, MODULE_PERSISTENT, zval TSRMLS_CC); + php_dl(extension, MODULE_TEMPORARY, zval TSRMLS_CC); } else { zend_alter_ini_entry(name, strlen(name)+1, value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / Makefile.global
hholzgraMon Aug 8 13:49:32 2005 EDT Modified files: /php-srcMakefile.global Log: put the -d extension loading options in the right place, get rid of basename http://cvs.php.net/diff.php/php-src/Makefile.global?r1=1.56r2=1.57ty=u Index: php-src/Makefile.global diff -u php-src/Makefile.global:1.56 php-src/Makefile.global:1.57 --- php-src/Makefile.global:1.56Mon Aug 8 12:06:47 2005 +++ php-src/Makefile.global Mon Aug 8 13:49:32 2005 @@ -47,12 +47,12 @@ install-su: install-pear -test: +test: all [EMAIL PROTECTED] test ! -z $(PHP_EXECUTABLE) test -x $(PHP_EXECUTABLE); then \ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC=$(CC) \ - $(PHP_EXECUTABLE) -d 'extension_dir=modules/' -d 'extension='`basename $(PHP_MODULES) .la`'.so' -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php tests/; \ + $(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \ elif test ! -z $(SAPI_CLI_PATH) test -x $(SAPI_CLI_PATH); then \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
hholzgraMon Aug 8 13:57:45 2005 EDT Modified files: /php-srcNEWS Log: finally! cd some_extension phpize configure make make test # THIS WORKS!!! :) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2024r2=1.2025ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2024 php-src/NEWS:1.2025 --- php-src/NEWS:1.2024 Sun Aug 7 18:09:06 2005 +++ php-src/NEWSMon Aug 8 13:57:35 2005 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 2005, PHP 5.1 +- made make test work for phpized extensions (Hartmut, Jani) - Updated bundled libraries in Windows distribution. (Edin) . zlib 1.2.3 . curl 7.14.0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php.h
hholzgraSun Aug 7 11:13:51 2005 EDT Modified files: /php-src/main php.h Log: typo fix http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.220r2=1.221ty=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.220 php-src/main/php.h:1.221 --- php-src/main/php.h:1.220Wed Aug 3 10:08:33 2005 +++ php-src/main/php.h Sun Aug 7 11:13:50 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.220 2005/08/03 14:08:33 sniper Exp $ */ +/* $Id: php.h,v 1.221 2005/08/07 15:13:50 hholzgra Exp $ */ #ifndef PHP_H #define PHP_H @@ -341,7 +341,7 @@ #define PHP_FALIAS ZEND_FALIAS #define PHP_ME ZEND_ME #define PHP_MALIAS ZEND_MALIAS -#define PHP_ASTSRACT_ME ZEND_ABSTRACT_ME +#define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME #define PHP_ME_MAPPING ZEND_ME_MAPPING #define PHP_MODULE_STARTUP_N ZEND_MODULE_STARTUP_N -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
hholzgraTue Aug 2 13:05:02 2005 EDT Modified files: /php-srcrun-tests.php Log: make skipif test use ini options specified by -d command line options http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.224r2=1.225ty=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.224 php-src/run-tests.php:1.225 --- php-src/run-tests.php:1.224 Fri Jul 29 13:25:38 2005 +++ php-src/run-tests.php Tue Aug 2 13:05:01 2005 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.224 2005/07/29 17:25:38 helly Exp $ */ +/* $Id: run-tests.php,v 1.225 2005/08/02 17:05:01 hholzgra Exp $ */ /* * TODO: @@ -822,10 +822,14 @@ $warn = false; if (array_key_exists('SKIPIF', $section_text)) { if (trim($section_text['SKIPIF'])) { + $skipif_params = array(); + settings2array($ini_overwrites,$skipif_params); + settings2params($skipif_params); + save_text($tmp_skipif, $section_text['SKIPIF']); $extra = substr(PHP_OS, 0, 3) !== WIN ? unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;: ; - $output = system_with_timeout($extra $php -q $info_params $tmp_skipif); + $output = system_with_timeout($extra $php -q $skipif_params $tmp_skipif); @unlink($tmp_skipif); if (eregi(^skip, trim($output))) { echo SKIP $tested; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php_ini.c
hholzgraWed Jul 27 11:12:19 2005 EDT Modified files: /php-src/main php_ini.c Log: php.ini search logic needs to use the absolute path of the running binary when looking for php.ini in the directory the php binary is installed in http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.130r2=1.131ty=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.130 php-src/main/php_ini.c:1.131 --- php-src/main/php_ini.c:1.130Fri Jun 17 05:39:23 2005 +++ php-src/main/php_ini.c Wed Jul 27 11:12:18 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.130 2005/06/17 09:39:23 dmitry Exp $ */ +/* $Id: php_ini.c,v 1.131 2005/07/27 15:12:18 hholzgra Exp $ */ /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -350,7 +350,11 @@ } #else if (sapi_module.executable_location) { - binary_location = estrdup(sapi_module.executable_location); + binary_location = (char *)emalloc(PATH_MAX); + if (!realpath(sapi_module.executable_location, binary_location)) { + efree(binary_location); + binary_location = NULL; +} } else { binary_location = NULL; } @@ -359,7 +363,7 @@ char *separator_location = strrchr(binary_location, DEFAULT_SLASH); if (separator_location) { - *(separator_location+1) = 0; + *(separator_location) = 0; } if (*php_ini_search_path) { strcat(php_ini_search_path, paths_separator); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php_ini.c
hholzgraWed Jul 27 11:13:50 2005 EDT Modified files: /php-src/main php_ini.c Log: edge case: do not remove trailing slash for root directory (Bug #33882) http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.131r2=1.132ty=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.131 php-src/main/php_ini.c:1.132 --- php-src/main/php_ini.c:1.131Wed Jul 27 11:12:18 2005 +++ php-src/main/php_ini.c Wed Jul 27 11:13:50 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.131 2005/07/27 15:12:18 hholzgra Exp $ */ +/* $Id: php_ini.c,v 1.132 2005/07/27 15:13:50 hholzgra Exp $ */ /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -362,7 +362,7 @@ if (binary_location) { char *separator_location = strrchr(binary_location, DEFAULT_SLASH); - if (separator_location) { + if (separator_location separator_location != binary_location) { *(separator_location) = 0; } if (*php_ini_search_path) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
hholzgraWed Jul 27 17:21:05 2005 EDT Modified files: /php-srcNEWS Log: news entry for bug #33882 fix http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2009r2=1.2010ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2009 php-src/NEWS:1.2010 --- php-src/NEWS:1.2009 Wed Jul 27 10:52:44 2005 +++ php-src/NEWSWed Jul 27 17:21:05 2005 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 2005, PHP 5.1 +- Fixed bug #33882 (CLI was looking for php.ini in wrong path). (Hartmut) - Fixed bug #33869 (strtotime() problem with +1days format). (Ilia) - Fixed bug #33841 (pdo sqlite driver forgets to update affected column count on execution of prepared statments). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
hholzgraMon Jun 13 18:20:07 2005 EDT Modified files: /php-srcNEWS Log: added news item for GLOB_ERR fix http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1916r2=1.1917ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1916 php-src/NEWS:1.1917 --- php-src/NEWS:1.1916 Mon Jun 13 07:22:58 2005 +++ php-src/NEWSMon Jun 13 18:20:05 2005 @@ -11,6 +11,7 @@ 'zend_error'). (Dmitry) - Fixed bug #31256 (PHP_EVAL_LIBLINE configure macro does not handle -pthread). (Jani) +- Fixed bug #28355 (glob wont error if dir is not readable). (Hartmut) 10 Jun 2005, PHP 5.1 Beta 1 - Upgraded PCRE library to version 5.0. (Andrei) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
hholzgraSun Jun 12 03:53:25 2005 EDT Modified files: /php-src/ext/standard dir.c Log: Support for GLOB_ERR so that glob() reports permission problems (Bug #28355) http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.145r2=1.146ty=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.145 php-src/ext/standard/dir.c:1.146 --- php-src/ext/standard/dir.c:1.145Sat Jun 11 21:13:24 2005 +++ php-src/ext/standard/dir.c Sun Jun 12 03:53:24 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.145 2005/06/12 01:13:24 hholzgra Exp $ */ +/* $Id: dir.c,v 1.146 2005/06/12 07:53:24 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -155,6 +155,9 @@ #ifdef GLOB_NOESCAPE REGISTER_LONG_CONSTANT(GLOB_NOESCAPE, GLOB_NOESCAPE, CONST_CS | CONST_PERSISTENT); #endif +#ifdef GLOB_ERR + REGISTER_LONG_CONSTANT(GLOB_ERR, GLOB_ERR, CONST_CS | CONST_PERSISTENT); +#endif #ifndef GLOB_ONLYDIR #define GLOB_ONLYDIR (130) @@ -395,10 +398,14 @@ if (0 != (ret = glob(pattern, flags GLOB_FLAGMASK, NULL, globbuf))) { #ifdef GLOB_NOMATCH if (GLOB_NOMATCH == ret) { - /* Linux handles no matches as an error condition, but FreeBSD -* doesn't. This ensure that if no match is found, an empty array -* is always returned so it can be used without worrying in e.g. -* foreach() */ + /* Some glob implementation simply return no data if no matches + were found, others return the GLOB_NOMATCH error code. + We don't want to treat GLOB_NOMATCH as an error condition + so that PHP glob() behaves the same on both types of + implementations and so that 'foreach (glob() as ...' + can be used for simple glob() calls without further error + checking. + */ array_init(return_value); return; } @@ -424,7 +431,7 @@ array_init(return_value); for (n = 0; n globbuf.gl_pathc; n++) { - /* we need to this everytime since GLOB_ONLYDIR does not guarantee that + /* we need to do this everytime since GLOB_ONLYDIR does not guarantee that * all directories will be filtered. GNU libc documentation states the * following: * If the information about the type of the file is easily available -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
hholzgraSat Jun 11 20:59:08 2005 EDT Modified files: /php-src/ext/standard dir.c Log: Removed bogus fix for bug #28355 (it was dead code anyway) http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.143r2=1.144ty=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.143 php-src/ext/standard/dir.c:1.144 --- php-src/ext/standard/dir.c:1.143Wed Feb 23 13:53:09 2005 +++ php-src/ext/standard/dir.c Sat Jun 11 20:59:04 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.143 2005/02/23 18:53:09 iliaa Exp $ */ +/* $Id: dir.c,v 1.144 2005/06/12 00:59:04 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -399,9 +399,6 @@ * doesn't. This ensure that if no match is found, an empty array * is always returned so it can be used without worrying in e.g. * foreach() */ -#ifndef __linux__ - RETURN_FALSE; -#else array_init(return_value); return; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
hholzgraSat Jun 11 21:13:25 2005 EDT Modified files: /php-src/ext/standard dir.c Log: thinko fix (E_COMMIT_AFTER_MIDNIGHT) http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.144r2=1.145ty=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.144 php-src/ext/standard/dir.c:1.145 --- php-src/ext/standard/dir.c:1.144Sat Jun 11 20:59:04 2005 +++ php-src/ext/standard/dir.c Sat Jun 11 21:13:24 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.144 2005/06/12 00:59:04 hholzgra Exp $ */ +/* $Id: dir.c,v 1.145 2005/06/12 01:13:24 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -401,7 +401,6 @@ * foreach() */ array_init(return_value); return; -#endif } #endif RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / acinclude.m4
Antony Dovgal wrote: + # we only support certain flex versions So, comments start with # or with dnl ? Comments that affect the m4 code have to start with dnl, this on the other hand is a comment that i want to have in the output file so it uses whatever comment syntax is appropriate for the output format (here: shell batch code) The comments in libtool.m4 that i changed earlier were ment to comment out M4 macro definitions and uses, in that case it is important to use the M4 comment syntax -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sqlite Makefile.frag config.m4
hholzgraMon May 30 10:15:40 2005 EDT Modified files: /php-src/ext/sqlite Makefile.frag config.m4 Log: gracefully handle changes of the parse.y lemon file, process it with lemon if available, else just keep the .c file from CVS not doing so leads to make using its implicit .y-.c rule here and bison doesn't really understand lemon syntax http://cvs.php.net/diff.php/php-src/ext/sqlite/Makefile.frag?r1=1.10r2=1.11ty=u Index: php-src/ext/sqlite/Makefile.frag diff -u /dev/null php-src/ext/sqlite/Makefile.frag:1.11 --- /dev/null Mon May 30 10:15:40 2005 +++ php-src/ext/sqlite/Makefile.fragMon May 30 10:15:40 2005 @@ -0,0 +1,2 @@ +$(srcdir)/libsqlite/src/parse.c: $(srcdir)/libsqlite/src/parse.y + $(LEMON) $(srcdir)/libsqlite/src/parse.y http://cvs.php.net/diff.php/php-src/ext/sqlite/config.m4?r1=1.36r2=1.37ty=u Index: php-src/ext/sqlite/config.m4 diff -u php-src/ext/sqlite/config.m4:1.36 php-src/ext/sqlite/config.m4:1.37 --- php-src/ext/sqlite/config.m4:1.36 Sun May 29 19:16:44 2005 +++ php-src/ext/sqlite/config.m4Mon May 30 10:15:40 2005 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.36 2005/05/29 23:16:44 sniper Exp $ +dnl $Id: config.m4,v 1.37 2005/05/30 14:15:40 hholzgra Exp $ dnl config.m4 for extension sqlite dnl vim:et:ts=2:sw=2 @@ -11,7 +11,42 @@ PHP_ARG_ENABLE(sqlite-utf8, whether to enable UTF-8 support in sqlite (default: ISO-8859-1), [ --enable-sqlite-utf8 SQLite: Enable UTF-8 support for SQLite], no, no) + + +dnl +dnl PHP_PROG_LEMON +dnl +dnl Search for lemon binary and check it's version +dnl +AC_DEFUN([PHP_PROG_LEMON],[ + # we only support certain lemon versions + lemon_version_list=1.0 + + AC_CHECK_PROG(LEMON, lemon, lemon) + if test $LEMON; then +AC_CACHE_CHECK([for lemon version], php_cv_lemon_version, [ + lemon_version=`$LEMON -x 2/dev/null | $SED -e 's/^.* //'` + php_cv_lemon_version=invalid + for lemon_check_version in $lemon_version_list; do +if test $lemon_version = $lemon_check_version; then + php_cv_lemon_version=$lemon_check_version (ok) +fi + done +]) + fi + case $php_cv_lemon_version in +|invalid[)] + lemon_msg=lemon versions supported for regeneration of the Zend/PHP parsers: $lemon_version_list (found $lemon_version). + AC_MSG_WARN([$lemon_msg]) + LEMON=exit 0; + ;; + esac + PHP_SUBST(LEMON) +]) + + if test $PHP_SQLITE != no; then + PHP_PROG_LEMON if test $PHP_PDO != no; then AC_MSG_CHECKING([for PDO includes]) if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then @@ -78,7 +113,7 @@ libsqlite/src/vacuum.c libsqlite/src/copy.c \ libsqlite/src/vdbeaux.c libsqlite/src/date.c \ libsqlite/src/where.c libsqlite/src/trigger.c - + PHP_ADD_EXTENSION_DEP(sqlite, spl) PHP_ADD_EXTENSION_DEP(sqlite, pdo) fi @@ -88,6 +123,7 @@ dnl sqlite_sources=sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources PHP_NEW_EXTENSION(sqlite, $sqlite_sources, $ext_shared,,$PHP_SQLITE_CFLAGS) + PHP_ADD_MAKEFILE_FRAGMENT PHP_SUBST(SQLITE_SHARED_LIBADD) PHP_INSTALL_HEADERS([$ext_builddir/libsqlite/src/sqlite.h]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sqlite config.m4
hholzgraMon May 30 11:57:55 2005 EDT Modified files: /php-src/ext/sqlite config.m4 Log: typo fix http://cvs.php.net/diff.php/php-src/ext/sqlite/config.m4?r1=1.37r2=1.38ty=u Index: php-src/ext/sqlite/config.m4 diff -u php-src/ext/sqlite/config.m4:1.37 php-src/ext/sqlite/config.m4:1.38 --- php-src/ext/sqlite/config.m4:1.37 Mon May 30 10:15:40 2005 +++ php-src/ext/sqlite/config.m4Mon May 30 11:57:54 2005 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.37 2005/05/30 14:15:40 hholzgra Exp $ +dnl $Id: config.m4,v 1.38 2005/05/30 15:57:54 hholzgra Exp $ dnl config.m4 for extension sqlite dnl vim:et:ts=2:sw=2 @@ -16,7 +16,7 @@ dnl dnl PHP_PROG_LEMON dnl -dnl Search for lemon binary and check it's version +dnl Search for lemon binary and check its version dnl AC_DEFUN([PHP_PROG_LEMON],[ # we only support certain lemon versions -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /build libtool.m4
hholzgraSun May 29 12:34:44 2005 EDT Modified files: /php-src/build libtool.m4 Log: m4 comments start with 'dnl', *not* with '#' http://cvs.php.net/diff.php/php-src/build/libtool.m4?r1=1.4r2=1.5ty=u Index: php-src/build/libtool.m4 diff -u php-src/build/libtool.m4:1.4 php-src/build/libtool.m4:1.5 --- php-src/build/libtool.m4:1.4Fri May 27 09:06:06 2005 +++ php-src/build/libtool.m4Sun May 29 12:34:43 2005 @@ -45,29 +45,29 @@ [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) -#dnl And a similar setup for Fortran 77 support -# AC_PROVIDE_IFELSE([AC_PROG_F77], -#[AC_LIBTOOL_F77], -#[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -#])]) - -#dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -#dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -#dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. -# AC_PROVIDE_IFELSE([AC_PROG_GCJ], -#[AC_LIBTOOL_GCJ], -#[AC_PROVIDE_IFELSE([A][M_PROG_GCJ], -# [AC_LIBTOOL_GCJ], -# [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], -# [AC_LIBTOOL_GCJ], -# [ifdef([AC_PROG_GCJ], -# [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) -# ifdef([A][M_PROG_GCJ], -# [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) -# ifdef([LT_AC_PROG_GCJ], -# [define([LT_AC_PROG_GCJ], -# defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -#]) +dnl dnl And a similar setup for Fortran 77 support +dnl AC_PROVIDE_IFELSE([AC_PROG_F77], +dnl [AC_LIBTOOL_F77], +dnl [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +dnl ])]) + +dnl dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. +dnl AC_PROVIDE_IFELSE([AC_PROG_GCJ], +dnl [AC_LIBTOOL_GCJ], +dnl [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], +dnl [AC_LIBTOOL_GCJ], +dnl [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], +dnl[AC_LIBTOOL_GCJ], +dnl [ifdef([AC_PROG_GCJ], +dnl [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) +dnlifdef([A][M_PROG_GCJ], +dnl [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) +dnlifdef([LT_AC_PROG_GCJ], +dnl [define([LT_AC_PROG_GCJ], +dnldefn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +dnl ]) ])# AC_PROG_LIBTOOL @@ -76,8 +76,8 @@ AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -#AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -#AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl +dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ac_aux_dir/ltmain.sh -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / acinclude.m4
hholzgraSun May 29 15:28:35 2005 EDT Modified files: /php-srcacinclude.m4 Log: simplify flex version test http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.310r2=1.311ty=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.310 php-src/acinclude.m4:1.311 --- php-src/acinclude.m4:1.310 Sun May 29 14:04:34 2005 +++ php-src/acinclude.m4Sun May 29 15:28:34 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: acinclude.m4,v 1.310 2005/05/29 18:04:34 hholzgra Exp $ +dnl $Id: acinclude.m4,v 1.311 2005/05/29 19:28:34 hholzgra Exp $ dnl dnl This file contains local autoconf functions. dnl @@ -1951,6 +1951,9 @@ dnl Search for (f)lex and check it's version dnl AC_DEFUN([PHP_PROG_LEX], [ + # we only support certain flex versions + flex_version_list=2.5.4 + AC_PROG_LEX if test -n $LEX; then AC_DECL_YYTEXT @@ -1964,22 +1967,21 @@ LEX_CFLAGS=-DYY_USE_CONST fi - if test $LEX ;then + if test $LEX; then AC_CACHE_CHECK([for flex version], php_cv_flex_version, [ - flexvers=`echo | $LEX -V -v --version 2/dev/null | $SED -e 's/^.* //' -e 's/\./ /g'` - if test ! -z $flexvers; then -set $flexvers -if test ${1} != 2 -o ${2} != 5 -o ${3} != 4; then - php_cv_flex_version=invalid -else - php_cv_flex_version=${1}.${2}.${3} (ok) + flex_version=`$LEX -V -v --version 2/dev/null | $SED -e 's/^.* //'` + php_cv_flex_version=invalid + for flex_check_version in $flex_version_list; do +if test $flex_version = $flex_check_version; then + php_cv_flex_version=$flex_check_version (ok) fi - fi + done ]) fi case $php_cv_flex_version in |invalid[)] - AC_MSG_WARN([You will need flex 2.5.4 if you want to regenerate Zend/PHP lexical parsers.]) + flex_msg=flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found $flex_version). + AC_MSG_WARN([$flex_msg]) LEX=exit 0; ;; esac -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xml/tests bug30266.phpt
hholzgraThu Feb 10 17:55:53 2005 EDT Added files: /php-src/ext/xml/tests bug30266.phpt Log: test case for Bug #30266 http://cvs.php.net/co.php/php-src/ext/xml/tests/bug30266.phpt?r=1.1p=1 Index: php-src/ext/xml/tests/bug30266.phpt +++ php-src/ext/xml/tests/bug30266.phpt --TEST-- Bug #30266 (Invalid opcode 137/1/8) --FILE-- ?php /* Currently (Feb 10, 2005) CVS HEAD fails with the following message: Fatal error: Invalid opcode 137/1/8. in /home/hartmut/projects/php/dev/head/ext/xml/tests/bug30266.php on line 22 */ class XML_Parser { public $dummy = a; function parse($data) { $parser = xml_parser_create(); xml_set_object($parser, $this); xml_set_element_handler($parser, 'startHandler', 'endHandler'); xml_parse($parser, $data, true); xml_parser_free($parser); } function startHandler($XmlParser, $tag, $attr) { $this-dummy = b; throw new Exception(ex); } function endHandler($XmlParser, $tag) { } } $p1 = new Xml_Parser(); try { $p1-parse('tag1tag2/tag2/tag1'); } catch (Exception $e) { echo OK\n; } ? --EXPECT-- OK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/ldap config.w32
hholzgraSat Oct 23 19:03:53 2004 EDT Modified files: /php-src/ext/ldap config.w32 Log: Make ldap_parse_reference() available on Windows (Bug #29492) http://cvs.php.net/diff.php/php-src/ext/ldap/config.w32?r1=1.1r2=1.2ty=u Index: php-src/ext/ldap/config.w32 diff -u php-src/ext/ldap/config.w32:1.1 php-src/ext/ldap/config.w32:1.2 --- php-src/ext/ldap/config.w32:1.1 Fri Dec 19 10:04:21 2003 +++ php-src/ext/ldap/config.w32 Sat Oct 23 19:03:52 2004 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.1 2003/12/19 15:04:21 wez Exp $ +// $Id: config.w32,v 1.2 2004/10/23 23:03:52 hholzgra Exp $ // vim:ft=javascript ARG_WITH(ldap, LDAP support, no); @@ -12,6 +12,7 @@ CHECK_LIB(olber32.lib, ldap, PHP_LDAP)) { EXTENSION('ldap', 'ldap.c'); + AC_DEFINE('HAVE_LDAP_PARSE_REFERENCE', 1); AC_DEFINE('HAVE_LDAP_START_TLS_S', 1); AC_DEFINE('HAVE_LDAP', 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mime_magic DEPRECATED EXPERIMENTAL config.m4
hholzgraWed Apr 21 21:24:12 2004 EDT Added files: /php-src/ext/mime_magic DEPRECATED Modified files: /php-src/ext/mime_magic EXPERIMENTAL config.m4 Log: Depercating mime_magic in favor of PECL::fileinfo http://cvs.php.net/diff.php/php-src/ext/mime_magic/EXPERIMENTAL?r1=1.1r2=1.2ty=u Index: php-src/ext/mime_magic/EXPERIMENTAL diff -u php-src/ext/mime_magic/EXPERIMENTAL:1.1 php-src/ext/mime_magic/EXPERIMENTAL:1.2 --- php-src/ext/mime_magic/EXPERIMENTAL:1.1 Sun Mar 24 18:00:47 2002 +++ php-src/ext/mime_magic/EXPERIMENTAL Wed Apr 21 21:24:12 2004 @@ -0,0 +1,2 @@ +this extension never left the experimental status +and is now superseded by PECL::fileinfo http://cvs.php.net/diff.php/php-src/ext/mime_magic/config.m4?r1=1.11r2=1.12ty=u Index: php-src/ext/mime_magic/config.m4 diff -u php-src/ext/mime_magic/config.m4:1.11 php-src/ext/mime_magic/config.m4:1.12 --- php-src/ext/mime_magic/config.m4:1.11 Fri Oct 3 01:24:23 2003 +++ php-src/ext/mime_magic/config.m4Wed Apr 21 21:24:12 2004 @@ -1,11 +1,10 @@ dnl -dnl $Id: config.m4,v 1.11 2003/10/03 05:24:23 sniper Exp $ +dnl $Id: config.m4,v 1.12 2004/04/22 01:24:12 hholzgra Exp $ dnl PHP_ARG_WITH(mime-magic, whether to include mime_magic support, [ --with-mime-magic[=FILE] - Include mime_magic support. FILE is the optional - pathname to the magic.mime file.]) + Include mime_magic support (deprecated)]) if test $PHP_MIME_MAGIC != no; then -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / dslgen xslgen
hholzgraFri Apr 16 09:20:23 2004 EDT Modified files: /functable dslgen xslgen Log: add PHP 5 to 'bultin' functions http://cvs.php.net/diff.php/functable/dslgen?r1=1.14r2=1.15ty=u Index: functable/dslgen diff -u functable/dslgen:1.14 functable/dslgen:1.15 --- functable/dslgen:1.14 Tue Sep 16 15:41:59 2003 +++ functable/dslgenFri Apr 16 09:20:23 2004 @@ -82,15 +82,15 @@ echo (cond\n; echo ' - ((equal-ci? (data nl) array) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) echo) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) empty) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) eval) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) exit) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) isset) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) list) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) print) (literal PHP 3, PHP 4 )) - ((equal-ci? (data nl) unset) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) array) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) echo) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) empty) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) eval) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) exit) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) isset) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) list) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) print) (literal PHP 3, PHP 4, PHP 5 )) + ((equal-ci? (data nl) unset) (literal PHP 3, PHP 4, PHP 5 )) '; foreach($doc_version as $key = $version) { http://cvs.php.net/diff.php/functable/xslgen?r1=1.10r2=1.11ty=u Index: functable/xslgen diff -u functable/xslgen:1.10 functable/xslgen:1.11 --- functable/xslgen:1.10 Tue Sep 16 15:41:59 2003 +++ functable/xslgenFri Apr 16 09:20:23 2004 @@ -21,15 +21,15 @@ echo versions\n; echo - function name='array' from='PHP 3, PHP 4 '/ - function name='echo' from='PHP 3, PHP 4 '/ - function name='empty' from='PHP 3, PHP 4 '/ - function name='eval' from='PHP 3, PHP 4 '/ - function name='exit' from='PHP 3, PHP 4 '/ - function name='isset' from='PHP 3, PHP 4 '/ - function name='list' from='PHP 3, PHP 4 '/ - function name='print' from='PHP 3, PHP 4 '/ - function name='unset' from='PHP 3, PHP 4 '/ + function name='array' from='PHP 3, PHP 4, PHP 5 '/ + function name='echo' from='PHP 3, PHP 4, PHP 5 '/ + function name='empty' from='PHP 3, PHP 4, PHP 5 '/ + function name='eval' from='PHP 3, PHP 4, PHP 5 '/ + function name='exit' from='PHP 3, PHP 4, PHP 5 '/ + function name='isset' from='PHP 3, PHP 4, PHP 5 '/ + function name='list' from='PHP 3, PHP 4, PHP 5 '/ + function name='print' from='PHP 3, PHP 4, PHP 5 '/ + function name='unset' from='PHP 3, PHP 4, PHP 5 '/ ; foreach($doc_version as $key = $version) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / version4.tags
hholzgraFri Apr 16 12:38:21 2004 EDT Modified files: /functable version4.tags Log: catch up with releases http://cvs.php.net/diff.php/functable/version4.tags?r1=1.15r2=1.16ty=u Index: functable/version4.tags diff -u functable/version4.tags:1.15 functable/version4.tags:1.16 --- functable/version4.tags:1.15Thu May 29 16:08:45 2003 +++ functable/version4.tags Fri Apr 16 12:38:21 2004 @@ -15,3 +15,7 @@ php_4_3_0 php_4_3_1 php_4_3_2 +php_4_3_3 +php_4_3_4 +php_4_3_5 +php_4_3_6 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable /lib doc_versions.php
hholzgraFri Apr 16 12:38:57 2004 EDT Modified files: /functable/lib doc_versions.php Log: add PHP 5 to manual version info where appropriate http://cvs.php.net/diff.php/functable/lib/doc_versions.php?r1=1.2r2=1.3ty=u Index: functable/lib/doc_versions.php diff -u functable/lib/doc_versions.php:1.2 functable/lib/doc_versions.php:1.3 --- functable/lib/doc_versions.php:1.2 Mon Jan 20 05:31:00 2003 +++ functable/lib/doc_versions.php Fri Apr 16 12:38:57 2004 @@ -22,7 +22,8 @@ , MIN(versionid) AS min3 , MAX(versionid) AS max3 FROM funclist - WHERE versionid 400 + WHERE versionid = 300 +AND versionid 400 GROUP BY function ); if(!$result) { echo mysql_error(); exit; } @@ -37,7 +38,8 @@ , MIN(versionid) AS min4 , MAX(versionid) AS max4 FROM funclist - WHERE versionid =400 + WHERE versionid = 400 + AND versionid 500 GROUP BY function ); if(!$result) { echo mysql_error(); exit; } @@ -48,48 +50,63 @@ } mysql_free_result($result); + $result = mysql_query(SELECT function + , MIN(versionid) AS min5 + , MAX(versionid) AS max5 + FROM funclist + WHERE versionid = 500 + AND versionid 600 + GROUP BY function +); + if(!$result) { echo mysql_error(); exit; } + while ($row=mysql_fetch_array($result)) { + $func[$row[function]] = true; + $min5[$row[function]] = $row[min5]; + $max5[$row[function]] = $row[max5]; + } + mysql_free_result($result); + + foreach($func as $key = $dummy) { + $vers = array(); + if(isset($min3[$key])) { $min = $min3[$key]-300; $max = $max3[$key]-300; - $ver3=PHP 3; + $vers[3]=PHP 3; if($min==0) { if($max==99) { ; } - else { $ver3.= = .$ver[$max+300];} + else { $vers[3].= = .$ver[$max+300];} } else if($min==99){ - $ver3.= CVS only; + $vers[3].= CVS only; } else { - if($max==99) { $ver3.== .$ver[$min+300]; } - else if ($min==$max) {$ver3.=$ver[$min+300]. only;} - else { $ver3=$ver[$min+300]. - .$ver[$max+300]. only;} + if($max==99) { $vers[3].== .$ver[$min+300]; } + else if ($min==$max) {$vers[3].=$ver[$min+300]. only;} + else { $vers[3]=$ver[$min+300]. - .$ver[$max+300]. only;} } - } else { - $ver3 = ; } if(isset($min4[$key])) { $min = $min4[$key]-400; $max = $max4[$key]-400; - $ver4=PHP 4 ; + $vers[4]=PHP 4 ; if($min==0) { if($max==99) { ; } - else { $ver4.= = .$ver[$max+400];} + else { $vers[4].= = .$ver[$max+400];} } else if($min==99){ - $ver4=PHP 5 CVS only; + $vers[4]=PHP 4 CVS only; } else { - if($max==99) { $ver4.== .$ver[$min+400]; } - else if ($min==$max) {$ver4.=$ver[$min+400]. only;} - else { $ver4=$ver[$min+400]. - .$ver[$max+400]. only;} + if($max==99) { $vers[4].== .$ver[$min+400]; } + else if ($min==$max) {$vers[4].=$ver[$min+400]. only;} + else { $vers[4]=$ver[$min+400]. - .$ver[$max+400]. only;} } - } else { - $ver4 = ; } - - if(empty($ver3)||empty($ver4)) { - $doc_version[$key] = $ver3$ver4; - } else { - $doc_version[$key] = $ver3, $ver4; + + if(isset($min5[$key])) { +
[PHP-CVS] cvs: php-src / README.TESTING
hholzgraThu Apr 15 11:03:27 2004 EDT Modified files: /php-srcREADME.TESTING Log: be a bit more explanatory ... http://cvs.php.net/diff.php/php-src/README.TESTING?r1=1.22r2=1.23ty=u Index: php-src/README.TESTING diff -u php-src/README.TESTING:1.22 php-src/README.TESTING:1.23 --- php-src/README.TESTING:1.22 Thu Jul 3 00:14:42 2003 +++ php-src/README.TESTING Thu Apr 15 11:03:26 2004 @@ -1,11 +1,20 @@ [IMPORTANT NOTICE] -- - Please do not ask developers why some or all tests are failing in -your environment! Let us know if you find why it fails. Thank you. + Failed tests usualy indicate a problem with your local system setup +and not within PHP itself (at least for official PHP release versions). +You may decide to automaticaly submit a test summary to our QA workflow +at the end of a test run. + Please do *not* submit a failed test as a bug or ask for help on why +it failed on your system without providing substantial backup information +on *why* the test failed on your special setup. Thank you :-) [Testing Basics] + The easiest way to test your PHP build is to run make test from the +command line after successfully compiling. This will run the complete +tests for all enabled functionalities and extensions using the PHP +CLI binary ( To execute test scripts, you must build PHP with some SAPI, then you type make test to execute all or some test scripts saved under tests directory under source root directory. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / README.TESTING
hholzgraThu Apr 15 11:27:09 2004 EDT Modified files: /php-srcREADME.TESTING Log: typo http://cvs.php.net/diff.php/php-src/README.TESTING?r1=1.23r2=1.24ty=u Index: php-src/README.TESTING diff -u php-src/README.TESTING:1.23 php-src/README.TESTING:1.24 --- php-src/README.TESTING:1.23 Thu Apr 15 11:03:26 2004 +++ php-src/README.TESTING Thu Apr 15 11:27:08 2004 @@ -14,7 +14,7 @@ The easiest way to test your PHP build is to run make test from the command line after successfully compiling. This will run the complete tests for all enabled functionalities and extensions using the PHP -CLI binary ( +CLI binary. To execute test scripts, you must build PHP with some SAPI, then you type make test to execute all or some test scripts saved under tests directory under source root directory. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xml/tests bug26614.phpt
hholzgraMon Mar 29 00:56:18 2004 EDT Modified files: /php-src/ext/xml/tests bug26614.phpt Log: Test updated to test for additional libxml2/expat inconsistencies http://cvs.php.net/diff.php/php-src/ext/xml/tests/bug26614.phpt?r1=1.3r2=1.4ty=u Index: php-src/ext/xml/tests/bug26614.phpt diff -u php-src/ext/xml/tests/bug26614.phpt:1.3 php-src/ext/xml/tests/bug26614.phpt:1.4 --- php-src/ext/xml/tests/bug26614.phpt:1.3 Mon Mar 15 10:53:28 2004 +++ php-src/ext/xml/tests/bug26614.phpt Mon Mar 29 00:56:18 2004 @@ -2,7 +2,21 @@ Bug #26614 (CDATA sections skipped on line count) --FILE-- ?php -$xml ='?xml version=1.0? +/* +this test works fine with Expat but fails with libxml +which we now use as default + +further investigation has shown that not only line count +is skippet on CDATA sections but that libxml does also +show different column numbers and byte positions depending +on context and in opposition to what one would expect to +see and what good old Expat reported just fine ... +*/ + +$xmls = array(); + +// Case 1: CDATA Sections +$xmls[CDATA] ='?xml version=1.0 encoding=iso-8859-1 ? data ![CDATA[ multi @@ -12,18 +26,63 @@ ]] /data'; +// Case 2: replace some characters so that we get comments instead +$xmls[Comment] ='?xml version=1.0 encoding=iso-8859-1 ? +data +!-- ATA[ +multi +line +CDATA +block +-- +/data'; + +// Case 3: replace even more characters so that only textual data is left +$xmls[Text] ='?xml version=1.0 encoding=iso-8859-1 ? +data +-!-- ATA[ +multi +line +CDATA +block +--- +/data'; + function startElement($parser, $name, $attrs) { -echo $name at line .xml_get_current_line_number($parser).\n; +printf($name at line %d, col %d (byte %d)\n, + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); } + function endElement($parser, $name) { -echo /$name at line .xml_get_current_line_number($parser).\n; +printf(/$name at line %d, col %d (byte %d)\n, + xml_get_current_line_number($parser), + xml_get_current_column_number($parser), + xml_get_current_byte_index($parser)); +} + +function characterData($parser, $data) { + // dummy } -$xml_parser = xml_parser_create(); -xml_set_element_handler($xml_parser, startElement, endElement); -xml_parse($xml_parser, $xml); -xml_parser_free($xml_parser); +foreach ($xmls as $desc = $xml) { + echo $desc\n; + $xml_parser = xml_parser_create(); + xml_set_element_handler($xml_parser, startElement, endElement); + xml_set_character_data_handler($xml_parser, characterData); + if (!xml_parse($xml_parser, $xml, true)) + echo Error: .xml_error_string(xml_get_error_code($xml_parser)).\n; + xml_parser_free($xml_parser); +} ? --EXPECT-- -DATA at line 2 -/DATA at line 9 +CDATA +DATA at line 2, col 0 (byte 45) +/DATA at line 9, col 0 (byte 90) +Comment +DATA at line 2, col 0 (byte 45) +/DATA at line 9, col 0 (byte 90) +Text +DATA at line 2, col 0 (byte 45) +/DATA at line 9, col 0 (byte 90) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/shmop package.xml
hholzgraThu Mar 25 14:51:54 2004 EDT Added files: /php-src/ext/shmop package.xml Log: another package description http://cvs.php.net/co.php/php-src/ext/shmop/package.xml?r=1.1p=1 Index: php-src/ext/shmop/package.xml +++ php-src/ext/shmop/package.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE package SYSTEM ../pear/package.dtd package nameshmop/name summaryPortable shared memory access/summary maintainers maintainer user???/user nameSlava Poliakov/name email[EMAIL PROTECTED]/email rolelead/role /maintainer maintainer user???/user nameIlia Alshanetsky/name email[EMAIL PROTECTED]/email rolelead/role /maintainer /maintainers description Portable Shared Memory access /description licensePHP/license release statebeta/state version5.0.0rc1/version date2004-03-19/date notes package.xml added to support intallation using pear installer /notes filelist file role=doc name=CREDITS/ file role=doc name=README/ file role=src name=config.m4/ file role=src name=config.w32/ file role=src name=shmop.dsp/ file role=src name=shmop.c/ file role=src name=php_shmop.h/ file role=test name=tests/001.phpt/ /filelist deps dep type=php rel=ge version=5 / /deps /release /package !-- vim:et:ts=1:sw=1 -- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dbx package.xml /ext/filepro package.xml /ext/session package.xml /ext/sockets package.xml /ext/tokenizer package.xml /ext/wddx package.xml /ext/yaz package.xml
hholzgraWed Mar 24 13:43:23 2004 EDT Added files: /php-src/ext/dbxpackage.xml /php-src/ext/filepropackage.xml /php-src/ext/sessionpackage.xml /php-src/ext/socketspackage.xml /php-src/ext/tokenizer package.xml /php-src/ext/wddx package.xml /php-src/ext/yazpackage.xml Log: more visa to sibira ;) http://cvs.php.net/co.php/php-src/ext/dbx/package.xml?r=1.1p=1 Index: php-src/ext/dbx/package.xml +++ php-src/ext/dbx/package.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE package SYSTEM ../pear/package.dtd package namedbx/name summaryDatabase abstraction functions/summary maintainers maintainer usermboeren/user nameMarc Boeren/name email[EMAIL PROTECTED]/email rolelead/role /maintainer maintainer userhirokawa/user nameRui Hirokawa/name email[EMAIL PROTECTED]/email rolelead/role /maintainer maintainer user???/user nameFrank M. Kromann/name email[EMAIL PROTECTED]/email rolelead/role /maintainer /maintainers description The dbx module is a database abstraction layer (db 'X', where 'X' is a supported database). The dbx functions allow you to access all supported databases using a single calling convention. The dbx-functions themselves do not interface directly to the databases, but interface to the modules that are used to support these databases. /description licensePHP/license release statebeta/state version5.0.0rc1/version date2004-03-19/date notes package.xml added to support intallation using pear installer /notes filelist file role=doc name=CREDITS/ file role=doc name=INSTALL/ file role=doc name=howto_extend_dbx.html/ file role=src name=config.m4/ file role=src name=config.w32/ file role=src name=dbx.dsp/ file role=src name=dbx.c/ file role=src name=dbx.h/ file role=src name=dbx_fbsql.c/ file role=src name=dbx_fbsql.h/ file role=src name=dbx_mssql.c/ file role=src name=dbx_mssql.h/ file role=src name=dbx_mysql.c/ file role=src name=dbx_mysql.h/ file role=src name=dbx_oci8.c/ file role=src name=dbx_oci8.h/ file role=src name=dbx_odbc.c/ file role=src name=dbx_odbc.h/ file role=src name=dbx_pgsql.c/ file role=src name=dbx_pgsql.h/ file role=src name=dbx_sybasect.c/ file role=src name=dbx_sybasect.h/ file role=src name=php_dbx.h/ file role=src name=dbx_sqlite.c/ file role=src name=dbx_sqlite.h/ file role=test name=tests/001.phpt/ file role=test name=tests/002.phpt/ file role=test name=tests/003.phpt/ file role=test name=tests/004.phpt/ file role=test name=tests/005.phpt/ file role=test name=tests/006.phpt/ file role=test name=tests/007.phpt/ file role=test name=tests/008.phpt/ file role=test name=tests/009.phpt/ file role=test name=tests/dbx_test.p/ file role=test name=tests/dbx_test.pgsql.script/ file role=test name=tests/dbx_test.script/ file role=test name=tests/skipif.inc/ file role=test name=tests/010.phpt/ /filelist deps dep type=php rel=ge version=5 / /deps /release /package !-- vim:et:ts=1:sw=1 -- http://cvs.php.net/co.php/php-src/ext/filepro/package.xml?r=1.1p=1 Index: php-src/ext/filepro/package.xml +++ php-src/ext/filepro/package.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE package SYSTEM ../pear/package.dtd package namefilepro/name summaryfilePor database access functions/summary maintainers maintainer user???/user name Chad Robinson/name email[EMAIL PROTECTED]/email rolelead/role /maintainer /maintainers description These functions allow read-only access to data stored in filePro databases. /description licensePHP/license release statebeta/state version5.0.0rc1/version date2004-03-19/date notes package.xml added to support intallation using pear installer /notes filelist file role=doc name=CREDITS/ file role=src name=config.m4/ file role=src name=config.w32/ file role=src name=filepro.dsp/ file role=src name=filepro.c/ file role=src name=php_filepro.h/ /filelist deps dep type=php rel=ge version=5 / /deps /release /package !-- vim:et:ts=1:sw=1 -- http://cvs.php.net/co.php/php-src/ext/session/package.xml?r=1.1p=1 Index: php-src/ext/session/package.xml +++ php-src/ext/session/package.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE package SYSTEM ../pear/package.dtd package namesession/name summarySession handling functions/summary maintainers maintainer usersascha/user nameSascha Schumann/name email[EMAIL PROTECTED]/email rolelead/role /maintainer maintainer userandrei/user nameAndrei Zmievski/name email[EMAIL PROTECTED]/email rolelead/role /maintainer /maintainers description Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site.
[PHP-CVS] cvs: php-src /ext/bcmath package.xml /ext/bz2 package.xml /ext/calendar package.xml /ext/com_dotnet package.xml /ext/cpdf package.xml /ext/ctype package.xml /ext/curl package.xml /ext/dbase package.xml /ext/dio package.xml /ext/exif package.xml /ext/fam package.xml /ext/fdf package.xml /ext/ftp package.xml /ext/mime_magic package.xml /ext/mysql package.xml /ext/mysqli package.xml /ext/ncurses package.xml /ext/oci8 package.xml /ext/oracle package.xml /ext/pcntl package.xml /ext/pdf package.xml /ext/posix package.xml /ext/sysvmsg package.xml /ext/sysvsem package.xml /ext/sysvshm package.xml /ext/w32api package.xml /ext/xml package.xml /ext/yp package.xml /ext/zlib package.xml
hholzgraTue Mar 23 14:46:06 2004 EDT Added files: /php-src/ext/bcmath package.xml /php-src/ext/calendar package.xml /php-src/ext/com_dotnet package.xml /php-src/ext/cpdf package.xml /php-src/ext/ctype package.xml /php-src/ext/curl package.xml /php-src/ext/dbase package.xml /php-src/ext/diopackage.xml /php-src/ext/exif package.xml /php-src/ext/fampackage.xml /php-src/ext/fdfpackage.xml /php-src/ext/ftppackage.xml /php-src/ext/mime_magic package.xml /php-src/ext/mysql package.xml /php-src/ext/mysqli package.xml /php-src/ext/ncursespackage.xml /php-src/ext/oci8 package.xml /php-src/ext/oracle package.xml /php-src/ext/pcntl package.xml /php-src/ext/pdfpackage.xml /php-src/ext/posix package.xml /php-src/ext/sysvmsgpackage.xml /php-src/ext/sysvsempackage.xml /php-src/ext/sysvshmpackage.xml /php-src/ext/w32api package.xml /php-src/ext/xmlpackage.xml /php-src/ext/yp package.xml /php-src/ext/zlib package.xml Modified files: /php-src/ext/bz2package.xml Log: The Visa to Sibiria (work in progress) Adding a package.xml to a bundled extension does not only ease the transition to PECL whereever suitable but also allows to build and install an extension as shared using the PEAR installer without having to deal with phpize and friends by hand http://cvs.php.net/diff.php/php-src/ext/bz2/package.xml?r1=1.1r2=1.2ty=u Index: php-src/ext/bz2/package.xml diff -u php-src/ext/bz2/package.xml:1.1 php-src/ext/bz2/package.xml:1.2 --- php-src/ext/bz2/package.xml:1.1 Sat May 17 10:29:31 2003 +++ php-src/ext/bz2/package.xml Tue Mar 23 14:46:04 2004 @@ -23,6 +23,9 @@ Initial Release in PECL /notes /release +configureoptions + configureoption name=with-bz2 default=autodetect prompt=path to bz2 installation?/ +/configureoptions filelist dir role=src name=/ file role=docCREDITS/file http://cvs.php.net/co.php/php-src/ext/bcmath/package.xml?r=1.1p=1 Index: php-src/ext/bcmath/package.xml +++ php-src/ext/bcmath/package.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE package SYSTEM ../pear/package.dtd package namebcmath/name summaryArbitrary Precision Mathematics Functions/summary maintainers maintainer userandi/user nameAndi Gutmans/name email[EMAIL PROTECTED]/email rolelead/role /maintainer /maintainers description For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings. /description licensePHP/license release statebeta/state version5.0.0rc1/version date2004-03-19/date notes package.xml added to support intallation using pear installer /notes filelist file role=doc name=CREDITS/ file role=src name=config.m4/ file role=src name=config.w32/ file role=src name=bcmath.c/ file role=src name=php_bcmath.h/ file role=src name=number.c/ file role=src name=number.h/ file role=doc name=libbcmath/AUTHORS/ file role=doc name=libbcmath/COPYING.LIB/ file role=doc name=libbcmath/ChangeLog/ file role=doc name=libbcmath/FAQ/ file role=doc name=libbcmath/INSTALL/ file role=doc name=libbcmath/NEWS/ file role=doc name=libbcmath/README/ file role=src name=libbcmath/src/Makefile.am/ file role=src name=libbcmath/src/add.c/ file role=src name=libbcmath/src/bcmath.h/ file role=src name=libbcmath/src/compare.c/ file role=src name=libbcmath/src/config.h/ file role=src name=libbcmath/src/debug.c/ file role=src name=libbcmath/src/div.c/ file role=src name=libbcmath/src/divmod.c/ file role=src name=libbcmath/src/doaddsub.c/ file role=src name=libbcmath/src/init.c/ file role=src name=libbcmath/src/int2num.c/ file role=src name=libbcmath/src/nearzero.c/ file role=src name=libbcmath/src/neg.c/ file role=src name=libbcmath/src/num2long.c/ file role=src name=libbcmath/src/num2str.c/ file role=src name=libbcmath/src/outofmem.c/ file role=src name=libbcmath/src/output.c/ file role=src name=libbcmath/src/private.h/ file role=src name=libbcmath/src/raise.c/ file role=src name=libbcmath/src/raisemod.c/ file role=src name=libbcmath/src/recmul.c/ file role=src name=libbcmath/src/rmzero.c/ file role=src name=libbcmath/src/rt.c/ file role=src name=libbcmath/src/sqrt.c/ file role=src name=libbcmath/src/str2num.c/ file role=src name=libbcmath/src/sub.c/ file role=src name=libbcmath/src/zero.c/ file role=src name=libbcmath/Makefile.am/ file role=src name=libbcmath/acconfig.h/ file role=src name=libbcmath/aclocal.m4/ file role=src name=libbcmath/config.h.in/ file role=src name=libbcmath/configure/ file role=src
[PHP-CVS] cvs: php-src /scripts/dev extern_c.php
hholzgraFri Feb 20 03:01:59 2004 EDT Added files: /php-src/scripts/devextern_c.php Log: A script that searches for PHPAPI and ZEND_API prototypes not enclosed by BEGIN_EXTERN_C/END_EXTERN_C http://cvs.php.net/co.php/php-src/scripts/dev/extern_c.php?r=1.1p=1 Index: php-src/scripts/dev/extern_c.php +++ php-src/scripts/dev/extern_c.php ?php function scan_dir($dir) { if (!is_dir($dir)) return; foreach (glob($dir/*) as $file) { if (is_dir($file)) { if (basename($file) != CVS) { scan_dir($file); } } else if (fnmatch(*.h, $file)) { scan_file($file); } } } function scan_file($file) { $flag = false; foreach (file($file) as $nr = $line) { if (ereg(^[[:space:]]*BEGIN_EXTERN_C, $line)) { # echo $file:.($nr+1). $line; $flag = true; } else if (ereg(^[[:space:]]*END_EXTERN_C, $line)) { # echo $file:.($nr+1). $line; $flag = false; } else if ( (ereg(^[[:space:]]*PHPAPI[[:space:]]*, $line)) ||(ereg(^[[:space:]]*ZEND_API[[:space:]]*, $line))) { if (strstr($line,()) { if (!$flag) echo $file:.($nr+1). $line; } } } } array_shift($_SERVER[argv]); if (count($_SERVER[argv])) { foreach ($_SERVER[argv] as $dir) { scan_dir($dir); } } else { scan_dir(.); } ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php_memory_streams.h php_network.h php_open_temporary_file.h php_output.h php_reentrancy.h php_streams.h php_ticks.h safe_mode.h
hholzgraFri Feb 20 03:04:31 2004 EDT Modified files: /php-src/main php_memory_streams.h php_network.h php_open_temporary_file.h php_output.h php_reentrancy.h php_streams.h php_ticks.h safe_mode.h Log: wrap all PHPAPI prototypes into BEGIN_EXTERN_C/END_EXTERN_C blocks (else they won't be usable from C++ extensions) http://cvs.php.net/diff.php/php-src/main/php_memory_streams.h?r1=1.10r2=1.11ty=u Index: php-src/main/php_memory_streams.h diff -u php-src/main/php_memory_streams.h:1.10 php-src/main/php_memory_streams.h:1.11 --- php-src/main/php_memory_streams.h:1.10 Thu Jan 8 12:33:04 2004 +++ php-src/main/php_memory_streams.h Fri Feb 20 03:04:30 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_memory_streams.h,v 1.10 2004/01/08 17:33:04 sniper Exp $ */ +/* $Id: php_memory_streams.h,v 1.11 2004/02/20 08:04:30 hholzgra Exp $ */ #ifndef PHP_MEMORY_STREAM_H #define PHP_MEMORY_STREAM_H @@ -38,13 +38,14 @@ #define php_stream_temp_create_rel(mode, max_memory_usage) _php_stream_temp_create((mode), (max_memory_usage) STREAMS_REL_CC TSRMLS_CC) #define php_stream_temp_open(mode, max_memory_usage, buf, length) _php_stream_temp_open((mode), (max_memory_usage), (buf), (length) STREAMS_CC TSRMLS_CC) - +BEGIN_EXTERN_C() PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC); PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC); +END_EXTERN_C() extern php_stream_ops php_stream_memory_ops; extern php_stream_ops php_stream_temp_ops; http://cvs.php.net/diff.php/php-src/main/php_network.h?r1=1.51r2=1.52ty=u Index: php-src/main/php_network.h diff -u php-src/main/php_network.h:1.51 php-src/main/php_network.h:1.52 --- php-src/main/php_network.h:1.51 Thu Jan 8 12:33:04 2004 +++ php-src/main/php_network.h Fri Feb 20 03:04:30 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_network.h,v 1.51 2004/01/08 17:33:04 sniper Exp $ */ +/* $Id: php_network.h,v 1.52 2004/02/20 08:04:30 hholzgra Exp $ */ #ifndef _PHP_NETWORK_H #define _PHP_NETWORK_H @@ -62,7 +62,9 @@ /* like strerror, but caller must efree the returned string, * unless buf is not NULL. * Also works sensibly for win32 */ +BEGIN_EXTERN_C() PHPAPI char *php_socket_strerror(long err, char *buf, size_t bufsize); +END_EXTERN_C() #ifdef HAVE_NETINET_IN_H # include netinet/in.h @@ -120,6 +122,7 @@ } php_sockaddr_storage; #endif +BEGIN_EXTERN_C() PHPAPI php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short port, int socktype, int asynchronous, struct timeval *timeout, char **error_string, int *error_code @@ -163,7 +166,7 @@ PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port); PHPAPI int php_sockaddr_size(php_sockaddr_storage *addr); - +END_EXTERN_C() struct _php_netstream_data_t { php_socket_t socket; @@ -177,6 +180,7 @@ extern php_stream_ops php_stream_generic_socket_ops; #define PHP_STREAM_IS_SOCKET (php_stream_socket_ops) +BEGIN_EXTERN_C() PHPAPI php_stream *_php_stream_sock_open_from_socket(php_socket_t socket, const char *persistent_id STREAMS_DC TSRMLS_DC ); /* open a connection to a host using php_hostconnect and return a stream */ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short port, @@ -193,6 +197,7 @@ PHPAPI int php_network_parse_network_address_with_port(const char *addr, long addrlen, struct sockaddr *sa, socklen_t *sl TSRMLS_DC); +END_EXTERN_C() #define php_stream_sock_open_from_socket(socket, persistent) _php_stream_sock_open_from_socket((socket), (persistent) STREAMS_CC TSRMLS_CC) #define php_stream_sock_open_host(host, port, socktype, timeout, persistent) _php_stream_sock_open_host((host), (port), (socktype), (timeout), (persistent) STREAMS_CC TSRMLS_CC) http://cvs.php.net/diff.php/php-src/main/php_open_temporary_file.h?r1=1.10r2=1.11ty=u Index: php-src/main/php_open_temporary_file.h diff -u php-src/main/php_open_temporary_file.h:1.10 php-src/main/php_open_temporary_file.h:1.11 --- php-src/main/php_open_temporary_file.h:1.10 Thu Jan 8 12:33:04 2004 +++ php-src/main/php_open_temporary_file.h Fri Feb 20 03:04:30 2004 @@ -16,12 +16,14 @@ +--+ */ -/* $Id: php_open_temporary_file.h,v 1.10 2004/01/08 17:33:04
[PHP-CVS] cvs: php-src /main/streams php_stream_context.h php_stream_filter_api.h php_stream_mmap.h php_stream_plain_wrapper.h php_stream_transport.h
hholzgraFri Feb 20 03:22:16 2004 EDT Modified files: /php-src/main/streams php_stream_context.h php_stream_filter_api.h php_stream_mmap.h php_stream_plain_wrapper.h php_stream_transport.h Log: EXTERN_C wrapping for PHPAPI prototypes (Zend and main should now be ok) http://cvs.php.net/diff.php/php-src/main/streams/php_stream_context.h?r1=1.8r2=1.9ty=u Index: php-src/main/streams/php_stream_context.h diff -u php-src/main/streams/php_stream_context.h:1.8 php-src/main/streams/php_stream_context.h:1.9 --- php-src/main/streams/php_stream_context.h:1.8 Thu Jan 8 12:33:06 2004 +++ php-src/main/streams/php_stream_context.h Fri Feb 20 03:22:12 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_stream_context.h,v 1.8 2004/01/08 17:33:06 sniper Exp $ */ +/* $Id: php_stream_context.h,v 1.9 2004/02/20 08:22:12 hholzgra Exp $ */ /* Stream context and status notification related definitions */ @@ -57,6 +57,7 @@ int rsrc_id;/* used for auto-cleanup */ }; +BEGIN_EXTERN_C() PHPAPI void php_stream_context_free(php_stream_context *context); PHPAPI php_stream_context *php_stream_context_alloc(void); PHPAPI int php_stream_context_get_option(php_stream_context *context, @@ -73,6 +74,7 @@ PHPAPI php_stream_notifier *php_stream_notification_alloc(void); PHPAPI void php_stream_notification_free(php_stream_notifier *notifier); +END_EXTERN_C() /* not all notification codes are implemented */ #define PHP_STREAM_NOTIFY_RESOLVE 1 @@ -90,9 +92,11 @@ #define PHP_STREAM_NOTIFY_SEVERITY_WARN1 #define PHP_STREAM_NOTIFY_SEVERITY_ERR 2 +BEGIN_EXTERN_C() PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity, char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC); PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context); +END_EXTERN_C() #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) (context)-notifier) { \ php_stream_notification_notify((context), (code), PHP_STREAM_NOTIFY_SEVERITY_INFO, \ http://cvs.php.net/diff.php/php-src/main/streams/php_stream_filter_api.h?r1=1.6r2=1.7ty=u Index: php-src/main/streams/php_stream_filter_api.h diff -u php-src/main/streams/php_stream_filter_api.h:1.6 php-src/main/streams/php_stream_filter_api.h:1.7 --- php-src/main/streams/php_stream_filter_api.h:1.6Thu Jan 8 12:33:06 2004 +++ php-src/main/streams/php_stream_filter_api.hFri Feb 20 03:22:12 2004 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: php_stream_filter_api.h,v 1.6 2004/01/08 17:33:06 sniper Exp $ */ +/* $Id: php_stream_filter_api.h,v 1.7 2004/02/20 08:22:12 hholzgra Exp $ */ /* The filter API works on the principle of Bucket-Brigades. This is * partially inspired by the Apache 2 method of doing things, although @@ -66,6 +66,7 @@ } php_stream_filter_status_t; /* Buckets API. */ +BEGIN_EXTERN_C() PHPAPI php_stream_bucket *php_stream_bucket_new(php_stream *stream, char *buf, size_t buflen, int own_buf, int buf_persistent TSRMLS_DC); PHPAPI int php_stream_bucket_split(php_stream_bucket *in, php_stream_bucket **left, php_stream_bucket **right, size_t length TSRMLS_DC); PHPAPI void php_stream_bucket_delref(php_stream_bucket *bucket TSRMLS_DC); @@ -74,6 +75,7 @@ PHPAPI void php_stream_bucket_append(php_stream_bucket_brigade *brigade, php_stream_bucket *bucket TSRMLS_DC); PHPAPI void php_stream_bucket_unlink(php_stream_bucket *bucket TSRMLS_DC); PHPAPI php_stream_bucket *php_stream_bucket_make_writeable(php_stream_bucket *bucket TSRMLS_DC); +END_EXTERN_C() #define PSFS_FLAG_NORMAL 0 /* regular read/write */ #define PSFS_FLAG_FLUSH_INC1 /* an incremental flush */ @@ -115,11 +117,13 @@ }; /* stack filter onto a stream */ +BEGIN_EXTERN_C() PHPAPI void php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter); PHPAPI void php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter); PHPAPI php_stream_filter *php_stream_filter_remove(php_stream_filter *filter, int call_dtor TSRMLS_DC); PHPAPI void php_stream_filter_free(php_stream_filter *filter TSRMLS_DC); PHPAPI php_stream_filter *_php_stream_filter_alloc(php_stream_filter_ops *fops, void *abstract, int persistent STREAMS_DC TSRMLS_DC); +END_EXTERN_C() #define php_stream_filter_alloc(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_CC TSRMLS_CC) #define php_stream_filter_alloc_rel(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_REL_CC TSRMLS_CC) @@ -129,9 +133,11 @@ php_stream_filter
[PHP-CVS] cvs: php-src /main php_logos.h
hholzgraWed Feb 18 16:34:16 2004 EDT Modified files: /php-src/main php_logos.h Log: be nice to C++ extensions http://cvs.php.net/diff.php/php-src/main/php_logos.h?r1=1.7r2=1.8ty=u Index: php-src/main/php_logos.h diff -u php-src/main/php_logos.h:1.7 php-src/main/php_logos.h:1.8 --- php-src/main/php_logos.h:1.7Thu Jan 8 12:33:04 2004 +++ php-src/main/php_logos.hWed Feb 18 16:34:15 2004 @@ -16,14 +16,17 @@ +--+ */ -/* $Id: php_logos.h,v 1.7 2004/01/08 17:33:04 sniper Exp $ */ +/* $Id: php_logos.h,v 1.8 2004/02/18 21:34:15 hholzgra Exp $ */ #ifndef _PHP_LOGOS_H #define _PHP_LOGOS_H +BEGIN_EXTERN_C() PHPAPI int php_register_info_logo(char *logo_string, char *mimetype, unsigned char *data, int size); PHPAPI int php_unregister_info_logo(char *logo_string); +END_EXTERN_C() + int php_init_info_logos(void); int php_shutdown_info_logos(void); int php_info_logos(const char *logo_string TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main/streams userspace.c
hholzgraWed Jan 21 05:17:14 2004 EDT Modified files: /php-src/main/streams userspace.c Log: stream_lock() method added to userspace streams wrapper http://cvs.php.net/diff.php/php-src/main/streams/userspace.c?r1=1.18r2=1.19ty=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.18 php-src/main/streams/userspace.c:1.19 --- php-src/main/streams/userspace.c:1.18 Thu Jan 8 03:17:59 2004 +++ php-src/main/streams/userspace.cWed Jan 21 05:17:12 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: userspace.c,v 1.18 2004/01/08 08:17:59 andi Exp $ */ +/* $Id: userspace.c,v 1.19 2004/01/21 10:17:12 hholzgra Exp $ */ #include php.h #include php_globals.h @@ -110,6 +110,7 @@ #define USERSTREAM_DIR_READdir_readdir #define USERSTREAM_DIR_REWIND dir_rewinddir #define USERSTREAM_DIR_CLOSE dir_closedir +#define USERSTREAM_LOCK stream_lock /* {{{ class should have methods like these: @@ -759,6 +760,55 @@ return ret; } + +static int php_userstreamop_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC) { + zval func_name; + zval *retval = NULL; + int call_result; + php_userstream_data_t *us = (php_userstream_data_t *)stream-abstract; + int ret = -1; + zval *zvalue; + zval **args[1]; + + MAKE_STD_ZVAL(zvalue); + ZVAL_LONG(zvalue, value); + args[0] = zvalue; + + switch (option) { + case PHP_STREAM_OPTION_LOCKING: + // TODO wouldblock + ZVAL_STRINGL(func_name, USERSTREAM_LOCK, sizeof(USERSTREAM_LOCK)-1, 0); + + call_result = call_user_function_ex(NULL, + us-object, + func_name, + retval, + 1, args, 0, NULL TSRMLS_CC); + + if (call_result == SUCCESS retval != NULL Z_TYPE_P(retval) == IS_BOOL) { + ret = !Z_LVAL_P(retval); + } else if (call_result == FAILURE) { + if (value == 0) { + ret = 0; // lock support test (TODO: more check) + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s:: USERSTREAM_LOCK is not implemented!, + us-wrapper-classname); + } + } + + if (retval) + zval_ptr_dtor(retval); + + break; + } + + /* clean up */ + zval_ptr_dtor(zvalue); + + return ret; +} + + static int user_wrapper_unlink(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC) { struct php_user_stream_wrapper *uwrap = (struct php_user_stream_wrapper*)wrapper-abstract; @@ -1152,6 +1202,7 @@ { zval func_name; zval *retval = NULL; + zval **args[1]; php_userstream_data_t *us = (php_userstream_data_t *)stream-abstract; ZVAL_STRINGL(func_name, USERSTREAM_DIR_REWIND, sizeof(USERSTREAM_DIR_REWIND)-1, 0); @@ -1175,8 +1226,8 @@ user-space, php_userstreamop_seek, NULL, /* cast */ - php_userstreamop_stat, /* stat */ - NULL /* set_option */ + php_userstreamop_stat, + php_userstreamop_set_option, }; php_stream_ops php_stream_userspace_dir_ops = { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
hholzgraWed Jan 21 05:20:46 2004 EDT Modified files: /php-srcNEWS Log: News update on new streams method http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1584r2=1.1585ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1584 php-src/NEWS:1.1585 --- php-src/NEWS:1.1584 Mon Jan 19 19:26:23 2004 +++ php-src/NEWSWed Jan 21 05:20:45 2004 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 2004, PHP 5 RC1 +- Added stream_lock() method to userspace streams interface. (Hartmut, Wez) - Added xsltprocessor-registerPHPFunctions(). (Christian) - Bundled new SPL extension. (Marcus, Derick) - Upgraded SQLite library to version 2.8.11. (Ilia, Wez) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xml/tests bug26614.phpt
hholzgraSat Dec 13 10:42:39 2003 EDT Added files: /php-src/ext/xml/tests bug26614.phpt Log: test case for BC bug 26614 Index: php-src/ext/xml/tests/bug26614.phpt +++ php-src/ext/xml/tests/bug26614.phpt --TEST-- Bug #26614 (CDATA sections skipped on line count) --FILE-- ?php $xml ='?xml version=1.0? data ![CDATA[ multi line CDATA block ]] /data'; function startElement($parser, $name, $attrs) { echo $name at line .xml_get_current_line_number($parser).\n; } function endElement($parser, $name) { echo /$name at line .xml_get_current_line_number($parser).\n; } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, startElement, endElement); xml_parse($xml_parser, file_get_contents(test.xml, true)); xml_parser_free($xml_parser); ? --EXPECT-- DATA at line 2 /DATA at line 4 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraMon Dec 8 17:22:58 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: reduce/reduce conflicts resolved Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.48 php-src/ext/standard/parsedate.y:1.49 --- php-src/ext/standard/parsedate.y:1.48 Tue Nov 25 10:36:38 2003 +++ php-src/ext/standard/parsedate.yMon Dec 8 17:22:57 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.48 2003/11/25 15:36:38 sebastian Exp $ */ +/* $Id: parsedate.y,v 1.49 2003/12/08 22:22:57 hholzgra Exp $ */ #include php.h @@ -150,8 +150,8 @@ %} -/* This grammar has 21 shift/reduce conflicts. */ -/* %expect 21 */ +/* This grammar has 22 shift/reduce conflicts. */ +%expect 22 %pure_parser %token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tZZONE @@ -161,7 +161,7 @@ %type NumbertDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT %type NumbertMONTH tMONTH_UNIT %type NumbertSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE tTZONE tZZONE -%type Meridian tMERIDIAN o_merid +%type Meridian tMERIDIAN %% @@ -185,6 +185,7 @@ ((struct date_yy *)parm)-yyHaveRel++; } | number +| o_merid ; time : tUNUMBER tMERIDIAN { @@ -193,11 +194,10 @@ ((struct date_yy *)parm)-yySeconds = 0; ((struct date_yy *)parm)-yyMeridian = $2; } - | tUNUMBER ':' tUNUMBER o_merid { + | tUNUMBER ':' tUNUMBER { ((struct date_yy *)parm)-yyHour = $1; ((struct date_yy *)parm)-yyMinutes = $3; ((struct date_yy *)parm)-yySeconds = 0; - ((struct date_yy *)parm)-yyMeridian = $4; } | tUNUMBER ':' tUNUMBER tSNUMBER { ((struct date_yy *)parm)-yyHour = $1; @@ -208,11 +208,10 @@ ? -$4 % 100 + (-$4 / 100) * 60 : - ($4 % 100 + ($4 / 100) * 60)); } - | tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid { + | tUNUMBER ':' tUNUMBER ':' tUNUMBER { ((struct date_yy *)parm)-yyHour = $1; ((struct date_yy *)parm)-yyMinutes = $3; ((struct date_yy *)parm)-yySeconds = $5; - ((struct date_yy *)parm)-yyMeridian = $6; } | tUNUMBER ':' tUNUMBER ':' tUNUMBER tSNUMBER { /* ISO 8601 format. hh:mm:ss[+-][0-9]{2}([0-9]{2})?. */ @@ -234,7 +233,6 @@ ((struct date_yy *)parm)-yySeconds = $5; ((struct date_yy *)parm)-yyMeridian = MER24; } - | iso8601time ; iso8601time: tUNUMBER ':' tUNUMBER ':' tUNUMBER { @@ -335,12 +333,12 @@ } } | iso8601date -| iso8601date tTZONE iso8601time { + | iso8601datetime { ((struct date_yy *)parm)-yyTimezone = 0; ((struct date_yy *)parm)-yyHaveZone++; ((struct date_yy *)parm)-yyHaveTime++; } -| iso8601date tTZONE iso8601time tZZONE { + | iso8601datetime tZZONE { ((struct date_yy *)parm)-yyTimezone = 0; ((struct date_yy *)parm)-yyHaveZone++; ((struct date_yy *)parm)-yyHaveTime++; @@ -384,6 +382,9 @@ } ; +iso8601datetime: iso8601date tTZONE iso8601time + ; + iso8601date: tUNUMBER tSNUMBER tSNUMBER { /* ISO 8601 format. -mm-dd. */ ((struct date_yy *)parm)-yyYear = $1; @@ -500,14 +501,10 @@ } ; -o_merid: /* NULL */ - { - $$ = MER24; - } - | tMERIDIAN - { - $$ = $1; - } +o_merid : tMERIDIAN + { +((struct date_yy *)parm)-yyMeridian = $1; + } ; %% -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraThu Nov 20 14:01:34 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: debug mode no longer needed Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.46 php-src/ext/standard/parsedate.y:1.47 --- php-src/ext/standard/parsedate.y:1.46 Wed Nov 19 14:55:13 2003 +++ php-src/ext/standard/parsedate.yThu Nov 20 14:01:33 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.46 2003/11/19 19:55:13 hholzgra Exp $ */ +/* $Id: parsedate.y,v 1.47 2003/11/20 19:01:33 hholzgra Exp $ */ #include php.h @@ -154,8 +154,6 @@ %expect 21 %pure_parser -%debug - %token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tZZONE %token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT %token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26317.phpt
hholzgraWed Nov 19 11:19:28 2003 EDT Modified files: /php-src/ext/standard/tests/timebug26317.phpt Log: Testcase done right ... Index: php-src/ext/standard/tests/time/bug26317.phpt diff -u php-src/ext/standard/tests/time/bug26317.phpt:1.1 php-src/ext/standard/tests/time/bug26317.phpt:1.2 --- php-src/ext/standard/tests/time/bug26317.phpt:1.1 Wed Nov 19 11:01:25 2003 +++ php-src/ext/standard/tests/time/bug26317.phpt Wed Nov 19 11:19:28 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #x (military timezone offset signedness) +Bug #26317 (military timezone offset signedness) --SKIP-- if ([EMAIL PROTECTED](TZ=GMT0) || getenv(TZ) != 'GMT0') { die(skip unable to change TZ enviroment variable\n); @@ -7,11 +7,11 @@ --FILE-- ?php putenv(TZ=GMT0); - echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 Z)); - echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 T)); - echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 k)); + echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 16:20:42 Z)); + echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 09:20:42 T)); + echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 19:20:42 C)); ? --EXPECT-- -2003-11-19 12:30:42 -2003-11-19 05:30:42 -2003-11-19 22:30:42 \ No newline at end of file +2003-11-19 16:20:42 +2003-11-19 16:20:42 +2003-11-19 16:20:42 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard parsedate.y /ext/standard/tests/time bug26317.phpt
hholzgraWed Nov 19 11:22:11 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/timebug26317.phpt Modified files: /php-src/ext/standard parsedate.y Log: MFH Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.34.2.3 php-src/ext/standard/parsedate.y:1.34.2.4 --- php-src/ext/standard/parsedate.y:1.34.2.3 Tue Nov 11 21:58:37 2003 +++ php-src/ext/standard/parsedate.yWed Nov 19 11:22:10 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.34.2.3 2003/11/12 02:58:37 iliaa Exp $ */ +/* $Id: parsedate.y,v 1.34.2.4 2003/11/19 16:22:10 hholzgra Exp $ */ #include php.h @@ -620,30 +620,30 @@ /* Military timezone table. */ static TABLE const MilitaryTable[] = { -{ a, tZONE, HOUR ( 1) }, -{ b, tZONE, HOUR ( 2) }, -{ c, tZONE, HOUR ( 3) }, -{ d, tZONE, HOUR ( 4) }, -{ e, tZONE, HOUR ( 5) }, -{ f, tZONE, HOUR ( 6) }, -{ g, tZONE, HOUR ( 7) }, -{ h, tZONE, HOUR ( 8) }, -{ i, tZONE, HOUR ( 9) }, -{ k, tZONE, HOUR ( 10) }, -{ l, tZONE, HOUR ( 11) }, -{ m, tZONE, HOUR ( 12) }, -{ n, tZONE, HOUR (- 1) }, -{ o, tZONE, HOUR (- 2) }, -{ p, tZONE, HOUR (- 3) }, -{ q, tZONE, HOUR (- 4) }, -{ r, tZONE, HOUR (- 5) }, -{ s, tZONE, HOUR (- 6) }, -{ t, tZONE, HOUR (- 7) }, -{ u, tZONE, HOUR (- 8) }, -{ v, tZONE, HOUR (- 9) }, -{ w, tZONE, HOUR (-10) }, -{ x, tZONE, HOUR (-11) }, -{ y, tZONE, HOUR (-12) }, +{ a, tZONE, HOUR (- 1) }, +{ b, tZONE, HOUR (- 2) }, +{ c, tZONE, HOUR (- 3) }, +{ d, tZONE, HOUR (- 4) }, +{ e, tZONE, HOUR (- 5) }, +{ f, tZONE, HOUR (- 6) }, +{ g, tZONE, HOUR (- 7) }, +{ h, tZONE, HOUR (- 8) }, +{ i, tZONE, HOUR (- 9) }, +{ k, tZONE, HOUR (-10) }, +{ l, tZONE, HOUR (-11) }, +{ m, tZONE, HOUR (-12) }, +{ n, tZONE, HOUR ( 1) }, +{ o, tZONE, HOUR ( 2) }, +{ p, tZONE, HOUR ( 3) }, +{ q, tZONE, HOUR ( 4) }, +{ r, tZONE, HOUR ( 5) }, +{ s, tZONE, HOUR ( 6) }, +{ t, tZONE, HOUR ( 7) }, +{ u, tZONE, HOUR ( 8) }, +{ v, tZONE, HOUR ( 9) }, +{ w, tZONE, HOUR ( 10) }, +{ x, tZONE, HOUR ( 11) }, +{ y, tZONE, HOUR ( 12) }, { z, tZONE, HOUR ( 0) }, { NULL, 0, 0 } }; Index: php-src/ext/standard/tests/time/bug26317.phpt +++ php-src/ext/standard/tests/time/bug26317.phpt --TEST-- Bug #x (military timezone offset signedness) --SKIP-- if ([EMAIL PROTECTED](TZ=GMT0) || getenv(TZ) != 'GMT0') { die(skip unable to change TZ enviroment variable\n); } --FILE-- ?php putenv(TZ=GMT0); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 Z)); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 T)); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19 12:30:42 k)); ? --EXPECT-- 2003-11-19 12:30:42 2003-11-19 05:30:42 2003-11-19 22:30:42 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:37:51 2003 EDT Added files: /php-src/ext/standard/tests/timebug26320.phpt Log: regression test for bug # 26320 strtotime() does not understand ISO6801 datetime format as used in XMLSchema Index: php-src/ext/standard/tests/time/bug26320.phpt +++ php-src/ext/standard/tests/time/bug26320.phpt --TEST-- Bug #26320 (strtotime handling of XML Schema/ISO 6801 format) --SKIP-- if ([EMAIL PROTECTED](TZ=GMT0) || getenv(TZ) != 'GMT0') { die(skip unable to change TZ enviroment variable\n); } --FILE-- ?php putenv(TZ=GMT0); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19T12:30:42)); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19T12:30:42Z)); ? --EXPECT-- 2003-11-19 12:30:42 2003-11-19 12:30:42 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:40:01 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/timebug26320.phpt Log: MFH Index: php-src/ext/standard/tests/time/bug26320.phpt +++ php-src/ext/standard/tests/time/bug26320.phpt --TEST-- Bug #26320 (strtotime handling of XML Schema/ISO 6801 format) --SKIP-- if ([EMAIL PROTECTED](TZ=GMT0) || getenv(TZ) != 'GMT0') { die(skip unable to change TZ enviroment variable\n); } --FILE-- ?php putenv(TZ=GMT0); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19T12:30:42)); echo date(Y-m-d H:i:s\n, strtotime(2003-11-19T12:30:42Z)); ? --EXPECT-- 2003-11-19 12:30:42 2003-11-19 12:30:42 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:44:51 2003 EDT Removed files: (Branch: PHP_4_3) /php-src/ext/standard/tests/timebug26320.phpt Log: removed ext/standard/tests/time/bug26320.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 12:38:43 2003 EDT Modified files: /php-src/ext/standard/tests/timebug26320.phpt Log: typo fix Index: php-src/ext/standard/tests/time/bug26320.phpt diff -u php-src/ext/standard/tests/time/bug26320.phpt:1.1 php-src/ext/standard/tests/time/bug26320.phpt:1.2 --- php-src/ext/standard/tests/time/bug26320.phpt:1.1 Wed Nov 19 11:37:50 2003 +++ php-src/ext/standard/tests/time/bug26320.phpt Wed Nov 19 12:38:42 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #26320 (strtotime handling of XML Schema/ISO 6801 format) +Bug #26320 (strtotime handling of XML Schema/ISO 8601 format) --SKIP-- if ([EMAIL PROTECTED](TZ=GMT0) || getenv(TZ) != 'GMT0') { die(skip unable to change TZ enviroment variable\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache_hooks php_apache.c
hholzgraWed Nov 19 15:13:50 2003 EDT Modified files: /php-src/sapi/apache_hooks php_apache.c Log: proto fix Index: php-src/sapi/apache_hooks/php_apache.c diff -u php-src/sapi/apache_hooks/php_apache.c:1.14 php-src/sapi/apache_hooks/php_apache.c:1.15 --- php-src/sapi/apache_hooks/php_apache.c:1.14 Tue Jun 10 16:03:44 2003 +++ php-src/sapi/apache_hooks/php_apache.c Wed Nov 19 15:13:49 2003 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.14 2003/06/10 20:03:44 imajes Exp $ */ +/* $Id: php_apache.c,v 1.15 2003/11/19 20:13:49 hholzgra Exp $ */ #include php_apache_http.h @@ -1228,7 +1228,7 @@ } /* }}} */ -/* {{{ proto long apache_request_run +/* {{{ proto long apache_request_run() This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard parsedate.y
Ilia Alshanetsky wrote: MFH ? On November 18, 2003 01:46 am, Hartmut Holzgraefe wrote: hholzgra Tue Nov 18 01:46:07 2003 EDT Modified files: /php-src/ext/standardparsedate.y Log: the military time zone offsets where pointing in the wrong direction yeah, later ... after my talk ;) ... and after adding regression test cases ... -- Hartmut Holzgraefe [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraTue Nov 18 01:45:03 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: make strtotime() understand the datetime format used with XML Schema Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.43 php-src/ext/standard/parsedate.y:1.44 --- php-src/ext/standard/parsedate.y:1.43 Tue Nov 11 21:55:03 2003 +++ php-src/ext/standard/parsedate.yTue Nov 18 01:45:01 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.43 2003/11/12 02:55:03 iliaa Exp $ */ +/* $Id: parsedate.y,v 1.44 2003/11/18 06:45:01 hholzgra Exp $ */ #include php.h @@ -136,6 +136,7 @@ int yyRelMonth; int yyRelSeconds; int yyRelYear; + int yyFlag; }; typedef union _date_ll { @@ -150,30 +151,30 @@ %} -/* This grammar has 17 shift/reduce conflicts. */ -%expect 17 +/* This grammar has 19 shift/reduce conflicts. */ +%expect 19 %pure_parser -%token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID +%token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tZZONE %token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT %token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE %type NumbertDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT %type NumbertMONTH tMONTH_UNIT -%type NumbertSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE +%type NumbertSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE tTZONE tZZONE %type Meridian tMERIDIAN o_merid %% spec : /* NULL */ | spec item - ; +; item : time { ((struct date_yy *)parm)-yyHaveTime++; } | zone { - ((struct date_yy *)parm)-yyHaveZone++; + ((struct date_yy *)parm)-yyHaveZone++; } | date { ((struct date_yy *)parm)-yyHaveDate++; @@ -251,7 +252,26 @@ | /* empty */ ; -zone : tZONE { + /* we have to deal with a special case for the datetime format + of XML Schema here: '2003-11-18T22:40:00Z' + the combination of a 'T' timezone specifier later followed + by a 'Z' is now recognized and allowed + TODO: change the grammer so that the exact positions are checked + right now '2003-11-18 22:40:00 TZ' is also accepted (hartmut) + */ + +zone : tTZONE { + ((struct date_yy *)parm)-yyFlag = 1; + ((struct date_yy *)parm)-yyTimezone = $1; + } + | tZZONE { + if (((struct date_yy *)parm)-yyFlag) { + ((struct date_yy *)parm)-yyHaveZone--; + ((struct date_yy *)parm)-yyFlag = 0; + } + ((struct date_yy *)parm)-yyTimezone = $1; + } + | tZONE { ((struct date_yy *)parm)-yyTimezone = $1; } | tDAYZONE { @@ -659,13 +679,13 @@ { q, tZONE, HOUR (- 4) }, { r, tZONE, HOUR (- 5) }, { s, tZONE, HOUR (- 6) }, -{ t, tZONE, HOUR (- 7) }, +{ t, tTZONE, HOUR (- 7) }, { u, tZONE, HOUR (- 8) }, { v, tZONE, HOUR (- 9) }, { w, tZONE, HOUR (-10) }, { x, tZONE, HOUR (-11) }, { y, tZONE, HOUR (-12) }, -{ z, tZONE, HOUR ( 0) }, +{ z, tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; @@ -969,6 +989,7 @@ date.yyHaveRel = 0; date.yyHaveTime = 0; date.yyHaveZone = 0; + date.yyFlag = 0; if (yyparse ((void *)date) || date.yyHaveTime 1 || date.yyHaveZone 1 @@ -1050,6 +1071,7 @@ if (!gmt) return -1; delta = date.yyTimezone * 60L + difftm (tm, gmt); + if ((Start + delta Start) != (delta 0)) return -1; /* time_t overflow */ Start += delta; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraTue Nov 18 01:46:07 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: the military time zone offsets where pointing in the wrong direction Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.44 php-src/ext/standard/parsedate.y:1.45 --- php-src/ext/standard/parsedate.y:1.44 Tue Nov 18 01:45:01 2003 +++ php-src/ext/standard/parsedate.yTue Nov 18 01:46:07 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.44 2003/11/18 06:45:01 hholzgra Exp $ */ +/* $Id: parsedate.y,v 1.45 2003/11/18 06:46:07 hholzgra Exp $ */ #include php.h @@ -661,30 +661,30 @@ /* Military timezone table. */ static TABLE const MilitaryTable[] = { -{ a, tZONE, HOUR ( 1) }, -{ b, tZONE, HOUR ( 2) }, -{ c, tZONE, HOUR ( 3) }, -{ d, tZONE, HOUR ( 4) }, -{ e, tZONE, HOUR ( 5) }, -{ f, tZONE, HOUR ( 6) }, -{ g, tZONE, HOUR ( 7) }, -{ h, tZONE, HOUR ( 8) }, -{ i, tZONE, HOUR ( 9) }, -{ k, tZONE, HOUR ( 10) }, -{ l, tZONE, HOUR ( 11) }, -{ m, tZONE, HOUR ( 12) }, -{ n, tZONE, HOUR (- 1) }, -{ o, tZONE, HOUR (- 2) }, -{ p, tZONE, HOUR (- 3) }, -{ q, tZONE, HOUR (- 4) }, -{ r, tZONE, HOUR (- 5) }, -{ s, tZONE, HOUR (- 6) }, -{ t, tTZONE, HOUR (- 7) }, -{ u, tZONE, HOUR (- 8) }, -{ v, tZONE, HOUR (- 9) }, -{ w, tZONE, HOUR (-10) }, -{ x, tZONE, HOUR (-11) }, -{ y, tZONE, HOUR (-12) }, +{ a, tZONE, HOUR (- 1) }, +{ b, tZONE, HOUR (- 2) }, +{ c, tZONE, HOUR (- 3) }, +{ d, tZONE, HOUR (- 4) }, +{ e, tZONE, HOUR (- 5) }, +{ f, tZONE, HOUR (- 6) }, +{ g, tZONE, HOUR (- 7) }, +{ h, tZONE, HOUR (- 8) }, +{ i, tZONE, HOUR (- 9) }, +{ k, tZONE, HOUR (-10) }, +{ l, tZONE, HOUR (-11) }, +{ m, tZONE, HOUR (-12) }, +{ n, tZONE, HOUR ( 1) }, +{ o, tZONE, HOUR ( 2) }, +{ p, tZONE, HOUR ( 3) }, +{ q, tZONE, HOUR ( 4) }, +{ r, tZONE, HOUR ( 5) }, +{ s, tZONE, HOUR ( 6) }, +{ t, tTZONE, HOUR ( 7) }, +{ u, tZONE, HOUR ( 8) }, +{ v, tZONE, HOUR ( 9) }, +{ w, tZONE, HOUR ( 10) }, +{ x, tZONE, HOUR ( 11) }, +{ y, tZONE, HOUR ( 12) }, { z, tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / php5protos php5protos.awk version5.tags
hholzgraThu Oct 23 03:08:47 2003 EDT Added files: /functable php5protos php5protos.awk version5.tags Log: go for 5 ... Index: functable/php5protos.awk +++ functable/php5protos.awk /^[[:space:]]*\/\*[[:space:]]*\{\{\{[[:space:]]*proto/ { split($0,proto,proto[[:space:]]+|\\*/[[:space:]]*$); parse=1; same=1; lc=0; } /\*\// { if(parse) { lines=; for(i=0;ilc;i++) { lines = sprintf(%s %s ,lines,line[i]); } if(!same) { split($0,temp,\*/[[:space:]]*$); lines = sprintf(%s %s ,lines,temp[1]); } split(proto[2],p2, |\\(); gsub(','',lines); printf(insert into proto5 set function ='%s',proto='%s',proto_desc='%s';\n,p2[2],proto[2],lines); parse=0; } next; } { if(parse !same) { split($0,temp,\*/[[:space:]]*$); line[lc++]=temp[1]; } same=0; } Index: functable/version5.tags +++ functable/version5.tags -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / genfunclist
hholzgraThu Oct 23 03:10:15 2003 EDT Modified files: /functable genfunclist Log: add #5 Index: functable/genfunclist diff -u functable/genfunclist:1.12 functable/genfunclist:1.13 --- functable/genfunclist:1.12 Fri Jul 19 19:50:36 2002 +++ functable/genfunclist Thu Oct 23 03:10:15 2003 @@ -5,7 +5,7 @@ # for the releases we do not replace informations # already available -for version in $versions php_3_cvs php_4_cvs +for version in $versions php_3_cvs php_4_cvs php_5_cvs do echo -n parsing version $version ... @@ -27,7 +27,7 @@ rm -f tmp.txt ; touch tmp.txt for file in `find $version -name *.[c] -print -o -name *.ec -print | xargs egrep -li function_entry| sed -es/\.\///g` do -file2=`echo $file | sed -es|^php_3[^/]*|php3|g | sed -es|^php_4[^/]*|php4|g` +file2=`echo $file | sed -es|^php_3[^/]*|php3|g | sed -es|^php_4[^/]*|php4|g | sed -es|^php_5[^/]*|php5|g` awk -f ../funcparse.awk $file | sed -es/ *//g | sed -es/ //g | sed -es|$|,'$file2');|g tmp.txt done @@ -52,8 +52,10 @@ mysql -uphpdoc -pphpdoc phpdoc EOF update funclist set versionid=399 where version='php_3_cvs'; update funclist set versionid=499 where version='php_4_cvs'; + update funclist set versionid=599 where version='php_5_cvs'; update funcimp set versionid=399 where version='php_3_cvs'; update funcimp set versionid=499 where version='php_4_cvs'; + update funcimp set versionid=599 where version='php_5_cvs'; delete from funclist where function like \t%; delete from funclist where function like ; delete from funclist where alias_for='warn_not_available'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable /lib dbconnect.php
hholzgraThu Oct 23 03:11:44 2003 EDT Modified files: /functable/lib dbconnect.php Log: set exit status to non-zero on errors, typo fix ... Index: functable/lib/dbconnect.php diff -u functable/lib/dbconnect.php:1.1 functable/lib/dbconnect.php:1.2 --- functable/lib/dbconnect.php:1.1 Fri Sep 20 07:31:27 2002 +++ functable/lib/dbconnect.php Thu Oct 23 03:11:44 2003 @@ -1,7 +1,7 @@ ?php $db = mysql_connect($dbhost, $dbuser, $dbpass); -if(! $db) { echo mysql_error(); exit; } -if(! mysql_select_db($dbname)) { echo mysq_error(); exit;} +if(! $db) { echo mysql_error(); exit(3); } +if(! mysql_select_db($dbname)) { echo mysql_error(); exit(3);} ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable /lib/statistics aliases.php no_prototype.php not_published.php undocumented_aliases.php undocumented_functions.php
hholzgraThu Oct 23 03:13:08 2003 EDT Modified files: /functable/lib/statistics aliases.php no_prototype.php not_published.php undocumented_aliases.php undocumented_functions.php Log: head is now php 5 cvs Index: functable/lib/statistics/aliases.php diff -u functable/lib/statistics/aliases.php:1.1 functable/lib/statistics/aliases.php:1.2 --- functable/lib/statistics/aliases.php:1.1Tue May 28 07:42:38 2002 +++ functable/lib/statistics/aliases.phpThu Oct 23 03:13:07 2003 @@ -8,7 +8,7 @@ , funclist.alias_for AS aname , funclist.linenoAS lineno FROM funclist - WHERE funclist.versionid = 499 + WHERE funclist.versionid = 599 AND funclist.alias_for IS NOT NULL ORDER BY funclist.filename , funclist.function Index: functable/lib/statistics/no_prototype.php diff -u functable/lib/statistics/no_prototype.php:1.1 functable/lib/statistics/no_prototype.php:1.2 --- functable/lib/statistics/no_prototype.php:1.1 Tue May 28 07:42:55 2002 +++ functable/lib/statistics/no_prototype.php Thu Oct 23 03:13:07 2003 @@ -7,11 +7,11 @@ , funclist.filename AS file , funclist.lineno AS lineno FROM funclist - LEFT JOIN proto4 - ON funclist.function = proto4.function - WHERE proto4.function IS NULL + LEFT JOIN proto5 + ON funclist.function = proto5.function + WHERE proto5.function IS NULL AND alias_for IS NULL -AND versionid = 499 +AND versionid = 599 ORDER BY funclist.filename , funclist.function ); Index: functable/lib/statistics/not_published.php diff -u functable/lib/statistics/not_published.php:1.1 functable/lib/statistics/not_published.php:1.2 --- functable/lib/statistics/not_published.php:1.1 Tue May 28 07:42:59 2002 +++ functable/lib/statistics/not_published.php Thu Oct 23 03:13:07 2003 @@ -8,7 +8,7 @@ LEFT OUTER JOIN funclist f ON (f.function = i.function or f.alias_for = i.function) AND f.versionid = i.versionid - WHERE i.versionid = 499 + WHERE i.versionid = 599 AND f.versionid IS NULL ORDER BY file , function @@ -16,7 +16,7 @@ $count['notpub']=mysql_num_rows($result); while($row=mysql_fetch_array($result)) { bg_toggle(); - $filename = str_replace(php_4_cvs,php4,$row[file]); + $filename = str_replace(php_5_cvs,php5,$row[file]); print(tr bgcolor=\$bgcolor\td.fpage($row[function])./tdtd.sourceref($filename.#.$row[lineno])./td/tr\n); } mysql_free_result($result); Index: functable/lib/statistics/undocumented_aliases.php diff -u functable/lib/statistics/undocumented_aliases.php:1.1 functable/lib/statistics/undocumented_aliases.php:1.2 --- functable/lib/statistics/undocumented_aliases.php:1.1 Tue May 28 07:43:09 2002 +++ functable/lib/statistics/undocumented_aliases.php Thu Oct 23 03:13:07 2003 @@ -11,7 +11,7 @@ , funclist.linenoAS lineno FROM funclist LEFT JOIN docfile ON funclist.function = docfile.function - WHERE funclist.versionid=499 + WHERE funclist.versionid=599 AND docfile.function IS NULL AND funclist.alias_for IS NOT NULL ORDER BY funclist.filename Index: functable/lib/statistics/undocumented_functions.php diff -u functable/lib/statistics/undocumented_functions.php:1.1 functable/lib/statistics/undocumented_functions.php:1.2 --- functable/lib/statistics/undocumented_functions.php:1.1 Tue May 28 07:43:13 2002 +++ functable/lib/statistics/undocumented_functions.php Thu Oct 23 03:13:07 2003 @@ -8,7 +8,7 @@ funclist.function AS fname FROM funclist LEFT JOIN docfile ON funclist.function = docfile.function - WHERE funclist.versionid = 499 + WHERE funclist.versionid = 599 AND funclist.alias_for IS NULL AND docfile.function IS NULL ORDER BY
[PHP-CVS] cvs: functable / update.all
hholzgraThu Oct 23 03:13:54 2003 EDT Modified files: /functable update.all Log: checkout php 5 head Index: functable/update.all diff -u functable/update.all:1.11 functable/update.all:1.12 --- functable/update.all:1.11 Mon Jan 20 05:31:00 2003 +++ functable/update.allThu Oct 23 03:13:54 2003 @@ -3,7 +3,7 @@ # test for net connection #if ping -c 1 -nq cvs.php.net /dev/null 2/dev/null #then - HAVE_CVS=1 + HAVE_CVS=1 #else # HAVE_CVS=0 #fi @@ -42,13 +42,14 @@ cvs -d :pserver:[EMAIL PROTECTED]:/repository get -d php_3_cvs php3 fi - # getting php4 releases + # getting php4 releases for release in `xargs echo ../version4.tags` do if [ ! -d $release ] then echo fetching $release from cvs - ../cvs-get-release php4 $release + echo ../cvs-get-release php-src $release + ../cvs-get-release php-src $release else echo $release already there fi @@ -58,9 +59,32 @@ echo updating php4 cvs if [ -d php_4_cvs ] then -(cd php_4_cvs; cvs update 21 | grep -v ^. php_3_cvs | grep -v Updating) +(cd php_4_cvs; cvs update 21 | grep -v ^. php_4_cvs | grep -v Updating) else -cvs -d :pserver:[EMAIL PROTECTED]:/repository get -d php_4_cvs php5 +cvs -d :pserver:[EMAIL PROTECTED]:/repository get -d php_4_cvs -r PHP_4_3 php-src + fi + + + # getting php5 releases + for release in `xargs echo ../version5.tags` + do +if [ ! -d $release ] +then + echo fetching $release from cvs + echo ../cvs-get-release php-src $release + ../cvs-get-release php-src $release +else + echo $release already there +fi + done + + # getting php5 latest developement snapshot + echo updating php5 cvs + if [ -d php_5_cvs ] + then +(cd php_5_cvs; cvs update 21 | grep -v ^. php_5_cvs | grep -v Updating) + else +cvs -d :pserver:[EMAIL PROTECTED]:/repository get -d php_5_cvs -r HEAD php-src fi # getting current manual snapshot @@ -70,7 +94,7 @@ (cd phpdoc; rm -f version.dsl version.xml; cvs update ) else cvs -d :pserver:[EMAIL PROTECTED]:/repository get -d phpdoc phpdoc-all -( cd phpdoc; autoconf; ./configure --with-lang=en --with-source=../php_4_cvs ) +( cd phpdoc; autoconf; ./configure --with-lang=en --with-source=../php_5_cvs ) fi else @@ -95,7 +119,8 @@ echo ... what is where -(cd sources/phpdoc make funclist.txt ../../checkdoc funclist.txt | mysql -u phpdoc -pphpdoc phpdoc ) +(cd sources/phpdoc make funclist.txt) +checkdoc.php echo ... quickref ./quickref @@ -106,6 +131,9 @@ echo ... protos in php 4 ./php4protos +echo ... protos in php 5 +./php5protos + @@ -113,6 +141,8 @@ echo removing ext_skel entries echo delete from funclist where filename like '%skeleton%' | mysql -u phpdoc -pphpdoc phpdoc echo delete from funcimp where filelike '%skeleton%' | mysql -u phpdoc -pphpdoc phpdoc + +# hide the easter egg ;) echo delete from funclist where function = 'php_egg_logoguid' | mysql -u phpdoc -pphpdoc phpdoc echo delete from funcimp where function = 'php_egg_logoguid' | mysql -u phpdoc -pphpdoc phpdoc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / checkdoc.php protos.php
hholzgraThu Oct 23 03:15:07 2003 EDT Added files: /functable checkdoc.php protos.php Log: additional scripts Index: functable/checkdoc.php +++ functable/checkdoc.php #!/usr/local/bin/php ?php require_once PEAR.php; require_once File/Find.php; require_once XML/Parser.php; require_once config.php; require_once lib/dbconnect.php; /** * Scan file for refname tags and store their positions * * @author Hartmut Holzgraefe [EMAIL PROTECTED] */ class func_finder extends XML_Parser { /** * Name of file being scanned * * @type string */ var $filename = ; /** * Remember last chunk of plain data here * * @type string */ var $last_data = ; /** * Data handler just stores last data seen * * @access private * @param resource XML parser * @param string cdata */ function cdataHandler($xp, $cdata) { $this-last_data = $cdata; } /** * refname end tag handler stores tag position in database * * We assume that refname.../refname is on a single line * and that the cdata within is just a single chunk * * @access private * @param resource XML parser * @param string tag name */ function xmltag_refname_($xp, $elem) { $query = sprintf(INSERT INTO docfile (function, docfile, lineno) VALUES ('%s', '%s',%d);\n, $this-last_data, ereg_replace(^sources/, , $this-filename), xml_get_current_line_number($xp) ); mysql_query($query); } /** * Constructor * * @access public * @param string file to scan */ function func_finder($filename) { parent::XML_Parser(null, func); $this-filename = $filename; $this-setInputFile($filename); $this-parse(); } } /* _ _ _ _ * __ _| | ___ | |__ __ _| | ___ ___ __| | ___ * / _` | |/ _ \| '_ \ / _` | | / __/ _ \ / _` |/ _ \ *| (_| | | (_) | |_) | (_| | | | (_| (_) | (_| | __/ * \__, |_|\___/|_.__/ \__,_|_| \___\___/ \__,_|\___| * |___/ */ // purge database mysql_query(TRUNCATE TABLE docfile); // get a file finder helper object $find = new File_Find; // now let it search for all relevant XML files foreach ($find-search('.*\.xml', 'sources/phpdoc/en/reference') as $file) { // and scan them $ff = new func_finder($file); unset($ff); } ? Index: functable/protos.php +++ functable/protos.php #!/usr/local/bin/php ?php require_once PEAR.php; require_once File/Find.php; require_once config.php; require_once lib/dbconnect.php; function proto_scan ($version, $filename) { $fp = fopen($filename, r); if ($fp) { $lineno = 0; while (!feof($fp)) { $line = fgets($fp); $lineno++; // check for proto lines if (preg_match('|/\*\s*\{\{\{\s+proto\s(.*)|', $line, $matches)) { $proto = $matches[1]; $proto_line = $lineno; // ignore protos for object methods if (strstr($proto, ::) || strstr($proto, -)) { continue; } // ingore anything that does not look like a function if (!preg_match('|(\w+)\s*\(|', $proto, $matches)) { continue; } $function = $matches[1]; // the rest of the comment is the description $comment = ; while (!feof($fp)) { $comment .= trim(fgets($fp)). ; $lineno++; // check for comment end and cut where appropriate $pos = strpos($comment, */); if ($pos !== false) { $comment = substr($comment, 0, $pos); break
[PHP-CVS] cvs: functable / dbmodel.sql
hholzgraThu Oct 23 03:15:52 2003 EDT Modified files: /functable dbmodel.sql Log: add php 5 protos Index: functable/dbmodel.sql diff -u functable/dbmodel.sql:1.6 functable/dbmodel.sql:1.7 --- functable/dbmodel.sql:1.6 Fri Jul 19 19:50:36 2002 +++ functable/dbmodel.sql Thu Oct 23 03:15:52 2003 @@ -10,10 +10,9 @@ DROP TABLE IF EXISTS docfile; CREATE TABLE docfile ( - function varchar(100) DEFAULT '' NOT NULL, + function varchar(100) NOT NULL PRIMARY KEY, docfile varchar(100), - lineno integer, - key df_idx (function) + lineno integer ); # @@ -69,6 +68,19 @@ proto_desc text, proto text, key p4_idx (function) +); + + +# +# Table structure for table 'proto5' +# + +DROP TABLE IF EXISTS proto5; +CREATE TABLE proto5 ( + function varchar(100) DEFAULT '' NOT NULL, + proto_desc text, + proto text, + key p5_idx (function) ); # -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/yp yp.c
hholzgraFri Sep 26 06:02:04 2003 EDT Modified files: /php-src/ext/yp yp.c Log: stupid typo fix Index: php-src/ext/yp/yp.c diff -u php-src/ext/yp/yp.c:1.40 php-src/ext/yp/yp.c:1.41 --- php-src/ext/yp/yp.c:1.40Fri Sep 26 03:50:01 2003 +++ php-src/ext/yp/yp.c Fri Sep 26 06:02:03 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.40 2003/09/26 07:50:01 hholzgra Exp $ */ +/* $Id: yp.c,v 1.41 2003/09/26 10:02:03 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -302,7 +302,7 @@ add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); efree(key); } else { - php_error(E_WARNING, Can't allocate %d bytes for key buffer in yp_cat()), inkeylen+1; + php_error(E_WARNING, Can't allocate %d bytes for key buffer in yp_cat(), inkeylen+1); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/yp yp.c
hholzgraFri Sep 26 06:13:31 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/yp yp.c Log: MFH Index: php-src/ext/yp/yp.c diff -u php-src/ext/yp/yp.c:1.31.8.3 php-src/ext/yp/yp.c:1.31.8.4 --- php-src/ext/yp/yp.c:1.31.8.3Fri Feb 28 01:51:16 2003 +++ php-src/ext/yp/yp.c Fri Sep 26 06:13:30 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.31.8.3 2003/02/28 06:51:16 hholzgra Exp $ */ +/* $Id: yp.c,v 1.31.8.4 2003/09/26 10:13:30 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -298,7 +298,7 @@ add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); efree(key); } else { - php_error(E_WARNING, Can't allocate %d bytes for key buffer in yp_cat()); + php_error(E_WARNING, Can't allocate %d bytes for key buffer in yp_cat(), inkeylen+1); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/yp yp.c
Derick Rethans wrote: Huh? Shouldn't that parameter be INSIDE the function call, and not after it? didn't i fix that half an hour ago? ;) that's what you get when you type on a train and don't disable your touchpad .o0(funny that i still managed to create valid C ;) -- Hartmut Holzgraefe [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c
hholzgraMon Sep 22 02:54:30 2003 EDT Modified files: /php-src/ext/interbase interbase.c Log: proto thiko fix Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.184 php-src/ext/interbase/interbase.c:1.185 --- php-src/ext/interbase/interbase.c:1.184 Tue Sep 16 21:25:08 2003 +++ php-src/ext/interbase/interbase.c Mon Sep 22 02:54:29 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.184 2003/09/17 01:25:08 abies Exp $ */ +/* $Id: interbase.c,v 1.185 2003/09/22 06:54:29 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -26,7 +26,7 @@ #include php.h -#define FILE_REVISION $Revision: 1.184 $ +#define FILE_REVISION $Revision: 1.185 $ #if HAVE_IBASE @@ -2508,7 +2508,7 @@ } /* }}} */ -/* {{{ proto ibase_num_rows( resource result_identifier ) +/* {{{ proto int ibase_num_rows( resource result_identifier ) */ #if abies_0 PHP_FUNCTION(ibase_num_rows) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / dslgen xslgen
hholzgraTue Sep 16 15:41:59 2003 EDT Modified files: /functable dslgen xslgen Log: mail address change Index: functable/dslgen diff -u functable/dslgen:1.13 functable/dslgen:1.14 --- functable/dslgen:1.13 Thu Jan 9 08:11:30 2003 +++ functable/dslgenTue Sep 16 15:41:59 2003 @@ -15,7 +15,7 @@ echo ;; to be found under the functable repository in CVS\n; echo ;;\n; echo ;; if you think this is out of date :\n; - echo ;; mailto:[EMAIL PROTECTED]; + echo ;; mailto:[EMAIL PROTECTED]; echo ;;\n\n; echo (define (index-char-val ch) (case ch Index: functable/xslgen diff -u functable/xslgen:1.9 functable/xslgen:1.10 --- functable/xslgen:1.9Fri Sep 20 07:55:43 2002 +++ functable/xslgenTue Sep 16 15:41:59 2003 @@ -15,7 +15,7 @@ echo ;; to be found under the functable repository in CVS\n; echo ;;\n; echo ;; if you think this is out of date :\n; - echo ;; mailto:[EMAIL PROTECTED]; + echo ;; mailto:[EMAIL PROTECTED]; echo ;; --\n\n; echo versions\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php