[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Aug 9 01:31:21 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2772r2=1.2773diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2772 php-src/ChangeLog:1.2773 --- php-src/ChangeLog:1.2772Wed Aug 8 01:31:29 2007 +++ php-src/ChangeLog Thu Aug 9 01:31:20 2007 @@ -1,3 +1,291 @@ +2007-08-08 Stanislav Malyshev [EMAIL PROTECTED] + +* sapi/cgi/cgi_main.c + sapi/cgi/cgi_main.c + sapi/cli/php_cli.c + sapi/cli/php_cli.c + sapi/embed/php_embed.c: + remove unneeded variables + +2007-08-08 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + ext/standard/file.c: + fix ws folding + +2007-08-08 Stanislav Malyshev [EMAIL PROTECTED] + +* (PHP_4_4) + sapi/embed/php_embed.c: + remove unneded variables + +* (PHP_5_2) + sapi/embed/php_embed.c: + fix startup - remove unneeded variables + +* sapi/embed/php_embed.c: + initialize variables + +* (PHP_4_4) + sapi/embed/php_embed.c: + fix embed TSRM startup + +* (PHP_5_2) + sapi/embed/php_embed.c: + initialize values + +* sapi/embed/php_embed.c + sapi/embed/php_embed.c: + fix TSRM embed startup + +2007-08-08 Johannes Schlüter [EMAIL PROTECTED] + +* ext/standard/array.c: + - Fix build (patch by Ulf Wendel) + +2007-08-08 Dmitry Stogov [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ZendEngine2/zend_builtin_functions.c + ZendEngine2/zend_builtin_functions.c + ZendEngine2/tests/bug42211.phpt + ZendEngine2/tests/bug42211.phpt + ZendEngine2/tests/bug42211.phpt: + Fixed bug #42211 (property_exists() fails to find protected properties from + a parent class) + +2007-08-08 Raghubansh Kumar [EMAIL PROTECTED] + +* ext/standard/tests/file/fgetcsv_error.phpt + ext/standard/tests/file/fgetcsv_variation1.phpt + ext/standard/tests/file/fgetcsv_variation10.phpt + ext/standard/tests/file/fgetcsv_variation11.phpt + ext/standard/tests/file/fgetcsv_variation12.phpt + ext/standard/tests/file/fgetcsv_variation13.phpt + ext/standard/tests/file/fgetcsv_variation14.phpt + ext/standard/tests/file/fgetcsv_variation15.phpt + ext/standard/tests/file/fgetcsv_variation16.phpt + ext/standard/tests/file/fgetcsv_variation17.phpt + ext/standard/tests/file/fgetcsv_variation18.phpt + ext/standard/tests/file/fgetcsv_variation19.phpt + ext/standard/tests/file/fgetcsv_variation2.phpt + ext/standard/tests/file/fgetcsv_variation20.phpt + ext/standard/tests/file/fgetcsv_variation21.phpt + ext/standard/tests/file/fgetcsv_variation22.phpt + ext/standard/tests/file/fgetcsv_variation23.phpt + ext/standard/tests/file/fgetcsv_variation24.phpt + ext/standard/tests/file/fgetcsv_variation25.phpt + ext/standard/tests/file/fgetcsv_variation26.phpt + ext/standard/tests/file/fgetcsv_variation27.phpt + ext/standard/tests/file/fgetcsv_variation28.phpt + ext/standard/tests/file/fgetcsv_variation29.phpt + ext/standard/tests/file/fgetcsv_variation3.phpt + ext/standard/tests/file/fgetcsv_variation30.phpt + ext/standard/tests/file/fgetcsv_variation31.phpt + ext/standard/tests/file/fgetcsv_variation4.phpt + ext/standard/tests/file/fgetcsv_variation5.phpt + ext/standard/tests/file/fgetcsv_variation6.phpt + ext/standard/tests/file/fgetcsv_variation7.phpt + ext/standard/tests/file/fgetcsv_variation8.phpt + ext/standard/tests/file/fgetcsv_variation9.phpt: + New testcases for fgetcsv() function + +* ext/standard/tests/file/fgetcsv_error.phpt + ext/standard/tests/file/fgetcsv_error.phpt + ext/standard/tests/file/fgetcsv_variation1.phpt + ext/standard/tests/file/fgetcsv_variation1.phpt + ext/standard/tests/file/fgetcsv_variation10.phpt + ext/standard/tests/file/fgetcsv_variation10.phpt + ext/standard/tests/file/fgetcsv_variation11.phpt + ext/standard/tests/file/fgetcsv_variation11.phpt + ext/standard/tests/file/fgetcsv_variation12.phpt + ext/standard/tests/file/fgetcsv_variation12.phpt + ext/standard/tests/file/fgetcsv_variation13.phpt + ext/standard/tests/file/fgetcsv_variation13.phpt + ext/standard/tests/file/fgetcsv_variation14.phpt + ext/standard/tests/file/fgetcsv_variation14.phpt + ext/standard/tests/file/fgetcsv_variation15.phpt + ext/standard/tests/file/fgetcsv_variation15.phpt + ext/standard/tests/file/fgetcsv_variation16.phpt + ext/standard/tests/file/fgetcsv_variation16.phpt + ext/standard/tests/file/fgetcsv_variation17.phpt + ext/standard/tests/file/fgetcsv_variation17.phpt + ext/standard/tests/file/fgetcsv_variation18.phpt + ext/standard/tests/file/fgetcsv_variation18.phpt + ext/standard/tests/file/fgetcsv_variation19.phpt +
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Aug 9 01:31:24 2007 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1153r2=1.1154diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1153 ZendEngine2/ChangeLog:1.1154 --- ZendEngine2/ChangeLog:1.1153Sat Aug 4 01:31:26 2007 +++ ZendEngine2/ChangeLog Thu Aug 9 01:31:24 2007 @@ -1,3 +1,20 @@ +2007-08-08 Dmitry Stogov [EMAIL PROTECTED] + +* zend_builtin_functions.c + zend_builtin_functions.c + tests/bug42211.phpt: + Fixed bug #42211 (property_exists() fails to find protected properties from + a parent class) + +* tests/bug42211.phpt + tests/bug42211.phpt: + + file bug42211.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + tests/017.phpt: + Fixed test + 2007-08-03 Stanislav Malyshev [EMAIL PROTECTED] * zend_constants.h: @@ -18659,7 +18676,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1153 2007/08/04 01:31:26 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1154 2007/08/09 01:31:24 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -20383,7 +20400,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1153 2007/08/04 01:31:26 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1154 2007/08/09 01:31:24 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php-src /ext/openssl openssl.c
Hi! Please see attached patch. Cheers, Mattias. On Wed, Aug 08, 2007 at 02:18:42AM +0400, Antony Dovgal wrote: Two OpenSSL tests started to fail yesterday: # cat ext/openssl/tests/004.diff 009+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/004.php on line 7 009- Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min - 4 (failed) in %s on line %d 011+ 012+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/004.php on line 12 013+ bool(false) 011- resource(%d) of type (OpenSSL X.509 CSR) # cat ext/openssl/tests/bug36732.diff 001+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 16 002+ 001- Ok 002- Ok 003+ Warning: openssl_csr_sign(): cannot get CSR from parameter 1 in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 17 004+ 005+ Warning: openssl_csr_export() expects parameter 1 to be resource, boolean given in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 20 006+ 007+ Warning: openssl_x509_export(): cannot get cert from parameter 1 in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 25 On 06.08.2007 23:50, Pierre-Alain Joye wrote: pajoye Mon Aug 6 19:50:16 2007 UTC Modified files: /php-src/ext/openssl openssl.c Log: - MFB: #4, forgot this one (thanks mattias) http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.147r2=1.148diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.147 php-src/ext/openssl/openssl.c:1.148 --- php-src/ext/openssl/openssl.c:1.147 Mon Aug 6 19:13:05 2007 +++ php-src/ext/openssl/openssl.cMon Aug 6 19:50:16 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.147 2007/08/06 19:13:05 pajoye Exp $ */ +/* $Id: openssl.c,v 1.148 2007/08/06 19:50:16 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1818,9 +1818,10 @@ len = 200; } memcpy(buffer, type, len); -buffer[len] = '\0'; +buffer[len - 1] = '\0'; + type = buffer; - + /* Skip past any leading X. X: X, etc to allow for multiple * instances */ for (str = type; *str; str++) { -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Index: ext/openssl/openssl.c === RCS file: /repository/php-src/ext/openssl/openssl.c,v retrieving revision 1.98.2.5.2.40 diff -u -a -r1.98.2.5.2.40 openssl.c --- ext/openssl/openssl.c 6 Aug 2007 19:49:45 - 1.98.2.5.2.40 +++ ext/openssl/openssl.c 8 Aug 2007 06:19:40 - @@ -1726,7 +1726,7 @@ /* Finally apply defaults from config file */ for(i = 0; i sk_CONF_VALUE_num(dn_sk); i++) { int len; - char buffer[200]; + char buffer[200 + 1]; v = sk_CONF_VALUE_value(dn_sk, i); type = v-name; @@ -1743,7 +1743,7 @@ len = 200; } memcpy(buffer, type, len); - buffer[len - 1] = '\0'; + buffer[len] = '\0'; type = buffer; /* Skip past any leading X. X: X, etc to allow for multiple -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl openssl.c
pajoye Wed Aug 8 06:29:47 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/opensslopenssl.c Log: - fix regression introduced with #4 (thx to tony and mattias for the head up) http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.40r2=1.98.2.5.2.41diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.40 php-src/ext/openssl/openssl.c:1.98.2.5.2.41 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.40 Mon Aug 6 19:49:45 2007 +++ php-src/ext/openssl/openssl.c Wed Aug 8 06:29:46 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98.2.5.2.40 2007/08/06 19:49:45 pajoye Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.41 2007/08/08 06:29:46 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1726,7 +1726,7 @@ /* Finally apply defaults from config file */ for(i = 0; i sk_CONF_VALUE_num(dn_sk); i++) { int len; - char buffer[200]; + char buffer[200 + 1]; /*200 + \0 !*/ v = sk_CONF_VALUE_value(dn_sk, i); type = v-name; @@ -1743,7 +1743,7 @@ len = 200; } memcpy(buffer, type, len); - buffer[len - 1] = '\0'; + buffer[len] = '\0'; type = buffer; /* Skip past any leading X. X: X, etc to allow for multiple -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/openssl openssl.c
pajoye Wed Aug 8 06:30:56 2007 UTC Modified files: /php-src/ext/opensslopenssl.c Log: - MFB: fix regressio introduced by #4 http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.148r2=1.149diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.148 php-src/ext/openssl/openssl.c:1.149 --- php-src/ext/openssl/openssl.c:1.148 Mon Aug 6 19:50:16 2007 +++ php-src/ext/openssl/openssl.c Wed Aug 8 06:30:56 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.148 2007/08/06 19:50:16 pajoye Exp $ */ +/* $Id: openssl.c,v 1.149 2007/08/08 06:30:56 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1801,7 +1801,7 @@ /* Finally apply defaults from config file */ for(i = 0; i sk_CONF_VALUE_num(dn_sk); i++) { int len; - char buffer[200]; + char buffer[200 + 1]; /* 200 + \n !*/ v = sk_CONF_VALUE_value(dn_sk, i); type = v-name; @@ -1818,7 +1818,7 @@ len = 200; } memcpy(buffer, type, len); - buffer[len - 1] = '\0'; + buffer[len] = '\0'; type = buffer; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/openssl openssl.c
Hi Mattias, Thanks for the patch (we came to the same conclusion yesterday :) applied On 8/8/07, Mattias Bengtsson [EMAIL PROTECTED] wrote: Hi! Please see attached patch. Cheers, Mattias. On Wed, Aug 08, 2007 at 02:18:42AM +0400, Antony Dovgal wrote: Two OpenSSL tests started to fail yesterday: # cat ext/openssl/tests/004.diff 009+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/004.php on line 7 009- Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min - 4 (failed) in %s on line %d 011+ 012+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/004.php on line 12 013+ bool(false) 011- resource(%d) of type (OpenSSL X.509 CSR) # cat ext/openssl/tests/bug36732.diff 001+ Warning: openssl_csr_new(): add_entry_by_txt countryNam - AU (failed) in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 16 002+ 001- Ok 002- Ok 003+ Warning: openssl_csr_sign(): cannot get CSR from parameter 1 in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 17 004+ 005+ Warning: openssl_csr_export() expects parameter 1 to be resource, boolean given in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 20 006+ 007+ Warning: openssl_x509_export(): cannot get cert from parameter 1 in /local/qa/5_2/ext/openssl/tests/bug36732.php on line 25 On 06.08.2007 23:50, Pierre-Alain Joye wrote: pajoye Mon Aug 6 19:50:16 2007 UTC Modified files: /php-src/ext/openssl openssl.c Log: - MFB: #4, forgot this one (thanks mattias) http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.147r2=1.148diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.147 php-src/ext/openssl/openssl.c:1.148 --- php-src/ext/openssl/openssl.c:1.147 Mon Aug 6 19:13:05 2007 +++ php-src/ext/openssl/openssl.cMon Aug 6 19:50:16 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.147 2007/08/06 19:13:05 pajoye Exp $ */ +/* $Id: openssl.c,v 1.148 2007/08/06 19:50:16 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1818,9 +1818,10 @@ len = 200; } memcpy(buffer, type, len); -buffer[len] = '\0'; +buffer[len - 1] = '\0'; + type = buffer; - + /* Skip past any leading X. X: X, etc to allow for multiple * instances */ for (str = type; *str; str++) { -- Wbr, Antony Dovgal -- 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 Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams streams.c
janiWed Aug 8 07:01:49 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/main/streams streams.c Log: MFH: This is what we get for not doing MFH..or MFB..a mess http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.17r2=1.82.2.6.2.18diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.17 php-src/main/streams/streams.c:1.82.2.6.2.18 --- php-src/main/streams/streams.c:1.82.2.6.2.17Wed Aug 8 02:16:41 2007 +++ php-src/main/streams/streams.c Wed Aug 8 07:01:49 2007 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.82.2.6.2.17 2007/08/08 02:16:41 iliaa Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.18 2007/08/08 07:01:49 jani Exp $ */ #define _GNU_SOURCE #include php.h @@ -1313,11 +1313,11 @@ p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped); if (p) { - size_t written = php_stream_write(dest, p, mapped); + mapped = php_stream_write(dest, p, mapped); php_stream_mmap_unmap(src); - return written; + return mapped; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c
janiWed Aug 8 07:41:09 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/standard array.c Log: - Fixed bug #42233 (Problems with æøå in extract()). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.883r2=1.2027.2.547.2.884diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.883 php-src/NEWS:1.2027.2.547.2.884 --- php-src/NEWS:1.2027.2.547.2.883 Wed Aug 8 02:16:41 2007 +++ php-src/NEWSWed Aug 8 07:41:09 2007 @@ -3,6 +3,7 @@ ?? Aug 2007, PHP 5.2.4 - Fixed bug #42237 (stream_copy_to_stream returns invalid values for mmaped streams). (andrew dot minerd at sellingsource dot com, Ilia) +- Fixed bug #42233 (Problems with æøå in extract()). (Jani) - Fixed bug #4 (possible buffer overflow in php_openssl_make_REQ). (Pierre) - Fixed bug #42208 (substr_replace() crashes when the same array is passed more than once). (crrodriguez at suse dot de, Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.30r2=1.308.2.21.2.31diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.30 php-src/ext/standard/array.c:1.308.2.21.2.31 --- php-src/ext/standard/array.c:1.308.2.21.2.30Sun Jun 24 17:37:01 2007 +++ php-src/ext/standard/array.cWed Aug 8 07:41:09 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.30 2007/06/24 17:37:01 iliaa Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.31 2007/08/08 07:41:09 jani Exp $ */ #include php.h #include php_ini.h @@ -1286,18 +1286,29 @@ if (!var_name) return 0; - - if (!isalpha((int)((unsigned char *)var_name)[0]) var_name[0] != '_') - return 0; - - if (len 1) { - for (i=1; ilen; i++) { - if (!isalnum((int)((unsigned char *)var_name)[i]) var_name[i] != '_') { - return 0; + + /* These are allowed as first char: [a-zA-Z_\x7f-\xff] */ + if (var_name[0] == '_' || + (((int)((unsigned char *)var_name)[0]) = 65 /* A*/ /* Z*/ 90 = ((int)((unsigned char *)var_name)[0])) || + (((int)((unsigned char *)var_name)[0]) = 97 /* a*/ /* z*/ 122 = ((int)((unsigned char *)var_name)[0])) || + (((int)((unsigned char *)var_name)[0]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[0])) + ) { + /* And these as the rest: [a-zA-Z0-9_\x7f-\xff] */ + if (len 1) { + for (i = 1; i len; i++) { + if (var_name[i] == '_' || + (((int)((unsigned char *)var_name)[i]) = 48 /* 0*/ /* 9*/ 57 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 65 /* A*/ /* Z*/ 90 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 97 /* a*/ /* z*/ 122 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[i])) + ) { } else { + return 0; + } } } + } else { + return 0; } - return 1; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard array.c
janiWed Aug 8 07:46:01 2007 UTC Modified files: /php-src/ext/standard array.c Log: MFB: Fix bug #42233 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.411r2=1.412diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.411 php-src/ext/standard/array.c:1.412 --- php-src/ext/standard/array.c:1.411 Mon Jul 9 14:32:59 2007 +++ php-src/ext/standard/array.cWed Aug 8 07:46:00 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.411 2007/07/09 14:32:59 dmitry Exp $ */ +/* $Id: array.c,v 1.412 2007/08/08 07:46:00 jani Exp $ */ #include php.h #include php_ini.h @@ -1276,22 +1276,33 @@ return 0; if (var_name_type == IS_STRING) { - if (!isalpha((int)((unsigned char *)var_name.s)[0]) var_name.s[0] != '_') - return 0; - - if (var_name_len 1) { - for (i=1; ivar_name_len; i++) { - if (!isalnum((int)((unsigned char *)var_name.s)[i]) var_name.s[i] != '_') { - return 0; + /* These are allowed as first char: [a-zA-Z_\x7f-\xff] */ + if (var_name[0] == '_' || + (((int)((unsigned char *)var_name)[0]) = 65 /* A */ /* Z*/ 90 = ((int)((unsigned char *)var_name)[0])) || + (((int)((unsigned char *)var_name)[0]) = 97 /* a */ /* z*/ 122 = ((int)((unsigned char *)var_name)[0])) || + (((int)((unsigned char *)var_name)[0]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[0])) + ) { + /* And these as the rest: [a-zA-Z0-9_\x7f-\xff] */ + if (len 1) { + for (i = 1; i len; i++) { + if (var_name[i] == '_' || + (((int)((unsigned char *)var_name)[i]) = 48 /* 0*/ /* 9*/ 57 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 65 /* A*/ /* Z*/ 90 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 97 /* a*/ /* z*/ 122 = ((int)((unsigned char *)var_name)[i])) || + (((int)((unsigned char *)var_name)[i]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[i])) + ) { } else { + return 0; + } } } + } else { + return 0; } } else { if (!zend_is_valid_identifier(var_name.u, var_name_len)) { return 0; } } - return 1; } /* }}} */ @@ -1449,7 +1460,7 @@ case EXTR_OVERWRITE: if (var_exists var_name_len == sizeof(GLOBALS) - ZEND_U_EQUAL(key_type, var_name, var_name_len-1, GLOBALS, sizeof(GLOBALS)-1)) { + ZEND_U_EQUAL(key_type, var_name, var_name_len-1, GLOBALS, sizeof(GLOBALS)-1)) { break; } @@ -1705,8 +1716,8 @@ if (zstep) { if (Z_TYPE_P(zstep) == IS_DOUBLE || - (Z_TYPE_P(zstep) == IS_STRING is_numeric_string(Z_STRVAL_P(zstep), Z_STRLEN_P(zstep), NULL, NULL, 0) == IS_DOUBLE) || - (Z_TYPE_P(zstep) == IS_UNICODE is_numeric_unicode(Z_USTRVAL_P(zstep), Z_USTRLEN_P(zstep), NULL, NULL, 0) == IS_DOUBLE)) { + (Z_TYPE_P(zstep) == IS_STRING is_numeric_string(Z_STRVAL_P(zstep), Z_STRLEN_P(zstep), NULL, NULL, 0) == IS_DOUBLE) || + (Z_TYPE_P(zstep) == IS_UNICODE is_numeric_unicode(Z_USTRVAL_P(zstep), Z_USTRLEN_P(zstep), NULL, NULL, 0) == IS_DOUBLE)) { is_step_double = 1; } @@ -2096,7 +2107,7 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end) { zval *stack,/* Input stack */ -**val; /* Value to be popped */ + **val; /* Value to be popped */ zstr key = NULL_ZSTR; uint key_len = 0; ulong index; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
janiWed Aug 8 10:00:20 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: - Fix typos in comments http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.327r2=1.328diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.327 php-src/sapi/cgi/cgi_main.c:1.328 --- php-src/sapi/cgi/cgi_main.c:1.327 Tue Jun 26 14:47:33 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 10:00:20 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.327 2007/06/26 14:47:33 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.328 2007/08/08 10:00:20 jani Exp $ */ #include php.h #include php_globals.h @@ -841,7 +841,7 @@ */ env_script_name = pt + l; - /* PATH_TRANSATED = DOCUMENT_ROOT + PATH_INFO */ + /* PATH_TRANSLATED = DOCUMENT_ROOT + PATH_INFO */ path_translated_len = l + (env_path_info ? strlen(env_path_info) : 0); path_translated = (char *) emalloc(path_translated_len + 1); memcpy(path_translated, env_document_root, l); @@ -857,7 +857,7 @@ } else if (env_script_name strstr(pt, env_script_name) ) { - /* PATH_TRANSATED = PATH_TRANSATED - SCRIPT_NAME + PATH_INFO */ + /* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */ int ptlen = strlen(pt) - strlen(env_script_name); int path_translated_len = ptlen + env_path_info ? strlen(env_path_info) : 0; char *path_translated = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c
janiWed Aug 8 10:00:34 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi cgi_main.c Log: MFH: fix typos in comments http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.43r2=1.267.2.15.2.44diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.43 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.44 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.43 Tue Jun 26 14:47:16 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 10:00:34 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.43 2007/06/26 14:47:16 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.44 2007/08/08 10:00:34 jani Exp $ */ #include php.h #include php_globals.h @@ -865,7 +865,7 @@ */ env_script_name = pt + l; - /* PATH_TRANSATED = DOCUMENT_ROOT + PATH_INFO */ + /* PATH_TRANSLATED = DOCUMENT_ROOT + PATH_INFO */ path_translated_len = l + (env_path_info ? strlen(env_path_info) : 0); path_translated = (char *) emalloc(path_translated_len + 1); memcpy(path_translated, env_document_root, l); @@ -881,7 +881,7 @@ } else if (env_script_name strstr(pt, env_script_name) ) { - /* PATH_TRANSATED = PATH_TRANSATED - SCRIPT_NAME + PATH_INFO */ + /* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */ int ptlen = strlen(pt) - strlen(env_script_name); int path_translated_len = ptlen + env_path_info ? strlen(env_path_info) : 0; char *path_translated = NULL; @@ -957,7 +957,7 @@ if (real_path) { free(real_path); } - } + } } else { #endif /* pre 4.3 behaviour, shouldn't be used but provides BC */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/ldap config.m4
nlopess Wed Aug 8 11:37:44 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/ldap config.m4 Log: +- Fixed bug #41973 (./configure --with-ldap=shared fails with http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.884r2=1.2027.2.547.2.885diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.884 php-src/NEWS:1.2027.2.547.2.885 --- php-src/NEWS:1.2027.2.547.2.884 Wed Aug 8 07:41:09 2007 +++ php-src/NEWSWed Aug 8 11:37:44 2007 @@ -9,6 +9,8 @@ more than once). (crrodriguez at suse dot de, Ilia) - Fixed bug #42195 (C++ compiler required always). (Jani) - Fixed bug #42082 (NodeList length zero should be empty). (Hannes) +- Fixed bug #41973 (./configure --with-ldap=shared fails with + LDFLAGS=-Wl,--as-needed). (Nuno) - Fixed bug #36492 (Userfilters can leak buckets). (Sara) 02 Aug 2007, PHP 5.2.4RC1 http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/config.m4?r1=1.39.2.6.2.1r2=1.39.2.6.2.2diff_format=u Index: php-src/ext/ldap/config.m4 diff -u php-src/ext/ldap/config.m4:1.39.2.6.2.1 php-src/ext/ldap/config.m4:1.39.2.6.2.2 --- php-src/ext/ldap/config.m4:1.39.2.6.2.1 Wed Oct 18 20:58:23 2006 +++ php-src/ext/ldap/config.m4 Wed Aug 8 11:37:44 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.39.2.6.2.1 2006/10/18 20:58:23 tony2001 Exp $ +dnl $Id: config.m4,v 1.39.2.6.2.2 2007/08/08 11:37:44 nlopess Exp $ dnl AC_DEFUN([PHP_LDAP_CHECKS], [ @@ -159,9 +159,9 @@ dnl Save original values _SAVE_CPPFLAGS=$CPPFLAGS - _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS CPPFLAGS=$CPPFLAGS -I$LDAP_INCDIR - LDFLAGS=$LDFLAGS $LDAP_SHARED_LIBADD + LIBS=$LIBS $LDAP_SHARED_LIBADD dnl Check for 3 arg ldap_set_rebind_proc AC_CACHE_CHECK([for 3 arg ldap_set_rebind_proc], ac_cv_3arg_setrebindproc, @@ -191,5 +191,5 @@ dnl Restore original values CPPFLAGS=$_SAVE_CPPFLAGS - LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/ldap config.m4
nlopess Wed Aug 8 11:38:32 2007 UTC Modified files: /php-src/ext/ldap config.m4 Log: MFB: fix bug #41973 http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/config.m4?r1=1.44r2=1.45diff_format=u Index: php-src/ext/ldap/config.m4 diff -u php-src/ext/ldap/config.m4:1.44 php-src/ext/ldap/config.m4:1.45 --- php-src/ext/ldap/config.m4:1.44 Wed Oct 18 20:57:06 2006 +++ php-src/ext/ldap/config.m4 Wed Aug 8 11:38:32 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.44 2006/10/18 20:57:06 tony2001 Exp $ +dnl $Id: config.m4,v 1.45 2007/08/08 11:38:32 nlopess Exp $ dnl AC_DEFUN([PHP_LDAP_CHECKS], [ @@ -159,9 +159,9 @@ dnl Save original values _SAVE_CPPFLAGS=$CPPFLAGS - _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS CPPFLAGS=$CPPFLAGS -I$LDAP_INCDIR - LDFLAGS=$LDFLAGS $LDAP_SHARED_LIBADD + LIBS=$LIBS $LDAP_SHARED_LIBADD dnl Check for 3 arg ldap_set_rebind_proc AC_CACHE_CHECK([for 3 arg ldap_set_rebind_proc], ac_cv_3arg_setrebindproc, @@ -191,5 +191,5 @@ dnl Restore original values CPPFLAGS=$_SAVE_CPPFLAGS - LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
sas Wed Aug 8 12:42:46 2007 UTC Modified files: /CVSROOTavail Log: - add mcbrown to phpdoc as requested by Georg Richter http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1296r2=1.1297diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1296 CVSROOT/avail:1.1297 --- CVSROOT/avail:1.1296Mon Aug 6 07:21:13 2007 +++ CVSROOT/avail Wed Aug 8 12:42:46 2007 @@ -44,7 +44,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97! 7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv! e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit! ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,gwynne,mkoppanen,ron,nicobn,jacques,void|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc! -es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,php doc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /sapi/cgi cgi_main.c
dmitry Wed Aug 8 13:01:40 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/sapi/cgi cgi_main.c Log: - Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO). - Fixed bug #31892 (PHP_SELF incorrect without cgi.fix_pathinfo, but turning on screws up PATH_INFO). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.885r2=1.2027.2.547.2.886diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.885 php-src/NEWS:1.2027.2.547.2.886 --- php-src/NEWS:1.2027.2.547.2.885 Wed Aug 8 11:37:44 2007 +++ php-src/NEWSWed Aug 8 13:01:39 2007 @@ -7,11 +7,15 @@ - Fixed bug #4 (possible buffer overflow in php_openssl_make_REQ). (Pierre) - Fixed bug #42208 (substr_replace() crashes when the same array is passed more than once). (crrodriguez at suse dot de, Ilia) +- Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir + and using PATH_INFO). (Dmitry) - Fixed bug #42195 (C++ compiler required always). (Jani) - Fixed bug #42082 (NodeList length zero should be empty). (Hannes) - Fixed bug #41973 (./configure --with-ldap=shared fails with LDFLAGS=-Wl,--as-needed). (Nuno) - Fixed bug #36492 (Userfilters can leak buckets). (Sara) +- Fixed bug #31892 (PHP_SELF incorrect without cgi.fix_pathinfo, but turning + on screws up PATH_INFO). (Dmitry) 02 Aug 2007, PHP 5.2.4RC1 - Removed --enable-versioning configure option. (Jani) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.44r2=1.267.2.15.2.45diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.44 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.45 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.44 Wed Aug 8 10:00:34 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 13:01:40 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.44 2007/08/08 10:00:34 jani Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.45 2007/08/08 13:01:40 dmitry Exp $ */ #include php.h #include php_globals.h @@ -522,16 +522,29 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) { - unsigned int new_val_len; - char *val = SG(request_info).request_uri ? SG(request_info).request_uri : ; + char *script_name = SG(request_info).request_uri; + unsigned int script_name_len = script_name ? strlen(script_name) : 0; + char *path_info = sapi_cgibin_getenv(PATH_INFO, sizeof(PATH_INFO)-1 TSRMLS_CC); + unsigned int path_info_len = path_info ? strlen(path_info) : 0; + unsigned int php_self_len = script_name_len + path_info_len; + char *php_self = emalloc(php_self_len + 1); + + if (script_name) { + memcpy(php_self, script_name, script_name_len + 1); + } + if (path_info) { + memcpy(php_self + script_name_len, path_info, path_info_len + 1); + } + /* In CGI mode, we consider the environment to be a part of the server * variables */ php_import_environment_variables(track_vars_array TSRMLS_CC); /* Build the special-case PHP_SELF variable for the CGI version */ - if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, val, strlen(val), new_val_len TSRMLS_CC)) { - php_register_variable_safe(PHP_SELF, val, new_val_len, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, php_self, php_self_len, php_self_len TSRMLS_CC)) { + php_register_variable_safe(PHP_SELF, php_self, php_self_len, track_vars_array TSRMLS_CC); } + efree(php_self); } static void sapi_cgi_log_message(char *message) @@ -830,7 +843,21 @@ if (orig_path_info != path_info) { if (orig_path_info) { + char old; + _sapi_cgibin_putenv(ORIG_PATH_INFO, orig_path_info TSRMLS_CC); + old = path_info[0]; + path_info[0] = 0; + if (!orig_script_name || + strcmp(orig_script_name, env_path_info) != 0) { + if (orig_script_name) { + _sapi_cgibin_putenv(ORIG_SCRIPT_NAME, orig_script_name TSRMLS_CC); + } +
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
dmitry Wed Aug 8 13:02:01 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: - Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir and using PATH_INFO). - Fixed bug #31892 (PHP_SELF incorrect without cgi.fix_pathinfo, but turning on screws up PATH_INFO). http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.328r2=1.329diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.328 php-src/sapi/cgi/cgi_main.c:1.329 --- php-src/sapi/cgi/cgi_main.c:1.328 Wed Aug 8 10:00:20 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 13:02:01 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.328 2007/08/08 10:00:20 jani Exp $ */ +/* $Id: cgi_main.c,v 1.329 2007/08/08 13:02:01 dmitry Exp $ */ #include php.h #include php_globals.h @@ -498,16 +498,29 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) { - unsigned int new_val_len; - char *val = SG(request_info).request_uri ? SG(request_info).request_uri : ; + char *script_name = SG(request_info).request_uri; + unsigned int script_name_len = script_name ? strlen(script_name) : 0; + char *path_info = sapi_cgibin_getenv(PATH_INFO, sizeof(PATH_INFO)-1 TSRMLS_CC); + unsigned int path_info_len = path_info ? strlen(path_info) : 0; + unsigned int php_self_len = script_name_len + path_info_len; + char *php_self = emalloc(php_self_len + 1); + + if (script_name) { + memcpy(php_self, script_name, script_name_len + 1); + } + if (path_info) { + memcpy(php_self + script_name_len, path_info, path_info_len + 1); + } + /* In CGI mode, we consider the environment to be a part of the server * variables */ php_import_environment_variables(track_vars_array TSRMLS_CC); /* Build the special-case PHP_SELF variable for the CGI version */ - if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, val, strlen(val), new_val_len TSRMLS_CC)) { - php_register_variable_safe(PHP_SELF, val, new_val_len, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, php_self, php_self_len, php_self_len TSRMLS_CC)) { + php_register_variable_safe(PHP_SELF, php_self, php_self_len, track_vars_array TSRMLS_CC); } + efree(php_self); } static void sapi_cgi_log_message(char *message) @@ -664,7 +677,7 @@ SCRIPT_NAME set to a URL path that could identify the CGI script - rather than the interpreter. PHP_SELF is set to this. + rather than the interpreter. PHP_SELF is set to this REQUEST_URI uri section following the domain:port part of a URI @@ -806,7 +819,21 @@ if (orig_path_info != path_info) { if (orig_path_info) { + char old; + _sapi_cgibin_putenv(ORIG_PATH_INFO, orig_path_info TSRMLS_CC); + old = path_info[0]; + path_info[0] = 0; + if (!orig_script_name || + strcmp(orig_script_name, env_path_info) != 0) { + if (orig_script_name) { + _sapi_cgibin_putenv(ORIG_SCRIPT_NAME, orig_script_name TSRMLS_CC); + } + SG(request_info).request_uri = _sapi_cgibin_putenv(SCRIPT_NAME, env_path_info TSRMLS_CC); + } else { + SG(request_info).request_uri = orig_script_name; + } + path_info[0] = old; } env_path_info = _sapi_cgibin_putenv(PATH_INFO, path_info TSRMLS_CC); } @@ -823,8 +850,7 @@ SCRIPT_FILENAME minus SCRIPT_NAME */ - if (env_document_root) - { +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fputcsv_variation6.phpt
kraghubaWed Aug 8 13:08:18 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filefputcsv_variation6.phpt Log: More testcases for fputcsv() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fputcsv_variation6.phpt +++ php-src/ext/standard/tests/file/fputcsv_variation6.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file fputcsv_variation6.phpt
kraghubaWed Aug 8 13:09:42 2007 UTC Modified files: /php-src/ext/standard/tests/filefputcsv_variation6.phpt Log: More testcases for fputcsv() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation6.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/fputcsv_variation6.phpt diff -u /dev/null php-src/ext/standard/tests/file/fputcsv_variation6.phpt:1.2 --- /dev/null Wed Aug 8 13:09:42 2007 +++ php-src/ext/standard/tests/file/fputcsv_variation6.phpt Wed Aug 8 13:09:42 2007 @@ -0,0 +1,1596 @@ +--TEST-- +Test fputcsv() : usage variations - with different delimiter and enclosure +--FILE-- +?php +/* + Prototype: array fputcsv ( resource $handle , array $fields [, string $delimiter [, string $enclosure]]] ); + Description: Format line as CSV and write to the file pointer +*/ + +/* + Testing fputcsv() to write to a file when delimiter are different from those + present in the field to be written to the file + */ + +echo *** Testing fputcsv() : with different delimiter and enclosure ***\n; + +/* the array is with three elements in it. Each element should be read as + 1st element is delimiter, 2nd element is enclosure + and 3rd element is csv fields +*/ +$csv_lists = array ( + array(',', '', array('water,fruit') ), + array(',', '', array('water,fruit') ), + array(',', '', array('water,fruit') ), + array(' ', '^', array('^water^ ^fruit^')), + array(':', '', array('water:fruit')), + array('=', '=', array('=water===fruit=')), + array('-', '-', array('-water--fruit-air')), + array('-', '-', array('-water---fruit---air-')), + array(':', '', array('::,::,:')) + +); +$file_path = dirname(__FILE__); +$filename = $file_path/fputcsv_variation6.tmp; + +$file_modes = array (r+, r+b, r+t, + a+, a+b, a+t, + w+, w+b, w+t, + x+, x+b, x+t); + +$loop_counter = 1; +foreach ($csv_lists as $csv_list) { + for($mode_counter = 0; $mode_counter count($file_modes); $mode_counter++) { + +echo \n-- file opened in $file_modes[$mode_counter] --\n; +// create the file and add the content with has csv fields +if ( strstr($file_modes[$mode_counter], r) ) { + $file_handle = fopen($filename, w); +} else { + $file_handle = fopen($filename, $file_modes[$mode_counter] ); +} +if ( !$file_handle ) { + echo Error: failed to create file $filename!\n; + exit(); +} +$delimiter = $csv_list[0]; +$enclosure = $csv_list[1]; +$csv_field = $csv_list[2]; + +// write to a file in csv format +var_dump( fputcsv($file_handle, $csv_field, '+', '%') ); +// check the file pointer position and eof +var_dump( ftell($file_handle) ); +var_dump( feof($file_handle) ); +//close the file +fclose($file_handle); + +// print the file contents +var_dump( file_get_contents($filename) ); + +//delete file +unlink($filename); + } //end of mode loop +} // end of foreach + +echo Done\n; +? +--EXPECTF-- +*** Testing fputcsv() : with different delimiter and enclosure *** + +-- file opened in r+ -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in r+b -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in r+t -- +int(12) +int(12) +bool(false) +string(%d) water,fruit + + +-- file opened in a+ -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in a+b -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in a+t -- +int(12) +int(12) +bool(false) +string(%d) water,fruit + + +-- file opened in w+ -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in w+b -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in w+t -- +int(12) +int(12) +bool(false) +string(%d) water,fruit + + +-- file opened in x+ -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in x+b -- +int(12) +int(12) +bool(false) +string(12) water,fruit + + +-- file opened in x+t -- +int(12) +int(12) +bool(false) +string(%d) water,fruit + + +-- file opened in r+ -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in r+b -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in r+t -- +int(15) +int(15) +bool(false) +string(%d) water,fruit + + +-- file opened in a+ -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in a+b -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in a+t -- +int(15) +int(15) +bool(false) +string(%d) water,fruit + + +-- file opened in w+ -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in w+b -- +int(15) +int(15) +bool(false) +string(15) water,fruit + + +-- file opened in w+t -- +int(15) +int(15) +bool(false) +string(%d) water,fruit + + +-- file opened in x+ -- +int(15) +int(15) +bool(false)
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetcsv_error.phpt fgetcsv_variation1.phpt fgetcsv_variation10.phpt fgetcsv_variation11.phpt fgetcsv_variation12.phpt fgetcsv_variation13.phpt
kraghubaWed Aug 8 13:13:18 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filefgetcsv_variation27.phpt fgetcsv_variation2.phpt fgetcsv_variation17.phpt fgetcsv_variation29.phpt fgetcsv_variation4.phpt fgetcsv_variation19.phpt fgetcsv_variation6.phpt fgetcsv_variation8.phpt fgetcsv_variation30.phpt fgetcsv_variation20.phpt fgetcsv_variation10.phpt fgetcsv_variation22.phpt fgetcsv_variation12.phpt fgetcsv_variation24.phpt fgetcsv_variation14.phpt fgetcsv_variation26.phpt fgetcsv_variation16.phpt fgetcsv_variation1.phpt fgetcsv_variation28.phpt fgetcsv_variation18.phpt fgetcsv_variation3.phpt fgetcsv_variation5.phpt fgetcsv_variation7.phpt fgetcsv_variation9.phpt fgetcsv_error.phpt fgetcsv_variation31.phpt fgetcsv_variation21.phpt fgetcsv_variation11.phpt fgetcsv_variation23.phpt fgetcsv_variation13.phpt fgetcsv_variation25.phpt fgetcsv_variation15.phpt Log: New Testcases for fgetcsv() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation27.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation27.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation27.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation2.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation17.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation17.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation17.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation29.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation29.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation29.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation4.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation19.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation19.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation19.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation6.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation8.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation30.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation30.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation30.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation20.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation20.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation20.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation10.phpt +++ php-src/ext/standard/tests/file/fgetcsv_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation22.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fgetcsv_variation22.phpt +++
[PHP-CVS] cvs: php-src /ext/standard array.c
johannesWed Aug 8 14:52:41 2007 UTC Modified files: /php-src/ext/standard array.c Log: - Fix build (patch by Ulf Wendel) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.412r2=1.413diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.412 php-src/ext/standard/array.c:1.413 --- php-src/ext/standard/array.c:1.412 Wed Aug 8 07:46:00 2007 +++ php-src/ext/standard/array.cWed Aug 8 14:52:40 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.412 2007/08/08 07:46:00 jani Exp $ */ +/* $Id: array.c,v 1.413 2007/08/08 14:52:40 johannes Exp $ */ #include php.h #include php_ini.h @@ -1277,19 +1277,19 @@ if (var_name_type == IS_STRING) { /* These are allowed as first char: [a-zA-Z_\x7f-\xff] */ - if (var_name[0] == '_' || - (((int)((unsigned char *)var_name)[0]) = 65 /* A */ /* Z*/ 90 = ((int)((unsigned char *)var_name)[0])) || - (((int)((unsigned char *)var_name)[0]) = 97 /* a */ /* z*/ 122 = ((int)((unsigned char *)var_name)[0])) || - (((int)((unsigned char *)var_name)[0]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[0])) + if (((unsigned char *)var_name.s)[0] == '_' || + (((int)((unsigned char *)var_name.s)[0]) = 65 /* A */ /* Z*/ 90 = ((int)((unsigned char *)var_name.s)[0])) || + (((int)((unsigned char *)var_name.s)[0]) = 97 /* a */ /* z*/ 122 = ((int)((unsigned char *)var_name.s)[0])) || + (((int)((unsigned char *)var_name.s)[0]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name.s)[0])) ) { /* And these as the rest: [a-zA-Z0-9_\x7f-\xff] */ - if (len 1) { - for (i = 1; i len; i++) { - if (var_name[i] == '_' || - (((int)((unsigned char *)var_name)[i]) = 48 /* 0*/ /* 9*/ 57 = ((int)((unsigned char *)var_name)[i])) || - (((int)((unsigned char *)var_name)[i]) = 65 /* A*/ /* Z*/ 90 = ((int)((unsigned char *)var_name)[i])) || - (((int)((unsigned char *)var_name)[i]) = 97 /* a*/ /* z*/ 122 = ((int)((unsigned char *)var_name)[i])) || - (((int)((unsigned char *)var_name)[i]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char *)var_name)[i])) + if (var_name_len 1) { + for (i = 1; i var_name_len; i++) { + if (((unsigned char*)var_name.s)[i] == '_' || + (((int)((unsigned char *)var_name.s)[i]) = 48 /* 0*/ /* 9*/ 57 = ((int)((unsigned char*)var_name.s)[i])) || + (((int)((unsigned char *)var_name.s)[i]) = 65 /* A*/ /* Z*/ 90 = ((int)((unsigned char*)var_name.s)[i])) || + (((int)((unsigned char *)var_name.s)[i]) = 97 /* a*/ /* z*/ 122 = ((int)((unsigned char*)var_name.s)[i])) || + (((int)((unsigned char *)var_name.s)[i]) = 127 /* 0x7f */ /* 0xff */ 255 = ((int)((unsigned char*)var_name.s)[i])) ) { } else { return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/embed php_embed.c
stasWed Aug 8 21:06:28 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/embed php_embed.c Log: fix TSRM embed startup http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.2r2=1.11.2.1.2.3diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.2 php-src/sapi/embed/php_embed.c:1.11.2.1.2.3 --- php-src/sapi/embed/php_embed.c:1.11.2.1.2.2 Thu Aug 2 23:45:28 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:06:28 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.11.2.1.2.2 2007/08/02 23:45:28 stas Exp $ */ +/* $Id: php_embed.c,v 1.11.2.1.2.3 2007/08/08 21:06:28 stas Exp $ */ #include php_embed.h @@ -143,9 +143,6 @@ { zend_llist global_vars; #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif @@ -173,15 +170,6 @@ tsrm_startup(1, 1, 0, NULL); #endif -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); - *ptsrm_ls = tsrm_ls; -#endif - ini_entries_len = strlen(HARDCODED_INI); php_embed_module.ini_entries = malloc(ini_entries_len+2); memcpy(php_embed_module.ini_entries, HARDCODED_INI, ini_entries_len+1); @@ -189,24 +177,24 @@ sapi_startup(php_embed_module); + if (argv) { + php_embed_module.executable_location = argv[0]; + } + if (php_embed_module.startup(php_embed_module)==FAILURE) { return FAILURE; } - if (argv) { - php_embed_module.executable_location = argv[0]; - } +#ifdef ZTS + sapi_globals = ts_resource(sapi_globals_id); + tsrm_ls = ts_resource(0); + *ptsrm_ls = tsrm_ls; +#endif zend_llist_init(global_vars, sizeof(char *), NULL, 0); /* Set some Embedded PHP defaults */ SG(options) |= SAPI_OPTION_NO_CHDIR; -#if 0 -// zend_alter_ini_entry(register_argc_argv, 19, 1, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(html_errors, 12, 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(implicit_flush, 15, 1, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(max_execution_time, 19, 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -#endif SG(request_info).argc=argc; SG(request_info).argv=argv; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/embed php_embed.c
stasWed Aug 8 21:08:51 2007 UTC Modified files: /php-src/sapi/embed php_embed.c Log: fix TSRM embed startup http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.18r2=1.19diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.18 php-src/sapi/embed/php_embed.c:1.19 --- php-src/sapi/embed/php_embed.c:1.18 Thu Aug 2 23:49:50 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:08:51 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.18 2007/08/02 23:49:50 stas Exp $ */ +/* $Id: php_embed.c,v 1.19 2007/08/08 21:08:51 stas Exp $ */ #include php_embed.h #include ext/standard/dl.h @@ -155,9 +155,6 @@ { zend_llist global_vars; #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif @@ -185,15 +182,6 @@ tsrm_startup(1, 1, 0, NULL); #endif -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); - *ptsrm_ls = tsrm_ls; -#endif - php_embed_module.additional_functions = additional_functions; ini_entries_len = strlen(HARDCODED_INI); @@ -203,24 +191,24 @@ sapi_startup(php_embed_module); + if (argv) { + php_embed_module.executable_location = argv[0]; + } + if (php_embed_module.startup(php_embed_module)==FAILURE) { return FAILURE; } - if (argv) { - php_embed_module.executable_location = argv[0]; - } +#ifdef ZTS + sapi_globals = ts_resource(sapi_globals_id); + tsrm_ls = ts_resource(0); + *ptsrm_ls = tsrm_ls; +#endif zend_llist_init(global_vars, sizeof(char *), NULL, 0); /* Set some Embedded PHP defaults */ SG(options) |= SAPI_OPTION_NO_CHDIR; -#if 0 -// zend_alter_ini_entry(register_argc_argv, 19, 1, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(html_errors, 12, 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(implicit_flush, 15, 1, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -// zend_alter_ini_entry(max_execution_time, 19, 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -#endif SG(request_info).argc=argc; SG(request_info).argv=argv; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/embed php_embed.c
stasWed Aug 8 21:11:53 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/embed php_embed.c Log: initialize values http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.3r2=1.11.2.1.2.4diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.3 php-src/sapi/embed/php_embed.c:1.11.2.1.2.4 --- php-src/sapi/embed/php_embed.c:1.11.2.1.2.3 Wed Aug 8 21:06:28 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:11:53 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.11.2.1.2.3 2007/08/08 21:06:28 stas Exp $ */ +/* $Id: php_embed.c,v 1.11.2.1.2.4 2007/08/08 21:11:53 stas Exp $ */ #include php_embed.h @@ -143,8 +143,8 @@ { zend_llist global_vars; #ifdef ZTS - sapi_globals_struct *sapi_globals; - void ***tsrm_ls; + sapi_globals_struct *sapi_globals = NULL; + void ***tsrm_ls = NULL; #endif int ini_entries_len = 0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/embed php_embed.c
stasWed Aug 8 21:14:11 2007 UTC Modified files: /php-src/sapi/embed php_embed.c Log: initialize variables http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.19r2=1.20diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.19 php-src/sapi/embed/php_embed.c:1.20 --- php-src/sapi/embed/php_embed.c:1.19 Wed Aug 8 21:08:51 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:14:11 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.19 2007/08/08 21:08:51 stas Exp $ */ +/* $Id: php_embed.c,v 1.20 2007/08/08 21:14:11 stas Exp $ */ #include php_embed.h #include ext/standard/dl.h @@ -155,8 +155,8 @@ { zend_llist global_vars; #ifdef ZTS - sapi_globals_struct *sapi_globals; - void ***tsrm_ls; + sapi_globals_struct *sapi_globals = NULL; + void ***tsrm_ls = NULL; #endif int ini_entries_len = 0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/embed php_embed.c
stasWed Aug 8 21:57:30 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/embed php_embed.c Log: fix startup - remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.11.2.1.2.4r2=1.11.2.1.2.5diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.11.2.1.2.4 php-src/sapi/embed/php_embed.c:1.11.2.1.2.5 --- php-src/sapi/embed/php_embed.c:1.11.2.1.2.4 Wed Aug 8 21:11:53 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:57:30 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.11.2.1.2.4 2007/08/08 21:11:53 stas Exp $ */ +/* $Id: php_embed.c,v 1.11.2.1.2.5 2007/08/08 21:57:30 stas Exp $ */ #include php_embed.h @@ -143,7 +143,6 @@ { zend_llist global_vars; #ifdef ZTS - sapi_globals_struct *sapi_globals = NULL; void ***tsrm_ls = NULL; #endif int ini_entries_len = 0; @@ -168,6 +167,8 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); + *ptsrm_ls = tsrm_ls; #endif ini_entries_len = strlen(HARDCODED_INI); @@ -185,12 +186,6 @@ return FAILURE; } -#ifdef ZTS - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); - *ptsrm_ls = tsrm_ls; -#endif - zend_llist_init(global_vars, sizeof(char *), NULL, 0); /* Set some Embedded PHP defaults */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /sapi/embed php_embed.c
stasWed Aug 8 21:58:53 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/embed php_embed.c Log: remove unneded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.1.2.5.2.3r2=1.1.2.5.2.4diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.1.2.5.2.3 php-src/sapi/embed/php_embed.c:1.1.2.5.2.4 --- php-src/sapi/embed/php_embed.c:1.1.2.5.2.3 Wed Aug 8 21:12:41 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:58:53 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic [EMAIL PROTECTED] | +--+ */ -/* $Id: php_embed.c,v 1.1.2.5.2.3 2007/08/08 21:12:41 stas Exp $ */ +/* $Id: php_embed.c,v 1.1.2.5.2.4 2007/08/08 21:58:53 stas Exp $ */ #include php_embed.h @@ -137,7 +137,6 @@ { zend_llist global_vars; #ifdef ZTS - sapi_globals_struct *sapi_globals = NULL; void ***tsrm_ls = NULL; #endif @@ -161,6 +160,8 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); + *ptsrm_ls = tsrm_ls; #endif sapi_startup(php_embed_module); @@ -173,12 +174,6 @@ return FAILURE; } -#ifdef ZTS - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); - *ptsrm_ls = tsrm_ls; -#endif - zend_llist_init(global_vars, sizeof(char *), NULL, 0); /* Set some Embedded PHP defaults */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetcsv_error.phpt
The tests below fail because of feof() returning bool(false) instead of expected bool(true) (dunno why its return value is even checked, the test is supposed to test fgetcsv(), not feof()). ext/standard/tests/file/fgetcsv_variation14.phpt ext/standard/tests/file/fgetcsv_variation2.phpt ext/standard/tests/file/fgetcsv_variation22.phpt ext/standard/tests/file/fgetcsv_variation29.phpt ext/standard/tests/file/fgetcsv_variation30.phpt ext/standard/tests/file/fgetcsv_variation31.phpt On 08.08.2007 17:13, Raghubansh Kumar wrote: kraghubaWed Aug 8 13:13:18 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/file fgetcsv_variation27.phpt -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard file.c
tony2001Wed Aug 8 22:32:25 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c Log: fix ws folding http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.21r2=1.409.2.6.2.22diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.21 php-src/ext/standard/file.c:1.409.2.6.2.22 --- php-src/ext/standard/file.c:1.409.2.6.2.21 Sun Jul 1 21:28:16 2007 +++ php-src/ext/standard/file.c Wed Aug 8 22:32:24 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.21 2007/07/01 21:28:16 sniper Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.22 2007/08/08 22:32:24 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -146,6 +146,7 @@ } /* }}} */ + /* {{{ Module-Stuff */ static ZEND_RSRC_DTOR_FUNC(file_context_dtor) @@ -302,15 +303,14 @@ /* }}} */ -PHP_MSHUTDOWN_FUNCTION(file) +PHP_MSHUTDOWN_FUNCTION(file) /* {{{ */ { #ifndef ZTS file_globals_dtor(file_globals TSRMLS_CC); #endif return SUCCESS; } - - +/* }}} */ /* {{{ proto bool flock(resource fp, int operation [, int wouldblock]) Portable file locking */ @@ -1387,10 +1387,7 @@ /* }}} */ -/* {{{ proto int mkdir(char *dir int mode) -*/ - -PHPAPI int php_mkdir_ex(char *dir, long mode, int options TSRMLS_DC) +PHPAPI int php_mkdir_ex(char *dir, long mode, int options TSRMLS_DC) /* {{{ */ { int ret; @@ -1741,10 +1738,11 @@ } /* }}} */ -PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC) +PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC) /* {{{ */ { return php_copy_file_ex(src, dest, ENFORCE_SAFE_MODE TSRMLS_CC); } +/* }}} */ /* {{{ php_copy_file */ @@ -1859,7 +1857,7 @@ } /* }}} */ -static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t len, const char delimiter TSRMLS_DC) +static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t len, const char delimiter TSRMLS_DC) /* {{{ */ { int inc_len; unsigned char last_chars[2] = { 0, 0 }; @@ -1895,6 +1893,7 @@ } return ptr; } +/* }}} */ #define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL_PP(field), c, Z_STRLEN_PP(field)) @@ -2090,11 +2089,7 @@ } /* }}} */ - -PHPAPI void php_fgetcsv(php_stream *stream, /* {{{ */ - char delimiter, char enclosure, - size_t buf_len, char *buf, - zval *return_value TSRMLS_DC) +PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, size_t buf_len, char *buf, zval *return_value TSRMLS_DC) /* {{{ */ { char *temp, *tptr, *bptr, *line_end, *limit; const char escape_char = '\\'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cli php_cli.c
stasWed Aug 8 23:51:24 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cli php_cli.c Log: remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.21r2=1.129.2.13.2.22diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.21 php-src/sapi/cli/php_cli.c:1.129.2.13.2.22 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.21 Mon Jun 4 09:47:54 2007 +++ php-src/sapi/cli/php_cli.c Wed Aug 8 23:51:24 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.21 2007/06/04 09:47:54 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.22 2007/08/08 23:51:24 stas Exp $ */ #include php.h #include php_globals.h @@ -607,10 +607,6 @@ int hide_argv = 0; /* end of temporary locals */ #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif #ifdef PHP_CLI_WIN32_NO_CONSOLE @@ -648,6 +644,7 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); #endif cli_sapi_module.ini_defaults = sapi_cli_ini_defaults; @@ -716,14 +713,6 @@ cli_sapi_module.executable_location = argv[0]; -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); -#endif - /* startup after we get the above ini override se we get things right */ if (cli_sapi_module.startup(cli_sapi_module)==FAILURE) { /* there is no way to see if we must call zend_ini_deactivate() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c
stasWed Aug 8 23:51:57 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi cgi_main.c Log: remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.45r2=1.267.2.15.2.46diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.45 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.46 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.45 Wed Aug 8 13:01:40 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 23:51:57 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.45 2007/08/08 13:01:40 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.46 2007/08/08 23:51:57 stas Exp $ */ #include php.h #include php_globals.h @@ -1161,10 +1161,6 @@ /* end of temporary locals */ #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif @@ -1204,6 +1200,7 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); #endif sapi_startup(cgi_sapi_module); @@ -1295,11 +1292,6 @@ php_optarg = orig_optarg; #ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); SG(request_info).path_translated = NULL; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
stasWed Aug 8 23:55:42 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.329r2=1.330diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.329 php-src/sapi/cgi/cgi_main.c:1.330 --- php-src/sapi/cgi/cgi_main.c:1.329 Wed Aug 8 13:02:01 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Aug 8 23:55:42 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.329 2007/08/08 13:02:01 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.330 2007/08/08 23:55:42 stas Exp $ */ #include php.h #include php_globals.h @@ -1117,10 +1117,6 @@ /* end of temporary locals */ #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif @@ -1158,6 +1154,7 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); #endif sapi_startup(cgi_sapi_module); @@ -1240,11 +1237,6 @@ php_optarg = orig_optarg; #ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); SG(request_info).path_translated = NULL; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cli php_cli.c
stasWed Aug 8 23:56:19 2007 UTC Modified files: /php-src/sapi/cli php_cli.c Log: remove unneeded variables http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.179r2=1.180diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.179 php-src/sapi/cli/php_cli.c:1.180 --- php-src/sapi/cli/php_cli.c:1.179Sun May 6 12:57:27 2007 +++ php-src/sapi/cli/php_cli.c Wed Aug 8 23:56:19 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.179 2007/05/06 12:57:27 johannes Exp $ */ +/* $Id: php_cli.c,v 1.180 2007/08/08 23:56:19 stas Exp $ */ #include php.h #include php_globals.h @@ -609,10 +609,6 @@ int hide_argv = 0; /* end of temporary locals */ #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; void ***tsrm_ls; #endif #ifdef PHP_CLI_WIN32_NO_CONSOLE @@ -650,6 +646,7 @@ #ifdef ZTS tsrm_startup(1, 1, 0, NULL); + tsrm_ls = ts_resource(0); #endif cli_sapi_module.ini_defaults = sapi_cli_ini_defaults; @@ -719,14 +716,6 @@ cli_sapi_module.executable_location = argv[0]; cli_sapi_module.additional_functions = additional_functions; -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); -#endif - /* startup after we get the above ini override se we get things right */ if (cli_sapi_module.startup(cli_sapi_module)==FAILURE) { /* there is no way to see if we must call zend_ini_deactivate() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file tempnam_variation1-win32.phpt tempnam_variation1.phpt tempnam_variation2-win32.phpt tempnam_variation2.phpt tempnam_variation3-win32.phpt tempn
kraghubaThu Aug 9 03:34:00 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filetempnam_variation3-win32.phpt tempnam_variation1.phpt tempnam_variation2.phpt tempnam_variation3.phpt tempnam_variation4.phpt tempnam_variation7-win32.phpt tempnam_variation5.phpt tempnam_variation6.phpt tempnam_variation7.phpt tempnam_variation1-win32.phpt tempnam_variation2-win32.phpt Log: New testcases for tempnam() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation1.phpt +++ php-src/ext/standard/tests/file/tempnam_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation2.phpt +++ php-src/ext/standard/tests/file/tempnam_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation3.phpt +++ php-src/ext/standard/tests/file/tempnam_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation4.phpt +++ php-src/ext/standard/tests/file/tempnam_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation5.phpt +++ php-src/ext/standard/tests/file/tempnam_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation6.phpt +++ php-src/ext/standard/tests/file/tempnam_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation7.phpt +++ php-src/ext/standard/tests/file/tempnam_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt +++ php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt +++ php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file tempnam_variation1-win32.phpt tempnam_variation1.phpt tempnam_variation2-win32.phpt tempnam_variation2.phpt tempnam_variation3-win32.phpt tempnam_variat
kraghubaThu Aug 9 03:35:23 2007 UTC Modified files: /php-src/ext/standard/tests/filetempnam_variation2.phpt tempnam_variation3.phpt tempnam_variation4.phpt tempnam_variation7-win32.phpt tempnam_variation5.phpt tempnam_variation6.phpt tempnam_variation7.phpt tempnam_variation1-win32.phpt tempnam_variation2-win32.phpt tempnam_variation3-win32.phpt tempnam_variation1.phpt Log: New testcases for tempnam() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/tempnam_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/file/tempnam_variation2.phpt:1.2 --- /dev/null Thu Aug 9 03:35:22 2007 +++ php-src/ext/standard/tests/file/tempnam_variation2.phpt Thu Aug 9 03:35:22 2007 @@ -0,0 +1,132 @@ +--TEST-- +Test tempnam() function: usage variations - relative paths +--SKIPIF-- +?php +if(substr(PHP_OS, 0, 3) == WIN) + die(skip Do not run on Windows); +? +--FILE-- +?php +/* Prototype: string tempnam ( string $dir, string $prefix ); + Description: Create file with unique file name. +*/ + +/* Creating unique files in various dirs by passing relative paths to $dir arg */ + +echo *** Testing tempnam() with relative paths ***\n; +$dir_name = dirname(__FILE__)./tempnam_variation2; +mkdir($dir_name); +$dir_path = $dir_name./tempnam_variation2_sub; +mkdir($dir_path); + +$old_dir_path = getcwd(); +chdir(dirname(__FILE__)); + +$dir_paths = array( + $dir_path, + $dir_path/, + $dir_path/.., + $dir_path//../, + $dir_path/../.././tempnam_variation2, + $dir_path/..///tempnam_variation2_sub//..//../tempnam_variation2, + ., + ./tempnam_variation2/../tempnam_variation2/tempnam_variation2_sub +); + +for($i = 0; $icount($dir_paths); $i++) { + $j = $i+1; + echo \n-- Iteration $j --\n; + $file_name = tempnam($dir_paths[$i], tempnam_variation2.tmp); + + if( file_exists($file_name) ){ + +echo File name is = ; +print(realpath($file_name)); +echo \n; + +echo File permissions are = ; +printf(%o, fileperms($file_name) ); +echo \n; + } + else +echo -- File is not created --; +unlink($file_name); +} + +chdir($old_dir_path); +rmdir($dir_path); +rmdir($dir_name); + +echo \n*** Done ***\n; +--EXPECTF-- +*** Testing tempnam() with relative paths *** + +-- Iteration 1 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 2 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 3 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 4 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 5 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 6 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 7 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 8 -- +File name is = %s +File permissions are = 100600 + +*** Done *** +--UEXPECTF-- +*** Testing tempnam() with relative paths *** + +-- Iteration 1 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 2 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 3 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 4 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 5 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 6 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 7 -- +File name is = %s +File permissions are = 100600 + +-- Iteration 8 -- +File name is = %s +File permissions are = 100600 + +*** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/tempnam_variation3.phpt diff -u /dev/null php-src/ext/standard/tests/file/tempnam_variation3.phpt:1.2 --- /dev/null Thu Aug 9 03:35:22 2007 +++ php-src/ext/standard/tests/file/tempnam_variation3.phpt Thu Aug 9 03:35:22 2007 @@ -0,0 +1,123 @@ +--TEST-- +Test tempnam() function: usage variations - invalid/non-existing file +--SKIPIF-- +?php +if(substr(PHP_OS, 0, 3) == WIN) + die(skip DO not run on Windows); +? +--FILE-- +?php +/* Prototype: string tempnam ( string $dir, string $prefix ); + Description: Create file with unique file name. +*/ + +/* Passing invalid/non-existing args for $prefix */ + +echo *** Testing tempnam() with invalid/non-existing file names ***\n; +$file_path = dirname(__FILE__); + +/* An array of names, which will be passed as a file name */ +$names_arr = array( + /* Invalid args */ + -1, + TRUE,
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetcsv_error.phpt
Hi Tony, The purpose of testcase (fgetcsv_variation14.phpt) is to read from end of file.The use of feof() in the testcase is to check for the file pointer pointing to end of file. This check is required to confirm the position of file pointer before and after the read function by fgetcsv(). I think this check is required here. Regards Nikhil On 8/9/07, Antony Dovgal [EMAIL PROTECTED] wrote: The tests below fail because of feof() returning bool(false) instead of expected bool(true) (dunno why its return value is even checked, the test is supposed to test fgetcsv(), not feof()). ext/standard/tests/file/fgetcsv_variation14.phpt ext/standard/tests/file/fgetcsv_variation2.phpt ext/standard/tests/file/fgetcsv_variation22.phpt ext/standard/tests/file/fgetcsv_variation29.phpt ext/standard/tests/file/fgetcsv_variation30.phpt ext/standard/tests/file/fgetcsv_variation31.phpt On 08.08.2007 17:13, Raghubansh Kumar wrote: kraghuba Wed Aug 8 13:13:18 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/file fgetcsv_variation27.phpt -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php