Bug #60933 [PATCH]: Testing asort with SORT_LOCALE_STRING fails on Mac OS X 10.6

2012-02-01 Thread ahar...@php.net
Edit report at https://bugs.php.net/bug.php?id=60933&edit=1

 ID: 60933
 Patch added by: ahar...@php.net
 Reported by:m...@php.net
 Summary:Testing asort with SORT_LOCALE_STRING fails on Mac
 OS X 10.6
 Status: Assigned
 Type:   Bug
 Package:Arrays related
 Operating System:   Mac OS X 10.6
 PHP Version:5.4SVN-2012-01-30 (SVN)
 Assigned To:aharvey
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: bug-60933-locale-sort-test
Revision:   1328158259
URL:
https://bugs.php.net/patch-display.php?bug=60933&patch=bug-60933-locale-sort-test&revision=1328158259


Previous Comments:

[2012-02-02 04:50:40] ahar...@php.net

I think this may just be nothing more than the default fr_FR locale selected on 
OS 
X nowadays simply being UTF-8 by default these days, which obviously fails to 
sort 
an ISO-8859-1 array correctly.

Can people who've had this fail try the attached patch and see if it fixes the 
problem, please?


[2012-02-02 00:55:36] j dot jeising at gmail dot com

Only failed test for me too (Mac OS X 10.6.8). Any environment specific details 
we 
could provide to reproduce this? (LANG="de_DE.UTF-8", LC_CTYPE="en_US.UTF-8")


[2012-02-01 19:32:31] ras...@php.net

I just ran it on an Ubuntu 11.10 box and it passed. So then it is environment-
specific somehow.


[2012-02-01 17:49:59] carloschilazo at gmail dot com

I think its not related to MAC OSX, test failed php5.4-201202011630 ubuntu 11.10


[2012-02-01 16:32:54] ras...@php.net

Bug 41758 is a won't fix simply because it is against PHP6 and we aren't fixing 
bugs in that dead branch at this point. This also a different issue since this 
one appears to be OSX-specific. This same test passes nicely on various 
versions 
of Debian and Ubuntu Linux.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=60933


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60933&edit=1


[PHP-BUG] Bug #61011 [NEW]: Crash when an exception is thrown by __autoload accessing a static property

2012-02-08 Thread ahar...@php.net
From: aharvey
Operating system: OSX 10.6.8 & Linux
PHP version:  5.4SVN-2012-02-08 (SVN)
Package:  Reproducible crash
Bug Type: Bug
Bug description:Crash when an exception is thrown by __autoload accessing a 
static property

Description:

I get a reproducible crash on PHP_5_4 and trunk when accessing a static
property 
on a non-existent class with an autoloader registered if the __autoload()
function 
throws an exception.

PHP_5_3 doesn't crash, and throws an exception as expected.

Test script:
---
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/adam/trees/php-
src/branches/PHP_5_4/sapi/cli/php...pdone.
(gdb) r /tmp/native-autoload.php 
Starting program: /home/adam/trees/php-src/branches/PHP_5_4/sapi/cli/php 
/tmp/native-autoload.php
[Thread debugging using libthread_db enabled]
referencing a static property on a non existent object... 
Program received signal SIGSEGV, Segmentation fault.
0x083d0d39 in _zend_is_inconsistent (ht=0x44, file=0x87bb748 
"/home/adam/trees/php-src/branches/PHP_5_4/Zend/zend_hash.c", line=946) at

/home/adam/trees/php-src/branches/PHP_5_4/Zend/zend_hash.c:54
54  if (ht->inconsistent==HT_OK) {
(gdb) bt
#0  0x083d0d39 in _zend_is_inconsistent (ht=0x44, file=0x87bb748 
"/home/adam/trees/php-src/branches/PHP_5_4/Zend/zend_hash.c", line=946) at

/home/adam/trees/php-src/branches/PHP_5_4/Zend/zend_hash.c:54
#1  0x083d36d4 in zend_hash_quick_find (ht=0x44, arKey=0xb7b60d40
"property", 
nKeyLength=9, h=2332364938, pData=0xbfffd01c) at /home/adam/trees/php-
src/branches/PHP_5_4/Zend/zend_hash.c:946
#2  0x083f1711 in zend_std_get_static_property (ce=0x0,
property_name=0xb7b60d40 
"property", property_name_len=8, silent=0 '\000', key=0xb7c6b67c)
at /home/adam/trees/php-
src/branches/PHP_5_4/Zend/zend_object_handlers.c:1232
#3  0x0840369b in zend_fetch_var_address_helper_SPEC_CONST_CONST (type=0, 
execute_data=0xb7c4f074) at /home/adam/trees/php-
src/branches/PHP_5_4/Zend/zend_vm_execute.h:3244
#4  0x08403bfe in ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER 
(execute_data=0xb7c4f074) at /home/adam/trees/php-
src/branches/PHP_5_4/Zend/zend_vm_execute.h:3335
#5  0x083f94b7 in execute (op_array=0xb7c6a4d0) at /home/adam/trees/php-
src/branches/PHP_5_4/Zend/zend_vm_execute.h:410
#6  0x083c3ec9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at 
/home/adam/trees/php-src/branches/PHP_5_4/Zend/zend.c:1272
#7  0x08348b0e in php_execute_script (primary_file=0xb518) at 
/home/adam/trees/php-src/branches/PHP_5_4/main/main.c:2475
#8  0x084da44e in do_cli (argc=2, argv=0xb7a4) at
/home/adam/trees/php-
src/branches/PHP_5_4/sapi/cli/php_cli.c:983
#9  0x084db492 in main (argc=2, argv=0xb7a4) at /home/adam/trees/php-
src/branches/PHP_5_4/sapi/cli/php_cli.c:1356
(gdb) 

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61011&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61011&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61011&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=61011&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61011&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61011&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61011&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=61011&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=61011&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=61011&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=61011&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=61011&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=61011&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=61011&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61011&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=61011&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=61011&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=61011&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=61011&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=61011&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=61011&r=nozend
MySQL Configuration Error:   
https://bug

Bug #65088 [PATCH]: configure script (and compile) fails, perhaps due to BSD differences in SH

2013-06-22 Thread ahar...@php.net
Edit report at https://bugs.php.net/bug.php?id=65088&edit=1

 ID: 65088
 Patch added by: ahar...@php.net
 Reported by:stolen dot data dot net at gmail dot com
 Summary:configure script (and compile) fails, perhaps due to
 BSD differences in SH
 Status: Feedback
 Type:   Bug
 Package:Compile Failure
 Operating System:   OpenBSD 5.3 (possibly all BSDs)
 PHP Version:5.5.0
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: bug65088
Revision:   1371945248
URL:
https://bugs.php.net/patch-display.php?bug=65088&patch=bug65088&revision=1371945248


Previous Comments:

[2013-06-22 23:53:20] ahar...@php.net

Can you try applying the patch I'm about to upload, then rebuilding configure 
by 
running ./buildconf, please? (You may need to use ./buildconf --force if you're 
using a release tarball; note that you'll require autoconf 2.59 or later.)


[2013-06-22 23:02:43] f...@php.net

Addendum: This is my shell version:

# echo $SH_VERSION
@(#)PD KSH v5.2.14 99/07/13.2


[2013-06-22 22:56:18] f...@php.net

Just tried this on:
OpenBSD puffy.lan 4.9 GENERIC#477 amd64

bash-4.1# /bin/sh
# /bin/sh
# cd /root/
# pwd
/root
# cd /usr/"local"
# pwd
/usr/local


[2013-06-22 22:50:08] ras...@php.net

So, a quick test on FreeBSD:

$ /bin/sh
$ cd /usr/"local"
$ pwd
/usr/local

That doesn't work on your machine?

We can't just remove the quotes there because it would break directory names 
with spaces and other shell-special characters in them. cd is a built-in in the 
shell and should support quoted literals. autoconf obviously relies on this 
being the case. Have you done something interesting to your /bin/sh on this box?


[2013-06-22 22:36:21] ras...@php.net

So basically autoconf generates a configure script that doesn't work on 
OpenBSD? 
That sounds a bit suspicious and I wonder why nobody else has reported it.

Anything special about your environment?

And can you reproduce just with just running the ./configure script with no 
args 
that comes with the php-5.5.0 tarball?

I just tested it again on FreeBSD 9.0 and it worked flawlessly, so it is not a 
generic BSD issue. It is either OpenBSD-specific or specific to your 
environment.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=65088


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65088&edit=1


[PHP-BUG] Req #61759 [NEW]: class_alias() should accept classes with leading backslashes

2012-04-17 Thread ahar...@php.net
From: aharvey
Operating system: Irrelevant
PHP version:  master-Git-2012-04-18 (Git)
Package:  Class/Object related
Bug Type: Feature/Change Request
Bug description:class_alias() should accept classes with leading backslashes

Description:

Aliasing namespaced classes currently expects that class names will be
given in 
the same form as the ZE uses internally; ie without a leading backslash.
Since 
that's inconsistent with the absolute form in PHP, it would be good if 
class_alias() could also ignore a leading backslash.

Test script:
---
foo();

Expected result:

42

Actual result:
--
Fatal error: Class 'B\C' not found in /private/tmp/test.php on line 7

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61759&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61759&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61759&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=61759&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61759&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61759&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61759&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=61759&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=61759&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=61759&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=61759&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=61759&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=61759&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=61759&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61759&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=61759&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=61759&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=61759&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=61759&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=61759&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=61759&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=61759&r=mysqlcfg



#48768 [NEW]: parse_ini_file() crash with INI_SCANNER_RAW

2009-07-02 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Linux x86
PHP version:  5.3CVS-2009-07-02 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  parse_ini_file() crash with INI_SCANNER_RAW

Description:

parse_ini_file() crashes in INI_SCANNER_RAW mode if a configuration item
consists solely of an equals sign.

Reproduce code:
---
INI file contents:

equal = "="


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(1) "="
}
array(1) {
  ["equal"]=>
  string(1) "="
}

Actual result:
--
array(1) {
  ["equal"]=>
  string(1) "="
}
Segmentation fault (core dumped)


gdb backtrace:

#0  0xb75f58b1 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x083d5e5b in zend_strndup (s=0xb7f14009 , length=3086171320) at /usr/include/bits/string3.h:52
#2  0x083d1b21 in ini_lex (ini_lval=0xbf9321d8) at
Zend/zend_ini_scanner.l:343
#3  0x083cf9fe in ini_parse () at
/h/aharvey/trees/php5/Zend/zend_ini_parser.c:1557
#4  0x083cfe91 in zend_parse_ini_file (fh=0xbf9322d0, unbuffered_errors=0
'\0', scanner_mode=1, ini_parser_cb=0x8320f20 ,
arg=0xa29d148) at /h/aharvey/trees/php5/Zend/zend_ini_parser.y:206
#5  0x0831f829 in zif_parse_ini_file (ht=3, return_value=0xa29d148,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/h/aharvey/trees/php5/ext/standard/basic_functions.c:5937
#6  0x08412a12 in execute_internal (execute_data_ptr=0xa2cddd8,
return_value_used=1) at /h/aharvey/trees/php5/Zend/zend_execute.c:1256
#7  0xb728dab0 in xdebug_execute_internal (current_execute_data=0xa2cddd8,
return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1630
#8  0x0843c9af in zend_do_fcall_common_helper_SPEC
(execute_data=0xa2cddd8) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:315
#9  0x0841a08e in execute (op_array=0xa29c554) at
/h/aharvey/trees/php5/Zend/zend_vm_execute.h:104
#10 0xb728d734 in xdebug_execute (op_array=0xa29c554) at
/tmp/pear/temp/xdebug/xdebug.c:1561
#11 0x083f12f6 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /h/aharvey/trees/php5/Zend/zend.c:1188
#12 0x0839f610 in php_execute_script (primary_file=0xbf9348f4) at
/h/aharvey/trees/php5/main/main.c:2196
#13 0x08476002 in main (argc=2, argv=0xbf934a54) at
/h/aharvey/trees/php5/sapi/cli/php_cli.c:1188

-- 
Edit bug report at http://bugs.php.net/?id=48768&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48768&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48768&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48768&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48768&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48768&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48768&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=48768&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=48768&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=48768&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=48768&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=48768&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=48768&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=48768&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48768&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=48768&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=48768&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=48768&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=48768&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=48768&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=48768&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=48768&r=mysqlcfg



#48769 [NEW]: parse_ini_file() equal sign issue with INI_SCANNER_RAW

2009-07-02 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Linux x86
PHP version:  5.3CVS-2009-07-02 (CVS)
PHP Bug Type: Filesystem function related
Bug description:  parse_ini_file() equal sign issue with INI_SCANNER_RAW

Description:

In addition to bug 48768, which is a parse_ini_file() crasher when
INI_SCANNER_RAW mode is used, there's also an issue with configuration
items containing equal signs in general which results in a (seemingly)
spurious warning.

Given that INI_SCANNER_RAW is new and only minimally documented, this may
in fact be intended behaviour, in which case this should probably be
changed to a documentation problem. It would seem odd that changing the
scanner mode would prevent properly double-quoted configuration values from
being parsed, though.

Reproduce code:
---
INI file:

equal = "foo=bar"


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:

array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}


Actual result:
--
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}

Warning: syntax error, unexpected '"' in equals.ini on line 1
 in /tmp/equals.php on line 5

Call Stack:
0.0007 324132   1. {main}() /tmp/equals.php:0
0.0012 324544   2. parse_ini_file() /tmp/equals.php:5


-- 
Edit bug report at http://bugs.php.net/?id=48769&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48769&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48769&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48769&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48769&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48769&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48769&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=48769&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=48769&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=48769&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=48769&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=48769&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=48769&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=48769&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48769&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=48769&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=48769&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=48769&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=48769&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=48769&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=48769&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=48769&r=mysqlcfg



#49585 [NEW]: date_format buffer not long enough for >4 digit years

2009-09-18 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Linux (Ubuntu 9.04)
PHP version:  5.3SVN-2009-09-18 (SVN)
PHP Bug Type: Date/time related
Bug description:  date_format buffer not long enough for >4 digit years

Description:

The buffer allocated within date_format() isn't long enough for RFC 2822
formatted dates (format string 'r') when the year requires five or more
characters to be represented, which causes the output to be truncated. ISO
8601 dates ('c') are also affected, but only in the absolute extreme case,
as demonstrated below.

The naïve approach is obviously to extend the buffer size, and the patch
(against the current PHP_5_3 checkout) at
http://www.adamharvey.name/stuff/date-format-buffer.patch extends it far
enough to cover all possible contingencies on common platforms -- since
date_format() casts the year to a signed int when it calls slprintf(), the
longest possible value that needs to be catered for in the year field is
-2147483648 on any platform where int is 32 bit, which is pretty much all
of them.

Reproduce code:
---
format('r'));

$date->setDate(pow(2, 31), 1, 1);
var_dump($date->format('r'));
var_dump($date->format('c'));
?>

Expected result:

string(32) "Sat, 01 Jan -1500 00:00:00 +0800"
string(38) "Wed, 01 Jan -2147483648 00:00:00 +0800"
string(32) "-2147483648-01-01T00:00:00+08:00"

Actual result:
--
string(31) "Sat, 01 Jan -1500 00:00:00 +080"
string(31) "Wed, 01 Jan -2147483648 00:00:0"
string(31) "-2147483648-01-01T00:00:00+08:0"

-- 
Edit bug report at http://bugs.php.net/?id=49585&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49585&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49585&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49585&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49585&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49585&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49585&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49585&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49585&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49585&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49585&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49585&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49585&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49585&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49585&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49585&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49585&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49585&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49585&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49585&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49585&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49585&r=mysqlcfg



#49914 [NEW]: DateInterval doesn't implement comparison functions

2009-10-18 Thread ahar...@php.net
From: ahar...@php.net
Operating system: Irrelevant
PHP version:  5.3SVN-2009-10-18 (SVN)
PHP Bug Type: Date/time related
Bug description:  DateInterval doesn't implement comparison functions

Description:

(This is really a feature request, rather than a bug per se.)

Unlike DateTime objects, DateInterval objects cannot easily be compared
within PHP. While it would be possible to concoct a workaround in userspace
using a few calls to DateInterval::format() and some arithmetic, it would
probably be preferable to implement it within ext/date itself.

I've prepared a patch (yes, it even has a simple test) against PHP_5_3 at
http://www.adamharvey.name/patches/DateInterval-comparators.patch which
implements comparator support. I can probably prepare a HEAD patch if
necessary; I just don't have a HEAD checkout to hand to do so at present.

There's one fairly significant issue with this patch worth noting: I've
implemented a new function (timelib_rel_time_to_seconds) which converts a
timelib_rel_time structure to the number of seconds it represents. The
issue with this is that, as per bug #49778, we don't always know exactly
how many days a timelib_rel_time actually represents because of the varying
number of days in a month and year.

As per the comments in the function, for now I've fudged it and
effectively chosen the default length of a month and year out of thin air
if the days field isn't set within the structure. If the resolution to bug
#49778 results in the days field always being filled in, then
timelib_rel_time_to_seconds can be simplified accordingly. Alternatively,
we could only support this in cases where we definitely know the days
within the timelib_rel_time structure and error out otherwise.

As a side note, I have a second patch that I can upload that implements
support for a DateInterval::getSeconds() method which effectively provides
a PHP wrapper around the proposed internal timelib_rel_time_to_seconds
function. If it's decided to accept this approach, I can create another bug
to track getting that in.

Reproduce code:
---


Expected result:

bool(true)

Actual result:
--
bool(false)

-- 
Edit bug report at http://bugs.php.net/?id=49914&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49914&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49914&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49914&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49914&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49914&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49914&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49914&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49914&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49914&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49914&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49914&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49914&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49914&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49914&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49914&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49914&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49914&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49914&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49914&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49914&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49914&r=mysqlcfg



[PHP-BUG] Bug #52284 [NEW]: Reproducible crash using curl_multi functions with FTP

2010-07-08 Thread ahar...@php.net
From: aharvey
Operating system: Ubuntu 10.04 (and others)
PHP version:  5.3SVN-2010-07-08 (SVN)
Package:  cURL related
Bug Type: Bug
Bug description:Reproducible crash using curl_multi functions with FTP

Description:

The attached script segfaults on most executions. This occurs both on Linux
and Windows and is reasonably, but not completely, reliable.



The valgrind output attached below kind of suggests memory corruption
somewhere, but I'm hoping someone with more knowledge of curl can look into
this, since I don't have the time at present for a detailed investigation.



Note that I'm not the original reporter of this bug (dumont reported it on
##php), but since I've generated the backtraces and have it crashing
reliably, he/she has asked me to post the bug report.

Test script:
---
ftp://test12345678:test12345...@www.ftpwt.com/'.$urls[$urls_id]."\r\n";

flush();

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);

curl_setopt($ch, CURLOPT_URL,
'ftp://test12345678:test12345...@www.ftpwt.com/'.$urls[$urls_id]);

curl_multi_add_handle($mcurl, $ch);

$urls_id++;

$threadsRunning++;

}

// Check if done

if($threadsRunning == 0 && $urls_id >= count($urls))

{

echo 'NO MORE THREADS LEFT';

break;

}

// Let mcurl do it's thing

curl_multi_select($mcurl);

while(($mcRes = curl_multi_exec($mcurl, $mcActive)) ==
CURLM_CALL_MULTI_PERFORM)

{

usleep(1);

}

if($mcRes != CURLM_OK)

{

echo '!!!NOT OK!!!';

break;

}

while($done = curl_multi_info_read($mcurl)) {

$ch = $done['handle'];

$done_url = curl_getinfo($ch);//CURLINFO_EFFECTIVE_URL

$done_content = curl_multi_getcontent($ch);

echo $done_content."";

#if(curl_errno($ch) == 0) {

#   $count = (preg_match('#of about 
([^>]+)#i', $done_content, $g)
? $g[1] : 'many');

#   echo "Link $done_url found $count
links.\n";

#   flush();

#   } else {

#   echo "Link $done_url failed:
".curl_error($ch)."\n";

#   flush();

#   }

echo 'removing curlmulti handle';

curl_multi_remove_handle($mcurl, $ch);

echo 'REMOVED curlmulti handle';

curl_close($ch);

$threadsRunning--;

}

}

curl_multi_close($mcurl);

echo 'Done.';

?>

Expected result:

Not a segfault. :)

Actual result:
--
(gdb) r curl.php

Starting program: /usr/local/bin/php curl.php

[Thread debugging using libthread_db enabled]

Adding download link: /test123.txt-URLID: 0-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 1-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 2-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 3-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 4-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

111removing curlmulti handleREMOVED curlmulti handle111removing
curlmulti handleREMOVED curlmulti handle111removing curlmulti
handleREMOVED curlmulti handle111removing curlmulti handleREMOVED
curlmulti handle111removing curlmulti handleREMOVED curlmulti
handleAdding download link: /test123.txt-URLID: 5-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 6-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

Adding download link: /test123.txt-URLID: 7-URL:
ftp://test12345678:test12345...@www.ftpwt.com//test123.txt

111removing curlmulti handleREMOVED curlmulti handle111removing
curlmulti handleREMOVED curlmulti handle111removing curlmulti
handleREMOVED curlmulti handleNO MORE THREADS LEFT

Program received signal SIGSEGV, Segmentation fault.

0x005751dc in curl_write_header (

data=0x14d6bb8 "221-Goodbye. You uploaded 0 and downloaded 1
kbytes.\r\n221 Logout.\r\n), 45.85 Kbytes per second\r", size=1, nmemb=54,
ctx=0x14824e0)

at
/home/aharvey/php/php/php-src/branches/PHP_5_3/ext/curl/interface.c:1119

1119php_curl_write *t   = ch->handlers->write_header;

(gdb) bt

#0  0x005751dc in curl_write_header (

data=0x14d6bb8 "221-Goodbye. You uploaded 0 and downloaded 1
kbytes.\r\n221 Logou

[PHP-BUG] Bug #52413 [NEW]: MySQLi build failure on OS X

2010-07-23 Thread ahar...@php.net
From: aharvey
Operating system: Mac OS X 10.6.4
PHP version:  5.3.3
Package:  MySQLi related
Bug Type: Bug
Bug description:MySQLi build failure on OS X

Description:

Building mysqli against an external libmysql fails on OS X 10.6.4 (and
probably 

other versions). Compilation succeeds when mysqlnd is used.



I'm using mysql-connector-c 6.0.2, which is the current package.

Actual result:
--
/bin/sh /Users/aharvey/Trees/php-5.3.3/libtool --silent --preserve-dup-deps
--

mode=compile gcc  -Iext/mysqli/
-I/Users/aharvey/Trees/php-5.3.3/ext/mysqli/ -

DPHP_ATOM_INC -I/Users/aharvey/Trees/php-5.3.3/include -

I/Users/aharvey/Trees/php-5.3.3/main -I/Users/aharvey/Trees/php-5.3.3 -

I/Users/aharvey/Trees/php-5.3.3/ext/date/lib -I/Users/aharvey/Trees/php-

5.3.3/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/include -

I/Users/aharvey/Trees/php-5.3.3/ext/sqlite3/libsqlite
-I/Users/aharvey/Trees/php-

5.3.3/TSRM -I/Users/aharvey/Trees/php-5.3.3/Zend  -no-cpp-precomp 
-I/usr/include 

-g -O2 -fvisibility=hidden  -c
/Users/aharvey/Trees/php-5.3.3/ext/mysqli/mysqli.c 

-o ext/mysqli/mysqli.lo 

In file included from /Users/aharvey/Trees/php-

5.3.3/ext/mysqli/php_mysqli_structs.h:57,

 from
/Users/aharvey/Trees/php-5.3.3/ext/mysqli/mysqli.c:33:

/usr/local/include/my_global.h:1011: error: duplicate ‘unsigned’

make: *** [ext/mysqli/mysqli.lo] Error 1

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52413&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52413&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52413&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52413&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52413&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52413&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52413&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52413&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52413&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52413&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52413&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52413&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52413&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52413&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52413&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52413&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52413&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52413&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52413&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52413&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52413&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52413&r=mysqlcfg



Req #52563 [PATCH]: [Feature request] error_reporting constant

2010-08-09 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=52563&edit=1

 ID: 52563
 Patch added by: ahar...@php.net
 Reported by:mattgscox at hotmail dot com
 Summary:[Feature request] error_reporting constant
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Any
 PHP Version:Irrelevant
 Block user comment: N

 New Comment:

The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1281350770
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1281350770


Previous Comments:

[2010-08-09 12:45:52] ahar...@php.net

Bah, forgot I don't have karma for Zend. Patch against trunk about to be
attached: this seems harmless enough, and a quick Google suggests people
do expect this to work.


[2010-08-07 19:20:42] mattgscox at hotmail dot com

Description:

Feature request only;



For completeness, and coding clarity, please define constant E_NONE to
set error reporting to none rather than relying on the absolute integer
value of 0

Test script:
---
error_reporting(E_NONE);

Expected result:

[No error warning]

Actual result:
--
PHP Notice:  Use of undefined constant E_NONE - assumed 'E_NONE'  






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52563&edit=1


Req #52563 [PATCH]: [Feature request] error_reporting constant

2010-08-09 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=52563&edit=1

 ID: 52563
 Patch added by: ahar...@php.net
 Reported by:mattgscox at hotmail dot com
 Summary:[Feature request] error_reporting constant
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Any
 PHP Version:Irrelevant
 Block user comment: N

 New Comment:

The following patch has been added/updated:

Patch Name: E_NONE-and-E_EVERYTHING
Revision:   1281409252
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE-and-E_EVERYTHING&revision=1281409252


Previous Comments:

[2010-08-10 04:35:57] ahar...@php.net

It's a shame that E_ALL was changed to not mean "all errors" in the
first place, really.



I'll hack up a revised patch (along with an update to the UPGRADING
file, since I forgot that first time around) which defines E_EVERYTHING
= -1 -- we can bikeshed the exact name on Internals later, if necessary.


[2010-08-09 19:31:41] ka...@php.net

While we are at it, we should add an E_ALL constant to -1 to display all
errors in the bitfield

----
[2010-08-09 12:46:10] ahar...@php.net

The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1281350770
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1281350770

--------
[2010-08-09 12:45:52] ahar...@php.net

Bah, forgot I don't have karma for Zend. Patch against trunk about to be
attached: this seems harmless enough, and a quick Google suggests people
do expect this to work.


[2010-08-07 19:20:42] mattgscox at hotmail dot com

Description:

Feature request only;



For completeness, and coding clarity, please define constant E_NONE to
set error reporting to none rather than relying on the absolute integer
value of 0

Test script:
---
error_reporting(E_NONE);

Expected result:

[No error warning]

Actual result:
--
PHP Notice:  Use of undefined constant E_NONE - assumed 'E_NONE'  






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52563&edit=1


Req #52563 [PATCH]: [Feature request] error_reporting constant

2010-08-27 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=52563&edit=1

 ID: 52563
 Patch added by: ahar...@php.net
 Reported by:mattgscox at hotmail dot com
 Summary:[Feature request] error_reporting constant
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Any
 PHP Version:Irrelevant
 Block user comment: N

 New Comment:

The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1282905701
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1282905701


Previous Comments:

[2010-08-24 18:44:31] s...@php.net

Frankly, I don't see why we need a constant meaning 0. What's wrong
with, say... 0?


[2010-08-10 05:00:52] ahar...@php.net

The following patch has been added/updated:

Patch Name: E_NONE-and-E_EVERYTHING
Revision:   1281409252
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE-and-E_EVERYTHING&revision=1281409252

----
[2010-08-10 04:35:57] ahar...@php.net

It's a shame that E_ALL was changed to not mean "all errors" in the
first place, really.



I'll hack up a revised patch (along with an update to the UPGRADING
file, since I forgot that first time around) which defines E_EVERYTHING
= -1 -- we can bikeshed the exact name on Internals later, if necessary.


[2010-08-09 19:31:41] ka...@php.net

While we are at it, we should add an E_ALL constant to -1 to display all
errors in the bitfield

----
[2010-08-09 12:46:10] ahar...@php.net

The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1281350770
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1281350770




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=52563


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52563&edit=1


Req #52563 [PATCH]: [Feature request] error_reporting constant

2010-08-27 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=52563&edit=1

 ID: 52563
 Patch added by: ahar...@php.net
 Reported by:mattgscox at hotmail dot com
 Summary:[Feature request] error_reporting constant
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Any
 PHP Version:Irrelevant
 Block user comment: N

 New Comment:

The following patch has been added/updated:

Patch Name: E_ALL
Revision:   1282906379
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_ALL&revision=1282906379


Previous Comments:

[2010-08-27 12:41:42] ahar...@php.net

The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1282905701
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1282905701


[2010-08-24 18:44:31] s...@php.net

Frankly, I don't see why we need a constant meaning 0. What's wrong
with, say... 0?

----
[2010-08-10 05:00:52] ahar...@php.net

The following patch has been added/updated:

Patch Name: E_NONE-and-E_EVERYTHING
Revision:   1281409252
URL:   
http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE-and-E_EVERYTHING&revision=1281409252

----
[2010-08-10 04:35:57] ahar...@php.net

It's a shame that E_ALL was changed to not mean "all errors" in the
first place, really.



I'll hack up a revised patch (along with an update to the UPGRADING
file, since I forgot that first time around) which defines E_EVERYTHING
= -1 -- we can bikeshed the exact name on Internals later, if necessary.


[2010-08-09 19:31:41] ka...@php.net

While we are at it, we should add an E_ALL constant to -1 to display all
errors in the bitfield




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=52563


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52563&edit=1


Bug #52829 [PATCH]: json_decode looses data

2010-09-13 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=52829&edit=1

 ID: 52829
 Patch added by: ahar...@php.net
 Reported by:pzbowen at gmail dot com
 Summary:json_decode looses data
 Status: Open
 Type:   Bug
 Package:JSON related
 Operating System:   Linux
 PHP Version:5.2.14
 Block user comment: N

 New Comment:

The following patch has been added/updated:

Patch Name: json-decode-warnings
Revision:   1284443322
URL:   
http://bugs.php.net/patch-display.php?bug=52829&patch=json-decode-warnings&revision=1284443322


Previous Comments:

[2010-09-13 22:03:03] pzbowen at gmail dot com

Agreed, no easy way to handle it, so it should return an error when this
situation is encountered.


[2010-09-13 21:49:13] ka...@php.net

I can't see any really easy way to achieve this since properties and
array keys are unique in PHP. Perhaps some overloading with objects but
that would be dirty/hackish


[2010-09-13 20:31:49] pzbowen at gmail dot com

Description:

According to RFC 4627, section 2.2, "The names within an object SHOULD
be unique."  This is only a SHOULD not a MUST, so the following is
valid



{"foo":2,"foo":3}



Unfortunately in PHP this only returns the last object member.

Test script:
---
var_dump(json_decode('{"foo":2,"foo":3}'));



Expected result:

an object with a way of accessing both members or an error raised by
json_decode

Actual result:
--
object(stdClass)#1 (1) {

  ["foo"]=>

  int(3)

}






-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52829&edit=1


[PHP-BUG] Bug #53279 [NEW]: SplFileObject doesn't initialise default CSV escape character

2010-11-09 Thread ahar...@php.net
From: aharvey
Operating system: Irrelevant
PHP version:  trunk-SVN-2010-11-09 (SVN)
Package:  SPL related
Bug Type: Bug
Bug description:SplFileObject doesn't initialise default CSV escape character

Description:

While the default CSV enclosure and delimiter are properly initialised,
SplFileObject never explicitly initialises the default escape character
within instances after the structure in question is first zeroed with
memset(), which means it defaults to (char) 0. All other CSV related
functions in PHP default to \ as the escape character as of 5.3.



Fix forthcoming; I'm just opening this so it's searchable and to get a bug
number for the NEWS.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53279&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53279&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53279&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=53279&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53279&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53279&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53279&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=53279&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=53279&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=53279&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=53279&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=53279&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=53279&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=53279&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53279&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=53279&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=53279&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=53279&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=53279&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=53279&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=53279&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=53279&r=mysqlcfg



Req #53622 [PATCH]: CLI -w separate functions of striping whitespace and comments

2011-01-04 Thread ahar...@php.net
Edit report at http://bugs.php.net/bug.php?id=53622&edit=1

 ID: 53622
 Patch added by: ahar...@php.net
 Reported by:mnelson at teshy dot com
 Summary:CLI -w separate functions of striping whitespace and
 comments
 Status: Open
 Type:   Feature/Change Request
 Package:CGI related
 Operating System:   all
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: strip-comments-whitespace
Revision:   1294153279
URL:   
http://bugs.php.net/patch-display.php?bug=53622&patch=strip-comments-whitespace&revision=1294153279


Previous Comments:

[2011-01-01 01:57:40] johan...@php.net

I believe it is better to do this in userland. I'd actually drop the -w
flag completely. Keeping the bug open so people can disagree and
implement it :-)



btw. a userspace beautifier is on
http://pear.php.net/package/PHP_Beautifier


[2010-12-28 17:44:55] mnelson at teshy dot com

Description:

It would be useful if The Command line option "-w" for stripping
comments and 

whitespace was broken down into separate commands. One for striping
whitespace and 

one for striping comments, the commands could be combined for users that
want 

both. 



In our use case we have code that has become unreadable and needs
excessive 

whitespace removed so it can be reformatted properly, we however want to
keep all 

code comments.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53622&edit=1


[PHP-BUG] Bug #53923 [NEW]: Zip functions assume HAVE_GLOB is defined

2011-02-04 Thread ahar...@php.net
From: aharvey
Operating system: Irrelevant
PHP version:  trunk-SVN-2011-02-04 (SVN)
Package:  Zip Related
Bug Type: Bug
Bug description:Zip functions assume HAVE_GLOB is defined

Description:

While testing the patches for bug #53913 and bug #53914, I've discovered
that the 

zip extension has a similar problem: it can't handle HAVE_GLOB being
undefined.



I'll fix it up myself: just noting it so there's a bug number.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53923&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53923&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53923&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=53923&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53923&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53923&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53923&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=53923&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=53923&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=53923&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=53923&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=53923&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=53923&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=53923&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53923&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=53923&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=53923&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=53923&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=53923&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=53923&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=53923&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=53923&r=mysqlcfg



[PHP-BUG] Bug #53924 [NEW]: FILTER_VALIDATE_URL doesn't validate port numbers

2011-02-04 Thread ahar...@php.net
From: aharvey
Operating system: Irrelevant
PHP version:  trunk-SVN-2011-02-04 (SVN)
Package:  Filter related
Bug Type: Bug
Bug description:FILTER_VALIDATE_URL doesn't validate port numbers

Description:

Non-integer port numbers are currently validated as OK by
FILTER_VALIDATE_URL, 

per a comment in bug #53901.

Test script:
---
http://example.com:qq', FILTER_VALIDATE_URL));

?>

Expected result:

bool(false)

Actual result:
--
string(21) "http://example.com:qq";

-- 
Edit bug report at http://bugs.php.net/bug.php?id=53924&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53924&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53924&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=53924&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53924&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53924&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53924&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=53924&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=53924&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=53924&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=53924&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=53924&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=53924&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=53924&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53924&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=53924&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=53924&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=53924&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=53924&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=53924&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=53924&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=53924&r=mysqlcfg