Re: [PHP-CVS] cvs: php4 /ext/informix ifx.ec
On Mon, 24 Feb 2003, Corne' Cornelius wrote: nobbie Mon Feb 24 01:34:37 2003 EDT Modified files: /php4/ext/informix ifx.ec Log: (PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault on an unopened connecection and with an errorcode supplied Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.81 php4/ext/informix/ifx.ec:1.82 --- php4/ext/informix/ifx.ec:1.81 Fri Feb 21 01:50:24 2003 +++ php4/ext/informix/ifx.ec Mon Feb 24 01:34:36 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.81 2003/02/21 06:50:24 sniper Exp $ */ +/* $Id: ifx.ec,v 1.82 2003/02/24 06:34:36 nobbie Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give @@ -1650,6 +1650,7 @@ } maxmsglen = 255; + msglen = maxmsglen; // Some bug fix, rgetlmsg doesnt always set the value ifx_errmsg = (char *)malloc(maxmsglen + 1); if (ifx_errorcode != 0) { rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen); Do NOT use C++ comments in C code! Use /* */ instead as some compilers choke on those // comments.. --Jani -- 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/informix ifx.ec
sniper Mon Feb 24 03:26:49 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec Log: no c++ comments Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.9 php4/ext/informix/ifx.ec:1.69.2.10 --- php4/ext/informix/ifx.ec:1.69.2.9 Mon Feb 24 02:45:58 2003 +++ php4/ext/informix/ifx.ecMon Feb 24 03:26:48 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.69.2.9 2003/02/24 07:45:58 nobbie Exp $ */ +/* $Id: ifx.ec,v 1.69.2.10 2003/02/24 08:26:48 sniper Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give @@ -1650,7 +1650,7 @@ } maxmsglen = 255; - msglen = maxmsglen; // Some bug fix, rgetlmsg doesnt always set the value + msglen = maxmsglen; /* Some bug fix, rgetlmsg doesnt always set the value */ ifx_errmsg = (char *)malloc(maxmsglen + 1); if (ifx_errorcode != 0) { rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/informix ifx.ec
sniper Mon Feb 24 03:27:24 2003 EDT Modified files: /php4/ext/informix ifx.ec Log: no c++ comments Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.82 php4/ext/informix/ifx.ec:1.83 --- php4/ext/informix/ifx.ec:1.82 Mon Feb 24 01:34:36 2003 +++ php4/ext/informix/ifx.ecMon Feb 24 03:27:23 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.82 2003/02/24 06:34:36 nobbie Exp $ */ +/* $Id: ifx.ec,v 1.83 2003/02/24 08:27:23 sniper Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give @@ -1650,7 +1650,7 @@ } maxmsglen = 255; - msglen = maxmsglen; // Some bug fix, rgetlmsg doesnt always set the value + msglen = maxmsglen; /* Some bug fix, rgetlmsg doesnt always set the value */ ifx_errmsg = (char *)malloc(maxmsglen + 1); if (ifx_errorcode != 0) { rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Mon, 24 Feb 2003, Sascha Schumann wrote: On Mon, 24 Feb 2003, Jani Taskinen wrote: sniper Sun Feb 23 23:37:04 2003 EDT Modified files: /php4acinclude.m4 Log: Always use the libtool which is build in the top_builddir. The cwd of the $(SHELL) is the top_builddir, so I don't see what you are trying to achieve here. On AIX, I encountered a problem that the libtool from top_builddir was NOT used but the one in my PATH. I was debugging that AIX + PHP as Apache DSO install problem and I was editing the generated libtool script.. kept wondering why none of my changes didn't seem to have any affect in the build, whatever I tried.. Now it uses the correct libtool script all the time. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On AIX, I encountered a problem that the libtool from top_builddir was NOT used but the one in my PATH. That's really weird. Way to go AIX. $ echo echo hi gcc $ chmod +x gcc $ /bin/sh gcc /bin/sh: gcc: cannot execute $ /bin/sh ./gcc hi - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Mon, 24 Feb 2003, Sascha Schumann wrote: On AIX, I encountered a problem that the libtool from top_builddir was NOT used but the one in my PATH. That's really weird. Way to go AIX. $ echo echo hi gcc $ chmod +x gcc $ /bin/sh gcc /bin/sh: gcc: cannot execute $ /bin/sh ./gcc hi Heh, I'm not very surprised. And it's not the only weird thing in it. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/yp yp.c
hholzgraMon Feb 24 08:35:06 2003 EDT Modified files: /php4/ext/ypyp.c Log: key has to be zero-delimited Index: php4/ext/yp/yp.c diff -u php4/ext/yp/yp.c:1.34 php4/ext/yp/yp.c:1.35 --- php4/ext/yp/yp.c:1.34 Fri Jan 24 11:34:18 2003 +++ php4/ext/yp/yp.cMon Feb 24 08:35:06 2003 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.34 2003/01/24 16:34:18 iliaa Exp $ */ +/* $Id: yp.c,v 1.35 2003/02/24 13:35:06 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -295,8 +295,17 @@ if (!err) { - if (inkeylen) - add_assoc_stringl_ex((zval *) indata,inkey,inkeylen,inval,invallen,1); + if (inkeylen) { + char *key = malloc(inkeylen+1); + if(key) { + strncpy(key, inkey, inkeylen); + key[inkeylen] = '\0'; + add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); + free(key); + } else { + php_error(E_WARNING, Can't allocate %d bytes for key buffer in yp_cat()); + } + } return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/apache2filter apache_config.c php_functions.c sapi_apache2.c
zeevMon Feb 24 10:10:37 2003 EDT Modified files: /php4/sapi/apache2filterapache_config.c php_functions.c sapi_apache2.c Log: (possibly) fix Win32 builds of the Apache 2 filter Index: php4/sapi/apache2filter/apache_config.c diff -u php4/sapi/apache2filter/apache_config.c:1.29 php4/sapi/apache2filter/apache_config.c:1.30 --- php4/sapi/apache2filter/apache_config.c:1.29Tue Dec 31 10:59:03 2002 +++ php4/sapi/apache2filter/apache_config.c Mon Feb 24 10:10:36 2003 @@ -16,7 +16,9 @@ +--+ */ -/* $Id: apache_config.c,v 1.29 2002/12/31 15:59:03 sebastian Exp $ */ +/* $Id: apache_config.c,v 1.30 2003/02/24 15:10:36 zeev Exp $ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include php.h #include php_ini.h Index: php4/sapi/apache2filter/php_functions.c diff -u php4/sapi/apache2filter/php_functions.c:1.37 php4/sapi/apache2filter/php_functions.c:1.38 --- php4/sapi/apache2filter/php_functions.c:1.37Mon Jan 27 20:25:34 2003 +++ php4/sapi/apache2filter/php_functions.c Mon Feb 24 10:10:36 2003 @@ -16,7 +16,10 @@ +--+ */ -/* $Id: php_functions.c,v 1.37 2003/01/28 01:25:34 iliaa Exp $ */ +/* $Id: php_functions.c,v 1.38 2003/02/24 15:10:36 zeev Exp $ */ + + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include php.h #include ext/standard/php_smart_str.h Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.104 php4/sapi/apache2filter/sapi_apache2.c:1.105 --- php4/sapi/apache2filter/sapi_apache2.c:1.104Mon Feb 10 14:12:02 2003 +++ php4/sapi/apache2filter/sapi_apache2.c Mon Feb 24 10:10:36 2003 @@ -18,9 +18,11 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.104 2003/02/10 19:12:02 moriyoshi Exp $ */ +/* $Id: sapi_apache2.c,v 1.105 2003/02/24 15:10:36 zeev Exp $ */ #include fcntl.h + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include php.h #include php_main.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Mon Feb 24 11:01:39 2003 EDT Modified files: /php4 NEWS Log: BFN Index: php4/NEWS diff -u php4/NEWS:1.1357 php4/NEWS:1.1358 --- php4/NEWS:1.1357Sat Feb 22 21:45:10 2003 +++ php4/NEWS Mon Feb 24 11:01:38 2003 @@ -3,8 +3,10 @@ ? ? ??? 200?, Version 5.0.0 - Moved extensions to PECL (http://pear.php.net/): (James, Tal) . ext/fribidi -- Fixed bug #21985 and #22064 (various mb_send_mail() issues). (Moriyoshi) +- Fixed bug #21600 (Assign by reference function call changes variable contents). + (Zeev) - Fixed bug #22059 (ftp_chdir causes segfault). (Sara) +- Fixed bug #21985 and #22064 (various mb_send_mail() issues). (Moriyoshi) - Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) - Fixed bug #20155 (xmlrpc compile problem with ZE2). (Derick, Jan Schneider) - Changed ini parser to allow for handling of quoted multi-line values. (Ilia) -- 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 bug21600.phpt bug22231.phpt
sniper Mon Feb 24 11:04:05 2003 EDT Removed files: (Branch: PHP_4_3) /php4/tests/langbug21600.phpt bug22231.phpt Log: - Removing pointless tests. (both of these will be fixed in PHP 5) # We don't need to get any test reports about these anymore # for PHP_4_3 branch since these won't be fixed in 4.3.x. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard reg.c
moriyoshi Mon Feb 24 11:13:13 2003 EDT Modified files: /php4/ext/standard reg.c Log: Style fix Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.72 php4/ext/standard/reg.c:1.73 --- php4/ext/standard/reg.c:1.72Sat Jan 11 18:05:19 2003 +++ php4/ext/standard/reg.c Mon Feb 24 11:13:13 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.72 2003/01/11 23:05:19 moriyoshi Exp $ */ +/* $Id: reg.c,v 1.73 2003/02/24 16:13:13 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -278,10 +278,12 @@ string_len = strlen(string); - if (icase) + if (icase) { copts = REG_ICASE; - if (extended) + } + if (extended) { copts |= REG_EXTENDED; + } err = regcomp(re, pattern, copts); if (err) { @@ -321,7 +323,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; - while (*walk) + while (*walk) { if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = ((char) re.re_nsub)) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; @@ -331,7 +333,7 @@ new_l++; walk++; } - + } if (new_l + 1 buf_len) { buf_len = 1 + buf_len + 2 * new_l; nbuf = emalloc(buf_len); @@ -346,7 +348,7 @@ /* copy replacement and backrefs */ walkbuf = buf[tmp + subs[0].rm_so]; walk = replace; - while (*walk) + while (*walk) { if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = (int)re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1 /* this next case shouldn't happen. it does. */ @@ -359,13 +361,15 @@ walk += 2; } else { *walkbuf++ = *walk++; - } + } + } *walkbuf = '\0'; /* and get ready to keep looking for replacements */ if (subs[0].rm_so == subs[0].rm_eo) { - if (subs[0].rm_so + pos = string_len) + if (subs[0].rm_so + pos = string_len) { break; + } new_l = strlen (buf) + 1; if (new_l + 1 buf_len) { buf_len = 1 + buf_len + 2 * new_l; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/apache config.m4
sniper Mon Feb 24 11:16:13 2003 EDT Modified files: /php4/sapi/apache config.m4 Log: Possible fix for #22259 + part 1/2 for fixing one AIX bug.. Index: php4/sapi/apache/config.m4 diff -u php4/sapi/apache/config.m4:1.67 php4/sapi/apache/config.m4:1.68 --- php4/sapi/apache/config.m4:1.67 Sun Feb 23 02:32:03 2003 +++ php4/sapi/apache/config.m4 Mon Feb 24 11:16:11 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.67 2003/02/23 07:32:03 sniper Exp $ +dnl $Id: config.m4,v 1.68 2003/02/24 16:16:11 sniper Exp $ dnl AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS) @@ -44,25 +44,29 @@ for flag in $APXS_CFLAGS; do case $flag in --D*) CPPFLAGS=$CPPFLAGS $flag;; +-D*) APACHE_CPPFLAGS=$APACHE_CPPFLAGS $flag;; esac done + case $host_alias in *aix*) APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR` -EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp +PHP_AIX_LDFLAGS=-Wl,-brtl +build_type=shared ;; *darwin*) MH_BUNDLE_FLAGS=-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD PHP_SUBST(MH_BUNDLE_FLAGS) SAPI_SHARED=libs/libphp4.so -PHP_SELECT_SAPI(apache, bundle, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +build_type=bundle ;; *) -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +build_type=shared ;; esac + + PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php4.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR) # Test whether apxs support -S option $APXS -q -S CFLAGS=$APXS_CFLAGS CFLAGS /dev/null 21 -- 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/apache config.m4
sniper Mon Feb 24 11:16:58 2003 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/apache config.m4 Log: MFH: Possible fix for #22259 + part 1/2 for fixing AIX DSO bug Index: php4/sapi/apache/config.m4 diff -u php4/sapi/apache/config.m4:1.62.4.5 php4/sapi/apache/config.m4:1.62.4.6 --- php4/sapi/apache/config.m4:1.62.4.5 Sun Feb 23 02:34:32 2003 +++ php4/sapi/apache/config.m4 Mon Feb 24 11:16:57 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.62.4.5 2003/02/23 07:34:32 sniper Exp $ +dnl $Id: config.m4,v 1.62.4.6 2003/02/24 16:16:57 sniper Exp $ dnl AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS) @@ -44,25 +44,29 @@ for flag in $APXS_CFLAGS; do case $flag in --D*) CPPFLAGS=$CPPFLAGS $flag;; +-D*) APACHE_CPPFLAGS=$APACHE_CPPFLAGS $flag;; esac done + case $host_alias in *aix*) APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR` -EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp +PHP_AIX_LDFLAGS=-Wl,-brtl +build_type=shared ;; *darwin*) MH_BUNDLE_FLAGS=-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD PHP_SUBST(MH_BUNDLE_FLAGS) SAPI_SHARED=libs/libphp4.so -PHP_SELECT_SAPI(apache, bundle, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +build_type=bundle ;; *) -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) +build_type=shared ;; esac + + PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php4.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR) # Test whether apxs support -S option $APXS -q -S CFLAGS=$APXS_CFLAGS CFLAGS /dev/null 21 -- 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 reg.c
moriyoshi Mon Feb 24 11:19:44 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard reg.c Log: MFH(r1.73): style fix Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.66.2.3 php4/ext/standard/reg.c:1.66.2.4 --- php4/ext/standard/reg.c:1.66.2.3Tue Dec 31 11:35:34 2002 +++ php4/ext/standard/reg.c Mon Feb 24 11:19:44 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.66.2.3 2002/12/31 16:35:34 sebastian Exp $ */ +/* $Id: reg.c,v 1.66.2.4 2003/02/24 16:19:44 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -278,10 +278,12 @@ string_len = strlen(string); - if (icase) + if (icase) { copts = REG_ICASE; - if (extended) + } + if (extended) { copts |= REG_EXTENDED; + } err = regcomp(re, pattern, copts); if (err) { @@ -321,7 +323,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; - while (*walk) + while (*walk) { if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = ((char) re.re_nsub)) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; @@ -331,7 +333,7 @@ new_l++; walk++; } - + } if (new_l + 1 buf_len) { buf_len = 1 + buf_len + 2 * new_l; nbuf = emalloc(buf_len); @@ -346,7 +348,7 @@ /* copy replacement and backrefs */ walkbuf = buf[tmp + subs[0].rm_so]; walk = replace; - while (*walk) + while (*walk) { if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1 /* this next case shouldn't happen. it does. */ @@ -359,13 +361,15 @@ walk += 2; } else { *walkbuf++ = *walk++; - } + } + } *walkbuf = '\0'; /* and get ready to keep looking for replacements */ if (subs[0].rm_so == subs[0].rm_eo) { - if (subs[0].rm_so + pos = string_len) + if (subs[0].rm_so + pos = string_len) { break; + } new_l = strlen (buf) + 1; if (new_l + 1 buf_len) { buf_len = 1 + buf_len + 2 * new_l; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard reg.c
moriyoshi Mon Feb 24 11:29:00 2003 EDT Modified files: /php4/ext/standard reg.c Log: Fixed a signed / unsigned issue. # imagine the case like \\\xfe where walk[1] takes a value that is greater # than 127 in integer... Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.73 php4/ext/standard/reg.c:1.74 --- php4/ext/standard/reg.c:1.73Mon Feb 24 11:13:13 2003 +++ php4/ext/standard/reg.c Mon Feb 24 11:29:00 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.73 2003/02/24 16:13:13 moriyoshi Exp $ */ +/* $Id: reg.c,v 1.74 2003/02/24 16:29:00 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -324,7 +324,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; while (*walk) { - if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = ((char) re.re_nsub)) { + if ('\\' == *walk isdigit(walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; } -- 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 reg.c
moriyoshi Mon Feb 24 11:30:15 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard reg.c Log: MFH(r1.74): fixed an signed / unsigned issue Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.66.2.4 php4/ext/standard/reg.c:1.66.2.5 --- php4/ext/standard/reg.c:1.66.2.4Mon Feb 24 11:19:44 2003 +++ php4/ext/standard/reg.c Mon Feb 24 11:30:14 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.66.2.4 2003/02/24 16:19:44 moriyoshi Exp $ */ +/* $Id: reg.c,v 1.66.2.5 2003/02/24 16:30:14 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -324,7 +324,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; while (*walk) { - if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = ((char) re.re_nsub)) { + if ('\\' == *walk isdigit(walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /tests/lang bug21600.phpt
moriyoshi Mon Feb 24 11:50:35 2003 EDT Modified files: /php4/tests/langbug21600.phpt Log: Fixed the test as the result is just considered to be expected Index: php4/tests/lang/bug21600.phpt diff -u php4/tests/lang/bug21600.phpt:1.2 php4/tests/lang/bug21600.phpt:1.3 --- php4/tests/lang/bug21600.phpt:1.2 Sun Jan 26 20:15:14 2003 +++ php4/tests/lang/bug21600.phpt Mon Feb 24 11:50:35 2003 @@ -26,7 +26,7 @@ --EXPECT-- array(1) { [foo]= - string(4) test + string(4) test } array(1) { [foo]= -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard reg.c
moriyoshi Mon Feb 24 11:54:21 2003 EDT Modified files: /php4/ext/standard reg.c Log: Forgot to fix this part Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.74 php4/ext/standard/reg.c:1.75 --- php4/ext/standard/reg.c:1.74Mon Feb 24 11:29:00 2003 +++ php4/ext/standard/reg.c Mon Feb 24 11:54:21 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.74 2003/02/24 16:29:00 moriyoshi Exp $ */ +/* $Id: reg.c,v 1.75 2003/02/24 16:54:21 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -324,7 +324,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; while (*walk) { - if ('\\' == *walk isdigit(walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { + if ('\\' == *walk isdigit((unsigned char)walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; } -- 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 reg.c
moriyoshi Mon Feb 24 11:56:25 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard reg.c Log: MFH Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.66.2.5 php4/ext/standard/reg.c:1.66.2.6 --- php4/ext/standard/reg.c:1.66.2.5Mon Feb 24 11:30:14 2003 +++ php4/ext/standard/reg.c Mon Feb 24 11:56:25 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.66.2.5 2003/02/24 16:30:14 moriyoshi Exp $ */ +/* $Id: reg.c,v 1.66.2.6 2003/02/24 16:56:25 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -324,7 +324,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; while (*walk) { - if ('\\' == *walk isdigit(walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { + if ('\\' == *walk isdigit((unsigned char)walk[1]) ((unsigned char)walk[1]) - '0' = re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /tests/lang bug22367.phpt
moriyoshi Mon Feb 24 14:37:27 2003 EDT Added files: /php4/tests/langbug22367.phpt Log: Added test case for bug #22367 Index: php4/tests/lang/bug22367.phpt +++ php4/tests/lang/bug22367.phpt --TEST-- Bug #22367 (weird zval allocation problem) --FILE-- ?php class foo { var $test = array(0, 1, 2, 3, 4); function a($arg) { var_dump(array_key_exists($arg, $this-test)); return $this-test[$arg]; } function b() { @$this-c(); $zero = $this-test[0]; $one = $this-test[1]; $two = $this-test[2]; $three = $this-test[3]; $four = $this-test[4]; return array($zero, $one, $two, $three, $four); } function c() { return $this-a($this-d()); } function d() {} } class bar extends foo { var $i = 0; var $idx; function bar($idx) { $this-idx = $idx; } function a($arg){ return parent::a($arg); } function d(){ return $this-idx; } } $a = new bar(5); var_dump($a-idx); @$a-c(); $b = $a-b(); var_dump($b); var_dump($a-test); $a = new bar(2); var_dump($a-idx); @$a-c(); $b = $a-b(); var_dump($b); var_dump($a-test); ? --EXPECT-- int(5) bool(false) bool(false) array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } int(2) bool(true) bool(true) array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } -- 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 bug22367.phpt
moriyoshi Mon Feb 24 14:38:33 2003 EDT Added files: (Branch: PHP_4_3) /php4/tests/langbug22367.phpt Log: MFH: added test case for bug #22367 Index: php4/tests/lang/bug22367.phpt +++ php4/tests/lang/bug22367.phpt --TEST-- Bug #22367 (weird zval allocation problem) --FILE-- ?php class foo { var $test = array(0, 1, 2, 3, 4); function a($arg) { var_dump(array_key_exists($arg, $this-test)); return $this-test[$arg]; } function b() { @$this-c(); $zero = $this-test[0]; $one = $this-test[1]; $two = $this-test[2]; $three = $this-test[3]; $four = $this-test[4]; return array($zero, $one, $two, $three, $four); } function c() { return $this-a($this-d()); } function d() {} } class bar extends foo { var $i = 0; var $idx; function bar($idx) { $this-idx = $idx; } function a($arg){ return parent::a($arg); } function d(){ return $this-idx; } } $a = new bar(5); var_dump($a-idx); @$a-c(); $b = $a-b(); var_dump($b); var_dump($a-test); $a = new bar(2); var_dump($a-idx); @$a-c(); $b = $a-b(); var_dump($b); var_dump($a-test); ? --EXPECT-- int(5) bool(false) bool(false) array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } int(2) bool(true) bool(true) array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } array(5) { [0]= int(0) [1]= int(1) [2]= int(2) [3]= int(3) [4]= int(4) } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard mail.c
iliaa Mon Feb 24 14:41:18 2003 EDT Modified files: /php4/ext/standard mail.c Log: Fixed bug #22355 (PHP would remove folding from Subject To fields). Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.68 php4/ext/standard/mail.c:1.69 --- php4/ext/standard/mail.c:1.68 Tue Dec 31 11:07:46 2002 +++ php4/ext/standard/mail.cMon Feb 24 14:41:18 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.68 2002/12/31 16:07:46 sebastian Exp $ */ +/* $Id: mail.c,v 1.69 2003/02/24 19:41:18 iliaa Exp $ */ #include stdlib.h #include ctype.h @@ -46,6 +46,15 @@ #include netware/sysexits.h /* For exit status codes like EX_OK */ #endif +#define SKIP_LONG_HEADER_SEP(str, pos) \ + if (str[pos] == '\r' str[pos + 1] == '\n' (str[pos + 2] == ' ' || str[pos + 2] == '\t')) {\ + pos += 3; \ + while (str[pos] == ' ' || str[pos] == '\t') { \ + pos++; \ + } \ + continue; \ + } \ + /* {{{ proto int ezmlm_hash(string addr) Calculate EZMLM list hash value. */ PHP_FUNCTION(ezmlm_hash) @@ -102,6 +111,12 @@ } for (i = 0; to[i]; i++) { if (iscntrl((unsigned char) to[i])) { + /* According to RFC 822, section 3.1.1 long headers may be separated into +* parts using CRLF followed at least one linear-white-space character ('\t' or ' '). +* To prevent these separators from being replaced with a space, we use the +* SKIP_LONG_HEADER_SEP to skip over them. +*/ + SKIP_LONG_HEADER_SEP(to, i); to[i] = ' '; } } @@ -116,6 +131,7 @@ } for(i = 0; subject[i]; i++) { if (iscntrl((unsigned char) subject[i])) { + SKIP_LONG_HEADER_SEP(subject, i); subject[i] = ' '; } } -- 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 mail.c
iliaa Mon Feb 24 14:41:40 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard mail.c Log: MFH Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.66.2.2 php4/ext/standard/mail.c:1.66.2.3 --- php4/ext/standard/mail.c:1.66.2.2 Tue Dec 31 11:35:31 2002 +++ php4/ext/standard/mail.cMon Feb 24 14:41:40 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.66.2.2 2002/12/31 16:35:31 sebastian Exp $ */ +/* $Id: mail.c,v 1.66.2.3 2003/02/24 19:41:40 iliaa Exp $ */ #include stdlib.h #include ctype.h @@ -46,6 +46,15 @@ #include netware/sysexits.h /* For exit status codes like EX_OK */ #endif +#define SKIP_LONG_HEADER_SEP(str, pos) \ + if (str[pos] == '\r' str[pos + 1] == '\n' (str[pos + 2] == ' ' || str[pos + 2] == '\t')) {\ + pos += 3; \ + while (str[pos] == ' ' || str[pos] == '\t') { \ + pos++; \ + } \ + continue; \ + } \ + /* {{{ proto int ezmlm_hash(string addr) Calculate EZMLM list hash value. */ PHP_FUNCTION(ezmlm_hash) @@ -102,6 +111,12 @@ } for (i = 0; to[i]; i++) { if (iscntrl((unsigned char) to[i])) { + /* According to RFC 822, section 3.1.1 long headers may be separated into +* parts using CRLF followed at least one linear-white-space character ('\t' or ' '). +* To prevent these separators from being replaced with a space, we use the +* SKIP_LONG_HEADER_SEP to skip over them. +*/ + SKIP_LONG_HEADER_SEP(to, i); to[i] = ' '; } } @@ -116,6 +131,7 @@ } for(i = 0; subject[i]; i++) { if (iscntrl((unsigned char) subject[i])) { + SKIP_LONG_HEADER_SEP(subject, i); subject[i] = ' '; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
iliaa Mon Feb 24 14:42:39 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Bug fixing news. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.108 php4/NEWS:1.1247.2.109 --- php4/NEWS:1.1247.2.108 Sun Feb 23 22:18:26 2003 +++ php4/NEWS Mon Feb 24 14:42:38 2003 @@ -25,6 +25,7 @@ - Fixed bug #22376 (wrong httpd.conf modified when using INSTALL_ROOT). (Jani) - Fixed bug #22363 (combinations of fwrite(), fread() and fseek() produce unexpected results). (Wez) +- Fixed bug #22355 (PHP would remove folding from Subject To fields). (Ilia) - Fixed bug #22330 (overloaded strrpos() gives wrong results). ([EMAIL PROTECTED], Moriyoshi) - Fixed bug #22308 (optimized passthru, code is now ~40 times faster). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard mail.c
My bad.. The patch isn't wrong except the CRLF conversion issue, and works fine with mb_send_mail(). Sorry for the wrong info. Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams cast.c plain_wrapper.c streams.c
wez Mon Feb 24 16:40:24 2003 EDT Modified files: /php4/ext/standard file.c /php4/main php_streams.h /php4/main/streams cast.c plain_wrapper.c streams.c Log: MFB: Bunch of streams related fixes. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.310 php4/ext/standard/file.c:1.311 --- php4/ext/standard/file.c:1.310 Sun Feb 23 22:13:25 2003 +++ php4/ext/standard/file.cMon Feb 24 16:40:23 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.310 2003/02/24 03:13:25 iliaa Exp $ */ +/* $Id: file.c,v 1.311 2003/02/24 21:40:23 wez Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2384,7 +2384,7 @@ int ret = FAILURE; srcstream = php_stream_open_wrapper(src, rb, - ENFORCE_SAFE_MODE | REPORT_ERRORS, + STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL); if (!srcstream) { Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.71 php4/main/php_streams.h:1.72 --- php4/main/php_streams.h:1.71Mon Feb 17 20:22:21 2003 +++ php4/main/php_streams.h Mon Feb 24 16:40:23 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_streams.h,v 1.71 2003/02/18 01:22:21 wez Exp $ */ +/* $Id: php_streams.h,v 1.72 2003/02/24 21:40:23 wez Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -405,6 +405,9 @@ /* this flag is used when only the headers from HTTP request are to be fetched */ #define STREAM_ONLY_GET_HEADERS512 + +/* don't apply open_basedir checks */ +#define STREAM_DISABLE_OPEN_BASEDIR1024 /* Antique - no longer has meaning */ #define IGNORE_URL_WIN 0 Index: php4/main/streams/cast.c diff -u php4/main/streams/cast.c:1.3 php4/main/streams/cast.c:1.4 --- php4/main/streams/cast.c:1.3Wed Feb 19 03:40:19 2003 +++ php4/main/streams/cast.cMon Feb 24 16:40:23 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: cast.c,v 1.3 2003/02/19 08:40:19 sniper Exp $ */ +/* $Id: cast.c,v 1.4 2003/02/24 21:40:23 wez Exp $ */ #define _GNU_SOURCE #include php.h @@ -208,7 +208,12 @@ return FAILURE; #endif - if (flags PHP_STREAM_CAST_TRY_HARD) { + if (!php_stream_is_filtered(stream) stream-ops-cast stream-ops-cast(stream, castas, NULL TSRMLS_CC) == SUCCESS) { + if (FAILURE == stream-ops-cast(stream, castas, ret TSRMLS_CC)) { + return FAILURE; + } + goto exit_success; + } else if (flags PHP_STREAM_CAST_TRY_HARD) { php_stream *newstream; newstream = php_stream_fopen_tmpfile(); Index: php4/main/streams/plain_wrapper.c diff -u php4/main/streams/plain_wrapper.c:1.2 php4/main/streams/plain_wrapper.c:1.3 --- php4/main/streams/plain_wrapper.c:1.2 Wed Feb 19 03:40:19 2003 +++ php4/main/streams/plain_wrapper.c Mon Feb 24 16:40:23 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.2 2003/02/19 08:40:19 sniper Exp $ */ +/* $Id: plain_wrapper.c,v 1.3 2003/02/24 21:40:23 wez Exp $ */ #include php.h #include php_globals.h @@ -603,7 +603,7 @@ DIR *dir = NULL; php_stream *stream = NULL; - if (php_check_open_basedir(path TSRMLS_CC)) { + if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } @@ -637,7 +637,7 @@ return php_stream_fopen_with_path_rel(path, mode, PG(include_path), opened_path, options); } - if (php_check_open_basedir(path TSRMLS_CC)) { + if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } @@ -702,7 +702,7 @@ } - if (php_check_open_basedir(filename TSRMLS_CC)) { + if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(filename TSRMLS_CC)) { return NULL; } @@ -722,7 +722,7 @@ /* Absolute path open */ if (IS_ABSOLUTE_PATH(filename, filename_length)) { - if (php_check_open_basedir(filename TSRMLS_CC)) { + if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(filename TSRMLS_CC)) { return NULL; } @@ -748,7 +748,7 @@ free(cwd); - if (php_check_open_basedir(trypath TSRMLS_CC)) { + if ((options STREAM_DISABLE_OPEN_BASEDIR == 0)
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c basic_functions.h user_filters.c
pollita Mon Feb 24 16:56:20 2003 EDT Modified files: /php4/ext/standard user_filters.c basic_functions.c basic_functions.h Log: Initial re-implementation of userfilters after filterchain redesign by wez. More userspace API to come. Index: php4/ext/standard/user_filters.c diff -u php4/ext/standard/user_filters.c:1.10 php4/ext/standard/user_filters.c:1.11 --- php4/ext/standard/user_filters.c:1.10 Mon Feb 17 20:22:21 2003 +++ php4/ext/standard/user_filters.cMon Feb 24 16:56:18 2003 @@ -14,10 +14,11 @@ +--+ | Authors: | | Wez Furlong ([EMAIL PROTECTED]) | + | Sara Golemon ([EMAIL PROTECTED]) | +--+ */ -/* $Id: user_filters.c,v 1.10 2003/02/18 01:22:21 wez Exp $ */ +/* $Id: user_filters.c,v 1.11 2003/02/24 21:56:18 pollita Exp $ */ /* * TODO: Rewrite for buckets. @@ -45,6 +46,11 @@ #include ext/standard/basic_functions.h #include ext/standard/file.h +#define PHP_STREAM_BRIGADE_RES_NAMEuserfilter.bucket brigade +#define PHP_STREAM_BUCKET_RES_NAME userfilter.bucket +#define PHP_STREAM_FILTER_RES_NAME userfilter.filter +#define PHP_STREAM_RES_NAME userfilter.stream + struct php_user_filter_data { zend_class_entry *ce; /* variable length; this *must* be last in the structure */ @@ -53,6 +59,9 @@ /* to provide context for calling into the next filter from user-space */ static int le_userfilters; +static int le_bucket_brigade; +static int le_bucket; +static int le_stream; #define GET_FILTER_FROM_OBJ() { \ zval **tmp; \ @@ -70,9 +79,7 @@ } static zend_function_entry user_filter_class_funcs[] = { - PHP_NAMED_FE(write, PHP_FN(user_filter_nop),NULL) - PHP_NAMED_FE(read, PHP_FN(user_filter_nop),NULL) - PHP_NAMED_FE(flush, PHP_FN(user_filter_nop),NULL) + PHP_NAMED_FE(filter,PHP_FN(user_filter_nop),NULL) PHP_NAMED_FE(oncreate, PHP_FN(user_filter_nop),NULL) PHP_NAMED_FE(onclose, PHP_FN(user_filter_nop),NULL) { NULL, NULL, NULL } @@ -90,10 +97,27 @@ /* init the filter resource; it has no dtor, as streams will always clean it up * at the correct time */ - le_userfilters = zend_register_list_destructors_ex(NULL, NULL, stream filter, 0); + le_userfilters = zend_register_list_destructors_ex(NULL, NULL, PHP_STREAM_FILTER_RES_NAME, 0); + + if (le_userfilters == FAILURE) { + return FAILURE; + } - if (le_userfilters == FAILURE) + le_bucket_brigade = zend_register_list_destructors_ex(NULL, NULL, PHP_STREAM_BRIGADE_RES_NAME, module_number); + le_bucket = zend_register_list_destructors_ex(NULL, NULL, PHP_STREAM_BUCKET_RES_NAME, module_number); + le_stream = zend_register_list_destructors_ex(NULL, NULL, PHP_STREAM_RES_NAME, module_number); + + if (le_bucket_brigade == FAILURE) { return FAILURE; + } + + REGISTER_LONG_CONSTANT(PSFS_PASS_ON, PSFS_PASS_ON, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(PSFS_FEED_ME, PSFS_FEED_ME, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(PSFS_ERR_FATAL,PSFS_ERR_FATAL, CONST_CS | CONST_PERSISTENT); + + REGISTER_LONG_CONSTANT(PSFS_FLAG_NORMAL, PSFS_FLAG_NORMAL, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(PSFS_FLAG_FLUSH_INC, PSFS_FLAG_FLUSH_INC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(PSFS_FLAG_FLUSH_CLOSE, PSFS_FLAG_FLUSH_CLOSE, CONST_CS | CONST_PERSISTENT); return SUCCESS; } @@ -117,7 +141,7 @@ if (retval) zval_ptr_dtor(retval); - if (SUCCESS == zend_hash_index_find(Z_OBJPROP_P(obj), 0, (void**)tmp)) { + if (SUCCESS == zend_hash_find(Z_OBJPROP_P(obj), filter, 6, (void**)tmp)) { zend_list_delete(Z_LVAL_PP(tmp)); FREE_ZVAL(*tmp); } @@ -135,25 +159,49 @@ int flags TSRMLS_DC) { - int ret = EOF; + int ret = PSFS_ERR_FATAL; zval *obj = (zval*)thisfilter-abstract; zval func_name; zval *retval = NULL; - zval **args[1]; - zval *zcount; + zval **args[4]; + zval *zclosing, *zconsumed, *zin, *zout, *zstream; int call_result; + if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), stream, 6, (void**)zstream)) { + /* Give the userfilter class a hook back to
[PHP-CVS] cvs: php4 /ext/standard php_string.h string.c
moriyoshi Mon Feb 24 17:01:13 2003 EDT Modified files: /php4/ext/standard php_string.h string.c Log: Made strip_tags() binary safe Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.71 php4/ext/standard/php_string.h:1.72 --- php4/ext/standard/php_string.h:1.71 Tue Feb 11 17:47:26 2003 +++ php4/ext/standard/php_string.h Mon Feb 24 17:01:11 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.71 2003/02/11 22:47:26 iliaa Exp $ */ +/* $Id: php_string.h,v 1.72 2003/02/24 22:01:11 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -129,7 +129,7 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC); -PHPAPI void php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value); PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.359 php4/ext/standard/string.c:1.360 --- php4/ext/standard/string.c:1.359Tue Feb 18 13:11:34 2003 +++ php4/ext/standard/string.c Mon Feb 24 17:01:12 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.359 2003/02/18 18:11:34 moriyoshi Exp $ */ +/* $Id: string.c,v 1.360 2003/02/24 22:01:12 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3299,6 +3299,7 @@ zval **str, **allow=NULL; char *allowed_tags=NULL; int allowed_tags_len=0; + size_t retval_len; switch (ZEND_NUM_ARGS()) { case 1: @@ -3320,8 +3321,8 @@ } convert_to_string_ex(str); buf = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str)); - php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); - RETURN_STRING(buf, 0); + retval_len = php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); + RETURN_STRINGL(buf, retval_len, 0); } /* }}} */ @@ -3555,7 +3556,7 @@ swm: Added ability to strip ?xml tags without assuming it PHP code. */ -PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) { char *tbuf, *buf, *p, *tp, *rp, c, lc; int br, i=0, depth=0; @@ -3751,6 +3752,8 @@ efree(tbuf); if (stateptr) *stateptr = state; + + return (size_t)(rp - rbuf); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard string.c
moriyoshi Mon Feb 24 17:19:37 2003 EDT Modified files: /php4/ext/standard string.c Log: Fixed possible buffer overflow of php_strip_tags Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.360 php4/ext/standard/string.c:1.361 --- php4/ext/standard/string.c:1.360Mon Feb 24 17:01:12 2003 +++ php4/ext/standard/string.c Mon Feb 24 17:19:36 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.360 2003/02/24 22:01:12 moriyoshi Exp $ */ +/* $Id: string.c,v 1.361 2003/02/24 22:19:36 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3746,7 +3746,9 @@ c = *(++p); i++; } - *rp = '\0'; + if (rp rbuf + len) { + *rp = '\0'; + } efree(buf); if (allow) efree(tbuf); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams cast.c plain_wrapper.c streams.c
On Mon, 24 Feb 2003, Wez Furlong wrote: wez Mon Feb 24 16:40:24 2003 EDT Modified files: /php4/ext/standardfile.c /php4/mainphp_streams.h /php4/main/streamscast.c plain_wrapper.c streams.c Log: MFB: Bunch of streams related fixes. Sorry, which branch are you merging from? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c
moriyoshi Mon Feb 24 17:39:47 2003 EDT Modified files: /php4/ext/standard file.c Log: Made fgetss() binary safe too Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.311 php4/ext/standard/file.c:1.312 --- php4/ext/standard/file.c:1.311 Mon Feb 24 16:40:23 2003 +++ php4/ext/standard/file.cMon Feb 24 17:39:47 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.311 2003/02/24 21:40:23 wez Exp $ */ +/* $Id: file.c,v 1.312 2003/02/24 22:39:47 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1675,6 +1675,7 @@ { zval **fd, **bytes, **allow=NULL; int len; + size_t actual_len, retval_len; char *buf; php_stream *stream; char *allowed_tags=NULL; @@ -1713,15 +1714,15 @@ /*needed because recv doesnt set null char at end*/ memset(buf, 0, len + 1); - if (php_stream_gets(stream, buf, len) == NULL) { + if (php_stream_get_line(stream, buf, len, actual_len) == NULL) { efree(buf); RETURN_FALSE; } /* strlen() can be used here since we are doing it on the return of an fgets() anyway */ - php_strip_tags(buf, strlen(buf), stream-fgetss_state, allowed_tags, allowed_tags_len); + retval_len = php_strip_tags(buf, actual_len, stream-fgetss_state, allowed_tags, allowed_tags_len); - RETURN_STRING(buf, 0); + RETURN_STRINGL(buf, retval_len, 0); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard php_string.h string.c
This should probably go into the 4.3 branch. On Mon, 24 Feb 2003, Moriyoshi Koizumi wrote: moriyoshi Mon Feb 24 17:01:13 2003 EDT Modified files: /php4/ext/standardphp_string.h string.c Log: Made strip_tags() binary safe Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.71 php4/ext/standard/php_string.h:1.72 --- php4/ext/standard/php_string.h:1.71 Tue Feb 11 17:47:26 2003 +++ php4/ext/standard/php_string.hMon Feb 24 17:01:11 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.71 2003/02/11 22:47:26 iliaa Exp $ */ +/* $Id: php_string.h,v 1.72 2003/02/24 22:01:11 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -129,7 +129,7 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC); -PHPAPI void php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value); PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.359 php4/ext/standard/string.c:1.360 --- php4/ext/standard/string.c:1.359 Tue Feb 18 13:11:34 2003 +++ php4/ext/standard/string.cMon Feb 24 17:01:12 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.359 2003/02/18 18:11:34 moriyoshi Exp $ */ +/* $Id: string.c,v 1.360 2003/02/24 22:01:12 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3299,6 +3299,7 @@ zval **str, **allow=NULL; char *allowed_tags=NULL; int allowed_tags_len=0; + size_t retval_len; switch (ZEND_NUM_ARGS()) { case 1: @@ -3320,8 +3321,8 @@ } convert_to_string_ex(str); buf = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str)); - php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); - RETURN_STRING(buf, 0); + retval_len = php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); + RETURN_STRINGL(buf, retval_len, 0); } /* }}} */ @@ -3555,7 +3556,7 @@ swm: Added ability to strip ?xml tags without assuming it PHP code. */ -PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) { char *tbuf, *buf, *p, *tp, *rp, c, lc; int br, i=0, depth=0; @@ -3751,6 +3752,8 @@ efree(tbuf); if (stateptr) *stateptr = state; + + return (size_t)(rp - rbuf); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard filters.c
moriyoshi Mon Feb 24 17:41:55 2003 EDT Modified files: /php4/ext/standard filters.c Log: Fixed string.strip_tags filter so it reflects the change on php_strip_tags Index: php4/ext/standard/filters.c diff -u php4/ext/standard/filters.c:1.27 php4/ext/standard/filters.c:1.28 --- php4/ext/standard/filters.c:1.27Tue Feb 18 19:12:23 2003 +++ php4/ext/standard/filters.c Mon Feb 24 17:41:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: filters.c,v 1.27 2003/02/19 00:12:23 moriyoshi Exp $ */ +/* $Id: filters.c,v 1.28 2003/02/24 22:41:55 moriyoshi Exp $ */ #include php.h #include php_globals.h @@ -214,9 +214,8 @@ bucket = php_stream_bucket_make_writeable(buckets_in-head TSRMLS_CC); consumed = bucket-buflen; - php_strip_tags(bucket-buf, bucket-buflen, (inst-state), (char *)inst-allowed_tags, inst-allowed_tags_len); + bucket-buflen = php_strip_tags(bucket-buf, bucket-buflen, (inst-state), (char *)inst-allowed_tags, inst-allowed_tags_len); - bucket-buflen = strlen(bucket-buf); php_stream_bucket_append(buckets_out, bucket TSRMLS_CC); } @@ -232,6 +231,8 @@ assert(thisfilter-abstract != NULL); php_strip_tags_filter_dtor((php_strip_tags_filter *)thisfilter-abstract); + + pefree(thisfilter-abstract, ((php_strip_tags_filter *)thisfilter-abstract)-persistent); } static php_stream_filter_ops strfilter_strip_tags_ops = { -- 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 php_string.h string.c
moriyoshi Mon Feb 24 17:47:15 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard php_string.h string.c Log: MFH: made strip_tags() binary safe Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.65.2.1 php4/ext/standard/php_string.h:1.65.2.2 --- php4/ext/standard/php_string.h:1.65.2.1 Tue Dec 31 11:35:33 2002 +++ php4/ext/standard/php_string.h Mon Feb 24 17:47:12 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.65.2.1 2002/12/31 16:35:33 sebastian Exp $ */ +/* $Id: php_string.h,v 1.65.2.2 2003/02/24 22:47:12 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -125,7 +125,7 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC); -PHPAPI void php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value); PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.16 php4/ext/standard/string.c:1.333.2.17 --- php4/ext/standard/string.c:1.333.2.16 Tue Feb 18 13:14:32 2003 +++ php4/ext/standard/string.c Mon Feb 24 17:47:12 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333.2.16 2003/02/18 18:14:32 moriyoshi Exp $ */ +/* $Id: string.c,v 1.333.2.17 2003/02/24 22:47:12 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3038,6 +3038,7 @@ zval **str, **allow=NULL; char *allowed_tags=NULL; int allowed_tags_len=0; + size_t retval_len; switch (ZEND_NUM_ARGS()) { case 1: @@ -3059,8 +3060,8 @@ } convert_to_string_ex(str); buf = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str)); - php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); - RETURN_STRING(buf, 0); + retval_len = php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags, allowed_tags_len); + RETURN_STRINGL(buf, retval_len, 0); } /* }}} */ @@ -3294,7 +3295,7 @@ swm: Added ability to strip ?xml tags without assuming it PHP code. */ -PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) +PHPAPI size_t php_strip_tags(char *rbuf, int len, int *stateptr, char *allow, int allow_len) { char *tbuf, *buf, *p, *tp, *rp, c, lc; int br, i=0, depth=0; @@ -3484,12 +3485,16 @@ c = *(++p); i++; } - *rp = '\0'; + if (rp rbuf + len) { + *rp = '\0'; + } efree(buf); if (allow) efree(tbuf); if (stateptr) *stateptr = state; + + return (size_t)(rp - rbuf); } /* }}} */ -- 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 file.c
moriyoshi Mon Feb 24 17:48:39 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard file.c Log: MFH: made fgetss() binary safe too Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.279.2.11 php4/ext/standard/file.c:1.279.2.12 --- php4/ext/standard/file.c:1.279.2.11 Sun Feb 23 22:15:53 2003 +++ php4/ext/standard/file.cMon Feb 24 17:48:39 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.279.2.11 2003/02/24 03:15:53 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.12 2003/02/24 22:48:39 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1390,6 +1390,7 @@ { zval **fd, **bytes, **allow=NULL; int len; + size_t actual_len, retval_len; char *buf; php_stream *stream; char *allowed_tags=NULL; @@ -1428,15 +1429,15 @@ /*needed because recv doesnt set null char at end*/ memset(buf, 0, len + 1); - if (php_stream_gets(stream, buf, len) == NULL) { + if (php_stream_get_line(stream, buf, len, actual_len) == NULL) { efree(buf); RETURN_FALSE; } /* strlen() can be used here since we are doing it on the return of an fgets() anyway */ - php_strip_tags(buf, strlen(buf), stream-fgetss_state, allowed_tags, allowed_tags_len); + retval_len = php_strip_tags(buf, actual_len, stream-fgetss_state, allowed_tags, allowed_tags_len); - RETURN_STRING(buf, 0); + RETURN_STRINGL(buf, retval_len, 0); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main/streams memory.c
moriyoshi Mon Feb 24 18:13:40 2003 EDT Modified files: /php4/main/streams memory.c Log: Removed unnecessary asserts Index: php4/main/streams/memory.c diff -u php4/main/streams/memory.c:1.2 php4/main/streams/memory.c:1.3 --- php4/main/streams/memory.c:1.2 Wed Feb 19 03:40:19 2003 +++ php4/main/streams/memory.c Mon Feb 24 18:13:40 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: memory.c,v 1.2 2003/02/19 08:40:19 sniper Exp $ */ +/* $Id: memory.c,v 1.3 2003/02/24 23:13:40 moriyoshi Exp $ */ #define _GNU_SOURCE #include php.h @@ -215,7 +215,6 @@ php_stream *stream; self = emalloc(sizeof(*self)); - assert(self != NULL); self-data = NULL; self-fpos = 0; self-fsize = 0; @@ -432,7 +431,6 @@ php_stream *stream; self = ecalloc(1, sizeof(*self)); - assert(self != NULL); self-smax = max_memory_usage; self-mode = mode; stream = php_stream_alloc(php_stream_temp_ops, self, 0, r+b); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams cast.c plain_wrapper.c streams.c
PHP_4_3. I made the original fixes there and then up-ported them to PHP5, which wasn't suffering so much since the ze-stream patch. --Wez. On Mon, 24 Feb 2003, Rasmus Lerdorf wrote: On Mon, 24 Feb 2003, Wez Furlong wrote: wez Mon Feb 24 16:40:24 2003 EDT Modified files: /php4/ext/standard file.c /php4/main php_streams.h /php4/main/streams cast.c plain_wrapper.c streams.c Log: MFB: Bunch of streams related fixes. Sorry, which branch are you merging from? -- 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
[PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams plain_wrapper.c
iliaa Mon Feb 24 20:39:07 2003 EDT Modified files: /php4/main php_streams.h /php4/main/streams plain_wrapper.c /php4/ext/standard file.c Log: Added locking to streams. Allow PHP to automatically release locks on files when terminating the stream. Fixed bugs in the handling of the 3rd optional parameter to flock(). Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.72 php4/main/php_streams.h:1.73 --- php4/main/php_streams.h:1.72Mon Feb 24 16:40:23 2003 +++ php4/main/php_streams.h Mon Feb 24 20:39:06 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_streams.h,v 1.72 2003/02/24 21:40:23 wez Exp $ */ +/* $Id: php_streams.h,v 1.73 2003/02/25 01:39:06 iliaa Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -325,6 +325,15 @@ /* set the timeout duration for reads on the stream. ptrparam is a pointer to a struct timeval * */ #define PHP_STREAM_OPTION_READ_TIMEOUT 4 #define PHP_STREAM_OPTION_SET_CHUNK_SIZE 5 + +/* set or release lock on a stream */ +#define PHP_STREAM_OPTION_LOCKING 6 + +/* whether or not locking is supported */ +#define PHP_STREAM_LOCK_SUPPORTED 1 + +#define php_stream_supports_lock(stream) php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKING, 0, (void *) PHP_STREAM_LOCK_SUPPORTED TSRMLS_CC) == 0 ? 1 : 0 +#define php_stream_lock(stream, mode) php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKING, (mode), (void *) NULL TSRMLS_CC) #define PHP_STREAM_OPTION_RETURN_OK 0 /* option set OK */ #define PHP_STREAM_OPTION_RETURN_ERR -1 /* problem setting option */ Index: php4/main/streams/plain_wrapper.c diff -u php4/main/streams/plain_wrapper.c:1.3 php4/main/streams/plain_wrapper.c:1.4 --- php4/main/streams/plain_wrapper.c:1.3 Mon Feb 24 16:40:23 2003 +++ php4/main/streams/plain_wrapper.c Mon Feb 24 20:39:06 2003 @@ -16,13 +16,14 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.3 2003/02/24 21:40:23 wez Exp $ */ +/* $Id: plain_wrapper.c,v 1.4 2003/02/25 01:39:06 iliaa Exp $ */ #include php.h #include php_globals.h #include php_network.h #include php_open_temporary_file.h #include ext/standard/file.h +#include ext/standard/flock_compat.h #include stddef.h #include fcntl.h #if HAVE_SYS_WAIT_H @@ -131,6 +132,7 @@ int fd; /* underlying file descriptor */ int is_process_pipe;/* use pclose instead of fclose */ int is_pipe;/* don't try and seek */ + int lock_flag; /* stores the lock state */ char *temp_file_name; /* if non-null, this is the path to a temporary file that * is to be deleted when the stream is closed */ #if HAVE_FLUSHIO @@ -167,6 +169,8 @@ php_stdio_stream_data *self = (php_stdio_stream_data*)stream-abstract; self-temp_file_name = opened_path; + self-lock_flag = LOCK_UN; + return stream; } fclose(fp); @@ -186,6 +190,7 @@ self = emalloc_rel_orig(sizeof(*self)); self-file = NULL; self-is_pipe = 0; + self-lock_flag = LOCK_UN; self-is_process_pipe = 0; self-temp_file_name = NULL; self-fd = fd; @@ -228,6 +233,7 @@ self = emalloc_rel_orig(sizeof(*self)); self-file = file; self-is_pipe = 0; + self-lock_flag = LOCK_UN; self-is_process_pipe = 0; self-temp_file_name = NULL; self-fd = fileno(file); @@ -270,6 +276,7 @@ self = emalloc_rel_orig(sizeof(*self)); self-file = file; self-is_pipe = 1; + self-lock_flag = LOCK_UN; self-is_process_pipe = 1; self-fd = fileno(file); self-temp_file_name = NULL; @@ -340,6 +347,9 @@ assert(data != NULL); if (close_handle) { + if (data-lock_flag != LOCK_UN) { + php_stream_lock(stream, LOCK_UN); + } if (data-file) { if (data-is_process_pipe) { errno = 0; @@ -541,6 +551,24 @@ return -1; } break; + + case PHP_STREAM_OPTION_LOCKING: + if (fd == -1) { + return -1; + } + + if ((int) ptrparam == PHP_STREAM_LOCK_SUPPORTED) { + return 0; + } + + if (!php_flock(fd, value) || (errno == EWOULDBLOCK value LOCK_NB)) { +
[PHP-CVS] cvs: php4 /main/streams plain_wrapper.c
iliaa Mon Feb 24 20:41:58 2003 EDT Modified files: /php4/main/streams plain_wrapper.c Log: Use native flock() whenever possible. Index: php4/main/streams/plain_wrapper.c diff -u php4/main/streams/plain_wrapper.c:1.4 php4/main/streams/plain_wrapper.c:1.5 --- php4/main/streams/plain_wrapper.c:1.4 Mon Feb 24 20:39:06 2003 +++ php4/main/streams/plain_wrapper.c Mon Feb 24 20:41:58 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.4 2003/02/25 01:39:06 iliaa Exp $ */ +/* $Id: plain_wrapper.c,v 1.5 2003/02/25 01:41:58 iliaa Exp $ */ #include php.h #include php_globals.h @@ -561,7 +561,7 @@ return 0; } - if (!php_flock(fd, value) || (errno == EWOULDBLOCK value LOCK_NB)) { + if (!flock(fd, value) || (errno == EWOULDBLOCK value LOCK_NB)) { data-lock_flag = value; return 0; } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main/streams plain_wrapper.c
iliaa Mon Feb 24 20:44:57 2003 EDT Modified files: /php4/main/streams plain_wrapper.c Log: Fixed various compiler warnings. Index: php4/main/streams/plain_wrapper.c diff -u php4/main/streams/plain_wrapper.c:1.5 php4/main/streams/plain_wrapper.c:1.6 --- php4/main/streams/plain_wrapper.c:1.5 Mon Feb 24 20:41:58 2003 +++ php4/main/streams/plain_wrapper.c Mon Feb 24 20:44:57 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.5 2003/02/25 01:41:58 iliaa Exp $ */ +/* $Id: plain_wrapper.c,v 1.6 2003/02/25 01:44:57 iliaa Exp $ */ #include php.h #include php_globals.h @@ -29,6 +29,9 @@ #if HAVE_SYS_WAIT_H #include sys/wait.h #endif +#if HAVE_SYS_FILE_H +#include sys/file.h +#endif #include php_streams_int.h @@ -631,7 +634,7 @@ DIR *dir = NULL; php_stream *stream = NULL; - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(path TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } @@ -665,7 +668,7 @@ return php_stream_fopen_with_path_rel(path, mode, PG(include_path), opened_path, options); } - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(path TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } @@ -730,7 +733,7 @@ } - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(filename TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(filename TSRMLS_CC)) { return NULL; } @@ -750,7 +753,7 @@ /* Absolute path open */ if (IS_ABSOLUTE_PATH(filename, filename_length)) { - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(filename TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(filename TSRMLS_CC)) { return NULL; } @@ -776,7 +779,7 @@ free(cwd); - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(trypath TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(trypath TSRMLS_CC)) { return NULL; } if ((php_check_safe_mode_include_dir(trypath TSRMLS_CC)) == 0) { @@ -792,7 +795,7 @@ if (!path || (path !*path)) { - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(path TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } @@ -837,7 +840,7 @@ } snprintf(trypath, MAXPATHLEN, %s/%s, ptr, filename); - if ((options STREAM_DISABLE_OPEN_BASEDIR == 0) php_check_open_basedir(trypath TSRMLS_CC)) { + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(trypath TSRMLS_CC)) { stream = NULL; goto stream_done; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
iliaa Mon Feb 24 22:49:27 2003 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Fixed a crash in gdImageCopyMergeGray(). Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.46 php4/ext/gd/libgd/gd.c:1.47 --- php4/ext/gd/libgd/gd.c:1.46 Sun Feb 9 09:17:05 2003 +++ php4/ext/gd/libgd/gd.c Mon Feb 24 22:49:26 2003 @@ -2160,67 +2160,50 @@ void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h, int pct) { + int c, dc; + int x, y; + int tox, toy; + int ncR, ncG, ncB; + float g; + toy = dstY; - int c, dc; - int x, y; - int tox, toy; - int ncR, ncG, ncB; - float g; - toy = dstY; - for (y = srcY; (y (srcY + h)); y++) -{ - tox = dstX; - for (x = srcX; (x (srcX + w)); x++) - { - int nc; - c = gdImageGetPixel (src, x, y); - /* Added 7/24/95: support transparent copies */ - if (gdImageGetTransparent (src) == c) - { - tox++; - continue; - } - /* If it's the same image, mapping is trivial */ - if (dst == src) - { - nc = c; - } - else - { - dc = gdImageGetPixel (dst, tox, toy); - g = (0.29900f * dst-red[dc]) - + (0.58700f * dst-green[dc]) - + (0.11400f * dst-blue[dc]); + for (y = srcY; (y (srcY + h)); y++) { + tox = dstX; + for (x = srcX; (x (srcX + w)); x++) { + int nc; + c = gdImageGetPixel (src, x, y); + /* Added 7/24/95: support transparent copies */ + if (gdImageGetTransparent(src) == c) { + tox++; + continue; + } + /* If it's the same image, mapping is trivial */ + if (dst == src) { + nc = c; + } else { + dc = gdImageGetPixel(dst, tox, toy); + g = (0.29900f * gdImageRed(dst, dc)) + (0.58700f * gdImageGreen(dst, dc)) + (0.11400f * gdImageBlue(dst, dc)); - ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) - + gdImageRed (dst, dc) * g * - ((100 - pct) / 100.0f)); - ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) - + gdImageGreen (dst, dc) * g * - ((100 - pct) / 100.0f)); - ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) - + gdImageBlue (dst, dc) * g * - ((100 - pct) / 100.0f)); + ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + gdImageRed(dst, dc) * g * ((100 - pct) / 100.0f)); + ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + gdImageGreen(dst, dc) * g * ((100 - pct) / 100.0f)); + ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + gdImageBlue(dst, dc) * g * ((100 - pct) / 100.0f)); - /* First look for an exact match */ - nc = gdImageColorExact (dst, ncR, ncG, ncB); - if (nc == (-1)) - { - /* No, so try to allocate it */ - nc = gdImageColorAllocate (dst, ncR, ncG, ncB); - /* If we're out of colors, go for the -closest color */ - if (nc == (-1)) - { - nc = gdImageColorClosest (dst, ncR, ncG, ncB); - } + /* First look for an exact match */ + nc = gdImageColorExact(dst, ncR, ncG, ncB); + if (nc == (-1)) { + /* No, so try to allocate it */ + nc = gdImageColorAllocate(dst, ncR, ncG, ncB); + /* If we're out of colors, go for the closest color */ + if (nc == (-1)) { + nc = gdImageColorClosest(dst, ncR, ncG, ncB); + } + } + } + gdImageSetPixel(dst, tox, toy, nc); + tox++; } - } - gdImageSetPixel (dst, tox, toy, nc); - tox++; + toy++; } - toy++; -} } void -- 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/gd/libgd gd.c
iliaa Mon Feb 24 22:53:22 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd/libgd gd.c Log: MFH (fix for crash in gdImageCopyMergeGray()). Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.24.2.3 php4/ext/gd/libgd/gd.c:1.24.2.4 --- php4/ext/gd/libgd/gd.c:1.24.2.3 Sat Feb 8 03:54:11 2003 +++ php4/ext/gd/libgd/gd.c Mon Feb 24 22:53:22 2003 @@ -2000,9 +2000,7 @@ else { dc = gdImageGetPixel (dst, tox, toy); - g = 0.29900f * dst-red[dc] - + 0.58700f * dst-green[dc] - + 0.11400f * dst-blue[dc]; + g = (0.29900f * gdImageRed(dst, dc)) + (0.58700f * gdImageGreen(dst, dc)) + (0.11400f * gdImageBlue(dst, dc)); ncR = (int)( gdImageRed (src, c) * (pct / 100.0f) + gdImageRed (dst, dc) * g * ((100 - pct) / 100.0f)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard ftp_fopen_wrapper.c
iliaa Mon Feb 24 23:20:22 2003 EDT Modified files: /php4/ext/standard ftp_fopen_wrapper.c Log: Fixed bug #22402 (opening of ftp for read/write could fail due to invalid return code handling). Solution suggested by [EMAIL PROTECTED] Index: php4/ext/standard/ftp_fopen_wrapper.c diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.44 php4/ext/standard/ftp_fopen_wrapper.c:1.45 --- php4/ext/standard/ftp_fopen_wrapper.c:1.44 Mon Feb 17 08:29:57 2003 +++ php4/ext/standard/ftp_fopen_wrapper.c Mon Feb 24 23:20:22 2003 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.44 2003/02/17 13:29:57 zeev Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.45 2003/02/25 04:20:22 iliaa Exp $ */ #include php.h #include php_globals.h @@ -414,7 +414,7 @@ } result = GET_FTP_RESULT(stream); - if (result != 150) { + if (result != 150 result != 125) { /* Could not retrieve or send the file * this data will only be sent to us after connection on the data port was initiated. */ -- 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 ftp_fopen_wrapper.c
iliaa Mon Feb 24 23:20:44 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard ftp_fopen_wrapper.c Log: MFH Index: php4/ext/standard/ftp_fopen_wrapper.c diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.38.2.3 php4/ext/standard/ftp_fopen_wrapper.c:1.38.2.4 --- php4/ext/standard/ftp_fopen_wrapper.c:1.38.2.3 Tue Dec 31 11:35:28 2002 +++ php4/ext/standard/ftp_fopen_wrapper.c Mon Feb 24 23:20:44 2003 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.38.2.3 2002/12/31 16:35:28 sebastian Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.38.2.4 2003/02/25 04:20:44 iliaa Exp $ */ #include php.h #include php_globals.h @@ -415,7 +415,7 @@ } result = GET_FTP_RESULT(stream); - if (result != 150) { + if (result != 150 result != 125) { /* Could not retrieve or send the file * this data will only be sent to us after connection on the data port was initiated. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
iliaa Mon Feb 24 23:21:27 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Bug fixing news. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.109 php4/NEWS:1.1247.2.110 --- php4/NEWS:1.1247.2.109 Mon Feb 24 14:42:38 2003 +++ php4/NEWS Mon Feb 24 23:21:26 2003 @@ -21,6 +21,8 @@ - Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) - Added XBM and WBMP support for getimagesize(). (Marcus) - Fixed several errors in hwapi extension. Objects weren't handled properly. (Uwe) +- Fixed bug #22402 (opening of ftp for read/write could fail due to invalid + return code handling). (Ilia) - Fixed bug #22382 (fgetcsv() did not handle \ correctly). (Ilia) - Fixed bug #22376 (wrong httpd.conf modified when using INSTALL_ROOT). (Jani) - Fixed bug #22363 (combinations of fwrite(), fread() and fseek() produce -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/oci8 config.m4
sniper Mon Feb 24 23:36:54 2003 EDT Modified files: /php4/ext/oci8 config.m4 Log: fix bug #22324, libjdbcoci8.so is not necessarily needed.. Index: php4/ext/oci8/config.m4 diff -u php4/ext/oci8/config.m4:1.41 php4/ext/oci8/config.m4:1.42 --- php4/ext/oci8/config.m4:1.41Fri Jan 24 12:51:19 2003 +++ php4/ext/oci8/config.m4 Mon Feb 24 23:36:54 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.41 2003/01/24 17:51:19 sniper Exp $ +dnl $Id: config.m4,v 1.42 2003/02/25 04:36:54 sniper Exp $ dnl AC_DEFUN(PHP_OCI_IF_DEFINED,[ @@ -88,9 +88,12 @@ 8.1) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) - fi + +dnl This breaks build on some systems (AIX at least). +dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then +dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) +dnl fi + PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) @@ -103,9 +106,12 @@ 9.0) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) - fi + +dnl This breaks build on some systems (AIX at least) +dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then +dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) +dnl fi + PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) -- 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/oci8 config.m4
sniper Mon Feb 24 23:37:08 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/oci8 config.m4 Log: MFH Index: php4/ext/oci8/config.m4 diff -u php4/ext/oci8/config.m4:1.37.2.2 php4/ext/oci8/config.m4:1.37.2.3 --- php4/ext/oci8/config.m4:1.37.2.2Fri Jan 31 09:21:19 2003 +++ php4/ext/oci8/config.m4 Mon Feb 24 23:37:08 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.37.2.2 2003/01/31 14:21:19 sniper Exp $ +dnl $Id: config.m4,v 1.37.2.3 2003/02/25 04:37:08 sniper Exp $ dnl AC_DEFUN(PHP_OCI_IF_DEFINED,[ @@ -88,9 +88,12 @@ 8.1) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) - fi + +dnl This breaks build on some systems (AIX at least). +dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then +dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) +dnl fi + PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) @@ -103,9 +106,12 @@ 9.0) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) - fi + +dnl This breaks build on some systems (AIX at least) +dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then +dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) +dnl fi + PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/informix config.m4
nobbie Tue Feb 25 00:33:27 2003 EDT Modified files: /php4/ext/informix config.m4 Log: - Changed IFX_VERSION to work with Major versions with more then one digit Index: php4/ext/informix/config.m4 diff -u php4/ext/informix/config.m4:1.29 php4/ext/informix/config.m4:1.30 --- php4/ext/informix/config.m4:1.29Wed Feb 19 02:16:00 2003 +++ php4/ext/informix/config.m4 Tue Feb 25 00:33:27 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29 2003/02/19 07:16:00 nobbie Exp $ +dnl $Id: config.m4,v 1.30 2003/02/25 05:33:27 nobbie Exp $ dnl PHP_ARG_WITH(informix,for Informix support, @@ -44,7 +44,7 @@ esac AC_MSG_CHECKING([Informix version]) - IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | grep ESQL Version | sed -ne '1 s/\(.*\)ESQL Version \([0-9]\)\.\([0-9]*\).*/\2\3/p'`] + IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | grep ESQL Version | sed -ne '1 s/\(.*\)ESQL Version \([0-9]*\)\.\([0-9]*\).*/\2\3/p'`] AC_MSG_RESULT($IFX_VERSION) AC_DEFINE_UNQUOTED(IFX_VERSION, $IFX_VERSION, [ ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
sniper Tue Feb 25 01:37:18 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: BFN Index: php4/NEWS diff -u php4/NEWS:1.1247.2.110 php4/NEWS:1.1247.2.111 --- php4/NEWS:1.1247.2.110 Mon Feb 24 23:21:26 2003 +++ php4/NEWS Tue Feb 25 01:37:18 2003 @@ -121,6 +121,7 @@ - Fixed bug #16798 (Compile failure with LOB support for Oracle version 8.1). (Maxim) - Fixed bug #14532 (fixed connection_status() to return 2 for timeouts). (Jani) +- Fixed bug #14245 ('make install' fails on AIX when using --with-apxs). (Jani) - Fixed bug #13561 (--without-pear disabled phpize/php-config install). (Jani) 17 Feb 2003, Version 4.3.1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/pi3web pi3web_sapi.c
sniper Tue Feb 25 01:54:04 2003 EDT Modified files: /php4/sapi/pi3web pi3web_sapi.c Log: Another win32 build fix. Index: php4/sapi/pi3web/pi3web_sapi.c diff -u php4/sapi/pi3web/pi3web_sapi.c:1.49 php4/sapi/pi3web/pi3web_sapi.c:1.50 --- php4/sapi/pi3web/pi3web_sapi.c:1.49 Tue Dec 31 10:59:12 2002 +++ php4/sapi/pi3web/pi3web_sapi.c Tue Feb 25 01:54:04 2003 @@ -21,7 +21,9 @@ +--+ */ -/* $Id: pi3web_sapi.c,v 1.49 2002/12/31 15:59:12 sebastian Exp $ */ +/* $Id: pi3web_sapi.c,v 1.50 2003/02/25 06:54:04 sniper Exp $ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include pi3web_sapi.h #include php.h @@ -78,7 +80,7 @@ PUTS(table border=0 cellpadding=3 cellspacing=1 width=600 align=center\n); PUTS(trth colspan=2 bgcolor=\ PHP_HEADER_COLOR \Pi3Web Server Information/th/tr\n); php_info_print_table_header(2, Information Field, Value); - php_info_print_table_row(2, Pi3Web SAPI module version, $Id: pi3web_sapi.c,v 1.49 2002/12/31 15:59:12 sebastian Exp $); + php_info_print_table_row(2, Pi3Web SAPI module version, $Id: pi3web_sapi.c,v 1.50 2003/02/25 06:54:04 sniper Exp $); php_info_print_table_row(2, Server Name Stamp, HTTPCore_getServerStamp()); snprintf(variable_buf, 511, %d, HTTPCore_debugEnabled()); php_info_print_table_row(2, Debug Enabled, variable_buf); -- 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/informix config.m4
nobbie Tue Feb 25 01:56:27 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix config.m4 Log: MFH: 1.30 Index: php4/ext/informix/config.m4 diff -u php4/ext/informix/config.m4:1.27.4.2 php4/ext/informix/config.m4:1.27.4.3 --- php4/ext/informix/config.m4:1.27.4.2Fri Feb 21 01:49:35 2003 +++ php4/ext/informix/config.m4 Tue Feb 25 01:56:27 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.27.4.2 2003/02/21 06:49:35 sniper Exp $ +dnl $Id: config.m4,v 1.27.4.3 2003/02/25 06:56:27 nobbie Exp $ dnl PHP_ARG_WITH(informix,for Informix support, @@ -44,7 +44,7 @@ esac AC_MSG_CHECKING([Informix version]) - IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | grep ESQL Version | sed -ne '1 s/\(.*\)ESQL Version \([0-9]\)\.\([0-9]*\).*/\2\3/p'`] + IFX_VERSION=[`$INFORMIXDIR/bin/esql -V | grep ESQL Version | sed -ne '1 s/\(.*\)ESQL Version \([0-9]*\)\.\([0-9]*\).*/\2\3/p'`] AC_MSG_RESULT($IFX_VERSION) AC_DEFINE_UNQUOTED(IFX_VERSION, $IFX_VERSION, [ ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/informix CREDITS ifx.ec php_informix.h php_informix_includes.h
nobbie Tue Feb 25 01:59:14 2003 EDT Modified files: /php4/ext/informix CREDITS ifx.ec php_informix.h php_informix_includes.h Log: - Added Corne' Cornelius to CREDITS/Authors Index: php4/ext/informix/CREDITS diff -u php4/ext/informix/CREDITS:1.1 php4/ext/informix/CREDITS:1.2 --- php4/ext/informix/CREDITS:1.1 Mon Nov 20 05:31:24 2000 +++ php4/ext/informix/CREDITS Tue Feb 25 01:59:13 2003 @@ -1,2 +1,2 @@ Informix -Danny Heijl, Christian Cartus +Danny Heijl, Christian Cartus, Corne' Cornelius Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.83 php4/ext/informix/ifx.ec:1.84 --- php4/ext/informix/ifx.ec:1.83 Mon Feb 24 03:27:23 2003 +++ php4/ext/informix/ifx.ecTue Feb 25 01:59:13 2003 @@ -16,11 +16,12 @@ | PHP4 port | | Christian Cartus [EMAIL PROTECTED] : blobs, and IUS 9 | | Jouni Ahto [EMAIL PROTECTED] : configuration stuff| + | Corne' Cornelius [EMAIL PROTECTED] : input descriptors | | Based on the MySQL code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: ifx.ec,v 1.83 2003/02/24 08:27:23 sniper Exp $ */ +/* $Id: ifx.ec,v 1.84 2003/02/25 06:59:13 nobbie Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give Index: php4/ext/informix/php_informix.h diff -u php4/ext/informix/php_informix.h:1.19 php4/ext/informix/php_informix.h:1.20 --- php4/ext/informix/php_informix.h:1.19 Tue Dec 31 11:06:45 2002 +++ php4/ext/informix/php_informix.hTue Feb 25 01:59:14 2003 @@ -15,11 +15,12 @@ | Authors: Danny Heijl [EMAIL PROTECTED], initial cut (ODS 7) | | Christian Cartus [EMAIL PROTECTED], blobs, and IUS 9| | Jouni Ahto [EMAIL PROTECTED], configuration stuff | + | Corne' Cornelius [EMAIL PROTECTED], input descriptors| | based on mysql code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_informix.h,v 1.19 2002/12/31 16:06:45 sebastian Exp $ */ +/* $Id: php_informix.h,v 1.20 2003/02/25 06:59:14 nobbie Exp $ */ #ifndef PHP_INFORMIX_H #define PHP_INFORMIX_H Index: php4/ext/informix/php_informix_includes.h diff -u php4/ext/informix/php_informix_includes.h:1.3 php4/ext/informix/php_informix_includes.h:1.4 --- php4/ext/informix/php_informix_includes.h:1.3 Fri Feb 21 01:50:24 2003 +++ php4/ext/informix/php_informix_includes.h Tue Feb 25 01:59:14 2003 @@ -15,11 +15,12 @@ | Authors: Danny Heijl [EMAIL PROTECTED], initial cut (ODS 7) | | Christian Cartus [EMAIL PROTECTED], blobs, and IUS 9| | Jouni Ahto [EMAIL PROTECTED], configuration stuff | + | Corne' Cornelius [EMAIL PROTECTED], input descriptors | | based on mysql code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_informix_includes.h,v 1.3 2003/02/21 06:50:24 sniper Exp $ */ +/* $Id: php_informix_includes.h,v 1.4 2003/02/25 06:59:14 nobbie Exp $ */ #ifndef PHP_INFORMIX_INCLUDES_H #define PHP_INFORMIX_INCLUDES_H -- 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/informix CREDITS ifx.ec php_informix.h php_informix_includes.h
nobbie Tue Feb 25 02:09:11 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix CREDITS ifx.ec php_informix.h php_informix_includes.h Log: MFH Index: php4/ext/informix/CREDITS diff -u php4/ext/informix/CREDITS:1.1 php4/ext/informix/CREDITS:1.1.16.1 --- php4/ext/informix/CREDITS:1.1 Mon Nov 20 05:31:24 2000 +++ php4/ext/informix/CREDITS Tue Feb 25 02:09:09 2003 @@ -1,2 +1,2 @@ Informix -Danny Heijl, Christian Cartus +Danny Heijl, Christian Cartus, Corne' Cornelius Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.10 php4/ext/informix/ifx.ec:1.69.2.11 --- php4/ext/informix/ifx.ec:1.69.2.10 Mon Feb 24 03:26:48 2003 +++ php4/ext/informix/ifx.ecTue Feb 25 02:09:09 2003 @@ -16,11 +16,12 @@ | PHP4 port | | Christian Cartus [EMAIL PROTECTED] : blobs, and IUS 9 | | Jouni Ahto [EMAIL PROTECTED] : configuration stuff| + | Corne' Cornelius [EMAIL PROTECTED] : input descriptors | | Based on the MySQL code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: ifx.ec,v 1.69.2.10 2003/02/24 08:26:48 sniper Exp $ */ +/* $Id: ifx.ec,v 1.69.2.11 2003/02/25 07:09:09 nobbie Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give Index: php4/ext/informix/php_informix.h diff -u php4/ext/informix/php_informix.h:1.18.4.1 php4/ext/informix/php_informix.h:1.18.4.2 --- php4/ext/informix/php_informix.h:1.18.4.1 Tue Dec 31 11:34:44 2002 +++ php4/ext/informix/php_informix.hTue Feb 25 02:09:10 2003 @@ -15,11 +15,12 @@ | Authors: Danny Heijl [EMAIL PROTECTED], initial cut (ODS 7) | | Christian Cartus [EMAIL PROTECTED], blobs, and IUS 9| | Jouni Ahto [EMAIL PROTECTED], configuration stuff | + | Corne' Cornelius [EMAIL PROTECTED], input descriptors| | based on mysql code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_informix.h,v 1.18.4.1 2002/12/31 16:34:44 sebastian Exp $ */ +/* $Id: php_informix.h,v 1.18.4.2 2003/02/25 07:09:10 nobbie Exp $ */ #ifndef PHP_INFORMIX_H #define PHP_INFORMIX_H Index: php4/ext/informix/php_informix_includes.h diff -u php4/ext/informix/php_informix_includes.h:1.1.4.3 php4/ext/informix/php_informix_includes.h:1.1.4.4 --- php4/ext/informix/php_informix_includes.h:1.1.4.3 Thu Feb 20 07:09:20 2003 +++ php4/ext/informix/php_informix_includes.h Tue Feb 25 02:09:10 2003 @@ -15,11 +15,12 @@ | Authors: Danny Heijl [EMAIL PROTECTED], initial cut (ODS 7) | | Christian Cartus [EMAIL PROTECTED], blobs, and IUS 9| | Jouni Ahto [EMAIL PROTECTED], configuration stuff | + | Corne' Cornelius [EMAIL PROTECTED], input descriptors | | based on mysql code by: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_informix_includes.h,v 1.1.4.3 2003/02/20 12:09:20 nobbie Exp $ */ +/* $Id: php_informix_includes.h,v 1.1.4.4 2003/02/25 07:09:10 nobbie Exp $ */ #ifndef PHP_INFORMIX_INCLUDES_H #define PHP_INFORMIX_INCLUDES_H -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/curl interface.c multi.c
sniper Tue Feb 25 02:19:44 2003 EDT Modified files: /php4/ext/curl interface.c multi.c Log: (hope) fix some win32 build errors Index: php4/ext/curl/interface.c diff -u php4/ext/curl/interface.c:1.8 php4/ext/curl/interface.c:1.9 --- php4/ext/curl/interface.c:1.8 Sat Feb 15 22:48:43 2003 +++ php4/ext/curl/interface.c Tue Feb 25 02:19:44 2003 @@ -16,7 +16,9 @@ +--+ */ -/* $Id: interface.c,v 1.8 2003/02/16 03:48:43 wez Exp $ */ +/* $Id: interface.c,v 1.9 2003/02/25 07:19:44 sniper Exp $ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #ifdef HAVE_CONFIG_H #include config.h @@ -43,8 +45,6 @@ #include ext/standard/info.h #include ext/standard/file.h #include php_curl.h - -static unsigned char second_arg_force_ref[] = {2, BYREF_NONE, BYREF_FORCE}; static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); Index: php4/ext/curl/multi.c diff -u php4/ext/curl/multi.c:1.4 php4/ext/curl/multi.c:1.5 --- php4/ext/curl/multi.c:1.4 Tue Dec 31 11:06:21 2002 +++ php4/ext/curl/multi.c Tue Feb 25 02:19:44 2003 @@ -16,7 +16,9 @@ +--+ */ -/* $Id: */ +/* $Id: multi.c,v 1.5 2003/02/25 07:19:44 sniper Exp $ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include php.h @@ -27,10 +29,21 @@ #include curl/curl.h #include curl/multi.h +#ifdef HAVE_SYS_SELECT_H #include sys/select.h +#endif + +#ifdef HAVE_SYS_TIME_H #include sys/time.h +#endif + +#ifdef HAVE_SYS_TYPES_H #include sys/types.h +#endif + +#ifdef HAVE_UNISTD_H #include unistd.h +#endif /* {{{ proto resource curl_multi_init(void) Returns a new cURL multi handle */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / configure.in
sniper Tue Feb 25 02:40:51 2003 EDT Modified files: /php4 configure.in Log: typofix Index: php4/configure.in diff -u php4/configure.in:1.424 php4/configure.in:1.425 --- php4/configure.in:1.424 Tue Feb 25 01:35:41 2003 +++ php4/configure.in Tue Feb 25 02:40:51 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.424 2003/02/25 06:35:41 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.425 2003/02/25 07:40:51 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1065,7 +1065,7 @@ dnl Libtool creation dnl -PHP_CONFIGURE_PART(Configuring Zend) +PHP_CONFIGURE_PART(Configuring libtool) LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS AC_PROG_LIBTOOL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / configure.in
sniper Tue Feb 25 02:41:05 2003 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in Log: MFH: typofix Index: php4/configure.in diff -u php4/configure.in:1.396.2.34 php4/configure.in:1.396.2.35 --- php4/configure.in:1.396.2.34Tue Feb 25 01:36:21 2003 +++ php4/configure.in Tue Feb 25 02:41:05 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.34 2003/02/25 06:36:21 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.35 2003/02/25 07:41:05 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1065,7 +1065,7 @@ dnl Libtool creation dnl -PHP_CONFIGURE_PART(Configuring Zend) +PHP_CONFIGURE_PART(Configuring libtool) LDFLAGS=$LDFLAGS $PHP_AIX_LDFLAGS AC_PROG_LIBTOOL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php