[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-06-26 Thread changelog
changelog   Wed Jun 27 01:31:16 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2730r2=1.2731diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2730 php-src/ChangeLog:1.2731
--- php-src/ChangeLog:1.2730Tue Jun 26 01:31:22 2007
+++ php-src/ChangeLog   Wed Jun 27 01:31:15 2007
@@ -1,3 +1,82 @@
+2007-06-26  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/assert.c
+  ext/standard/base64.c
+  ext/standard/basic_functions.c
+  ext/standard/browscap.c
+  ext/standard/credits.c
+  ext/standard/crypt.c
+  ext/standard/css.c
+  ext/standard/cyr_convert.c
+  ext/standard/datetime.c
+  ext/standard/var.c:
+  fix ws  folding
+
+2007-06-26  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c:
+  Fixed bug #40419 (Trailing Slash in CGI request don't work)
+
+2007-06-26  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/dir.c:
+  add missing include and fix warning
+
+* ext/xmlwriter/tests/007.phpt
+  ext/xmlwriter/tests/OO_007.phpt:
+  MFB
+
+* (PHP_5_2)
+  ext/xmlwriter/tests/007.phpt
+  ext/xmlwriter/tests/OO_007.phpt:
+  fix tests as discussed
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/basic_functions.c
+  ext/standard/tests/general_functions/bug41445.phpt
+  ext/standard/tests/general_functions/bug41445_1.phpt:
+  MFH: fix #41445 (parse_ini_file() has a problem with certain types of
+  integer as sections)
+
+* ext/standard/basic_functions.c
+  ext/standard/tests/general_functions/bug41445.phpt
+  ext/standard/tests/general_functions/bug41445.phpt
+  ext/standard/tests/general_functions/bug41445_1.phpt
+  ext/standard/tests/general_functions/bug41445_1.phpt:
+  fix #41445 (parse_ini_file() has a problem with certain types of integer 
as
+  sections)
+
+* (PHP_5_2)
+  ext/standard/var.c:
+  fix ws
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/dns.c:
+  MFH: fix #41795 (checkdnsrr does not support DNS_TXT type)
+  patch by lucas at facebook dot com
+
+* ext/standard/dns.c:
+  fix #41795 (checkdnsrr does not support DNS_TXT type)
+
+* Makefile.global:
+  fix 'make test' on platforms with broken shells
+
+2007-06-26  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/pdo/pdo_stmt.c
+  ext/pdo_mysql/tests/bug_41698.phpt
+  ext/pdo_mysql/tests/bug_41698.phpt:
+  
+  Fixed bug #41698 (float parameters truncated to integer in prepared
+  statements).
+
 2007-06-25  Antony Dovgal  [EMAIL PROTECTED]
 
 * ext/standard/tests/file/bug41655_1.phpt


RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Dmitry Stogov
Hi Rob,

So what do you suggest to make with these tests?

Dmitry.

 -Original Message-
 From: Rob Richards [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 25, 2007 10:25 PM
 To: Antony Dovgal
 Cc: Dmitry Stogov; [EMAIL PROTECTED]; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) 
 /ext/xmlwriter/tests 007.phpt OO_007.phpt
 
 
 Changed output is due to a I fix I made in libxml2 for 2.6.29
 
 Rob
 
 Antony Dovgal wrote:
  On 25.06.2007 21:41, Dmitry Stogov wrote:
  Interesting. May be it depends on libxml version (I use 
 2.6.29). I'll 
  try to look into it tomorrow.
 
  May be.
  I use libxml2 2.6.26.
 
 
 -- 
 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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Antony Dovgal

On 25.06.2007 22:24, Rob Richards wrote:

Changed output is due to a I fix I made in libxml2 for 2.6.29


So we need either to create separate tests for 2.6.29 or just disable these tests when 
LIBXML_VERSION = 20629, if I understood it correctly.



Antony Dovgal wrote:

On 25.06.2007 21:41, Dmitry Stogov wrote:

Interesting. May be it depends on libxml version (I use 2.6.29).
I'll try to look into it tomorrow.


May be.
I use libxml2 2.6.26.






--
Wbr, 
Antony Dovgal


--
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/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Dmitry Stogov
The behavior with libxml  2.6.29 is wrong, but this is libxml bug and it
cannot be simple fixed in PHP.

Thanks. Dmitry.

 -Original Message-
 From: Antony Dovgal [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 26, 2007 10:34 AM
 To: Rob Richards
 Cc: Dmitry Stogov; [EMAIL PROTECTED]; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) 
 /ext/xmlwriter/tests 007.phpt OO_007.phpt
 
 
 On 25.06.2007 22:24, Rob Richards wrote:
  Changed output is due to a I fix I made in libxml2 for 2.6.29
 
 So we need either to create separate tests for 2.6.29 or just 
 disable these tests when 
 LIBXML_VERSION = 20629, if I understood it correctly.
 
  Antony Dovgal wrote:
  On 25.06.2007 21:41, Dmitry Stogov wrote:
  Interesting. May be it depends on libxml version (I use 2.6.29). 
  I'll try to look into it tomorrow.
 
  May be.
  I use libxml2 2.6.26.
 
  
 
 
 -- 
 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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Pierre

On 6/26/07, Dmitry Stogov [EMAIL PROTECTED] wrote:

The behavior with libxml  2.6.29 is wrong, but this is libxml bug and it
cannot be simple fixed in PHP.


What Tony (afaiu :) meant is to skip the test if the libxml version is
younger than 2.6.29.

Thanks,
--Pierre

--
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/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Antony Dovgal

On 26.06.2007 11:53, Pierre wrote:

On 6/26/07, Dmitry Stogov [EMAIL PROTECTED] wrote:

The behavior with libxml  2.6.29 is wrong, but this is libxml bug and it
cannot be simple fixed in PHP.


What Tony (afaiu :) meant is to skip the test if the libxml version is
younger than 2.6.29.


Exactly. 
Either just skip it or skip it + run different tests with libxml  2.6.29.


--
Wbr, 
Antony Dovgal


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/file symlink_link_linkinfo_is_link_basic.phpt symlink_link_linkinfo_is_link_error.phpt symlink_link_linkinfo_is_link_variation.phpt

2007-06-26 Thread Antony Dovgal

On 26.06.2007 11:00, Raghubansh wrote:

Tony, Please provide the diff. files. Thanks


http://news.php.net/php.qa/36932 - MacOs X
http://news.php.net/php.qa/36936 - Fedora Core release 3 32bit
http://news.php.net/php.qa/36938 - SuSE 9 64bit
http://news.php.net/php.qa/36940 - FC3 64bit

--
Wbr, 
Antony Dovgal


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/file symlink_link_linkinfo_is_link_basic.phpt symlink_link_linkinfo_is_link_error.phpt symlink_link_linkinfo_is_link_variation.phpt

2007-06-26 Thread Raghubansh

Thanks Tony!

On 6/26/07, Antony Dovgal [EMAIL PROTECTED] wrote:


On 26.06.2007 11:00, Raghubansh wrote:
 Tony, Please provide the diff. files. Thanks

http://news.php.net/php.qa/36932 - MacOs X
http://news.php.net/php.qa/36936 - Fedora Core release 3 32bit
http://news.php.net/php.qa/36938 - SuSE 9 64bit
http://news.php.net/php.qa/36940 - FC3 64bit

--
Wbr,
Antony Dovgal





--
with Regards,
Raghubansh


Re: [PHP-CVS] cvs: php-src /ext/standard/tests/file symlink_link_linkinfo_is_link_basic.phpt symlink_link_linkinfo_is_link_error.phpt symlink_link_linkinfo_is_link_variation.phpt

2007-06-26 Thread Antony Dovgal

On 26.06.2007 11:00, Raghubansh wrote:

Tony, Please provide the diff. files. Thanks


More test results:
http://news.php.net/php.qa/36961 - Sun Solaris 10

--
Wbr, 
Antony Dovgal


--
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/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Dmitry Stogov
No problem with SKIPing them, btw the old behavior is wrong.

Dmitry.

 -Original Message-
 From: Antony Dovgal [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 26, 2007 12:57 PM
 To: Pierre
 Cc: Dmitry Stogov; Rob Richards; [EMAIL PROTECTED]; 
 php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) 
 /ext/xmlwriter/tests 007.phpt OO_007.phpt
 
 
 On 26.06.2007 11:53, Pierre wrote:
  On 6/26/07, Dmitry Stogov [EMAIL PROTECTED] wrote:
  The behavior with libxml  2.6.29 is wrong, but this is libxml bug 
  and it cannot be simple fixed in PHP.
  
  What Tony (afaiu :) meant is to skip the test if the libxml 
 version is 
  younger than 2.6.29.
 
 Exactly. 
 Either just skip it or skip it + run different tests with 
 libxml  2.6.29.
 
 -- 
 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] cvs: php-src /ext/standard dns.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 11:03:42 2007 UTC

  Modified files:  
/php-src/ext/standard   dns.c 
  Log:
  fix #41795 (checkdnsrr does not support DNS_TXT type)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.85r2=1.86diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.85 php-src/ext/standard/dns.c:1.86
--- php-src/ext/standard/dns.c:1.85 Mon May 14 14:38:29 2007
+++ php-src/ext/standard/dns.c  Tue Jun 26 11:03:42 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.85 2007/05/14 14:38:29 scottmac Exp $ */
+/* $Id: dns.c,v 1.86 2007/06/26 11:03:42 tony2001 Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -276,6 +276,7 @@
else if (!strcasecmp(PTR,   rectype)) type = DNS_T_PTR;
else if (!strcasecmp(ANY,   rectype)) type = DNS_T_ANY;
else if (!strcasecmp(SOA,   rectype)) type = DNS_T_SOA;
+   else if (!strcasecmp(TXT,   rectype)) type = DNS_T_TXT;
else if (!strcasecmp(CNAME, rectype)) type = DNS_T_CNAME;
else if (!strcasecmp(,  rectype)) type = DNS_T_;
else if (!strcasecmp(SRV,   rectype)) type = DNS_T_SRV;

-- 
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 dns.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 11:04:56 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   dns.c 
  Log:
  MFH: fix #41795 (checkdnsrr does not support DNS_TXT type)
  patch by lucas at facebook dot com
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.800r2=1.2027.2.547.2.801diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.800 php-src/NEWS:1.2027.2.547.2.801
--- php-src/NEWS:1.2027.2.547.2.800 Tue Jun 26 01:24:09 2007
+++ php-src/NEWSTue Jun 26 11:04:55 2007
@@ -36,6 +36,8 @@
 - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory 
   already exists). (Pierre)
 
+- Fixed bug #41795 (checkdnsrr does not support DNS_TXT type). 
+  (lucas at facebook dot com, Tony)
 - Fixed bug #41773 (php_strip_whitespace() sends headers with errors 
   suppressed). (Tony)
 - Fixed bug #41765 (Recode crashes/does not work on amd64). 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.4r2=1.70.2.7.2.5diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.70.2.7.2.4 
php-src/ext/standard/dns.c:1.70.2.7.2.5
--- php-src/ext/standard/dns.c:1.70.2.7.2.4 Mon May 14 11:33:34 2007
+++ php-src/ext/standard/dns.c  Tue Jun 26 11:04:55 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.70.2.7.2.4 2007/05/14 11:33:34 tony2001 Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.5 2007/06/26 11:04:55 tony2001 Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -289,6 +289,7 @@
else if (!strcasecmp(PTR,   Z_STRVAL_PP(arg2))) type 
= DNS_T_PTR;
else if (!strcasecmp(ANY,   Z_STRVAL_PP(arg2))) type 
= DNS_T_ANY;
else if (!strcasecmp(SOA,   Z_STRVAL_PP(arg2))) type 
= DNS_T_SOA;
+   else if (!strcasecmp(TXT,   Z_STRVAL_PP(arg2))) type 
= DNS_T_TXT;
else if (!strcasecmp(CNAME, Z_STRVAL_PP(arg2))) type 
= DNS_T_CNAME;
else if (!strcasecmp(,  Z_STRVAL_PP(arg2))) type 
= DNS_T_;
else if (!strcasecmp(SRV,   Z_STRVAL_PP(arg2))) type 
= DNS_T_SRV;

-- 
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) / Makefile.global

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 10:22:49 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcMakefile.global 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/Makefile.global?r1=1.57.2.5.2.5r2=1.57.2.5.2.6diff_format=u
Index: php-src/Makefile.global
diff -u php-src/Makefile.global:1.57.2.5.2.5 
php-src/Makefile.global:1.57.2.5.2.6
--- php-src/Makefile.global:1.57.2.5.2.5Sat Jun  9 12:06:53 2007
+++ php-src/Makefile.global Tue Jun 26 10:22:48 2007
@@ -69,7 +69,7 @@

 install-su: install-pear
 
-PHP_TEST_SHARED_EXTENSIONS=`(for i in $(PHP_MODULES); do . $$i ; echo -n -d 
extension=$$dlname ; done)`
+PHP_TEST_SHARED_EXTENSIONS=`(if test ! -z $(PHP_MODULES); then for i in 
$(PHP_MODULES); do . $$i ; echo -n -d extension=$$dlname ; done; fi;)`
 PHP_TEST_SETTINGS=-d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' 
-d 'memory_limit=-1'
 
 test: all 
@@ -79,7 +79,12 @@
CC=$(CC) \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -d extension_dir=modules/ 
$(PHP_TEST_SHARED_EXTENSIONS) tests/; \
elif test ! -z $(SAPI_CLI_PATH)  test -x $(SAPI_CLI_PATH); then \
-   $(EGREP) -v '^extension[\t\ ]=' 
`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo (php_ini_loaded_file()) ? 
php_ini_loaded_file() : no_ini_file;'`  $(top_builddir)/tmp-php.ini; \
+   INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo 
php_ini_loaded_file();'`; \
+   if test -z $(INI_FILE); then \
+   echo   $(top_builddir)/tmp-php.ini; \
+   else \
+   $(EGREP) -v '^extension[\t\ ]=' $(INI_FILE)  
$(top_builddir)/tmp-php.ini; \
+   fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC=$(CC) \

-- 
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/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Rob Richards

Antony Dovgal wrote:

On 25.06.2007 22:24, Rob Richards wrote:

Changed output is due to a I fix I made in libxml2 for 2.6.29


So we need either to create separate tests for 2.6.29 or just disable 
these tests when LIBXML_VERSION = 20629, if I understood it correctly.


That is correct. As Dmitry pointed out older libxml2 produced invalid 
XML, but that particular test is for a non-related PHP issue in the 
extension.
Personally I'd prefer just to disable the test when LIBXML_VERSION  
20629 (using Dmitry's updated test) instead of having to have multiple 
tests for different libxml2 versions and seeing the output is really 
correct in the newer version.


Rob

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41445.phpt bug41445_1.phpt

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 12:08:50 2007 UTC

  Added files: 
/php-src/ext/standard/tests/general_functions   bug41445.phpt 
bug41445_1.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  fix #41445 (parse_ini_file() has a problem with certain types of integer as 
sections)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.859r2=1.860diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.859 
php-src/ext/standard/basic_functions.c:1.860
--- php-src/ext/standard/basic_functions.c:1.859Sat Jun  9 11:42:55 2007
+++ php-src/ext/standard/basic_functions.c  Tue Jun 26 12:08:50 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.859 2007/06/09 11:42:55 sniper Exp $ */
+/* $Id: basic_functions.c,v 1.860 2007/06/26 12:08:50 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6122,7 +6122,7 @@
 
 static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, int 
callback_type, zval *arr)
 {
-   zval *element;
+   zval *element, name;
TSRMLS_FETCH();
 
switch (callback_type) {
@@ -6136,29 +6136,17 @@
*element = *arg2;
zval_copy_ctor(element);
INIT_PZVAL(element);
+
+   name = *arg1;
+   zval_copy_ctor(name);
+   INIT_PZVAL(name);
+
if (UG(unicode)) {
convert_to_unicode_with_converter(element, 
UG(utf8_conv));
+   convert_to_unicode_with_converter(name, 
UG(utf8_conv));
}
-   if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) { 
-   zstr key;
-   int key_len;
-
-   if (UG(unicode)) {
-   if 
(zend_string_to_unicode(UG(utf8_conv), key.u, key_len, Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1) TSRMLS_CC) == FAILURE) {
-   return;
-   }
-   } else {
-   key.s = Z_STRVAL_P(arg1);
-   key_len = Z_STRLEN_P(arg1);
-   }
-   zend_u_hash_update(Z_ARRVAL_P(arr), 
ZEND_STR_TYPE, key, key_len+1, element, sizeof(zval *), NULL);
-   if (UG(unicode)) {
-   efree(key.u);
-   }
-   } else {
-   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
-   zend_hash_index_update(Z_ARRVAL_P(arr), key, 
element, sizeof(zval *), NULL);
-   }
+   zend_u_symtable_update(Z_ARRVAL_P(arr), ZEND_STR_TYPE, 
Z_UNIVAL(name), Z_UNILEN(name)+1, element, sizeof(zval *), NULL);
+   zval_dtor(name);
break;
 
case ZEND_INI_PARSER_POP_ENTRY:
@@ -6170,7 +6158,18 @@
break;
}
 
-   if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) {
+   if (!(Z_STRLEN_P(arg1)  1  Z_STRVAL_P(arg1)[0]=='0') 
 is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == 
IS_LONG) {
+   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
+   if (zend_hash_index_find(Z_ARRVAL_P(arr), key, 
(void **) find_hash) == FAILURE) {
+   ALLOC_ZVAL(hash);
+   INIT_PZVAL(hash);
+   array_init(hash);
+
+   
zend_hash_index_update(Z_ARRVAL_P(arr), key, hash, sizeof(zval *), NULL);
+   } else {
+   hash = *find_hash;
+   }
+   } else {
zstr key;
int key_len;
 
@@ -6196,17 +6195,6 @@
if (UG(unicode)) {
efree(key.u);
}
-   } else {
-   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
-   if (zend_hash_index_find(Z_ARRVAL_P(arr), key, 
(void **) find_hash) == FAILURE) {
- 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41445.phpt bug41445_1.phpt

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 12:10:08 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/general_functions   bug41445.phpt 
bug41445_1.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
/php-srcNEWS 
  Log:
  MFH: fix #41445 (parse_ini_file() has a problem with certain types of integer 
as sections)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.55r2=1.725.2.31.2.56diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.55 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.56
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.55  Mon Jun 25 
21:12:47 2007
+++ php-src/ext/standard/basic_functions.c  Tue Jun 26 12:10:08 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.55 2007/06/25 21:12:47 tony2001 Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.56 2007/06/26 12:10:08 tony2001 Exp $ 
*/
 
 #include php.h
 #include php_streams.h
@@ -6130,12 +6130,7 @@
*element = *arg2;
zval_copy_ctor(element);
INIT_PZVAL(element);
-   if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) { 
-   zend_hash_update(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, element, sizeof(zval *), NULL);
-   } else {
-   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
-   zend_hash_index_update(Z_ARRVAL_P(arr), key, 
element, sizeof(zval *), NULL);
-   }
+   zend_symtable_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1)+1, element, sizeof(zval *), NULL);
break;
 
case ZEND_INI_PARSER_POP_ENTRY:
@@ -6147,17 +6142,7 @@
break;
}
 
-   if (is_numeric_string(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1), NULL, NULL, 0) != IS_LONG) {
-   if (zend_hash_find(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, (void **) find_hash) == FAILURE) {
-   ALLOC_ZVAL(hash);
-   INIT_PZVAL(hash);
-   array_init(hash);
-
-   zend_hash_update(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, hash, sizeof(zval *), NULL);
-   } else {
-   hash = *find_hash;
-   }
-   } else {
+   if (!(Z_STRLEN_P(arg1)  1  Z_STRVAL_P(arg1)[0]=='0') 
 is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == 
IS_LONG) {
ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
if (zend_hash_index_find(Z_ARRVAL_P(arr), key, 
(void **) find_hash) == FAILURE) {
ALLOC_ZVAL(hash);
@@ -6168,6 +6153,16 @@
} else {
hash = *find_hash;
}
+   } else {
+   if (zend_hash_find(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, (void **) find_hash) == FAILURE) {
+   ALLOC_ZVAL(hash);
+   INIT_PZVAL(hash);
+   array_init(hash);
+
+   zend_hash_update(Z_ARRVAL_P(arr), 
Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, hash, sizeof(zval *), NULL);
+   } else {
+   hash = *find_hash;
+   }
}
 
if (Z_TYPE_P(hash) != IS_ARRAY) {
@@ -6196,12 +6191,7 @@
if (callback_type == ZEND_INI_PARSER_SECTION) {
MAKE_STD_ZVAL(BG(active_ini_file_section));
array_init(BG(active_ini_file_section));
-   if (is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, 
NULL, 0) != IS_LONG) {
-   zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1)+1, BG(active_ini_file_section), sizeof(zval *), NULL);
-   } else {
-   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
-   zend_hash_index_update(Z_ARRVAL_P(arr), key, 
BG(active_ini_file_section), sizeof(zval *), NULL);
-   }
+   

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 12:12:31 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlwriter/tests007.phpt OO_007.phpt 
  Log:
  fix tests as discussed
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/007.phpt?r1=1.1.2.3.2.1r2=1.1.2.3.2.2diff_format=u
Index: php-src/ext/xmlwriter/tests/007.phpt
diff -u php-src/ext/xmlwriter/tests/007.phpt:1.1.2.3.2.1 
php-src/ext/xmlwriter/tests/007.phpt:1.1.2.3.2.2
--- php-src/ext/xmlwriter/tests/007.phpt:1.1.2.3.2.1Mon Jun 25 06:45:57 2007
+++ php-src/ext/xmlwriter/tests/007.phptTue Jun 26 12:12:31 2007
@@ -3,11 +3,11 @@
 --SKIPIF--
 ?php 
 if (!extension_loaded(xmlwriter)) die(skip); 
-if (!function_exists(xmlwriter_start_attribute_ns)) die(skip: libxml2 
2.6.17+ required);
+if (LIBXML_VERSION  20629) die(skip: libxml2 2.6.29+ required);
 ?
 --FILE--
 ?php 
-/* $Id: 007.phpt,v 1.1.2.3.2.1 2007/06/25 06:45:57 dmitry Exp $ */
+/* $Id: 007.phpt,v 1.1.2.3.2.2 2007/06/26 12:12:31 tony2001 Exp $ */
 
 $xw = xmlwriter_open_memory();
 xmlwriter_set_indent($xw, TRUE);
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/OO_007.phpt?r1=1.1.2.3.2.1r2=1.1.2.3.2.2diff_format=u
Index: php-src/ext/xmlwriter/tests/OO_007.phpt
diff -u php-src/ext/xmlwriter/tests/OO_007.phpt:1.1.2.3.2.1 
php-src/ext/xmlwriter/tests/OO_007.phpt:1.1.2.3.2.2
--- php-src/ext/xmlwriter/tests/OO_007.phpt:1.1.2.3.2.1 Mon Jun 25 06:45:57 2007
+++ php-src/ext/xmlwriter/tests/OO_007.phpt Tue Jun 26 12:12:31 2007
@@ -3,11 +3,11 @@
 --SKIPIF--
 ?php 
 if (!extension_loaded(xmlwriter)) die(skip); 
-if (!function_exists(xmlwriter_start_attribute_ns)) die(skip: libxml2 
2.6.17+ required);
+if (LIBXML_VERSION  20629) die(skip: libxml2 2.6.29+ required);
 ?
 --FILE--
 ?php 
-/* $Id: OO_007.phpt,v 1.1.2.3.2.1 2007/06/25 06:45:57 dmitry Exp $ */
+/* $Id: OO_007.phpt,v 1.1.2.3.2.2 2007/06/26 12:12:31 tony2001 Exp $ */
 
 $xw = new XMLWriter();
 $xw-openMemory();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xmlwriter/tests 007.phpt OO_007.phpt

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 12:14:01 2007 UTC

  Modified files:  
/php-src/ext/xmlwriter/tests007.phpt OO_007.phpt 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/007.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/xmlwriter/tests/007.phpt
diff -u php-src/ext/xmlwriter/tests/007.phpt:1.3 
php-src/ext/xmlwriter/tests/007.phpt:1.4
--- php-src/ext/xmlwriter/tests/007.phpt:1.3Mon Jun 25 06:46:15 2007
+++ php-src/ext/xmlwriter/tests/007.phptTue Jun 26 12:14:01 2007
@@ -3,11 +3,11 @@
 --SKIPIF--
 ?php 
 if (!extension_loaded(xmlwriter)) die(skip); 
-if (!function_exists(xmlwriter_start_attribute_ns)) die(skip: libxml2 
2.6.17+ required);
+if (LIBXML_VERSION  20629) die(skip: libxml2 2.6.29+ required);
 ?
 --FILE--
 ?php 
-/* $Id: 007.phpt,v 1.3 2007/06/25 06:46:15 dmitry Exp $ */
+/* $Id: 007.phpt,v 1.4 2007/06/26 12:14:01 tony2001 Exp $ */
 
 $xw = xmlwriter_open_memory();
 xmlwriter_set_indent($xw, TRUE);
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/OO_007.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/xmlwriter/tests/OO_007.phpt
diff -u php-src/ext/xmlwriter/tests/OO_007.phpt:1.3 
php-src/ext/xmlwriter/tests/OO_007.phpt:1.4
--- php-src/ext/xmlwriter/tests/OO_007.phpt:1.3 Mon Jun 25 06:46:15 2007
+++ php-src/ext/xmlwriter/tests/OO_007.phpt Tue Jun 26 12:14:01 2007
@@ -3,11 +3,11 @@
 --SKIPIF--
 ?php 
 if (!extension_loaded(xmlwriter)) die(skip); 
-if (!function_exists(xmlwriter_start_attribute_ns)) die(skip: libxml2 
2.6.17+ required);
+if (LIBXML_VERSION  20629) die(skip: libxml2 2.6.29+ required);
 ?
 --FILE--
 ?php 
-/* $Id: OO_007.phpt,v 1.3 2007/06/25 06:46:15 dmitry Exp $ */
+/* $Id: OO_007.phpt,v 1.4 2007/06/26 12:14:01 tony2001 Exp $ */
 
 $xw = new XMLWriter();
 $xw-openMemory();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard dir.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 12:14:24 2007 UTC

  Modified files:  
/php-src/ext/standard   dir.c 
  Log:
  add missing include and fix warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.165r2=1.166diff_format=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.165 php-src/ext/standard/dir.c:1.166
--- php-src/ext/standard/dir.c:1.165Mon Jun 25 09:42:49 2007
+++ php-src/ext/standard/dir.c  Tue Jun 26 12:14:24 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dir.c,v 1.165 2007/06/25 09:42:49 dmitry Exp $ */
+/* $Id: dir.c,v 1.166 2007/06/26 12:14:24 tony2001 Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -24,6 +24,7 @@
 #include fopen_wrappers.h
 #include file.h
 #include php_dir.h
+#include php_string.h
 #include php_scandir.h
 
 #ifdef HAVE_DIRENT_H

-- 
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 /sapi/cgi cgi_main.c

2007-06-26 Thread Dmitry Stogov
dmitry  Tue Jun 26 14:47:16 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #40419 (Trailing Slash in CGI request don't work)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.802r2=1.2027.2.547.2.803diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.802 php-src/NEWS:1.2027.2.547.2.803
--- php-src/NEWS:1.2027.2.547.2.802 Tue Jun 26 12:10:08 2007
+++ php-src/NEWSTue Jun 26 14:47:15 2007
@@ -88,6 +88,7 @@
   integer as sections). (Tony)
 - Fixed bug #41350 (my_thread_global_end() error during request shutdown
   on Windows). (Scott, Andrey)
+- Fixed bug #40419 (Trailing Slash in CGI request don't work). (Dmitry)
 - Fixed bug #39330 (apache2handler does not call shutdown actions before 
   apache child die). (isk at ecommerce dot com, Gopal, Tony)
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.42r2=1.267.2.15.2.43diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.42 
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.42 Thu Jun 21 08:40:43 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Jun 26 14:47:16 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.42 2007/06/21 08:40:43 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.43 2007/06/26 14:47:16 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -766,7 +766,7 @@
char *env_document_root = sapi_cgibin_getenv(DOCUMENT_ROOT, 
sizeof(DOCUMENT_ROOT)-1 TSRMLS_CC);
 
if (CGIG(fix_pathinfo)) {
-   char *real_path;
+   char *real_path = NULL;
char *orig_path_translated = env_path_translated;
char *orig_path_info = env_path_info;
char *orig_script_name = env_script_name;
@@ -926,6 +926,9 @@
efree(pt);
}
} else {
+   if (real_path) {
+   script_path_translated = real_path;
+   }
/* make sure path_info/translated are empty */
if (!orig_script_filename ||
(script_path_translated != 
orig_script_filename) ||
@@ -951,8 +954,10 @@
} else {
SG(request_info).request_uri = 
env_script_name;
}
+   if (real_path) {
+   free(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 /sapi/cgi cgi_main.c

2007-06-26 Thread Dmitry Stogov
dmitry  Tue Jun 26 14:47:33 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #40419 (Trailing Slash in CGI request don't work)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.326r2=1.327diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.326 php-src/sapi/cgi/cgi_main.c:1.327
--- php-src/sapi/cgi/cgi_main.c:1.326   Thu Jun 21 08:40:56 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Jun 26 14:47:33 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.326 2007/06/21 08:40:56 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.327 2007/06/26 14:47:33 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -738,9 +738,9 @@
char *env_path_info = sapi_cgibin_getenv(PATH_INFO, 
sizeof(PATH_INFO)-1 TSRMLS_CC);
char *env_script_name = sapi_cgibin_getenv(SCRIPT_NAME, 
sizeof(SCRIPT_NAME)-1 TSRMLS_CC);
 
-   if (CGIG(fix_pathinfo)) {
+   if (CGIG(fix_pathinfo)) {   
struct stat st;
-   char *real_path;
+   char *real_path = NULL;
char *env_redirect_url = 
sapi_cgibin_getenv(REDIRECT_URL, sizeof(REDIRECT_URL)-1 TSRMLS_CC);
char *env_document_root = 
sapi_cgibin_getenv(DOCUMENT_ROOT, sizeof(DOCUMENT_ROOT)-1 TSRMLS_CC);
char *orig_path_translated = env_path_translated;
@@ -902,6 +902,9 @@
efree(pt);
}
} else {
+   if (real_path) {
+   script_path_translated = real_path;
+   }
/* make sure path_info/translated are empty */
if (!orig_script_filename ||
(script_path_translated != 
orig_script_filename) ||
@@ -927,8 +930,10 @@
} else {
SG(request_info).request_uri = 
env_script_name;
}
+   if (real_path) {
+   free(real_path);
+   }
}
-   free(real_path);
} else {
/* pre 4.3 behaviour, shouldn't be used but provides BC 
*/
if (env_path_info) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Test failure on MacOS X and Failure analysis

2007-06-26 Thread Raghubansh

Hi,

Firstly many thanks to Tony, Hanne  Dmrity for providing all the required
information which help me analyze various failure on  MacOS X.

The analysis is bit lengthier, my apologies for the lengthy note. Appreciate
any feedback and comment, that would be helpful in analyzing the failure on
other OS, which is in progress.

I do not have a MacOS X system, but tried to put the analysis,  please feel
free to correct me if i am wrong. Below analysis contains the following :
  The failure out difference as generated by run-test.php
  Analysis of failure,
  A sample testcode which can be run to verify the failure/behavior 
  Expected output on RHEL 5.


Following testcases are failing and have been analyzed :

Test filesize() function: usage variations
[ext/standard/tests/file/filesize_variation.phpt]
Test popen() and pclose function: error conditions
[ext/standard/tests/file/popen_pclose_error.phpt]
Test readlink() and realpath functions: basic functionality
[ext/standard/tests/file/readlink_realpath_basic.phpt]
Test readlink() and realpath() functions: error conditions
[ext/standard/tests/file/readlink_realpath_error.phpt]
Test readlink() and realpath() functions: usage variation
[ext/standard/tests/file/readlink_realpath_variation.phpt]
Test symlink(), linkinfo(), link() and is_link() functions : error
conditions
[ext/standard/tests/file/symlink_link_linkinfo_is_link_error.phpt]
Test symlink(), linkinfo(), link() and is_link() functions : usage
variations
[ext/standard/tests/file/symlink_link_linkinfo_is_link_variation.phpt]



Failure in filesize_variation.phpt

Output lines indicating failure :
-
016+ int(68)
016- int(4096)
018+ int(102)
018- int(4096)
021+ int(102)
022+ int(68)
021- int(4096)
022- int(4096)
024+ int(102)
025+ int(102)
024- int(4096)
025- int(4096)

Explanation:

There is a difference in the size of a dir when created. On Linux its is
4096 by default but
on MacOS its 68 and then changes when a new file/subdir is created inside
the dir. I suggest that we
have seperate testcase for MacOs or just do the check for %d or %i in place
of size.

Here is the sample code to reproduce this:
?php
 $filepath = dirname(__FILE__);
 // create dir and check size
 mkdir(dirname(__FILE__)./temp);
 var_dump( filesize($filepath./temp) );
 mkdir($filepath./temp/subdir);
 var_dump( filesize($filepath./temp/subdir) );

 // remove temp dir
 rmdir( $filepath./temp/subdir);
 rmdir( $filepath./temp);
?

Expected result on Linux ( RHEL 5 ):
---
int(4096)
int(4096)




Failure in popen_pclose_error.phpt

Output lines indicating failure :
-
009+ Warning: popen(abc.txt,rw): Inappropriate ioctl for device in
/private/var/root/tony/php-src_5_2/ext/standard/tests/file/popen_pclose_error.php
on line 13
009- Warning: popen(abc.txt,rw): Invalid argument in %s on line %d

Explanation:

The behavior of popen() is expected to be saying Invalid argument  but
looks like it
tried to proceed with the given wrong input and finally fails. I think this
looks like a bug,
If you agree I'll raise bugzilla.

Code for reproducing the error:

?php
 var_dump( popen(abc, rw) ); // with invalid mode argument
?
Expected result on Linux ( RHEL 5 ):
---

Warning: popen(abc.txt,rw): Invalid argument in %s on line %d




Failure in readlink_realpath_basic.phpt

Output lines indicating failure :
-
035+ string(117)
/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/..readlink_realpath_basic_link.tmp
035- bool(false)
039+ Warning: readlink(): Invalid argument in
/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic.php
on line 48
039- Warning: readlink(): Not a directory in %s on line %d
041+ string(120)
/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/home/test/readlink_realpath_basic.tmp
041- bool(false)
067+ string(110)
/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/readlink_realpath_basic.tmp
067- bool(false)

Explanation:

The failure on line number 35  is coming from realpath().
The expected output is bool(false) because given path is invalid and
nonexistent.
I think this looks like a bug, If you agree I'll raise bugzilla

The failure on line number 41  67, The given path is
correct but since it end with a forward slash, it should be treated as 

[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 21:29:32 2007 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  fix ws  folding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.860r2=1.861diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.860 
php-src/ext/standard/basic_functions.c:1.861
--- php-src/ext/standard/basic_functions.c:1.860Tue Jun 26 12:08:50 2007
+++ php-src/ext/standard/basic_functions.c  Tue Jun 26 21:29:32 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.860 2007/06/26 12:08:50 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.861 2007/06/26 21:29:32 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3133,7 +3133,7 @@
 /* }}} */
 /* }}} */
 
-zend_function_entry basic_functions[] = {
+zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(constant,
arginfo_constant)
PHP_FE(bin2hex, 
arginfo_bin2hex)
PHP_FE(sleep,   
arginfo_sleep)
@@ -3826,13 +3826,15 @@
 
{NULL, NULL, NULL}
 };
+/* }}} */
 
-static zend_module_dep standard_deps[] = {
+static zend_module_dep standard_deps[] = { /* {{{ */
ZEND_MOD_OPTIONAL(session)
{NULL, NULL, NULL}
 };
+/* }}} */
 
-zend_module_entry basic_functions_module = {
+zend_module_entry basic_functions_module = { /* {{{ */
 STANDARD_MODULE_HEADER_EX,
NULL,
standard_deps,
@@ -3846,10 +3848,10 @@
 PHP_VERSION,   /* extension version */
STANDARD_MODULE_PROPERTIES
 };
-
+/* }}} */
 
 #if defined(HAVE_PUTENV)
-static void php_putenv_destructor(putenv_entry *pe)
+static void php_putenv_destructor(putenv_entry *pe) /* {{{ */
 {
if (pe-previous_value) {
 #if _MSC_VER = 1300
@@ -3890,10 +3892,10 @@
efree(pe-putenv_string);
efree(pe-key);
 }
+/* }}} */
 #endif
 
-
-static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC)
+static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) 
/* {{{ */
 {
BG(rand_is_seeded) = 0;
BG(mt_rand_is_seeded) = 0;
@@ -3915,9 +3917,9 @@
 
BG(incomplete_class) = incomplete_class_entry;
 }
+/* }}} */
 
-
-static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC)
+static void basic_globals_dtor(php_basic_globals *basic_globals_p TSRMLS_DC) 
/* {{{ */
 {
zend_hash_destroy(BG(sm_protected_env_vars));
if (BG(sm_allowed_env_vars)) {
@@ -3928,12 +3930,12 @@
free(BG(url_adapt_state_ex).tags);
}
 }
-
+/* }}} */
 
 #define PHP_DOUBLE_INFINITY_HIGH   0x7ff0
 #define PHP_DOUBLE_QUIET_NAN_HIGH  0xfff8
 
-PHPAPI double php_get_nan(void)
+PHPAPI double php_get_nan(void) /* {{{ */
 {
 #if HAVE_HUGE_VAL_NAN
return HUGE_VAL + -HUGE_VAL;
@@ -3948,8 +3950,9 @@
return 0.0/0.0;
 #endif
 }
+/* }}} */
 
-PHPAPI double php_get_inf(void)
+PHPAPI double php_get_inf(void) /* {{{ */
 {
 #if HAVE_HUGE_VAL_INF
return HUGE_VAL;
@@ -3964,8 +3967,9 @@
return 1.0/0.0;
 #endif
 }
+/* }}} */
 
-PHP_MINIT_FUNCTION(basic)
+PHP_MINIT_FUNCTION(basic) /* {{{ */
 {
 #ifdef ZTS
ts_allocate_id(basic_globals_id, sizeof(php_basic_globals), 
(ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
@@ -4080,9 +4084,9 @@
 
return SUCCESS;
 }
+/* }}} */
 
-
-PHP_MSHUTDOWN_FUNCTION(basic)
+PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
 {
 #ifdef HAVE_SYSLOG_H
PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
@@ -4120,9 +4124,9 @@
 
return SUCCESS;
 }
+/* }}} */
 
-
-PHP_RINIT_FUNCTION(basic)
+PHP_RINIT_FUNCTION(basic) /* {{{ */
 {
memset(BG(strtok_table), 0, 256);
BG(strtok_string) = NULL;
@@ -4161,9 +4165,9 @@
 
return SUCCESS;
 }
+/* }}} */
 
-
-PHP_RSHUTDOWN_FUNCTION(basic)
+PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
 {
if (BG(strtok_zval)) {
zval_ptr_dtor(BG(strtok_zval));
@@ -4216,9 +4220,9 @@

return SUCCESS;
 }
+/* }}} */
 
-
-PHP_MINFO_FUNCTION(basic)
+PHP_MINFO_FUNCTION(basic) /* {{{ */
 {
php_info_print_table_start();
PHP_MINFO(regex)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
@@ -4227,7 +4231,7 @@
php_info_print_table_end();
PHP_MINFO(assert)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
 }
-
+/* }}} */
 
 /* {{{ proto mixed constant(string const_name) U
Given the name of a constant this function will return the constant's 
associated value */
@@ -4319,8 +4323,6 @@
 /* }}} */
 #endif /* 

[PHP-CVS] cvs: php-src /ext/standard assert.c base64.c browscap.c credits.c crypt.c css.c cyr_convert.c datetime.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 21:37:14 2007 UTC

  Modified files:  
/php-src/ext/standard   assert.c base64.c browscap.c credits.c 
crypt.c css.c cyr_convert.c datetime.c 
  Log:
  fix ws  folding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.73r2=1.74diff_format=u
Index: php-src/ext/standard/assert.c
diff -u php-src/ext/standard/assert.c:1.73 php-src/ext/standard/assert.c:1.74
--- php-src/ext/standard/assert.c:1.73  Fri Feb 16 16:33:37 2007
+++ php-src/ext/standard/assert.c   Tue Jun 26 21:37:14 2007
@@ -16,14 +16,16 @@
+--+
  */
 
-/* $Id: assert.c,v 1.73 2007/02/16 16:33:37 dmitry Exp $ */
+/* $Id: assert.c,v 1.74 2007/06/26 21:37:14 tony2001 Exp $ */
 
-/* {{{ includes/startup/misc */
+/* {{{ includes */
 
 #include php.h
 #include php_assert.h
 #include php_ini.h
 
+/* }}} */
+
 ZEND_BEGIN_MODULE_GLOBALS(assert)
long active;
long bail;
@@ -51,7 +53,7 @@
ASSERT_QUIET_EVAL
 };
 
-static PHP_INI_MH(OnChangeCallback)
+static PHP_INI_MH(OnChangeCallback) /* {{{ */
 {
if (EG(in_execution)) {
if (ASSERTG(callback)) {
@@ -75,6 +77,7 @@
}
return SUCCESS;
 }
+/* }}} */
 
 PHP_INI_BEGIN()
 STD_PHP_INI_ENTRY(assert.active, 1,PHP_INI_ALL,
OnUpdateLong,   active, zend_assert_globals,
assert_globals)
@@ -84,13 +87,14 @@
 STD_PHP_INI_ENTRY(assert.quiet_eval, 0,PHP_INI_ALL,
OnUpdateLong,   quiet_eval, zend_assert_globals,
assert_globals)
 PHP_INI_END()
 
-static void php_assert_init_globals(zend_assert_globals *assert_globals_p 
TSRMLS_DC)
+static void php_assert_init_globals(zend_assert_globals *assert_globals_p 
TSRMLS_DC) /* {{{ */
 {
assert_globals_p-callback = NULL;
assert_globals_p-cb = NULL;
 }
+/* }}} */
 
-PHP_MINIT_FUNCTION(assert)
+PHP_MINIT_FUNCTION(assert) /* {{{ */
 {
ZEND_INIT_MODULE_GLOBALS(assert, php_assert_init_globals, NULL);
 
@@ -104,8 +108,9 @@
 
return SUCCESS;
 }
+/* }}} */
 
-PHP_MSHUTDOWN_FUNCTION(assert)
+PHP_MSHUTDOWN_FUNCTION(assert) /* {{{ */
 {
if (ASSERTG(cb)) {
pefree(ASSERTG(cb), 1);
@@ -113,8 +118,9 @@
}
return SUCCESS;
 }
+/* }}} */
 
-PHP_RSHUTDOWN_FUNCTION(assert)
+PHP_RSHUTDOWN_FUNCTION(assert) /* {{{ */
 {
if (ASSERTG(callback)) { 
zval_ptr_dtor(ASSERTG(callback));
@@ -123,15 +129,14 @@
 
return SUCCESS;
 }
+/* }}} */
 
-PHP_MINFO_FUNCTION(assert)
+PHP_MINFO_FUNCTION(assert) /* {{{ */
 {
DISPLAY_INI_ENTRIES();
 }
-
-/* }}} */
-/* {{{ internal functions */
 /* }}} */
+
 /* {{{ proto int assert(string|bool assertion) U
Checks if assertion is false */
 
@@ -256,6 +261,7 @@
 }
 
 /* }}} */
+
 /* {{{ proto mixed assert_options(int what [, mixed value]) U
Set/get the various assert flags */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/base64.c?r1=1.51r2=1.52diff_format=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.51 php-src/ext/standard/base64.c:1.52
--- php-src/ext/standard/base64.c:1.51  Mon Jan  1 09:29:30 2007
+++ php-src/ext/standard/base64.c   Tue Jun 26 21:37:14 2007
@@ -15,14 +15,14 @@
| Author: Jim Winstead [EMAIL PROTECTED]  
|
+--+
  */
-/* $Id: base64.c,v 1.51 2007/01/01 09:29:30 sebastian Exp $ */
+/* $Id: base64.c,v 1.52 2007/06/26 21:37:14 tony2001 Exp $ */
 
 #include string.h
 
 #include php.h
 #include base64.h
 
-/* {{{ */
+/* {{{ base64 tables */
 static const char base64_table[] =
{ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
@@ -53,8 +53,7 @@
 };
 /* }}} */
 
-/* {{{ php_base64_encode */
-PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, 
int *ret_length)
+PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, 
int *ret_length) /* {{{ */
 {
const unsigned char *current = str;
unsigned char *p;
@@ -135,14 +134,13 @@
 */
 /* }}} */
 
-PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, 
int *ret_length)
+PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, 
int *ret_length) /* {{{ */
 {
return php_base64_decode_ex(str, length, ret_length, 0);
 }
+/* }}} */
 
-/* {{{ php_base64_decode */
-/* as above, but backwards. :) */
-PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int 
length, int *ret_length, zend_bool strict)
+PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int 
length, int *ret_length, zend_bool strict) /* {{{ */
 {
const unsigned char *current = str;
int ch, i 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pdo_pgsql pgsql_driver.c

2007-06-26 Thread Ilia Alshanetsky
iliaa   Wed Jun 27 02:00:46 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/pdo_pgsql  pgsql_driver.c 
  Log:
  Added persistent connection status checker to pdo_pgsql
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.803r2=1.2027.2.547.2.804diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.803 php-src/NEWS:1.2027.2.547.2.804
--- php-src/NEWS:1.2027.2.547.2.803 Tue Jun 26 14:47:15 2007
+++ php-src/NEWSWed Jun 27 02:00:45 2007
@@ -10,6 +10,8 @@
 - Changed error handler to send HTTP 500 instead of blank page on PHP errors.
   (Dmitry, Andrei Nigmatulin)
 
+- Added persistent connection status checker to pdo_pgsql (Elvis
+  Pranskevichus, Ilia)
 - Added php_ini_loaded_file() function which returns the path to the actual
   php.ini in use. (Jani)
 - Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.14.2.7r2=1.53.2.14.2.8diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.7 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.8
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.7  Mon Jan  1 09:36:05 2007
+++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Jun 27 02:00:46 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pgsql_driver.c,v 1.53.2.14.2.7 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pgsql_driver.c,v 1.53.2.14.2.8 2007/06/27 02:00:46 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -476,6 +476,17 @@
return 1;
 }
 
+/* {{{ */
+static int pdo_pgsql_check_liveness(pdo_dbh_t *dbh TSRMLS_DC)
+{
+   pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data;
+   if (PQstatus(H-server) == CONNECTION_BAD) {
+   PQreset(H-server);
+   }
+   return (PQstatus(H-server) == CONNECTION_OK) ? SUCCESS : FAILURE;
+}
+/* }}} */
+
 static int pdo_pgsql_transaction_cmd(const char *cmd, pdo_dbh_t *dbh TSRMLS_DC)
 {
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data;
@@ -650,7 +661,7 @@
pdo_pgsql_last_insert_id,
pdo_pgsql_fetch_error_func,
pdo_pgsql_get_attribute,
-   NULL,   /* check_liveness */
+   pdo_pgsql_check_liveness,   /* check_liveness */
pdo_pgsql_get_driver_methods  /* get_driver_methods */
 };
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo pdo_dbh.c

2007-06-26 Thread Ilia Alshanetsky
iliaa   Wed Jun 27 02:02:18 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdopdo_dbh.c 
  Log:
  Fixed a crash inside PDO when there is more then one instance of a
  persistent connection inside a script and PDO object is extended by class
  with a destructor
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.11r2=1.82.2.31.2.12diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.11 
php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.12
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.11Wed May 16 19:33:57 2007
+++ php-src/ext/pdo/pdo_dbh.c   Wed Jun 27 02:02:18 2007
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.11 2007/05/16 19:33:57 iliaa Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.12 2007/06/27 02:02:18 iliaa Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -1423,6 +1423,12 @@
}
}
 
+   if (dbh-properties) {
+   zend_hash_destroy(dbh-properties);
+   efree(dbh-properties);
+   dbh-properties = NULL;
+   }
+
pefree(dbh, dbh-is_persistent);
 }
 
@@ -1443,12 +1449,6 @@
dbh-in_txn = 0;
}

-   if (dbh-properties) {
-   zend_hash_destroy(dbh-properties);
-   efree(dbh-properties);
-   dbh-properties = NULL;
-   }
-
if (!dbh-is_persistent) {
dbh_free(dbh TSRMLS_CC);
} else if (dbh-methods  dbh-methods-persistent_shutdown) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php