[PHP-CVS] cvs: php-src /ext/sockets sockets.c
msopacuaSun Mar 14 06:42:18 2004 EDT Modified files: /php-src/ext/socketssockets.c Log: Fix a typo, dating back from 1.145. http://cvs.php.net/diff.php/php-src/ext/sockets/sockets.c?r1=1.159r2=1.160ty=u Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.159 php-src/ext/sockets/sockets.c:1.160 --- php-src/ext/sockets/sockets.c:1.159 Wed Feb 25 17:10:09 2004 +++ php-src/ext/sockets/sockets.c Sun Mar 14 06:42:17 2004 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.159 2004/02/25 22:10:09 iliaa Exp $ */ +/* $Id: sockets.c,v 1.160 2004/03/14 11:42:17 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -385,7 +385,7 @@ #else /* No IPv6 specific hostname resolution is available on this system? */ php_error_docref(NULL TSRMLS_CC, E_WARNING, Host lookup failed: getaddrinfo() not available on system.); - reurn 0; + return 0; #endif } -- 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 002.phpt bug13142.phpt
msopacuaTue Sep 9 17:31:52 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard/tests/timebug13142.phpt 002.phpt Log: Fix testcases, failing with 'America/New_York' vs. 'US/Eastern' systems and fallback to POSIX-style. The fallback is based on tzset(3) manpage [1] for these systems and may apply to past and future unknowns as well. Affected systems: 4.4BSD Possible problem: OSF Proposed solution: leave testcase as is, and if OSF systems start failing during next qa-cycle, always use POSIX style in testcases and add portability note to docs. # [1] If the TZ environment variable does not specify a tzfile(5)-format # file and cannot be interpreted as a direct specification, UTC is # used. Index: php-src/ext/standard/tests/time/bug13142.phpt diff -u php-src/ext/standard/tests/time/bug13142.phpt:1.1.2.2 php-src/ext/standard/tests/time/bug13142.phpt:1.1.2.3 --- php-src/ext/standard/tests/time/bug13142.phpt:1.1.2.2 Tue Aug 5 08:29:41 2003 +++ php-src/ext/standard/tests/time/bug13142.phpt Tue Sep 9 17:31:51 2003 @@ -9,6 +9,9 @@ --FILE-- ?php putenv(TZ=US/Eastern); +if (date('T') == 'GMT') { + putenv(TZ=EST5EDT4,M4.1.0,M10.5.0); +} echo date(r\n, strtotime(Sep 04 16:39:45 2001)); echo date(r\n, strtotime(Sep 04 2001 16:39:45)); ? Index: php-src/ext/standard/tests/time/002.phpt diff -u php-src/ext/standard/tests/time/002.phpt:1.4.2.4 php-src/ext/standard/tests/time/002.phpt:1.4.2.5 --- php-src/ext/standard/tests/time/002.phpt:1.4.2.4Thu Aug 7 13:46:40 2003 +++ php-src/ext/standard/tests/time/002.phptTue Sep 9 17:31:51 2003 @@ -33,12 +33,12 @@ echo date (Y-m-d H:i:s\n, strtotime ($date)); } - if (PHP_OS === OSF1) { + putenv(TZ=US/Eastern); + if( date(T) == GMT ) { // POSIX style putenv (TZ=EST5EDT4,M4.1.0,M10.5.0); - } else { - putenv (TZ=US/Eastern); } + foreach ($dates as $date) { echo date (Y-m-d H:i:s\n, strtotime ($date)); } -- 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 002.phpt bug13142.phpt
msopacuaTue Sep 9 17:56:34 2003 EDT Modified files: /php-src/ext/standard/tests/time002.phpt bug13142.phpt Log: MFB: Fix US/Eastern vs. America/New_York style tzset implementations. Index: php-src/ext/standard/tests/time/002.phpt diff -u php-src/ext/standard/tests/time/002.phpt:1.10 php-src/ext/standard/tests/time/002.phpt:1.11 --- php-src/ext/standard/tests/time/002.phpt:1.10 Thu Aug 7 13:46:18 2003 +++ php-src/ext/standard/tests/time/002.phptTue Sep 9 17:56:33 2003 @@ -33,12 +33,12 @@ echo date (Y-m-d H:i:s\n, strtotime ($date)); } - if (PHP_OS === OSF1) { + putenv(TZ=US/Eastern); + if( date(T) == GMT ) { // POSIX style putenv (TZ=EST5EDT4,M4.1.0,M10.5.0); - } else { - putenv (TZ=US/Eastern); } + foreach ($dates as $date) { echo date (Y-m-d H:i:s\n, strtotime ($date)); } Index: php-src/ext/standard/tests/time/bug13142.phpt diff -u php-src/ext/standard/tests/time/bug13142.phpt:1.2 php-src/ext/standard/tests/time/bug13142.phpt:1.3 --- php-src/ext/standard/tests/time/bug13142.phpt:1.2 Tue Aug 5 08:29:26 2003 +++ php-src/ext/standard/tests/time/bug13142.phpt Tue Sep 9 17:56:33 2003 @@ -9,6 +9,9 @@ --FILE-- ?php putenv(TZ=US/Eastern); +if (date('T') == 'GMT') { + putenv(TZ=EST5EDT4,M4.1.0,M10.5.0); +} echo date(r\n, strtotime(Sep 04 16:39:45 2001)); echo date(r\n, strtotime(Sep 04 2001 16:39:45)); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt TODO
msopacuaTue Feb 11 15:26:26 2003 EDT Modified files: /php4/ext/xslt TODO Log: Update time Index: php4/ext/xslt/TODO diff -u php4/ext/xslt/TODO:1.1 php4/ext/xslt/TODO:1.2 --- php4/ext/xslt/TODO:1.1 Tue Nov 12 00:14:44 2002 +++ php4/ext/xslt/TODO Tue Feb 11 15:26:26 2003 @@ -7,17 +7,14 @@ The numbering of the items on the list does not imply priority. Rather it is simply a means for efficient communication on the mailing lists. -$Id: TODO,v 1.1 2002/11/12 05:14:44 dviner Exp $ +$Id: TODO,v 1.2 2003/02/11 20:26:26 msopacua Exp $ Short Term == -1. something about arg:/foo and arg:foo that i haven't figured out yet +1. Add streams support for file paths in 4th and 5th arg of xslt_process +2. Use zend_parse_parameters and related API's +3. SDOM_* stuff which does xpath queries. - Melvyn - - i think this might be done ? -2. SDOM_* stuff which does xpath queries. - - Melvyn -3. SablotGetLibs() function - -- sorta available.. but i don't know how. Long Term @@ -28,4 +25,7 @@ actual tsrmls value. - suggested by Marcus Boerger - +3. Evaluate OO functions, ZE2 + - All +4. Prolly an API rewrite, for php5 + - All -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / Makefile.global
msopacuaMon Feb 10 13:49:02 2003 EDT Modified files: (Branch: PHP_4_3) /php4 Makefile.global Log: Make sure we're not buffering stuff Index: php4/Makefile.global diff -u php4/Makefile.global:1.40.2.2 php4/Makefile.global:1.40.2.3 --- php4/Makefile.global:1.40.2.2 Wed Jan 15 04:31:41 2003 +++ php4/Makefile.globalMon Feb 10 13:49:02 2003 @@ -50,7 +50,7 @@ @TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC=$(CC) \ - $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS) + $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d +'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS) clean: find . -name \*.lo -o -name \*.o | xargs rm -f -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / INSTALL
msopacuaSat Feb 1 06:18:53 2003 EDT Modified files: /php4 INSTALL Log: Fix Bug #21892 (links to apache2 install instructions missing) # and stop nicos from bitching Index: php4/INSTALL diff -u php4/INSTALL:1.31 php4/INSTALL:1.32 --- php4/INSTALL:1.31 Fri Dec 20 02:08:47 2002 +++ php4/INSTALLSat Feb 1 06:18:53 2003 @@ -8,6 +8,11 @@ http://www.php.net/manual/en/install.apache.php +For Apache 2, instructions and up-to-date information regarding it's +support status, is available here: + +http://www.php.net/manual/en/install.apache2.php + It is strongly recommended that you read the manual page before going further. However, for the impatient, here is a quick set of steps that will build PHP as (first) a dynamic Apache module (DSO) for Apache 1.3.x -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
msopacuaSat Feb 1 08:28:33 2003 EDT Modified files: /php4 run-tests.php Log: Make it easier to diff results of several runs in one day. Index: php4/run-tests.php diff -u php4/run-tests.php:1.140 php4/run-tests.php:1.141 --- php4/run-tests.php:1.140Sun Jan 26 12:17:44 2003 +++ php4/run-tests.php Sat Feb 1 08:28:32 2003 @@ -430,7 +430,7 @@ $compression = 0; if ($just_save_results || !mail_qa_team($failed_tests_data, $compression, $status)) { - $output_file = 'php_test_results_' . date('Ymd') . ( $compression ? '.txt.gz' : '.txt' ); + $output_file = 'php_test_results_' . date('Ymd_Hi') . ( +$compression ? '.txt.gz' : '.txt' ); $fp = fopen($output_file, w); fwrite($fp, $failed_tests_data); fclose($fp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mcrypt config.m4
msopacuaFri Jan 31 10:06:46 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mcryptconfig.m4 Log: The ugly patch Make mcrypt compile, when we finally are free of -ltdl. Bug #20926. # There's a variant, with a config option, but that's an ugly word(tm) Index: php4/ext/mcrypt/config.m4 diff -u php4/ext/mcrypt/config.m4:1.24 php4/ext/mcrypt/config.m4:1.24.4.1 --- php4/ext/mcrypt/config.m4:1.24 Tue Mar 12 11:24:05 2002 +++ php4/ext/mcrypt/config.m4 Fri Jan 31 10:06:45 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.24 2002/03/12 16:24:05 sas Exp $ +dnl $Id: config.m4,v 1.24.4.1 2003/01/31 15:06:45 msopacua Exp $ dnl PHP_ARG_WITH(mcrypt, for mcrypt support, @@ -29,15 +29,28 @@ ]) ],[ -PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, +unset found +unset ac_cv_lib_mcrypt_mcrypt_module_open +PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, [ - AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ]) -],[ - AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.]) -],[ - -L$MCRYPT_DIR/lib -]) + AC_DEFINE(HAVE_LIBMCRYPT24,1,[ ]) + PHP_CHECK_LIBRARY(mcrypt, mcrypt_generic_deinit, + [ +AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ]) + ],[],[ +-L$MCRYPT_DIR/lib + ]) +],[ + PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, + [ +AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ]) + ],[ +AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you +have installed.]) + ],[ +-L$MCRYPT_DIR/lib + ]) +],[]) ],[ -L$MCRYPT_DIR/lib -lltdl ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mcrypt config.m4
msopacuaFri Jan 31 18:01:38 2003 EDT Modified files: /php4/ext/mcryptconfig.m4 Log: Require 2.5.6+ MFB: Be -ltdl aware Index: php4/ext/mcrypt/config.m4 diff -u php4/ext/mcrypt/config.m4:1.25 php4/ext/mcrypt/config.m4:1.26 --- php4/ext/mcrypt/config.m4:1.25 Fri Jan 3 14:49:44 2003 +++ php4/ext/mcrypt/config.m4 Fri Jan 31 18:01:36 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.25 2003/01/03 19:49:44 derick Exp $ +dnl $Id: config.m4,v 1.26 2003/01/31 23:01:36 msopacua Exp $ dnl AC_DEFUN(PHP_MCRYPT_CHECK_VERSION,[ @@ -8,13 +8,13 @@ AC_MSG_CHECKING(for libmcrypt version) AC_EGREP_CPP(yes,[ #include mcrypt.h -#if MCRYPT_API_VERSION = 20020309 +#if MCRYPT_API_VERSION = 20021217 yes #endif ],[ -AC_MSG_RESULT(= 2.5.3) +AC_MSG_RESULT(= 2.5.6) ],[ -AC_MSG_ERROR(libmcrypt version 2.5.3 or greater required.) +AC_MSG_ERROR(libmcrypt version 2.5.6 or greater required.) ]) CPPFLAGS=$old_CPPFLAGS ]) @@ -36,10 +36,27 @@ PHP_MCRYPT_CHECK_VERSION - PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) + PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, + [ +PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD) +AC_DEFINE(HAVE_LIBMCRYPT,1,[ ]) + ],[ +unset found +unset ac_cv_lib_mcrypt_mcrypt_module_open +PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, +[ + AC_DEFINE(HAVE_LIBMCRYPT,1,[ ]) +],[ + AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you +have installed.]) +],[ + -L$MCRYPT_DIR/lib +]) + ],[ +-L$MCRYPT_DIR/lib -lltdl + ]) + PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD) PHP_ADD_INCLUDE($MCRYPT_DIR/include) - AC_DEFINE(HAVE_LIBMCRYPT,1,[ ]) PHP_SUBST(MCRYPT_SHARED_LIBADD) PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard dir.c
msopacuaTue Dec 24 10:04:10 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH: crash fix in glob() with no results Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109.2.1 php4/ext/standard/dir.c:1.109.2.2 --- php4/ext/standard/dir.c:1.109.2.1 Thu Nov 14 17:51:21 2002 +++ php4/ext/standard/dir.c Tue Dec 24 10:04:10 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.1 2002/11/14 22:51:21 ssb Exp $ */ +/* $Id: dir.c,v 1.109.2.2 2002/12/24 15:04:10 msopacua Exp $ */ /* {{{ includes/startup/misc */ @@ -400,6 +400,9 @@ /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ + if (!globbuf.gl_pathv) { + RETURN_FALSE; + } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard dir.c
msopacuaMon Dec 23 13:33:47 2002 EDT Modified files: /php4/ext/standard dir.c Log: Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't supported and there are no matches. # BSDi/Mac OSX are affected. Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.111 php4/ext/standard/dir.c:1.112 --- php4/ext/standard/dir.c:1.111 Fri Nov 15 02:21:33 2002 +++ php4/ext/standard/dir.c Mon Dec 23 13:33:46 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.111 2002/11/15 07:21:33 sniper Exp $ */ +/* $Id: dir.c,v 1.112 2002/12/23 18:33:46 msopacua Exp $ */ /* {{{ includes/startup/misc */ @@ -400,6 +400,9 @@ /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ + if (!globbuf.gl_pathv) { + RETURN_FALSE; + } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
msopacuaSun Dec 22 07:48:49 2002 EDT Modified files: /php4 run-tests.php Log: Delete some security related env variables Index: php4/run-tests.php diff -u php4/run-tests.php:1.135 php4/run-tests.php:1.136 --- php4/run-tests.php:1.135Thu Dec 19 19:28:08 2002 +++ php4/run-tests.php Sun Dec 22 07:48:49 2002 @@ -42,6 +42,11 @@ @chdir(getenv('TEST_PHP_SRCDIR')); } +// Delete some security related environment variables +putenv('SSH_CLIENT=deleted'); +putenv('SSH_AUTH_SOCK=deleted'); +putenv('SSH_TTY=deleted'); + $cwd = getcwd(); set_time_limit(0); while(ob_get_level()) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /tests/lang bug20993.phpt
msopacuaSat Dec 21 11:54:07 2002 EDT Modified files: (Branch: PHP_4_3) /php4/tests/langbug20993.phpt Log: Skip the test, until a proper descision is made Index: php4/tests/lang/bug20993.phpt diff -u php4/tests/lang/bug20993.phpt:1.1.2.1 php4/tests/lang/bug20993.phpt:1.1.2.2 --- php4/tests/lang/bug20993.phpt:1.1.2.1 Fri Dec 13 13:46:14 2002 +++ php4/tests/lang/bug20993.phpt Sat Dec 21 11:54:07 2002 @@ -1,5 +1,10 @@ --TEST-- Bug #20993 (referenced array key, makes array global) +--SKIPIF-- +?php +if(TRUE) + die(skip fix for this problem is yet undecided.); +? --FILE-- ?php $a = array(1); @@ -17,7 +22,10 @@ $arr[0] = 2; } ? ---EXPECT-- -1 -b 1 -r 1 -1 -b 1 -r 1 +--EXPECTF-- 1 -b 1 -r 1 + +Notice: %s referenced element(s) %s +%s +2 -b 1 -r 2 +2 -b 1 -r 2 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /tests/lang bug20993.phpt
msopacuaSat Dec 21 16:01:26 2002 EDT Removed files: (Branch: PHP_4_3) /php4/tests/langbug20993.phpt Log: There won't be a warning/fix on this, so remove the test -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /tests/lang bug20993.phpt
msopacuaSat Dec 21 16:01:52 2002 EDT Removed files: /php4/tests/langbug20993.phpt Log: MFB: There won't be a warning/fix on this, so remove the test -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / run-tests.php
msopacuaThu Dec 19 19:25:56 2002 EDT Modified files: (Branch: PHP_4_3) /php4 run-tests.php Log: Fix libtool detection Index: php4/run-tests.php diff -u php4/run-tests.php:1.119.2.14 php4/run-tests.php:1.119.2.15 --- php4/run-tests.php:1.119.2.14 Tue Dec 17 14:08:01 2002 +++ php4/run-tests.php Thu Dec 19 19:25:56 2002 @@ -371,7 +371,8 @@ if (substr(PHP_OS, 0, 3) != WIN) { $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); - $libtool = shell_exec('libtool --version'); + /* Always use the generated libtool - Mac OSX uses 'glibtool' +*/ + $libtool = shell_exec('./libtool --version'); /* Try the most common flags for 'version' */ $flags = array('-v', '-V', '--version'); $cc_status=0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
msopacuaThu Dec 19 19:28:08 2002 EDT Modified files: /php4 run-tests.php Log: MFB: libtool detection Index: php4/run-tests.php diff -u php4/run-tests.php:1.134 php4/run-tests.php:1.135 --- php4/run-tests.php:1.134Tue Dec 17 14:07:15 2002 +++ php4/run-tests.php Thu Dec 19 19:28:08 2002 @@ -372,7 +372,8 @@ if (substr(PHP_OS, 0, 3) != WIN) { $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); - $libtool = shell_exec('libtool --version'); + /* Always use the generated libtool - Mac OSX uses 'glibtool' +*/ + $libtool = shell_exec('./libtool --version'); /* Try the most common flags for 'version' */ $flags = array('-v', '-V', '--version'); $cc_status=0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /tests/lang bug20993.phpt
msopacuaFri Dec 13 13:46:15 2002 EDT Added files: (Branch: PHP_4_3) /php4/tests/langbug20993.phpt Log: MFH Index: php4/tests/lang/bug20993.phpt +++ php4/tests/lang/bug20993.phpt --TEST-- Bug #20993 (referenced array key, makes array global) --FILE-- ?php $a = array(1); $b = array(1); $ref = $a[0]; echo $a[0], ' -b ', $b[0], ' -r ', $ref, \n; changeVal($a); echo $a[0], ' -b ', $b[0], ' -r ', $ref, \n; changeVal($b); echo $a[0], ' -b ', $b[0], ' -r ', $ref, \n; function changeVal($arr) { $arr[0] = 2; } ? --EXPECT-- 1 -b 1 -r 1 1 -b 1 -r 1 1 -b 1 -r 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/cgi config9.m4 /sapi/cli config.m4
msopacuaMon Dec 9 12:02:39 2002 EDT Modified files: /php4/sapi/cli config.m4 /php4/sapi/cgi config9.m4 Log: Fix make install target on Cygwin, bug #20807 Index: php4/sapi/cli/config.m4 diff -u php4/sapi/cli/config.m4:1.12 php4/sapi/cli/config.m4:1.13 --- php4/sapi/cli/config.m4:1.12Wed Nov 13 20:09:46 2002 +++ php4/sapi/cli/config.m4 Mon Dec 9 12:02:38 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.12 2002/11/14 01:09:46 sas Exp $ +dnl $Id: config.m4,v 1.13 2002/12/09 17:02:38 msopacua Exp $ dnl AC_MSG_CHECKING(for CLI build) @@ -21,6 +21,10 @@ case $host_alias in *darwin*) BUILD_CLI=\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) +;; + *cygwin*) +SAPI_CLI_PATH=sapi/cli/php.exe +BUILD_CLI=\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) +\$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) +\$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) ;; *) BUILD_CLI=\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) Index: php4/sapi/cgi/config9.m4 diff -u php4/sapi/cgi/config9.m4:1.3 php4/sapi/cgi/config9.m4:1.4 --- php4/sapi/cgi/config9.m4:1.3Sun Dec 1 16:50:35 2002 +++ php4/sapi/cgi/config9.m4Mon Dec 9 12:02:38 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config9.m4,v 1.3 2002/12/01 21:50:35 shane Exp $ +dnl $Id: config9.m4,v 1.4 2002/12/09 17:02:38 msopacua Exp $ dnl AC_ARG_ENABLE(cgi, @@ -86,7 +86,14 @@ AC_MSG_RESULT(yes) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) -SAPI_CGI_PATH=sapi/cgi/php-cgi +case $host_alias in + *cygwin* ) +SAPI_CGI_PATH=sapi/cgi/php-cgi.exe +;; + * ) +SAPI_CGI_PATH=sapi/cgi/php-cgi +;; +esac PHP_SUBST(SAPI_CGI_PATH) PHP_TEST_WRITE_STDOUT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /sapi/cgi config9.m4 /sapi/cli config.m4
msopacuaMon Dec 9 12:25:01 2002 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/cli config.m4 /php4/sapi/cgi config9.m4 Log: MFH: fix make install target on Cygwin Index: php4/sapi/cli/config.m4 diff -u php4/sapi/cli/config.m4:1.11 php4/sapi/cli/config.m4:1.11.2.1 --- php4/sapi/cli/config.m4:1.11Sun Sep 29 12:22:48 2002 +++ php4/sapi/cli/config.m4 Mon Dec 9 12:25:01 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.11 2002/09/29 16:22:48 sas Exp $ +dnl $Id: config.m4,v 1.11.2.1 2002/12/09 17:25:01 msopacua Exp $ dnl AC_MSG_CHECKING(for CLI build) @@ -21,6 +21,10 @@ case $host_alias in *darwin*) BUILD_CLI=\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) +;; + *cygwin*) +SAPI_CLI_PATH=sapi/cli/php.exe +BUILD_CLI=\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) +\$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) +\$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) ;; *) BUILD_CLI=\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH) Index: php4/sapi/cgi/config9.m4 diff -u php4/sapi/cgi/config9.m4:1.1.2.1 php4/sapi/cgi/config9.m4:1.1.2.2 --- php4/sapi/cgi/config9.m4:1.1.2.1Sun Dec 1 18:27:14 2002 +++ php4/sapi/cgi/config9.m4Mon Dec 9 12:25:01 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config9.m4,v 1.1.2.1 2002/12/01 23:27:14 shane Exp $ +dnl $Id: config9.m4,v 1.1.2.2 2002/12/09 17:25:01 msopacua Exp $ dnl AC_ARG_ENABLE(cgi, @@ -86,7 +86,14 @@ AC_MSG_RESULT(yes) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) -SAPI_CGI_PATH=sapi/cgi/php-cgi +case $host_alias in + *cygwin* ) +SAPI_CGI_PATH=sapi/cgi/php-cgi.exe +;; + * ) +SAPI_CGI_PATH=sapi/cgi/php-cgi +;; +esac PHP_SUBST(SAPI_CGI_PATH) PHP_TEST_WRITE_STDOUT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt php_sablot.h sablot.c
msopacuaThu Nov 21 18:28:25 2002 EDT Modified files: /php4/ext/xslt php_sablot.h sablot.c Log: Fix bug #20518 Index: php4/ext/xslt/php_sablot.h diff -u php4/ext/xslt/php_sablot.h:1.17 php4/ext/xslt/php_sablot.h:1.18 --- php4/ext/xslt/php_sablot.h:1.17 Sun Nov 10 07:18:02 2002 +++ php4/ext/xslt/php_sablot.h Thu Nov 21 18:28:25 2002 @@ -46,6 +46,7 @@ #define XSLT_ERRNO(handle) ((handle)-err-no) #define XSLT_ERRSTR(handle)((handle)-err-str) #define XSLT_LOG(handle) ((handle)-err-log) +#define XSLT_BASE_ISSET(handle) ((handle)-base_isset) #define XSLT_FUNCH_FREE(__var) if (__var) zval_ptr_dtor((__var)); #define XSLT_REG_ERRMSG(msg, handle) if (XSLT_ERRSTR(handle)) efree(XSLT_ERRSTR(handle)); \ @@ -124,6 +125,7 @@ struct xslt_processor processor; struct xslt_error *err; zval *object; + unsigned short base_isset; } php_xslt; #else Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.68 php4/ext/xslt/sablot.c:1.69 --- php4/ext/xslt/sablot.c:1.68 Sun Nov 10 07:18:02 2002 +++ php4/ext/xslt/sablot.c Thu Nov 21 18:28:25 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sablot.c,v 1.68 2002/11/10 12:18:02 msopacua Exp $ */ +/* $Id: sablot.c,v 1.69 2002/11/21 23:28:25 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -218,6 +218,7 @@ handle-handlers = ecalloc(1, sizeof(struct xslt_handlers)); handle-err = ecalloc(1, sizeof(struct xslt_error)); handle-object = NULL; + handle-base_isset = 0; XSLT_LOG(handle).path = NULL; @@ -435,6 +436,7 @@ /* Set the base */ SablotSetBase(XSLT_PROCESSOR(handle), Z_STRVAL_PP(base)); + XSLT_BASE_ISSET(handle) = 1; } /* }}} */ @@ -547,7 +549,6 @@ xslt_make_array(args_p, args); /* Can return NULL */ if (args) { - char *baseuri; TSRMLS_FETCH(); i=0; while (args[i]) { @@ -559,14 +560,17 @@ } /* Since we have args passed, we need to set the base uri, so pull in executor - globals and set the base, using the current filename, specifally for the + globals and set the base, using the current filename, +specifcally for the 'arg' scheme */ + if(XSLT_BASE_ISSET(handle) == 0) + { + char *baseuri; spprintf(baseuri, 0, file://%s, zend_get_executed_filename(TSRMLS_C)); + SablotSetBaseForScheme(XSLT_PROCESSOR(handle), arg, +baseuri); - SablotSetBaseForScheme(XSLT_PROCESSOR(handle), arg, baseuri); - - if(baseuri) - efree(baseuri); + if(baseuri) + efree(baseuri); + } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt/tests bug20518.phpt
msopacuaThu Nov 21 18:31:44 2002 EDT Added files: (Branch: PHP_4_3) /php4/ext/xslt/testsbug20518.phpt Log: test for bug #20518 Index: php4/ext/xslt/tests/bug20518.phpt +++ php4/ext/xslt/tests/bug20518.phpt --TEST-- Don't override xslt_set_base (bug #20518) --SKIPIF-- ?php // vim600: syn=php ts=4 sw=4 include(skipif.inc); mkdir(dirname(__FILE__) . '/tmp', 0777) or die(skip Cannot create working directory); ? --INI-- magic_quotes_runtime=0 --FILE-- ?php error_reporting(E_ALL); copy(dirname(__FILE__) . '/qa.dtd', dirname(__FILE__) . '/tmp/qa.dtd'); $xslfile = dirname(__FILE__) . '/args.xsl'; $xslsheet = @implode('', @file($xslfile)); $xmldata = '?xml version=1.0 encoding=ISO-8859-1?'; $xmldata .= '!DOCTYPE qa SYSTEM qa.dtd' . \n; $xmldata .=' qa test type=simpleTest has passed/test test type=complex / /qa'; $xh = xslt_create(); xslt_set_base($xh, 'file://' . dirname(__FILE__) . '/tmp/'); $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet)); print $result\n; xslt_free($xh); unlink(dirname(__FILE__) . '/tmp/qa.dtd'); rmdir(dirname(__FILE__) . '/tmp'); ? --EXPECT-- Test has passed -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt php_sablot.h sablot.c
msopacuaThu Nov 21 18:32:53 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/xslt php_sablot.h sablot.c Log: MFH Fix bug #20518 Index: php4/ext/xslt/php_sablot.h diff -u php4/ext/xslt/php_sablot.h:1.17 php4/ext/xslt/php_sablot.h:1.17.2.1 --- php4/ext/xslt/php_sablot.h:1.17 Sun Nov 10 07:18:02 2002 +++ php4/ext/xslt/php_sablot.h Thu Nov 21 18:32:53 2002 @@ -46,6 +46,7 @@ #define XSLT_ERRNO(handle) ((handle)-err-no) #define XSLT_ERRSTR(handle)((handle)-err-str) #define XSLT_LOG(handle) ((handle)-err-log) +#define XSLT_BASE_ISSET(handle) ((handle)-base_isset) #define XSLT_FUNCH_FREE(__var) if (__var) zval_ptr_dtor((__var)); #define XSLT_REG_ERRMSG(msg, handle) if (XSLT_ERRSTR(handle)) efree(XSLT_ERRSTR(handle)); \ @@ -124,6 +125,7 @@ struct xslt_processor processor; struct xslt_error *err; zval *object; + unsigned short base_isset; } php_xslt; #else Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.68 php4/ext/xslt/sablot.c:1.68.2.1 --- php4/ext/xslt/sablot.c:1.68 Sun Nov 10 07:18:02 2002 +++ php4/ext/xslt/sablot.c Thu Nov 21 18:32:53 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sablot.c,v 1.68 2002/11/10 12:18:02 msopacua Exp $ */ +/* $Id: sablot.c,v 1.68.2.1 2002/11/21 23:32:53 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -218,6 +218,7 @@ handle-handlers = ecalloc(1, sizeof(struct xslt_handlers)); handle-err = ecalloc(1, sizeof(struct xslt_error)); handle-object = NULL; + handle-base_isset = 0; XSLT_LOG(handle).path = NULL; @@ -435,6 +436,7 @@ /* Set the base */ SablotSetBase(XSLT_PROCESSOR(handle), Z_STRVAL_PP(base)); + XSLT_BASE_ISSET(handle) = 1; } /* }}} */ @@ -547,7 +549,6 @@ xslt_make_array(args_p, args); /* Can return NULL */ if (args) { - char *baseuri; TSRMLS_FETCH(); i=0; while (args[i]) { @@ -559,14 +560,17 @@ } /* Since we have args passed, we need to set the base uri, so pull in executor - globals and set the base, using the current filename, specifally for the + globals and set the base, using the current filename, +specifcally for the 'arg' scheme */ + if(XSLT_BASE_ISSET(handle) == 0) + { + char *baseuri; spprintf(baseuri, 0, file://%s, zend_get_executed_filename(TSRMLS_C)); + SablotSetBaseForScheme(XSLT_PROCESSOR(handle), arg, +baseuri); - SablotSetBaseForScheme(XSLT_PROCESSOR(handle), arg, baseuri); - - if(baseuri) - efree(baseuri); + if(baseuri) + efree(baseuri); + } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / README.SUBMITTING_PATCH
msopacuaThu Nov 14 14:44:26 2002 EDT Modified files: /php4 README.SUBMITTING_PATCH Log: Add a note about the mime-type Index: php4/README.SUBMITTING_PATCH diff -u php4/README.SUBMITTING_PATCH:1.4 php4/README.SUBMITTING_PATCH:1.5 --- php4/README.SUBMITTING_PATCH:1.4Wed Oct 23 17:41:40 2002 +++ php4/README.SUBMITTING_PATCHThu Nov 14 14:44:26 2002 -88,6 +88,11 Please add the prefix [PATCH] to your email subject and make sure to include the patch as a MIME attachment even if it is short. + +NOTE: only MIME attachements of type 'text/*' are accepted. The + easiest way to acclomplish this, is to make the extension + '.txt'. + Test scripts should be included in the same email. Explain what has been fixed/added/changed by your patch. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / README.SUBMITTING_PATCH
msopacuaThu Nov 14 15:57:10 2002 EDT Modified files: (Branch: PHP_4_3) /php4 README.SUBMITTING_PATCH Log: MFH plus typo fix Index: php4/README.SUBMITTING_PATCH diff -u php4/README.SUBMITTING_PATCH:1.4 php4/README.SUBMITTING_PATCH:1.4.2.1 --- php4/README.SUBMITTING_PATCH:1.4Wed Oct 23 17:41:40 2002 +++ php4/README.SUBMITTING_PATCHThu Nov 14 15:57:09 2002 -88,6 +88,11 Please add the prefix [PATCH] to your email subject and make sure to include the patch as a MIME attachment even if it is short. + +NOTE: only MIME attachments of type 'text/*' are accepted. The + easiest way to acclomplish this, is to make the extension + '.txt'. + Test scripts should be included in the same email. Explain what has been fixed/added/changed by your patch. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / README.SUBMITTING_PATCH
msopacuaThu Nov 14 15:57:49 2002 EDT Modified files: /php4 README.SUBMITTING_PATCH Log: typo Index: php4/README.SUBMITTING_PATCH diff -u php4/README.SUBMITTING_PATCH:1.5 php4/README.SUBMITTING_PATCH:1.6 --- php4/README.SUBMITTING_PATCH:1.5Thu Nov 14 14:44:26 2002 +++ php4/README.SUBMITTING_PATCHThu Nov 14 15:57:48 2002 -89,7 +89,7 Please add the prefix [PATCH] to your email subject and make sure to include the patch as a MIME attachment even if it is short. -NOTE: only MIME attachements of type 'text/*' are accepted. The +NOTE: only MIME attachments of type 'text/*' are accepted. The easiest way to acclomplish this, is to make the extension '.txt'. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / run-tests.php
msopacuaSun Nov 10 03:56:28 2002 EDT Modified files: /php4 run-tests.php Log: - Make it possible for people to save results and/or remove unwanted ENV data. - Use more options for the CC 'version' flag Index: php4/run-tests.php diff -u php4/run-tests.php:1.118 php4/run-tests.php:1.119 --- php4/run-tests.php:1.118Thu Nov 7 20:11:05 2002 +++ php4/run-tests.php Sun Nov 10 03:56:28 2002 -309,10 +309,12 /* We got failed Tests, offer the user to send and e-mail to QA team, unless NO_INTERACTION is set */ if ($sum_results['FAILED'] !getenv('NO_INTERACTION')) { $fp = fopen(php://stdin, r+); - echo Some tests have failed, would you like to send the\nreport to PHP's QA team? [Yn]: ; + echo Some tests have failed, would you like to send the\nreport to PHP's QA +team\n; + echo (choose \s\ to just save the results to a file)? [Yns]: ; $user_input = fgets($fp, 10); + $just_save_results = (strtolower($user_input[0]) == 's'); - if (strlen(trim($user_input)) == 0 || strtolower($user_input[0]) == 'y') { + if ($just_save_results || strlen(trim($user_input)) == 0 || +strtolower($user_input[0]) == 'y') { /* * Collect information about the host system for our report * Fetch phpinfo() output so that we can see the PHP enviroment -329,7 +331,16 $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); $libtool = shell_exec('libtool --version'); - $compiler = shell_exec(getenv('CC').' -v 21'); + /* Try the most common flags for 'version' */ + $flags = array('-v', '-V', '--version'); + $cc_status=0; + foreach($flags AS $flag) { + system(getenv('CC'). $flag /dev/null 21, +$cc_status); + if($cc_status == 0) { + $compiler = shell_exec(getenv('CC'). $flag +21); + break; + } + } } $failed_tests_data .= Automake:\n$automake\n; $failed_tests_data .= Autoconf:\n$autoconf\n; -352,13 +363,15 $compression = 0; - if (!mail_qa_team($failed_tests_data, $compression)) { + if ($just_save_results || !mail_qa_team($failed_tests_data, +$compression)) { $output_file = 'php_test_results_' . date('Ymd') . ( $compression ? '.txt.gz' : '.txt' ); $fp = fopen($output_file, w); fwrite($fp, $failed_tests_data); fclose($fp); - echo \nThe test script was unable to automatically send the report to PHP's QA Team\nPlease send .$output_file. to .PHP_QA_EMAIL. manually, thank you.\n; + if (!$just_save_results) + echo \nThe test script was unable to automatically send +the report to PHP's QA Team\n; + echo Please send .$output_file. to .PHP_QA_EMAIL. +manually, thank you.\n; } else { fwrite($fp, \nThank you for helping to make PHP better.\n); fclose($fp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt config.m4 php_sablot.h sablot.c /ext/xslt/tests xslt_backend_info.phpt
msopacuaSun Nov 10 07:18:02 2002 EDT Added files: /php4/ext/xslt/testsxslt_backend_info.phpt Modified files: /php4/ext/xslt config.m4 php_sablot.h sablot.c Log: - implement xslt_backend_info - add test for it - fix some prototypes Index: php4/ext/xslt/config.m4 diff -u php4/ext/xslt/config.m4:1.29 php4/ext/xslt/config.m4:1.30 --- php4/ext/xslt/config.m4:1.29Thu Oct 31 16:21:00 2002 +++ php4/ext/xslt/config.m4 Sun Nov 10 07:18:02 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.29 2002/10/31 21:21:00 msopacua Exp $ +dnl $Id: config.m4,v 1.30 2002/11/10 12:18:02 msopacua Exp $ dnl dnl +--+ dnl | This is where the magic of the extension reallly is. Depending on what | -58,6 +58,19 fi if test $PHP_XSLT_SABLOT != no; then +AC_MSG_CHECKING([for sablot-config]) +if test -x $XSLT_DIR/bin/sablot-config ; then + AC_MSG_RESULT(found) + AC_DEFINE(HAVE_SABLOT_CONFIG, 1, [Whether the Sablotron config file is found]) + dnl Use this script to register this information in phpinfo() + SABINF_CFLAGS=`$XSLT_DIR/bin/sablot-config --cflags` + SABINF_LIBS=`$XSLT_DIR/bin/sablot-config --libs` + SABINF_PREFIX=`$XSLT_DIR/bin/sablot-config --prefix` + SABINF_ALL=\Cflags: $SABINF_CFLAGS\nLibs: $SABINF_LIBS\nPrefix: +$SABINF_PREFIX\ + PHP_DEFINE(SAB_INFO, $SABINF_ALL) +else + AC_MSG_RESULT(not found) +fi AC_MSG_CHECKING([for Sablotron version]) old_CPPFLAGS=$CPPFLAGS CPPFLAGS=$CPPFLAGS -I$XSLT_DIR/include Index: php4/ext/xslt/php_sablot.h diff -u php4/ext/xslt/php_sablot.h:1.16 php4/ext/xslt/php_sablot.h:1.17 --- php4/ext/xslt/php_sablot.h:1.16 Thu Oct 31 16:21:00 2002 +++ php4/ext/xslt/php_sablot.h Sun Nov 10 07:18:02 2002 -50,6 +50,7 #define XSLT_FUNCH_FREE(__var) if (__var) zval_ptr_dtor((__var)); #define XSLT_REG_ERRMSG(msg, handle) if (XSLT_ERRSTR(handle)) efree(XSLT_ERRSTR(handle)); \ XSLT_ERRSTR(handle) = estrdup(msg); +#define XSLT_NO_INFO No information available. PHP_MINIT_FUNCTION(xslt); PHP_MINFO_FUNCTION(xslt); -72,7 +73,7 #endif PHP_FUNCTION(xslt_backend_version); PHP_FUNCTION(xslt_backend_name); - +PHP_FUNCTION(xslt_backend_info); struct scheme_handlers { zval *sh_get_all; Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.67 php4/ext/xslt/sablot.c:1.68 --- php4/ext/xslt/sablot.c:1.67 Sat Nov 2 10:01:42 2002 +++ php4/ext/xslt/sablot.c Sun Nov 10 07:18:02 2002 -19,7 +19,7 +--+ */ -/* $Id: sablot.c,v 1.67 2002/11/02 15:01:42 msopacua Exp $ */ +/* $Id: sablot.c,v 1.68 2002/11/10 12:18:02 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -32,6 +32,9 #if HAVE_SABLOT_BACKEND +#ifdef HAVE_SABLOT_CONFIG +#include php_sab_info.h +#endif #include sablot.h #include string.h -99,6 +102,7 #endif PHP_FE(xslt_backend_version, NULL) PHP_FE(xslt_backend_name,NULL) +PHP_FE(xslt_backend_info,NULL) {NULL, NULL, NULL} }; /* }}} */ -193,6 +197,9 #ifdef SAB_VERSION php_info_print_table_row(2, Sablotron Version, SAB_VERSION); #endif +#ifdef HAVE_SABLOT_CONFIG + php_info_print_table_row(2, Sablotron Information, SAB_INFO); +#endif php_info_print_table_end(); } /* }}} */ -758,7 +765,7 /* }}} */ #endif -/* {{{ proto void xslt_backend_version() +/* {{{ proto string xslt_backend_version() Returns the version number of Sablotron (if available) */ PHP_FUNCTION(xslt_backend_version) { -770,7 +777,7 } /* }}} */ -/* {{{ proto void xslt_backend_name() +/* {{{ proto string xslt_backend_name() Returns the name of the Backend (here Sablotron)*/ PHP_FUNCTION(xslt_backend_name) { -778,6 +785,17 } /* }}} */ +/* {{{ proto string xslt_backend_info() + Returns the information on the compilation settings of the backend */ +PHP_FUNCTION(xslt_backend_info) +{ +#ifdef HAVE_SABLOT_CONFIG + RETURN_STRING(SAB_INFO, strlen(SAB_INFO)); +#else + RETURN_STRING(XSLT_NO_INFO, strlen(XSLT_NO_INFO)); +#endif +} +/* }}} */ /* {{{ free_processor() Free an XSLT processor */ static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC) Index: php4/ext/xslt/tests/xslt_backend_info.phpt +++ php4/ext/xslt/tests/xslt_backend_info.phpt --TEST-- xslt_backend_info: examples for detection of backend features --SKIPIF-- ?php // vim600: noet sw=4 ts=4 syn=php ai si tw=78 include(skipif.inc); if(!function_exists('xslt_backend_info')) { die(skip\n); } // Yeah-right-but-still if(xslt_backend_name() != Sablotron) { die(skip This test currently only supports Sablotron); } if(No information available == xslt_backend_info()) { die(skip
[PHP-CVS] Fwd: sorry for cluttering
Sometimes the obvious, is actually obvious :-) Delivered-To: [EMAIL PROTECTED] X-Originating-IP: [212.39.78.67] From: Kostadin Atanasov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: sorry for cluttering Date: Mon, 04 Nov 2002 12:56:28 + X-OriginalArrivalTime: 04 Nov 2002 12:56:28.0652 (UTC) FILETIME=[9735E2C0:01C28401] X-SMTPD: qpsmtpd/0.11-dev, http://develooper.com/code/qpsmtpd/ Sorry for cluttering the BUG database. Initially I thought it was a PHP problem. Thank you for your prompt reply and understanding. Thanks for the great job you're doing. Best regards, Kostadin Atanasov _ MSN - More useful every day http://www.msn.de /MELVYN void wakeup() { for(unsigned int cuppajava;drink();cuppajava++); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests qa.dtd
msopacuaSun Nov 3 12:46:37 2002 EDT Modified files: /php4/ext/xslt/testsqa.dtd Log: ws Index: php4/ext/xslt/tests/qa.dtd diff -u php4/ext/xslt/tests/qa.dtd:1.1 php4/ext/xslt/tests/qa.dtd:1.2 --- php4/ext/xslt/tests/qa.dtd:1.1 Sat Oct 5 15:44:25 2002 +++ php4/ext/xslt/tests/qa.dtd Sun Nov 3 12:46:37 2002 -1,8 +1,7 -?xml version=1.0 encoding=UTF-8? -!ELEMENT qa (test+) - -!ELEMENT test (#PCDATA) -!ATTLIST test - type CDATA #IMPLIED - -!ENTITY reg#174; \ No newline at end of file +?xml version=1.0 encoding=ISO-8859-1? +!ELEMENT qa (test+) +!ELEMENT test (#PCDATA) +!ATTLIST test + type CDATA #IMPLIED + +!ENTITY reg #174; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/sysvsem/tests sysv.phpt
msopacuaSun Nov 3 21:44:09 2002 EDT Added files: /php4/ext/sysvsem/tests sysv.phpt Log: Add test for both sysvsem and sysvshm Index: php4/ext/sysvsem/tests/sysv.phpt +++ php4/ext/sysvsem/tests/sysv.phpt --TEST-- General semaphore and shared memory test --SKIP-- ?php // vim600: ts=4 sw=4 syn=php fdm=marker if(!extension_loaded('sysvsem') || !extension_loaded('sysvshm')) { die(skip Both sysvsem and sysvshm required); } ? --INI-- magic_quotes_runtime=0 --FILE-- ?php $MEMSIZE = 512; // size of shared memory to allocate $SEMKEY = 1; // Semaphore key $SHMKEY = 2; // Shared memory key echo Start.\n; // Get semaphore $sem_id = sem_get($SEMKEY, 1); if ($sem_id === FALSE) { echo Fail to get semaphore; exit; } echo Got semaphore $sem_id.\n; // Accuire semaphore if (! sem_acquire($sem_id)) { echo Fail to aquire semaphore $sem_id.\n; sem_remove($sem_id); exit; } echo Success aquire semaphore $sem_id.\n; $shm_id = shm_attach($SHMKEY, $MEMSIZE); if ($shm_id === FALSE) { echo Fail to attach shared memory.\n; sem_remove($sem_id); exit; } echo Success to attach shared memory : $shm_id.\n; // Write variable 1 if (!shm_put_var($shm_id, 1, Variable 1)) { echo Fail to put var 1 on shared memory $shm_id.\n; sem_remove($sem_id); shm_remove ($shm_id); exit; } echo Write var1 to shared memory.\n; // Write variable 2 if (!shm_put_var($shm_id, 2, Variable 2)) { echo Fail to put var 2 on shared memory $shm_id.\n; sem_remove($sem_id); shm_remove ($shm_id); exit; } echo Write var2 to shared memory.\n; // Read variable 1 $var1 = shm_get_var ($shm_id, 1); if ($var1 === FALSE) { echo Fail to retrieve Var 1 from Shared memory $shm_id, return value=$var1.\n; } else { echo Read var1=$var1.\n; } // Read variable 1 $var2 = shm_get_var ($shm_id, 2); if ($var1 === FALSE) { echo Fail to retrieve Var 2 from Shared memory $shm_id, return value=$var2.\n; } else { echo Read var2=$var2.\n; } // Release semaphore if (!sem_release($sem_id)) { echo Fail to release $sem_id semaphore.\n; } else { echo Semaphore $sem_id released.\n; } // remove shared memory segmant from SysV if (shm_remove ($shm_id)) { echo Shared memory successfully removed from SysV.\n; } else { echo Fail to remove $shm_id shared memory from SysV.\n; } // Remove semaphore if (sem_remove($sem_id)) { echo semaphore removed successfully from SysV.\n; } else { echo Fail to remove $sem_id semaphore from SysV.\n; } echo End.\n; /* NOTE: assigned semids differ depending on the kernel, since * there are actually 3 semaphores per PHP-created * semaphores in effect, to keep state information. * That's the reason for EXPECTF. */ ? --EXPECTF-- Start. Got semaphore Resource id #%i. Success aquire semaphore Resource id #%i. Success to attach shared memory : %i. Write var1 to shared memory. Write var2 to shared memory. Read var1=Variable 1. Read var2=Variable 2. Semaphore Resource id #%i released. Shared memory successfully removed from SysV. semaphore removed successfully from SysV. End. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt sablot.c
msopacuaSat Nov 2 10:01:43 2002 EDT Modified files: /php4/ext/xslt sablot.c Log: - Use spprintf to avoid two calls to zend_get_executed_filename, suggested by Marcus Börger Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.66 php4/ext/xslt/sablot.c:1.67 --- php4/ext/xslt/sablot.c:1.66 Sat Nov 2 05:58:01 2002 +++ php4/ext/xslt/sablot.c Sat Nov 2 10:01:42 2002 -19,7 +19,7 +--+ */ -/* $Id: sablot.c,v 1.66 2002/11/02 10:58:01 helly Exp $ */ +/* $Id: sablot.c,v 1.67 2002/11/02 15:01:42 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -554,8 +554,7 /* Since we have args passed, we need to set the base uri, so pull in executor globals and set the base, using the current filename, specifally for the 'arg' scheme */ - baseuri = (char *)emalloc(strlen(zend_get_executed_filename(TSRMLS_C))+7+1); - sprintf(baseuri, file://%s, zend_get_executed_filename(TSRMLS_C)); + spprintf(baseuri, 0, file://%s, +zend_get_executed_filename(TSRMLS_C)); SablotSetBaseForScheme(XSLT_PROCESSOR(handle), arg, baseuri); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_set_scheme_handlers-002.phpt xslt_set_scheme_handlers-003.phpt
msopacuaSat Nov 2 12:24:57 2002 EDT Modified files: /php4/ext/xslt/testsxslt_set_scheme_handlers-003.phpt xslt_set_scheme_handlers-002.phpt Log: Skip when Sablotron version is too old Index: php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt diff -u php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.2 php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.3 --- php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.2 Fri Nov 1 08:43:39 2002 +++ php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt Sat Nov 2 12:24:56 +2002 -1,7 +1,12 --TEST-- Core dump when returning FALSE in a handler --SKIPIF-- -?php include(skipif.inc); ? +?php +include(skipif.inc); +if(!defined(XSLT_SABOPT_FILES_TO_HANDLER)) { + die(skip Sablotron CVS 20021031 needed); +} +? --INI-- magic_quotes_runtime=0 --FILE-- Index: php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt diff -u php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt:1.1 php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt:1.2 --- php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt:1.1 Thu Oct 31 21:21:57 2002 +++ php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt Sat Nov 2 12:24:56 +2002 -1,7 +1,12 --TEST-- Override Sablotron file handler --SKIPIF-- -?php include(skipif.inc); ? +?php +include(skipif.inc); +if(!defined(XSLT_SABOPT_FILES_TO_HANDLER)) { + die(skip Sab CVS 20021031 needed); +} +? --INI-- magic_quotes_runtime=0 --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_set_scheme_handlers-003.phpt
msopacuaFri Nov 1 08:43:39 2002 EDT Modified files: /php4/ext/xslt/testsxslt_set_scheme_handlers-003.phpt Log: Fix test output Index: php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt diff -u php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.1 php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.2 --- php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt:1.1 Thu Oct 31 21:27:42 2002 +++ php4/ext/xslt/tests/xslt_set_scheme_handlers-003.phpt Fri Nov 1 08:43:39 +2002 -30,9 +30,13 /xsl:template /xsl:stylesheet'; xslt_set_scheme_handlers($xh, array('get_all' = 'handle_files_all')); -$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmlstring, '/_xsl' = $xslstring)); -echo $result; +/* This is intended to be silent! + * The result is known to be invalid, but if it doesn't core dump, the test + * has succeeded. */ +$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = +$xmlstring, '/_xsl' = $xslstring)); +echo OK; xslt_free($xh); ? --EXPECT-- -simple: PHP QA +OK + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_args.phpt
msopacuaFri Nov 1 20:13:21 2002 EDT Added files: /php4/ext/xslt/testsxslt_args.phpt Log: Test for files in 'args' provided handles Index: php4/ext/xslt/tests/xslt_args.phpt +++ php4/ext/xslt/tests/xslt_args.phpt --TEST-- Relative and absolute arg handling --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip function utf8_encode() not available); } ? --INI-- magic_quotes_runtime=0 --FILE-- ?php error_reporting(E_ALL); $xslfile = dirname(__FILE__) . '/args.xsl'; $xslsheet = implode('', file($xslfile)); $xmldata = '?xml version=1.0 encoding=ISO-8859-1?'; $xmldata .= '!DOCTYPE qa SYSTEM qa.dtd' . \n; $xmldata .=' qa test type=simpleTest has passed/test test type=complex / /qa'; $xh = xslt_create(); $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet)); print $result\n; xslt_free($xh); ? --EXPECT-- Test has passed Test has passed -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests bug20177.phpt xslt_args.phpt
msopacuaFri Nov 1 20:34:55 2002 EDT Added files: /php4/ext/xslt/testsbug20177.phpt Removed files: /php4/ext/xslt/testsxslt_args.phpt Log: test rename Index: php4/ext/xslt/tests/bug20177.phpt +++ php4/ext/xslt/tests/bug20177.phpt --TEST-- Relative and absolute arg handling --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip function utf8_encode() not available); } ? --INI-- magic_quotes_runtime=0 --FILE-- ?php error_reporting(E_ALL); $xslfile = dirname(__FILE__) . '/args.xsl'; $xslsheet = implode('', file($xslfile)); $xmldata = '?xml version=1.0 encoding=ISO-8859-1?'; $xmldata .= '!DOCTYPE qa SYSTEM qa.dtd' . \n; $xmldata .=' qa test type=simpleTest has passed/test test type=complex / /qa'; $xh = xslt_create(); $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet)); print $result\n; xslt_free($xh); ? --EXPECT-- Test has passed Test has passed -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt sablot.c
msopacuaFri Nov 1 20:44:35 2002 EDT Modified files: /php4/ext/xslt sablot.c Log: Fix typo # Sorry Lenar Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.64 php4/ext/xslt/sablot.c:1.65 --- php4/ext/xslt/sablot.c:1.64 Fri Nov 1 20:32:08 2002 +++ php4/ext/xslt/sablot.c Fri Nov 1 20:44:34 2002 @@ -14,12 +14,12 @@ +--+ | Authors: Sterling Hughes [EMAIL PROTECTED] | | David Viner [EMAIL PROTECTED]| - | Lehnar Lohmus [EMAIL PROTECTED]| + | Lenar Lohmus [EMAIL PROTECTED] | | Melvyn Sopacua [EMAIL PROTECTED] | +--+ */ -/* $Id: sablot.c,v 1.64 2002/11/02 01:32:08 msopacua Exp $ */ +/* $Id: sablot.c,v 1.65 2002/11/02 01:44:34 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_getopt.phpt
msopacuaThu Oct 31 16:09:04 2002 EDT Added files: /php4/ext/xslt/testsxslt_getopt.phpt Log: Add test for xslt_getopt # see next commit Index: php4/ext/xslt/tests/xslt_getopt.phpt +++ php4/ext/xslt/tests/xslt_getopt.phpt --TEST-- xslt_getopt function and public entities --SKIPIF-- ?php include(skipif.inc); if(!function_exists('xslt_getopt')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xh = xslt_create(); xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES); if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES) print(OK\n); else var_dump(xslt_getopt($xh)); xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META); if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META) print(OK\n); else var_dump(xslt_getopt($xh)); xslt_setopt($xh, xslt_getopt($xh) | XSLT_OPT_SILENT); if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META | XSLT_OPT_SILENT) print(OK\n); else var_dump(xslt_getopt($xh)); xslt_free($xh); ? --EXPECT-- OK OK OK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_setopt.phpt
msopacuaThu Oct 31 16:11:56 2002 EDT Modified files: /php4/ext/xslt/testsxslt_setopt.phpt Log: Fix typo Index: php4/ext/xslt/tests/xslt_setopt.phpt diff -u php4/ext/xslt/tests/xslt_setopt.phpt:1.2 php4/ext/xslt/tests/xslt_setopt.phpt:1.3 --- php4/ext/xslt/tests/xslt_setopt.phpt:1.2Tue Oct 29 16:57:50 2002 +++ php4/ext/xslt/tests/xslt_setopt.phptThu Oct 31 16:11:56 2002 -1,5 +1,5 --TEST-- -xslt_set_opt function and public entities +xslt_setopt function and public entities --SKIPIF-- ?php include(skipif.inc); -57,4 +57,4 pPHP QA®/p /body /html - \ 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: php4 /ext/xslt sablot.c
msopacuaThu Oct 31 21:05:36 2002 EDT Modified files: /php4/ext/xslt sablot.c Log: - Fix registration of XSLT_SABOPT_FILES_TO_HANDLER Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.61 php4/ext/xslt/sablot.c:1.62 --- php4/ext/xslt/sablot.c:1.61 Thu Oct 31 16:21:00 2002 +++ php4/ext/xslt/sablot.c Thu Oct 31 21:05:35 2002 -16,7 +16,7 +--+ */ -/* $Id: sablot.c,v 1.61 2002/10/31 21:21:00 msopacua Exp $ */ +/* $Id: sablot.c,v 1.62 2002/11/01 02:05:35 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -170,7 +170,9 REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_ADDING_META, SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(XSLT_SABOPT_IGNORE_DOC_NOT_FOUND, SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT); -#ifdef SAB_FILES_TO_HANDLER +/* hack: implemented at the same time, so should work. + Otherwise we need to check the enum type of SablotFlag in sablot.h */ +#ifdef HAVE_SABLOT_GET_OPTIONS REGISTER_LONG_CONSTANT(XSLT_SABOPT_FILES_TO_HANDLER, SAB_FILES_TO_HANDLER, CONST_CS | CONST_PERSISTENT); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_set_scheme_handlers-002.phpt
msopacuaThu Oct 31 21:21:57 2002 EDT Added files: /php4/ext/xslt/testsxslt_set_scheme_handlers-002.phpt Log: Testcase for new Sablotron option Index: php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt +++ php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt --TEST-- Override Sablotron file handler --SKIPIF-- ?php include(skipif.inc); ? --INI-- magic_quotes_runtime=0 --FILE-- ?php function handle_files_all($xh, $proto, $rest_uri) { $error = Cannot resolve $proto:$rest_uri on handle $xh; if($proto != 'file') return $error; $rest_uri = substr($rest_uri, 2); // strip protocol separators // if(substr($rest_uri, 0, 1) == '/') { return (file_exists($rest_uri)) ? implode('', file($rest_uri)) : $error; } else { $f = dirname(__FILE__) . '/' . $rest_uri; return (file_exists($f)) ? implode('', file($f)) : $error; } } $xh = xslt_create(); xslt_setopt($xh, XSLT_SABOPT_FILES_TO_HANDLER); $xmlstring='?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE qa SYSTEM file://qa.dtd qa test type=simplePHP QA/test /qa'; $xslstring='?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=text omit-xml-declaration=yes encoding=ISO-8859-1 / xsl:param name=insertionTest failed/xsl:param xsl:template match=/qa xsl:apply-templates select=test / /xsl:template xsl:template match=test xsl:value-of select=concat(type, \': \', .) / /xsl:template /xsl:stylesheet'; xslt_set_scheme_handlers($xh, array('get_all' = 'handle_files_all')); $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmlstring, '/_xsl' = $xslstring)); echo $result; xslt_free($xh); ? --EXPECT-- simple: PHP QA -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/xslt/tests xslt_process-001.phpt xslt_set_object.phpt xslt_setopt.phpt
At 22:57 29-10-2002, Marcus Börger wrote: --use var_dump() Why? Please Marcus - discuss with the person who developed the test before altering it's behavior. What's the positive side of using var_dump? Here are the negatives: -- iconv could be unsupported (which was on my list of things to fix for this and other tests) If the entity fails, it fails in both cases and so the meta test succeeds but, just because a character misses the test fails for no good reason. -- indenting is something being discussed on the Sablist and so may change and can be platform specific. However indenting is handled, it will be handled consistently for a platform. IMO comparison is the way to do it here, not var_dump. Let's here the positives? Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /build buildcheck.sh
On Wed, 30 Oct 2002, Andi Gutmans wrote: Right, and if you try it with 1.28 it'll work. Also works with bison 1.75. Andi At 05:59 PM 10/30/2002 +0100, Marcus Boerger wrote: [marcuszaphod xslt]$ php -r 'function getFrontendObject() { $a = new $GLOBALS['_PEAR_Command_uiclass']; } ' Command line code(4) : Fatal error - Can't use method return value in write context -- With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/xslt/tests xslt_process-001.phpt xslt_set_object.phpt xslt_setopt.phpt
On Wed, 30 Oct 2002, Marcus Boerger wrote: At 11:38 30.10.2002, Melvyn Sopacua wrote: At 22:57 29-10-2002, Marcus Börger wrote: --use var_dump() Why? Please Marcus - discuss with the person who developed the test before altering it's behavior. What's the positive side of using var_dump? I saw no need in first comparing results and then compare the result of the compare again in run-test.php. The far better way seems to present the output and compare the expected output in run-test.php. The reason i did was that i was wondering what i would do when i got any .diff .out from a user for whom the test faild? I would receive somthing like unexpected result. Wow that would be a good help in finding the bug. Ok - good point. Here are the negatives: -- iconv could be unsupported (which was on my list of things to fix for this and other tests) If the entity fails, it fails in both cases and so the meta test succeeds but, just because a character misses the test fails for no good reason. We can rewrite the test so it becomes independant from iconv. I'm looking into some stuff, to get this done in the best way. I think I'll change sablot.c to reflect if --with-iconv-dir was given and provide the information xslt_sab_libs() (same for js). The main reason, is not this test by the way - but in a hosting environment, it may also be very convenient, to know if you have iconv recoding available in Sablotron, and js support and what the expat version is. It may also be possible to get this via the Sablotron library. Anyhow - it depends what can be done in which timeframe. -- indenting is something being discussed on the Sablist and so may change and can be platform specific. However indenting is handled, it will be handled consistently for a platform. If above is reason enough to display the full result we could use --EXPECTREGEX-- und skip over any whitespace. But your original compare would be much easier. Perhaps use your compare and var_dump on failure? That's the best compromise I think. -- With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] Some NetWare files are not getting committed.
At 15:49 28-10-2002, Ananth Kesari wrote: But I need to add a folder by name, netware with some NetWare specific files within it. These are NOT getting committed. If I add it gets added. I once committed on Thursday. Now, if I commit, it verifies and does nothing indicating that it is already committed. But if I check-out the 4.2 project, I do not get the netware folder. Can anyone tell me what's wrong? I am a beginner to this CVS process and so I may be missing something even simple or obvious. Since you probably have update -d -P in your ~/.cvsrc like you should, the directory won't show up, untill you commit files in them. Remove the -P option from your ~/.cvsrc directory temporarily to get the netware directory back. -P means prune, which deletes empty dirs -d means create new directory that's cause the conflict. HTH With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv/tests
At 18:15 28-10-2002, Marcus Börger wrote: Log: fix this tests -they did not dl load module in test Yes, exactly as they shouldn't. It's been discussed. Why did you revert that? The main reason - to repeat it: ./configure --prefix=/previous/install dl('foo.so')= foo.so version is previous install, not current! Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/iconv/tests
At 19:36 28-10-2002, Marcus Börger wrote: Then what about: cvs -z3 -q diff skipif.inc test.inc (in directory S:\php4-HEAD\ext\iconv\tests\) Index: skipif.inc === RCS file: /repository/php4/ext/iconv/tests/skipif.inc,v retrieving revision 1.2 diff -u -r1.2 skipif.inc --- skipif.inc 28 Oct 2002 17:15:21 - 1.2 +++ skipif.inc 28 Oct 2002 18:35:25 - -1,10 +1,11 ?php // This script prints skip if condition does not meet. -if (!extension_loaded(iconv) ini_get(enable_dl)) { - $dlext = (substr(PHP_OS, 0, 3) == WIN) ? .dll : .so; - dl(iconv$dlext); -} +// Do not dl load extension +//if (!extension_loaded(iconv) ini_get(enable_dl)) { +// $dlext = (substr(PHP_OS, 0, 3) == WIN) ? .dll : .so; +// dl(iconv$dlext); +//} if (!extension_loaded(iconv)) { die(skip iconv extension not available\n); } Yeah, that's what it should be, when we decide to strike the dl() for lack of a foolproof alternative. The problem is twofold: loading the right filename (so/dll/foo) and loading the right VERSION, ie the one just built in $source_root/modules or $source_root/(RELEASE_TS|DEBUG_TS). We could of course look for getenv('DL_LOAD_DIR') and getenv('DL_EXT'), and document this properly, so the user is able to test his shared modules. Food time :) Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities03.phpt
msopacuaSun Oct 27 12:01:48 2002 EDT Modified files: /php4/ext/standard/tests/stringshtmlentities03.phpt Log: Add FreeBSD locale Index: php4/ext/standard/tests/strings/htmlentities03.phpt diff -u php4/ext/standard/tests/strings/htmlentities03.phpt:1.2 php4/ext/standard/tests/strings/htmlentities03.phpt:1.3 --- php4/ext/standard/tests/strings/htmlentities03.phpt:1.2 Sat Oct 26 12:09:50 2002 +++ php4/ext/standard/tests/strings/htmlentities03.phpt Sun Oct 27 12:01:48 2002 -1,12 +1,12 --TEST-- htmlentities() test 3 (setlocale / de_DE.ISO-8859-1) --SKIPIF-- -?php setlocale(LC_CTYPE, de_DE.ISO-8859-1) or die(skip setlocale() failed\n); ? +?php setlocale(LC_CTYPE, de_DE.ISO-8859-1, de_DE.ISO8859-1) or die(skip +setlocale() failed\n); ? --INI-- mbstring.internal_encoding=pass --FILE-- ?php - setlocale( LC_CTYPE, de_DE.ISO-8859-1 ); + setlocale( LC_CTYPE, de_DE.ISO-8859-1, de_DE.ISO8859-1); var_dump(htmlentities(\xe4\xf6\xfc, ENT_QUOTES, '')); ? --EXPECT-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities02.phpt htmlentities04.phpt
msopacuaSun Oct 27 12:07:26 2002 EDT Modified files: /php4/ext/standard/tests/stringshtmlentities04.phpt htmlentities02.phpt Log: Add FreeBSD locale Index: php4/ext/standard/tests/strings/htmlentities04.phpt diff -u php4/ext/standard/tests/strings/htmlentities04.phpt:1.2 php4/ext/standard/tests/strings/htmlentities04.phpt:1.3 --- php4/ext/standard/tests/strings/htmlentities04.phpt:1.2 Sat Oct 26 12:09:50 2002 +++ php4/ext/standard/tests/strings/htmlentities04.phpt Sun Oct 27 12:07:26 2002 -1,12 +1,12 --TEST-- htmlentities() test 4 (setlocale / ja_JP.EUC-JP) --SKIPIF-- -?php setlocale(LC_CTYPE, ja_JP.EUC-JP) or die(skip setlocale() failed\n); ? +?php setlocale(LC_CTYPE, ja_JP.EUC-JP, ja_JP.eucJP) or die(skip setlocale() +failed\n); ? --INI-- mbstring.internal_encoding=pass --FILE-- ?php - setlocale( LC_CTYPE, ja_JP.EUC-JP ); + setlocale( LC_CTYPE, ja_JP.EUC-JP, ja_JP.eucJP ); var_dump(htmlentities(\xa1\xa2\xa1\xa3\xa1\xa4, ENT_QUOTES, '')); ? --EXPECT-- Index: php4/ext/standard/tests/strings/htmlentities02.phpt diff -u php4/ext/standard/tests/strings/htmlentities02.phpt:1.2 php4/ext/standard/tests/strings/htmlentities02.phpt:1.3 --- php4/ext/standard/tests/strings/htmlentities02.phpt:1.2 Sat Oct 26 12:09:50 2002 +++ php4/ext/standard/tests/strings/htmlentities02.phpt Sun Oct 27 12:07:26 2002 -1,12 +1,12 --TEST-- htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) --SKIPIF-- -?php setlocale(LC_CTYPE, fr_FR.ISO-8859-15) or die(skip setlocale() failed\n); ? +?php setlocale(LC_CTYPE, fr_FR.ISO-8859-15, fr_FR.ISO8859-15) or die(skip +setlocale() failed\n); ? --INI-- mbstring.internal_encoding=pass --FILE-- ?php - setlocale( LC_CTYPE, fr_FR.ISO-8859-15 ); + setlocale( LC_CTYPE, fr_FR.ISO-8859-15, fr_FR.ISO8859-15 ); var_dump(htmlentities(\xbc\xbd\xbe, ENT_QUOTES, '')); ? --EXPECT-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /build buildcheck.sh
At 20:47 27-10-2002, Jani Taskinen wrote: sniper Sun Oct 27 14:47:34 2002 EDT Modified files: /php4/build buildcheck.sh Log: We have to require bison version = 1.30 = 1.75 since any versions between are broken.. 1.33/4/5 work for me...are you sure? Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings bug20108.phpt
msopacuaSat Oct 26 16:07:26 2002 EDT Added files: /php4/ext/standard/tests/stringsbug20108.phpt Log: Test for bug in sprintf # Doesn't segfault for me, but gives a lot of garbage, so I really don't # know what the output should be. Results posted to QA Index: php4/ext/standard/tests/strings/bug20108.phpt +++ php4/ext/standard/tests/strings/bug20108.phpt --TEST-- Segfault on prinft statement Bug #20108 --SKIPIF-- --FILE-- ?php $a = boo; printf(%580.58s\n, $a); ? --EXPECT-- I have no idea yet :) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] Re: [PHP-QA] Re: [PHP-CVS] cvs: php4 /ext/standard file.c /ext/standard/tests/strings strtoupper.phpt
At 01:30 25-10-2002, Ilia A. wrote: Could you please try the attached patch and let me know if it fixes the problem. Confirmed. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt
msopacuaFri Oct 25 15:13:33 2002 EDT Removed files: /php4/ext/xslt/tests001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt 009.phpt Log: test renaming -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests bug17791.phpt bug17931.phpt skipif.inc xslt-001.phpt xslt.phpt xslt_process-001.phpt xslt_process-002.phpt xslt_set_object.phpt xslt_set_scheme_handlers-001.phpt xslt_setopt.phpt
msopacuaFri Oct 25 15:17:15 2002 EDT Added files: /php4/ext/xslt/testsxslt-001.phpt xslt_process-001.phpt xslt_process-002.phpt xslt_set_object.phpt xslt_set_scheme_handlers-001.phpt xslt_setopt.phpt bug17791.phpt bug17931.phpt xslt.phpt Modified files: /php4/ext/xslt/testsskipif.inc Log: Tests renamed Remove dl() from skipif, for potential problems accross platforms and versions. Index: php4/ext/xslt/tests/skipif.inc diff -u php4/ext/xslt/tests/skipif.inc:1.1 php4/ext/xslt/tests/skipif.inc:1.2 --- php4/ext/xslt/tests/skipif.inc:1.1 Fri Oct 4 07:41:33 2002 +++ php4/ext/xslt/tests/skipif.inc Fri Oct 25 15:17:15 2002 -1,8 +1,4 ?php -if(!extension_loaded(xslt) ini_get(enable_dl)) { - $dlext = (substr(PHP_OS, 0, 4) == WIN) ? .dll : .so; - dl(xlst$dlext); -} if(!extension_loaded(xslt)) { die(skip\n); } Index: php4/ext/xslt/tests/xslt-001.phpt +++ php4/ext/xslt/tests/xslt-001.phpt --TEST-- Memoryleak in error printing --SKIPIF-- ?php include(skipif.inc); ? --INI-- error_reporting=2047 display_errors=0 track_errors=1 --FILE-- ?php $xmlfile = 'ext/xslt/tests/non-existent.xml'; $xslfile = 'ext/xslt/tests/non-existent.xsl'; $xh = xslt_create(); $result = xslt_process($xh, $xmlfile, $xslfile, NULL); xslt_free($xh); echo $php_errormsg.\n; ? --EXPECTF-- Sablotron error on line none: cannot open file '%s/ext/xslt/tests/non-existent.xsl' Index: php4/ext/xslt/tests/xslt_process-001.phpt +++ php4/ext/xslt/tests/xslt_process-001.phpt --TEST-- Various ways to provide xml and xslt arguments and params --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/test.xml'; $xslfile = 'ext/xslt/tests/args.xsl'; $xmldata = implode('', file($xmlfile)); $xslsheet = implode('', file($xslfile)); $xh = xslt_create(); $result = xslt_process($xh, $xmlfile, $xslfile); print $result\n; $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata)); print $result\n; $result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = $xslsheet)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet)); print $result\n; // The same, with params $xslfile = 'ext/xslt/tests/param.xsl'; $xslsheet = implode('', file($xslfile)); $params = array(Test has passed, PHP QA®); foreach($params AS $val) { $val = utf8_encode($val); $result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' = $val)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata), array('insertion' = $val)); print $result\n; $result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = $xslsheet), array('insertion' = $val)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet), array('insertion' = $val)); print $result\n; } xslt_free($xh); ? --EXPECT-- Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed PHP QA® PHP QA® PHP QA® PHP QA® Index: php4/ext/xslt/tests/xslt_process-002.phpt +++ php4/ext/xslt/tests/xslt_process-002.phpt --TEST-- Crash xslt_process with reused handler (this test may take a while) --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/test.xml'; $xslfile = 'ext/xslt/tests/param.xsl'; $xmldata = implode('', file($xmlfile)); $xslsheet = implode('', file($xslfile)); /* * Tested on a Cyrix 200MMX/128MB took 2 secs. Should be a reasonable margin. * * It's not meant as an actual speed test, but if it's slower than this, * there must be something significantly off in the php/sablot/expat trio. * Emulation OS's come to mind... */ $want_time = 6; function make_param() { $ret_val = ''; $numchars = mt_rand(2,16); $illegal = array(0,256,512); for($i=0;$i$numchars;$i++) { $char=0; while(in_array($char, $illegal)) { $char .= mt_rand(32, 512); } $ret_val .= chr($char); } return utf8_encode($ret_val); } function decode($string) { $ret_val = ''; for($i=0; $istrlen($string);$i++) { $ret_val .= ord(substr($string,$i,1)) . ; } return $ret_val; } $xh = xslt_create(); $t1 = time(); for ($i=0; $i50; $i++) { $val = make_param(); $result = xslt_process($xh, $xmlfile, $xslfile, NULL,
[PHP-CVS] cvs: php4 /ext/xslt php_sablot.h sablot.c
msopacuaFri Oct 25 15:23:14 2002 EDT Modified files: /php4/ext/xslt php_sablot.h sablot.c Log: - Add XSLT_REG_ERRMSG macro to register an error on the handle - Rename constants to a bit more appropreate format - Add XSLT_ERR_UNSUPPORTED_SCHEME to be returned for scheme handlers. # Docs on xslt_set_scheme_handlers are in progress. Index: php4/ext/xslt/php_sablot.h diff -u php4/ext/xslt/php_sablot.h:1.14 php4/ext/xslt/php_sablot.h:1.15 --- php4/ext/xslt/php_sablot.h:1.14 Tue Oct 15 12:41:38 2002 +++ php4/ext/xslt/php_sablot.h Fri Oct 25 15:23:13 2002 -48,6 +48,8 #define XSLT_LOG(handle) ((handle)-err-log) #define XSLT_FUNCH_FREE(__var) if (__var) zval_ptr_dtor((__var)); +#define XSLT_REG_ERRMSG(msg, handle) if (XSLT_ERRSTR(handle)) +efree(XSLT_ERRSTR(handle)); \ + XSLT_ERRSTR(handle) = estrdup(msg); PHP_MINIT_FUNCTION(xslt); PHP_MINFO_FUNCTION(xslt); Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.58 php4/ext/xslt/sablot.c:1.59 --- php4/ext/xslt/sablot.c:1.58 Tue Oct 15 12:41:38 2002 +++ php4/ext/xslt/sablot.c Fri Oct 25 15:23:13 2002 -16,7 +16,7 +--+ */ -/* $Id: sablot.c,v 1.58 2002/10/15 16:41:38 sterling Exp $ */ +/* $Id: sablot.c,v 1.59 2002/10/25 19:23:13 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -158,13 +158,15 le_xslt = zend_register_list_destructors_ex(free_processor, NULL, le_xslt_name, module_number); /* Generic options, which can apply to 'all' xslt processors */ - REGISTER_LONG_CONSTANT(XSLT_SILENT, SAB_NO_ERROR_REPORTING, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_OPT_SILENT, SAB_NO_ERROR_REPORTING, CONST_CS | +CONST_PERSISTENT); + /* Error constants, which are useful in userspace. */ + REGISTER_LONG_CONSTANT(XSLT_ERR_UNSUPPORTED_SCHEME, +SH_ERR_UNSUPPORTED_SCHEME, CONST_CS | CONST_PERSISTENT); /* Sablotron specific options */ - REGISTER_LONG_CONSTANT(XSLT_SAB_PARSE_PUBLIC_ENTITIES, SAB_PARSE_PUBLIC_ENTITIES, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_ADDING_META, SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(XSLT_SAB_IGNORE_DOC_NOT_FOUND, SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SABOPT_PARSE_PUBLIC_ENTITIES, +SAB_PARSE_PUBLIC_ENTITIES, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_ADDING_META, +SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, +CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SABOPT_IGNORE_DOC_NOT_FOUND, +SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT); return SUCCESS; } -1534,10 +1536,7 if (level == MH_LEVEL_WARN || level == MH_LEVEL_ERROR || level == MH_LEVEL_CRITICAL) { - if (XSLT_ERRSTR(handle)) - efree(XSLT_ERRSTR(handle)); - - XSLT_ERRSTR(handle) = estrdup(errmsg); + XSLT_REG_ERRMSG(errmsg, handle); } /* If we haven't allocated and opened the file yet */ -1722,13 +1721,7 msgbuf = emalloc((sizeof(msgformat) - 4) + strlen(errmsg) + strlen(errline) + 1); sprintf(msgbuf, msgformat, errline, errmsg); - /* If an old message exists, remove it - leak */ - if (XSLT_ERRSTR(handle)) - efree(XSLT_ERRSTR(handle)); - - /* Copy the error message onto the handle for use when - the xslt_error function is called */ - XSLT_ERRSTR(handle) = estrdup(errmsg); + XSLT_REG_ERRMSG(errmsg, handle); /* Output a warning */ php_error(E_WARNING, msgbuf); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / run-tests.php
At 21:27 25-10-2002, Marcus Börger wrote: It should not break any test...please send a list of those failed. ext/xslt/xslt-001.phpt (used to be 009.phpt). log_errors=1 on cli, is /dev/stderr. Ilia: Could you take a look at the message I sent regarding your fix of that test? There are other problems with memory leaks (display_memleak and --disable-debug), so I'm enclined to drop this test - the format of the error message is not important and not what we we're testing. I've wrapped the procedure that caused the memleak in the first place into a macro, and used that. Any future places this should occur, we'll use the macro. marcus At 19:24 25.10.2002, Ilia Alshanetsky wrote: iliaa Fri Oct 25 13:24:10 2002 EDT Modified files: /php4 run-tests.php Log: The log_errors=1 breaks a number of tests and is useless for our purposes, removing. Index: php4/run-tests.php diff -u php4/run-tests.php:1.89 php4/run-tests.php:1.90 --- php4/run-tests.php:1.89 Thu Oct 24 14:14:39 2002 +++ php4/run-tests.php Fri Oct 25 13:24:09 2002 -484,7 +484,7 -d 'disable_functions=', -d 'error_reporting=2047', -d 'display_errors=0', - -d 'log_errors=1', + -d 'log_errors=0', -d 'html_errors=0', -d 'docref_root=/phpmanual/', -d 'docref_ext=.html', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / README.TESTING
At 01:26 24-10-2002, Marcus Börger wrote: Shouldn't we allow - in %i, too? I would like the following: %i = [+\-]?[0-9]+ %d = [0-9]+ %f = [+\-]?\.?[0-9]+\.?[0-9]* +1 on that. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / run-tests.php
Ah - now I get why posting to QA gives me 'cc: command not found'. Any objections to using getenv('CC') and default to 'cc' when undefined? I for one don't have cc in my path and have set the CC=gcc in my profile, further more 'cc' may not be the compiler used. At 10:51 23-10-2002, Jan Lehnardt wrote: jan Wed Oct 23 04:51:18 2002 EDT Modified files: /php4 run-tests.php Log: - be more verbose Index: php4/run-tests.php diff -u php4/run-tests.php:1.81 php4/run-tests.php:1.82 --- php4/run-tests.php:1.81 Tue Oct 22 14:53:56 2002 +++ php4/run-tests.php Wed Oct 23 04:51:17 2002 -270,7 +270,7 $failed_tests_data .= Autoconf:\n. shell_exec('autoconf --version'). \n; $failed_tests_data .= Libtool:\n. shell_exec('libtool --version'). \n; $failed_tests_data .= Bison:\n. shell_exec('bison --version'). \n; - $failed_tests_data .= Compiler:\n. shell_exec('cc --version'). \n; + $failed_tests_data .= Compiler:\n. shell_exec('cc -v'). \n; $failed_tests_data .= \n\n; foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $test_info) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests 003.phpt xslt_set_error_handler.php
msopacuaWed Oct 23 15:52:25 2002 EDT Removed files: /php4/ext/xslt/testsxslt_set_error_handler.php Modified files: /php4/ext/xslt/tests003.phpt Log: Make it work without .php files Index: php4/ext/xslt/tests/003.phpt diff -u php4/ext/xslt/tests/003.phpt:1.1 php4/ext/xslt/tests/003.phpt:1.2 --- php4/ext/xslt/tests/003.phpt:1.1Fri Oct 4 07:41:33 2002 +++ php4/ext/xslt/tests/003.phptWed Oct 23 15:52:25 2002 -4,7 +4,29 ?php include(skipif.inc); ? --FILE-- ?php -include('xslt_set_error_handler.php'); +class xsl { + + function xsl() { + $this-_parser = xslt_create(); + } + + function set_error() { + xslt_set_error_handler($this-_parser, array($this, +'xslt_trap_error')); + echo OK; + } + + function xslt_trap_error($parser, $errorno, $level, $fields) { + return TRUE; + } + function clean() { + xslt_free($this-_parser); + } +} + +$x = new xsl; +// work-around for possible '$this does not exist' bug in constructor +$x-set_error(); +$x-clean(); ? --EXPECT-- OK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / README.TESTING
msopacuaWed Oct 23 16:56:09 2002 EDT Modified files: /php4 README.TESTING Log: Some english fixes Added docs for automated testing. Now telling the current version of the truth about ini settings :) Be more verbose about QA goals intentions and the tester's part in the process. Index: php4/README.TESTING diff -u php4/README.TESTING:1.7 php4/README.TESTING:1.8 --- php4/README.TESTING:1.7 Wed Oct 23 08:59:18 2002 +++ php4/README.TESTING Wed Oct 23 16:56:09 2002 -14,10 +14,11 make test make test basically executes run-tests.php script -under source root. Therefore you can execute the script -as follows +under the source root (parallel builds will not work). Therefore you +can execute the script as follows: -./sapi/cli/php -c /path/to/php.ini/ run-tests.php [ext/some_extension_name] +TEST_PHP_EXECUTABLE=sapi/cli/php \ +sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB] [Which php executable make test look for] -37,38 +38,39 [Which php.ini is used] --- - make test force to use php.ini-dist as default config file. If -you would like to test with other configuration file, user -run-tests.php script. - -Example: -./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/standard - -If you use php.ini other than php.ini-dist, you may see more failed -tests. + make test uses the same php.ini file as it would once installed. +The tests have been written to be independant of that php.ini file, +so if you find a test that is affected by a setting, please report +this, so we can address the issue. [Which test scripts are executed] - - run-tests.php (make test) executes all test scripts by default -by looking all directory named tests. If there are files have phpt -extension, run-tests.php takes test php code from the file and -executes it. + run-tests.php (make test), without any arguments executes all +test scripts by looking extracting all directories named tests +from the source root and any subdirectories below. If there are files, +which have a phpt extension, run-tests.php looks at the sections +in these files, determines whether it should run it, by evaluating +the 'SKIP' section. If the test is elligable for execution, the 'FILE' +section is extracted into a .php file, with a unique name and +executed. +When an argument is given or TESTS environment variable is set, the +GLOB is expanded by the shell and any file with extension *.phpt is +regarded as a testfile. Tester can easily execute tests selectively with as follows. Examples: -./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring -./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring/020.phpt +./sapi/cli/php run-tests.php ext/mbstring/* +./sapi/cli/php run-tests.php ext/mbstring/020.phpt [Test results] -- Test results are printed to standard output. If there is a failed test, -run-tests.php script saves the result, expected result and code -executed to the test script directory. For example, if -ext/myext/tests/myext.phpt is failed to pass, following files are -created: +the run-tests.php script saves the result, the expected result and the +code executed to the test script directory. For example, if +ext/myext/tests/myext.phpt fails to pass, the following files are created: ext/myext/tests/myext.php - actual testfile executed ext/myext/tests/myext.log - log of test execution (L) -76,7 +78,13 ext/myext/tests/myext.out - output from test script (O) ext/myext/tests/myext.diff - diff of .out and .exp (D) - Tester can verify these files, if failed test is actually a bug or not. + Failed tests are always bugs. Either the test is bugged or not considering +factors applying to the tester's environment, or there is a bug in PHP. +If this is a known bug, we strive to provide bugnumbers, in either the +test name or the file name. You can check the status of such a bug, by +going to: http://bugs.php.net/12345 where 12345 is the bugnumber. +For clarity and automated processing, bugnumbers are prefixed by a hash +sign '#' in testnames and/or testcases are named bug12345.phpt. NOTE: The files generated by tests can be selected by setting the environment variable TEST_PHP_LOG_FORMAT. For each file you want to be -85,6 +93,21 NOTE: You can set environment variable TEST_PHP_DETAILED to enable detailed test information. + +[Automated testing] + If you like to keep up to speed, with latest developments and quality +assurance, setting the environment variable NO_INTERACTION to 1, will not +prompt the tester for any user input. + +Normally, the exit status of make test is zero, regardless of the results +of independant tests. Set the environment variable REPORT_EXIT_STATUS to 1, +to make make test' set the exit statis ($?) to non-zero, when a test has +failed. + +NOTE: the exit status of run-tests.php will be 1 when +REPORT_EXIT_STATUS is
[PHP-CVS] cvs: php4 / README.TESTING
msopacuaWed Oct 23 17:15:08 2002 EDT Modified files: /php4 README.TESTING Log: statis-status clarity on the exit status Index: php4/README.TESTING diff -u php4/README.TESTING:1.8 php4/README.TESTING:1.9 --- php4/README.TESTING:1.8 Wed Oct 23 16:56:09 2002 +++ php4/README.TESTING Wed Oct 23 17:15:08 2002 -101,8 +101,8 Normally, the exit status of make test is zero, regardless of the results of independant tests. Set the environment variable REPORT_EXIT_STATUS to 1, -to make make test' set the exit statis ($?) to non-zero, when a test has -failed. +and make test will set the exit status ($?) to non-zero, when an +individual test has failed. NOTE: the exit status of run-tests.php will be 1 when REPORT_EXIT_STATUS is set. The result of make test may be higher -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard/tests/strings strtoupper.phpt
Typo indeed. At 23:07 23-10-2002, Ilia A. wrote: I will have that test working correctly momentarily. As it stands that test would only work if a locale supporting the used characters is exported. ??? I'd like to see that one. Not sure what you mean now. Ilia On October 23, 2002 05:04 pm, Moriyoshi Koizumi wrote: Hi, The first letter in $chars appears to be a small a with a grave accent in my linux box. Is this a typo for a small a with a two-dot umlaut sign, or the test is supposed to fail? Moriyoshi Melvyn Sopacua [EMAIL PROTECTED] wrote: msopacuaTue Oct 22 15:39:17 2002 EDT Added files: /php4/ext/standard/tests/stringsstrtoupper.phpt Log: test for locale support in strtoupper Index: php4/ext/standard/tests/strings/strtoupper.phpt +++ php4/ext/standard/tests/strings/strtoupper.phpt --TEST-- Test strtoupper on non-ASCII characters --POST-- --GET-- --FILE-- ?php $chars = àé ; setlocale(LC_ALL, C); // Not sure which is most portable. BSD's answer to // this one. A small array based on PHP_OS should // cover a majority of systems and makes the problem // of locales transparent for the end user. setlocale(LC_CTYPE, ISO8859-1); print(strtoupper($chars)); ? --EXPECT-- É -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / README.TESTING
msopacuaWed Oct 23 17:32:09 2002 EDT Modified files: /php4 README.TESTING Log: Provide an example cron script, to invite people to test. Index: php4/README.TESTING diff -u php4/README.TESTING:1.10 php4/README.TESTING:1.11 --- php4/README.TESTING:1.10Wed Oct 23 17:21:07 2002 +++ php4/README.TESTING Wed Oct 23 17:32:09 2002 @@ -104,6 +104,34 @@ and make test will set the exit status ($?) to non-zero, when an individual test has failed. +Example script to be run by cron(1): +== qa-test.sh = +#!/bin/sh + +CO_DIR=$HOME/cvs/php4 [EMAIL PROTECTED] +TMPDIR=/var/tmp +TODAY=`date +%Y%m%d` + +# Make sure compilation enviroment is correct +CONFIGURE_OPTS='--disable-all --enable-cli --with-pcre' +export MAKE=gmake +export CC=gcc + +# Set test environment +export NO_INTERACTIVITY=1 +export REPORT_EXIT_STATUS=1 + +cd $CO_DIR +cvs update . $TMPDIR/phpqatest.$TODAY +./cvsclean ; ./buildconf ; ./configure $CONFIGURE_OPTS ; $MAKE +$MAKE test $TMPDIR/phpqatest.$TODAY 21 +if test $? -gt 0 +then +cat $TMPDIR/phpqatest.$TODAY | mail -sPHP-QA Test Failed for $TODAY $MYMAIL +fi +== end of qa-test.sh = + NOTE: the exit status of run-tests.php will be 1 when REPORT_EXIT_STATUS is set. The result of make test may be higher than that. At present, gmake 3.79.1 returns 2, so it is -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests 009.phpt
msopacuaWed Oct 23 18:21:39 2002 EDT Modified files: /php4/ext/xslt/tests009.phpt Log: suddenly, there was a newline Index: php4/ext/xslt/tests/009.phpt diff -u php4/ext/xslt/tests/009.phpt:1.2 php4/ext/xslt/tests/009.phpt:1.3 --- php4/ext/xslt/tests/009.phpt:1.2Tue Oct 22 13:38:12 2002 +++ php4/ext/xslt/tests/009.phptWed Oct 23 18:21:39 2002 -14,4 +14,5 ? --EXPECTF-- Warning: Sablotron error on line none: cannot open file '%s/ext/xslt/tests/non-existent.xsl' in %s/ext/xslt/tests/009.%s on line %i + %sext/xslt/tests/009.%s(%i) : Warning - Sablotron error on line none: cannot open file '%sext/xslt/tests/non-existent.xsl' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / run-tests.php
Good call on \s, but what's with the \$ ? Haven't used ereg functions in ages, but why should the $ be escaped? If this is mandatory, we should update the examples at: http://www.php.net/manual/en/ref.regex.php At 10:23 10/21/2002 +, Moriyoshi Koizumi wrote: moriyoshi Mon Oct 21 06:23:31 2002 EDT Modified files: /php4 run-tests.php Log: Fixed typo. Index: php4/run-tests.php diff -u php4/run-tests.php:1.78 php4/run-tests.php:1.79 --- php4/run-tests.php:1.78 Mon Oct 21 06:22:41 2002 +++ php4/run-tests.php Mon Oct 21 06:23:31 2002 -435,7 +435,7 unlink($tmp_skipif); if (ereg(^skip, trim($output))){ echo SKIP $tested; - $reason = (ereg(^skip[[:space:]]*(.+)\$, trim($output))) ? ereg_replace(^^skip[[:space:]]*(.+)\$, \\1, trim($output)) : FALSE; + $reason = (ereg(^skip[[:space:]]*(.+)\$, trim($output))) ? ereg_replace(^skip[[:space:]]*(.+)\$, \\1, trim($output)) : FALSE; if ($reason) { echo (reason: $reason)\n; } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua Logan I spent a minute looking at my own code by accident. Logan I was thinking What the hell is this guy doing? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/sysvmsg config.m4
msopacuaTue Oct 8 12:20:21 2002 EDT Modified files: /php4/ext/sysvmsg config.m4 Log: Fix config bug reported by Jan Lehnart. Keep it simple, and the size of a pointer is always known, duh. Index: php4/ext/sysvmsg/config.m4 diff -u php4/ext/sysvmsg/config.m4:1.3 php4/ext/sysvmsg/config.m4:1.4 --- php4/ext/sysvmsg/config.m4:1.3 Thu Sep 19 16:14:58 2002 +++ php4/ext/sysvmsg/config.m4 Tue Oct 8 12:20:20 2002 -1,4 +1,4 -dnl $Id: config.m4,v 1.3 2002/09/19 20:14:58 iliaa Exp $ +dnl $Id: config.m4,v 1.4 2002/10/08 16:20:20 msopacua Exp $ PHP_ARG_ENABLE(sysvmsg,whether to enable System V IPC support, [ --enable-sysvmsgEnable sysvmsg support]) -9,9 +9,9 [#include sys/types.h #include sys/ipc.h #include sys/msg.h], - [struct msgbuf *foo; + [size_t i; -foo = (struct msgbuf *) malloc(sizeof(struct msgbuf*) +1); + i = sizeof(struct msgbuf); return 1;], [AC_MSG_RESULT(msgbuf)], [AC_TRY_COMPILE( -19,9 +19,9 #include sys/ipc.h #include sys/msg.h ], - [struct mymsg *foo; + [size_t i; - foo = (struct mymsg *) malloc(sizeof(struct mymsg*) +1); + i = sizeof(struct mymsg); return 1; ], [AC_DEFINE(msgbuf, mymsg, [msgbuf is called mymsg]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard css.c
At 21:42 8-10-2002, Colin Viebrock wrote: cmv Tue Oct 8 15:42:23 2002 EDT Modified files: /php4/ext/standard css.c Log: don't define fonts ... use the browser defaults Reason being? The definitions end in generic font families. There's no shame in defining a __readable__ __preference__. Especially Andale Mono, since it is one of the few monotype fonts, that has a readable difference between the l and a 1 and the O and 0. I've seen more people fiddling with their fonts, because they're pretty than because they're readable. Docs should aim to be readable. What's more problematic in the css code below, is the 75% default on td/th. If you nest that, the inner td, is 75% of 75% of the body. Index: php4/ext/standard/css.c diff -u php4/ext/standard/css.c:1.2 php4/ext/standard/css.c:1.3 --- php4/ext/standard/css.c:1.2 Thu Sep 26 13:54:53 2002 +++ php4/ext/standard/css.c Tue Oct 8 15:42:23 2002 -16,7 +16,7 +--+ */ -/* $Id: css.c,v 1.2 2002/09/26 17:54:53 cmv Exp $ */ +/* $Id: css.c,v 1.3 2002/10/08 19:42:23 cmv Exp $ */ #include php.h #include info.h -29,15 +29,15 TSRMLS_FETCH(); PUTS(body {background-color: #ff; color: #00;}\n); - PUTS(body, td, th, h1, h2 {font-family: arial, helvetica, sans-serif;}\n); - PUTS(pre {margin: 0px; font-family: \andale mono\, \monotype.com\, \courier new\, courier, monospace;}\n); + PUTS(body, td, th, h1, h2 {font-family: sans-serif;}\n); + PUTS(pre {margin: 0px; font-family: monospace;}\n); PUTS(a:link {color: #99; text-decoration: none;}\n); PUTS(a:hover {text-decoration: underline;}\n); PUTS(table {border-collapse: collapse;}\n); PUTS(td, th { border: 1px solid #00; font-size: 75%; vertical-align: baseline;}\n); PUTS(h1 {font-size: 150%;}\n); - PUTS(.p {text-align: left;}\n); PUTS(h2 {font-size: 125%;}\n); + PUTS(.p {text-align: left;}\n); PUTS(.e {background-color: #ff; font-weight: bold;}\n); PUTS(.h {background-color: #cc; font-weight: bold;}\n); PUTS(.v {background-color: #cc;}\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
msopacuaMon Oct 7 17:48:25 2002 EDT Modified files: /php4 NEWS Log: Add xslt milestones Index: php4/NEWS diff -u php4/NEWS:1.1189 php4/NEWS:1.1190 --- php4/NEWS:1.1189Mon Oct 7 15:51:32 2002 +++ php4/NEWS Mon Oct 7 17:48:25 2002 -6,6 +6,11 - Fix ImageCopy() in bundled GD2 library to handle copying from truecolor to palette-based. (Wez, Rasmus) - Read-only GIF support for bundled GD2 library. (Rasmus) +- Made several adjustments to xslt extension (David Viner, Lehnar, Melvyn) + . Added xslt_set_object and xslt_setopt function + . Changed backend interaction with Sablotron library + . Fixed leak with error_print + . Make xslt_make_array always set NULL on last index to signal array end. - Make the glue argument to implode() optional, if it is not specified default to using . (Sterling) - Fixed fields argument to contain correct info for xslt_set_error_handler. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt sablot.c
msopacuaSun Oct 6 11:28:12 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/xslt sablot.c Log: whitespace Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.56.2.1 php4/ext/xslt/sablot.c:1.56.2.2 --- php4/ext/xslt/sablot.c:1.56.2.1 Sat Oct 5 19:50:59 2002 +++ php4/ext/xslt/sablot.c Sun Oct 6 11:28:12 2002 -16,7 +16,7 +--+ */ -/* $Id: sablot.c,v 1.56.2.1 2002/10/05 23:50:59 msopacua Exp $ */ +/* $Id: sablot.c,v 1.56.2.2 2002/10/06 15:28:12 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -528,12 +528,12 /* Can return NULL */ if (args) { i=0; - while(args[i]) { + while (args[i]) { /* We can safely add args[i+1] since xslt_make_array sets args[i] to NULL if a key on the array is missing. */ /* For now, we don't care about the error. So don't store it. */ SablotAddArgBuffer(XSLT_SITUATION(handle), XSLT_PROCESSOR(handle), args[i], args[i+1]); - i+=2; + i += 2; } } } -543,9 +543,9 /* Can return NULL */ if (params) { i=0; - while(params[i]) { + while (params[i]) { SablotAddParam(XSLT_SITUATION(handle), XSLT_PROCESSOR(handle), params[i], params[i+1]); - i+=2; + i += 2; } } } -622,7 +622,7 } ZEND_FETCH_RESOURCE(handle, php_xslt *, processor_p, -1, le_xslt_name, le_xslt); - if(XSLT_ERRSTR(handle)) { + if (XSLT_ERRSTR(handle)) { RETURN_STRING(XSLT_ERRSTR(handle), 1); } else { RETURN_FALSE; -675,7 +675,7 zval **zbitmask;/* A bitmask created by through processor specific constants */ php_xslt *handle; /* A PHP-XSLT processor */ int error; /* Error return codes */ - int bitmask; + int bitmask; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, processor_p, zbitmask) == FAILURE) { -686,13 +686,13 convert_to_long_ex(zbitmask); bitmask = Z_LVAL_PP(zbitmask); - if(bitmask 0) { + if (bitmask 0) { php_error_docref(function.xslt-setopt TSRMLS_CC, E_WARNING, Invalid bitmask: %i, bitmask); RETURN_FALSE; } error = SablotSetOptions(XSLT_SITUATION(handle), bitmask); - if(error) { + if (error) { /* FIXME: Need to analyze the return code to give a more verbose error description */ php_error_docref(NULL TSRMLS_CC, E_NOTICE, Failed to set options); } -715,8 +715,6 /* }}} */ - - /* {{{ proto void xslt_backend_version() Returns the version number of Sablotron (if available) */ PHP_FUNCTION(xslt_backend_version) -853,7 +851,7 xslt_call_function(scheme get all, XSLT_SCHEME(handle).get_all, handle-object, 3, argv, retval); - if(!retval) { + if (!retval) { /* return failure */ return 1; } -937,7 +935,7 xslt_call_function(scheme open, XSLT_SCHEME(handle).open, handle-object, 3, argv, retval); - if(!retval) { + if (!retval) { /* return failure */ return 1; } -948,7 +946,7 /* Free it all up */ zval_ptr_dtor(retval); - if(!*fd) { + if (!*fd) { /* return failure - unsupported scheme */ return SH_ERR_UNSUPPORTED_SCHEME; } -991,7 +989,7 xslt_call_function(scheme get, XSLT_SCHEME(handle).get, handle-object, 3, argv, retval); - if(!retval) { + if (!retval) { /* return failure */ return 1; } -1040,7 +1038,7 xslt_call_function(scheme put, XSLT_SCHEME(handle).put, handle-object, 3, argv, retval); - if(!retval) { + if (!retval) { /* return failure */ return 1; } -1086,7 +1084,7 xslt_call_function(scheme close, XSLT_SCHEME(handle).close, handle-object, 2, argv, retval); - if(!retval) { + if (!retval) { /* return failure */ return 1; } -1125,7 +1123,7 1, argv, retval); /* Cleanup */ - if(retval) +
[PHP-CVS] cvs: php4 /ext/xslt/tests public.xml
msopacuaSun Oct 6 11:51:31 2002 EDT Added files: /php4/ext/xslt/testspublic.xml Log: missed this, needed by 007.phpt Index: php4/ext/xslt/tests/public.xml +++ php4/ext/xslt/tests/public.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE qa PUBLIC -//PHP-QA//PHP Quality Assurance DTD //EN qa.dtd qa test type=simplePHP QAreg;/test /qa -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt/tests public.xml
msopacuaSun Oct 6 11:53:17 2002 EDT Added files: (Branch: PHP_4_3) /php4/ext/xslt/testspublic.xml Log: MFH Index: php4/ext/xslt/tests/public.xml +++ php4/ext/xslt/tests/public.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE qa PUBLIC -//PHP-QA//PHP Quality Assurance DTD //EN qa.dtd qa test type=simplePHP QAreg;/test /qa -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt/tests 009.phpt
msopacuaSun Oct 6 20:34:03 2002 EDT Added files: (Branch: PHP_4_3) /php4/ext/xslt/tests009.phpt Log: MFH Index: php4/ext/xslt/tests/009.phpt +++ php4/ext/xslt/tests/009.phpt --TEST-- Memoryleak in error printing --SKIPIF-- ?php include(skipif.inc); ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/non-existent.xml'; $xslfile = 'ext/xslt/tests/non-existent.xsl'; $xh = xslt_create(); $result = xslt_process($xh, $xmlfile, $xslfile, NULL); xslt_free($xh); ? --EXPECTF-- Warning: Sablotron error on line none: cannot open file '%s/ext/xslt/tests/non-existent.xsl' in %s/ext/xslt/tests/phpt.%s on line %i %sext/xslt/tests/%s(%i) : Warning - Sablotron error on line none: cannot open file '%sext/xslt/tests/non-existent.xsl' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt sablot.c
msopacuaSat Oct 5 10:04:18 2002 EDT Modified files: /php4/ext/xslt sablot.c Log: (xslt: error_print) Fixes a leak when multiple error messages are issued during a transformation. # It's probably better to wrap this in an internal function, since it's # easily forgotten. Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.55 php4/ext/xslt/sablot.c:1.56 --- php4/ext/xslt/sablot.c:1.55 Fri Oct 4 19:06:09 2002 +++ php4/ext/xslt/sablot.c Sat Oct 5 10:04:18 2002 -16,7 +16,7 +--+ */ -/* $Id: sablot.c,v 1.55 2002/10/04 23:06:09 dviner Exp $ */ +/* $Id: sablot.c,v 1.56 2002/10/05 14:04:18 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -1632,6 +1632,10 /* Allocate the message buffer and copy the data onto it */ msgbuf = emalloc((sizeof(msgformat) - 4) + strlen(errmsg) + strlen(errline) + 1); sprintf(msgbuf, msgformat, errline, errmsg); + + /* If an old message exists, remove it - leak */ + if (XSLT_ERRSTR(handle)) + efree(XSLT_ERRSTR(handle)); /* Copy the error message onto the handle for use when the xslt_error function is called */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/xslt/tests 005.phpt 006.phpt 007.phpt args.xsl param.xsl qa.dtd test.xml
msopacuaSat Oct 5 15:44:25 2002 EDT Added files: /php4/ext/xslt/tests005.phpt 006.phpt 007.phpt args.xsl param.xsl test.xml qa.dtd Log: (xslt tests) Add test for new backend API (005.phpt), new function (006.phpt) and a crash test (007.phpt) 006.phpt also tests handling of public entities, which is in essence new to the extension, since there was no way to turn it on. # These new functions and backend will be added shortly. # TODO: test for xslt_set_object Index: php4/ext/xslt/tests/005.phpt +++ php4/ext/xslt/tests/005.phpt --TEST-- Various ways to provide xml and xslt arguments and params --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/test.xml'; $xslfile = 'ext/xslt/tests/args.xsl'; $xmldata = implode('', file($xmlfile)); $xslsheet = implode('', file($xslfile)); $xh = xslt_create(); $result = xslt_process($xh, $xmlfile, $xslfile); print $result\n; $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata)); print $result\n; $result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = $xslsheet)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet)); print $result\n; // The same, with params $xslfile = 'ext/xslt/tests/param.xsl'; $xslsheet = implode('', file($xslfile)); $params = array(Test has passed, PHP QA®); foreach($params AS $val) { $val = utf8_encode($val); $result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' = $val)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata), array('insertion' = $val)); print $result\n; $result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = $xslsheet), array('insertion' = $val)); print $result\n; $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, '/_xsl' = $xslsheet), array('insertion' = $val)); print $result\n; } xslt_free($xh); ? --EXPECT-- Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed Test has passed PHP QA® PHP QA® PHP QA® PHP QA® Index: php4/ext/xslt/tests/006.phpt +++ php4/ext/xslt/tests/006.phpt --TEST-- Crash xslt_process with reused handler (this test may take a while) --SKIPIF-- ?php include(skipif.inc); if(!function_exists('utf8_encode')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/test.xml'; $xslfile = 'ext/xslt/tests/param.xsl'; $xmldata = implode('', file($xmlfile)); $xslsheet = implode('', file($xslfile)); /* * Tested on a Cyrix 200MMX/128MB took 2 secs. Should be a reasonable margin. * * It's not meant as an actual speed test, but if it's slower than this, * there must be something significantly off in the php/sablot/expat trio. * Emulation OS's come to mind... */ $want_time = 6; function make_param() { $ret_val = ''; $numchars = mt_rand(2,16); $illegal = array(0,256,512); for($i=0;$i$numchars;$i++) { $char=0; while(in_array($char, $illegal)) { $char .= mt_rand(32, 512); } $ret_val .= chr($char); } return utf8_encode($ret_val); } function decode($string) { $ret_val = ''; for($i=0; $istrlen($string);$i++) { $ret_val .= ord(substr($string,$i,1)) . ; } return $ret_val; } $xh = xslt_create(); $t1 = time(); for ($i=0; $i50; $i++) { $val = make_param(); $result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' = $val)); if(!$result or $result != utf8_decode($val)) print Failed $i / .utf8_decode($val).: $result\n\tDecode: . decode(utf8_decode($val)) . \n ; } print OK\n; xslt_free($xh); $t2 = time(); $op_time = $t2 - $t1; if($op_time $want_time) print This test took more than $want_time seconds. Either you have a very slow / busy machine, or there's something very wrong with the speed. Your time: $op_time; ? --EXPECT-- OK Index: php4/ext/xslt/tests/007.phpt +++ php4/ext/xslt/tests/007.phpt --TEST-- xslt_set_opt function and public entities --SKIPIF-- ?php include(skipif.inc); if(!function_exists('xslt_setopt')) { die(skip\n); } ? --FILE-- ?php error_reporting(E_ALL); $xmlfile = 'ext/xslt/tests/public.xml'; $xslfile = 'ext/xslt/tests/args.xsl'; $xh = xslt_create(); // Tell Sablotron to process public entities xslt_setopt($xh, XSLT_SAB_PARSE_PUBLIC_ENTITIES); $result = xslt_process($xh, $xmlfile, $xslfile); print $result\n; $xslstring = implode('',
[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt php_sablot.h sablot.c xslt.c
msopacuaSat Oct 5 19:51:00 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/xslt php_sablot.h sablot.c xslt.c Log: (xslt) Introduce revised interaction with Sablotron backend. ATTENTION: interaction with Sablotron backend, now uses the API prefered by the Ginger Alliance. Test it for BC issues. It also changes internals of the abstraction, to resolve issues that would arrise with invalid argument or parameter arrays. New functions: * xslt_set_object, similar to xml_set_object * xslt_setopt, set global options for a processor instance. Introduces new constants, related to the xslt_setopt function. Removes a warning, when skipping argument array with NULL. Index: php4/ext/xslt/php_sablot.h diff -u php4/ext/xslt/php_sablot.h:1.12 php4/ext/xslt/php_sablot.h:1.12.2.1 --- php4/ext/xslt/php_sablot.h:1.12 Fri Oct 4 19:06:09 2002 +++ php4/ext/xslt/php_sablot.h Sat Oct 5 19:50:59 2002 -41,6 +41,7 #define XSLT_ERROR(handle) ((handle)-handlers-error) #define XSLT_PROCESSOR(handle) ((handle)-processor.ptr) +#define XSLT_SITUATION(handle) ((handle)-processor.sit) #define XSLT_ERRNO(handle) ((handle)-err-no) #define XSLT_ERRSTR(handle)((handle)-err-str) -63,6 +64,7 PHP_FUNCTION(xslt_errno); PHP_FUNCTION(xslt_free); PHP_FUNCTION(xslt_set_object); +PHP_FUNCTION(xslt_setopt); PHP_FUNCTION(xslt_backend_version); PHP_FUNCTION(xslt_backend_name); -95,6 +97,7 struct xslt_processor { SablotHandle ptr; + SablotSituation sit; long idx; }; Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.56 php4/ext/xslt/sablot.c:1.56.2.1 --- php4/ext/xslt/sablot.c:1.56 Sat Oct 5 10:04:18 2002 +++ php4/ext/xslt/sablot.c Sat Oct 5 19:50:59 2002 -16,7 +16,7 +--+ */ -/* $Id: sablot.c,v 1.56 2002/10/05 14:04:18 msopacua Exp $ */ +/* $Id: sablot.c,v 1.56.2.1 2002/10/05 23:50:59 msopacua Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -90,6 +90,7 PHP_FE(xslt_errno, NULL) PHP_FE(xslt_free,NULL) PHP_FE(xslt_set_object, second_args_force_ref) + PHP_FE(xslt_setopt, NULL) PHP_FE(xslt_backend_version, NULL) PHP_FE(xslt_backend_name,NULL) {NULL, NULL, NULL} -155,6 +156,16 PHP_MINIT_FUNCTION(xslt) { le_xslt = zend_register_list_destructors_ex(free_processor, NULL, le_xslt_name, module_number); + + /* Generic options, which can apply to 'all' xslt processors */ + REGISTER_LONG_CONSTANT(XSLT_SILENT, SAB_NO_ERROR_REPORTING, CONST_CS | +CONST_PERSISTENT); + + /* Sablotron specific options */ + REGISTER_LONG_CONSTANT(XSLT_SAB_PARSE_PUBLIC_ENTITIES, +SAB_PARSE_PUBLIC_ENTITIES, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_ADDING_META, +SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, +CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(XSLT_SAB_IGNORE_DOC_NOT_FOUND, +SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT); + return SUCCESS; } /* }}} */ -179,6 +190,7 { php_xslt *handle; /* The php - sablotron handle */ SablotHandle processor; /* The sablotron processor */ + SablotSituation sit;/* The sablotron Situation handle */ int error; /* The error container */ /* Allocate the php-sablotron handle */ -190,7 +202,8 XSLT_LOG(handle).path = NULL; /* Allocate the actual processor itself, via sablotron */ - error = SablotCreateProcessor(processor); + SablotCreateSituation(sit); + error = SablotCreateProcessorForSituation(sit, processor); if (error) { XSLT_ERRNO(handle) = error; RETURN_FALSE; -198,6 +211,7 /* Save the processor and set the default handlers */ XSLT_PROCESSOR(handle) = processor; + XSLT_SITUATION(handle) = sit; SablotRegHandler(XSLT_PROCESSOR(handle), HLR_SAX, (void *) sax_handlers, (void *) handle); SablotRegHandler(XSLT_PROCESSOR(handle), HLR_MESSAGE, (void *) message_handler, (void *) handle); SablotRegHandler(XSLT_PROCESSOR(handle), HLR_SCHEME, (void *) scheme_handler, (void *) handle); -483,6 +497,7 char*result; /* The result file or argument buffer */ int argc = ZEND_NUM_ARGS(); /* The number of arguments given */ int error; /* Our error container */ + int i; /* iterator for Situation */ if (argc 3 || argc 6
[PHP-CVS] cvs: php4 /ext/xslt/tests 002.phpt 003.phpt skipif.inc xslt_set_error_handler.php
msopacuaFri Oct 4 07:41:33 2002 EDT Added files: /php4/ext/xslt/tests002.phpt 003.phpt skipif.inc xslt_set_error_handler.php Log: Improve testkit for xslt. 002.phpt and 003.phpt are regression tests for reported bugs. 004.phpt has been known to cause problems in some Sab/PHP combinations. No known reports in bug db for that one. Added skip mechanism - Added regression test for bugs #17791 and #17931 (Melvyn) Index: php4/ext/xslt/tests/002.phpt +++ php4/ext/xslt/tests/002.phpt --TEST-- Pass long string to 'file' argument, bug #17791 --SKIPIF-- ?php include(skipif.inc); ? --FILE-- ?php $xmlstring = str_repeat('x', 512); $xslstring = 'x'; $xh = xslt_create(); $result = xslt_process($xh, $xmlstring, $xslstring); xslt_free($xh); echo(OK); ? --EXPECT-- OK Index: php4/ext/xslt/tests/003.phpt +++ php4/ext/xslt/tests/003.phpt --TEST-- Pass object for xslt_error_handler, bug #17931 --SKIPIF-- ?php include(skipif.inc); ? --FILE-- ?php include('xslt_set_error_handler.php'); ? --EXPECT-- OK Index: php4/ext/xslt/tests/skipif.inc +++ php4/ext/xslt/tests/skipif.inc ?php if(!extension_loaded(xslt) ini_get(enable_dl)) { $dlext = (substr(PHP_OS, 0, 4) == WIN) ? .dll : .so; dl(xlst$dlext); } if(!extension_loaded(xslt)) { die(skip\n); } ? Index: php4/ext/xslt/tests/xslt_set_error_handler.php +++ php4/ext/xslt/tests/xslt_set_error_handler.php ?php class xsl { function xsl() { $this-_parser = xslt_create(); } function set_error() { xslt_set_error_handler($this-_parser, array($this, 'xslt_trap_error')); echo OK; } function xslt_trap_error($parser, $errorno, $level, $fields) { return TRUE; } function clean() { xslt_free($this-_parser); } } $x = new xsl; // work-around for possible '$this does not exist' bug in constructor $x-set_error(); $x-clean(); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php