[PHP-BUG] Bug #63586 [NEW]: Bad md5sum of php-5.3.19.tar.bz2

2012-11-23 Thread witekfl at gazeta dot pl
From: witekfl at gazeta dot pl
Operating system: 
PHP version:  5.3.19
Package:  *General Issues
Bug Type: Bug
Bug description:Bad md5sum of php-5.3.19.tar.bz2

Description:

md5sum of php-5.3.19.tar.bz2 is different than shown on the download page.


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



Bug #63583 [Nab]: Comparing objects is wrong

2012-11-23 Thread vadimx at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63583&edit=1

 ID: 63583
 User updated by:vadimx at gmail dot com
 Reported by:vadimx at gmail dot com
 Summary:Comparing objects is wrong
 Status: Not a bug
 Type:   Bug
 Package:SimpleXML related
 Operating System:   *
 PHP Version:5.3.18
 Block user comment: N
 Private report: N

 New Comment:

So, for compare 2 SimpleXMLElement objects, i have one, not good way 
var_dump($o1->asXML() == $o2->asXML()), but it's wrong if one space (or \n \t) 
before tag name are different?
Or exists another method, for check if 2 SimpleXMLElement objects are same?


Previous Comments:

[2012-11-23 01:52:35] ahar...@php.net

SimpleXML does implement object comparison, but it compares both the underlying 
document and node — if they aren't the same (and they aren't, in this case, 
since both new SimpleXMLElement() calls create new documents and nodes), then 
the objects aren't the same.


[2012-11-22 16:40:48] vadimx at gmail dot com

Description:

Comparing objects always returns false. How can i compare objects?

Test script:
---
$xml = '';

$a = new SimpleXMLElement($xml);
$b = new SimpleXMLElement($xml);

var_dump($a == $b);


Expected result:

bool(true)

Actual result:
--
bool(false)






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


Bug #51298 [Asn->Csd]: TZ detection crash

2012-11-23 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=51298&edit=1

 ID: 51298
 Updated by: paj...@php.net
 Reported by:trotsky_icepick at hotmail dot com
 Summary:TZ detection crash
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:Apache2 related
 Operating System:   Windows Vista SP2
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: Y
 Private report: N

 New Comment:

TZ detection has been completely 
removed and user must set the TZ 
now. Crash is then per se gone.


Previous Comments:

[2010-07-17 03:54:38] remindkumar at gmail dot com

Hi all,
I found that the php_bcompiler.dll from http://downloads.php.net/pierre/
built in version 5.3.1.

I was able to build the bcompiler source and now it is working for me.

Posted this update just to clarify.


[2010-07-15 20:54:25] tegwe002 at umn dot edu

I experienced this bug as well. 

My issue was that we're running 2 versions of php and have mysql tools for 5.0 
on our machine they all had php5ts.dll

I added the location of the apache php to the environment path before mysql and 
that worked for me.

Server:
Win 2003 SP 2
Apache 2.2.15 win32 x86 openssl
PHP 5.2.13 win32 zip install.


[2010-07-12 21:25:23] paj...@php.net

If it does not crash without this module, what makes you think that this is 
remotely related to this bug (Tz detection crash)? Please report a bug at 
pecl.php.net/bcompiler


[2010-07-12 20:58:50] remindkumar at gmail dot com

Hi all,

I am using apache 2.2.15 with SSL from Apache Lounge, and PHP 5.3.2 VC9_ts in 
XP SP3.

Initially everything was working fine. After encoding my php scripts using 
php_bcompiler.dll (Vc9 + TS), apache is crashing with faulting module: 

AppName: httpd.exe   AppVer: 2.2.15.0ModName: php5ts.dll
ModVer: 5.3.2.0  Offset: bfb7

Error log:
[Mon Jul 12 14:46:15 2010] [notice] Parent: child process exited with status 
3221225477 -- Restarting.
[Mon Jul 12 14:46:16 2010] [notice] Apache/2.2.15 (Win32) mod_ssl/2.2.15 
OpenSSL/0.9.8m PHP/5.3.2 configured -- resuming normal operations
[Mon Jul 12 14:46:16 2010] [notice] Server built: Mar  2 2010 15:56:36
[Mon Jul 12 14:46:16 2010] [notice] Parent: Created child process 3260

Any help would be appreciated.


[2010-07-06 07:57:48] paj...@php.net

I'm not negative, I only try to keep the noise/signal ration as low as I can 
for identified bugs, like this one. The many other crash reports are usually 
not crashes but simply bad configurations. And bugs.php.net is not a support 
channel. However I happily support users on php-windows or any other support 
channel.

Or in your case simply wrong version of PHP, you need the thread safe version 
of php for Apache as Apache uses thread safe SAPIs. NTS only contains cli, 
fastcgi/cgi or other non thread safe SAPIs.




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=51298


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


Req #55078 [Opn->Wfx]: Can't use anonymous function inside array declaration inside a class

2012-11-23 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=55078&edit=1

 ID: 55078
 Updated by: larue...@php.net
 Reported by:charlie at charliesomerville dot com
 Summary:Can't use anonymous function inside array
 declaration inside a class
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

"(propeties) This declaration may include an initialization, but this 
initialization must be a constant value--that is, it must be able to be 
evaluated at compile time and must not depend on run-time information in order 
to be evaluated."
http://www.php.net/manual/pt_BR/language.oop5.properties.php

lambda is a dynamic expression like :

function lambda() use ($variable) {
}

so, we should not allow lambda in class properties initialization.


Previous Comments:

[2012-11-23 04:38:30] nickmokisasian at gmail dot com

When will this feature be supported?


[2011-07-01 18:46:57] fel...@php.net

This is just more one limitation, not a bug. Changing to feature request.
Thanks.


[2011-06-29 23:54:37] charlie at charliesomerville dot com

Description:

You can't declare an anonymous function in an array declaration inside a class 
declaration.

Test script:
---
 function() {
phpinfo();
});
}

Foo::$array["hi"]();

Expected result:

phpinfo being displayed

Actual result:
--
Parse error: syntax error, unexpected T_FUNCTION in /path/to/script.php on line 
5






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


Bug #63486 [Opn->Ver]: mysqli_free_result leave the resource variable in a messy state

2012-11-23 Thread uw
Edit report at https://bugs.php.net/bug.php?id=63486&edit=1

 ID: 63486
 Updated by: u...@php.net
 Reported by:der...@php.net
 Summary:mysqli_free_result leave the resource variable in a
 messy state
-Status: Open
+Status: Verified
 Type:   Bug
 Package:MySQLi related
 PHP Version:5.4.8
-Assigned To:
+Assigned To:mysql
 Block user comment: N
 Private report: N

 New Comment:

Thanks for the patch. It seems straight forward , however, it changes behaviour 
in case of user errors. This makes me wonder in which PHP version it should go.


Current behaviour:
a) var_dump() - the XDebug view 

res->free();
var_dump(res)  <-- throws a ton of warnings

b) Invalid property access - user error: why access free'd resource?

res->free();
var_dump(res->lengths) <--- throws a ton of warnings

c) Invalid method access - user error: why access free'd resource?

res->free();
res->free(); <--- trows a ton of warnings

In all three cases the user is confronted with warnings that he could ignore, 
if he wanted. The patch leaves the user with:

a) var_dump() - the XDebug view

res->free()
var_dump(res) <-- Warning on accessing free'd resource is gone

b) 

res->free();
var_dump(res->lengths) <-- Notice
var_dump(res)  <-- Warning gone

In sum: user gets less hints about his, well, "why are you doing that"-code.

c)

res->free();
res->free();   <-- Fatal

Application that used to work now throws fatal



Please, note that I am not saying no to fixing the var_dump() issue. Trying to 
explain the side effects of the proposed patch and asking what PHP version 
would qualify for such a change.


Previous Comments:

[2012-11-15 17:17:16] u...@php.net

Derick, thanks a lot for the patch. All three of us MySQL guys are at a team 
meeting. We will fly back home tomorrow morning. We can have a look once home 
and no more tired (flight goes at 6:xx am).


[2012-11-11 12:53:01] der...@php.net

The following patch has been added/updated:

Patch Name: mysqli-clear-result-cleanup
Revision:   1352638381
URL:
https://bugs.php.net/patch-display.php?bug=63486&patch=mysqli-clear-result-cleanup&revision=1352638381


[2012-11-11 12:52:02] der...@php.net

Description:

An Xdebug user filed the following report: 
http://bugs.xdebug.org/view.php?id=900

I've just investigated this, and found out that this is something I can't fix 
in Xdebug. mysqli_free_result() destroys the internal object, but leaves the 
resource (in your case, $rs) in a silly state. All Xdebug does internally is 
basically a var_dump( $rs ), and after it is freed with mysqli_free_result(), 
that throws exactly the same error (without Xdebug). This can however, easily 
be fixed in the MySQLi extension with the attached patch. The patch applies to 
PHP 5.4, but this also a problem in master and PHP 5.3. It is also possible, 
that other mysqli_free_* functions can benefit from a similar construct.

Test script:
---



Expected result:

The expected result is perhaps something like "NULL" (which my patch makes it 
do).

Actual result:
--
hi mom
Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Property access is not allowed yet in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.ph

Bug #63520 [Com]: JSON extension includes a problematic license statement

2012-11-23 Thread r...@php.net
Edit report at https://bugs.php.net/bug.php?id=63520&edit=1

 ID: 63520
 Comment by: r...@php.net
 Reported by:kaplan at debian dot org
 Summary:JSON extension includes a problematic license
 statement
 Status: Suspended
 Type:   Bug
 Package:JSON related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

A patch proposed in https://bugs.php.net/63588 makes "json_encode" really free.


Previous Comments:

[2012-11-15 18:09:30] ras...@php.net

I am not saying it isn't a tricky license clause to deal with and it would be 
better if it wasn't there. However, I am also not keen on spending resources on 
rewriting code for this reason. If someone supplies a functionally equivalent 
replacement, we will have a look at it. But as far as I am concerned, license-
wise the terms Good and Evil are not legal terms. These are more subjective 
self-describing terms and since I deem PHP's use of the code as "Good" then we 
comply with the license. Could others perhaps use PHP and thus the code for 
"Evil" and therefore not comply with the license? Sure, but there are many 
things people can do with our code that is either against the various licenses 
involved or even illegal criminally. It is something we cannot control.


[2012-11-15 18:01:24] paj...@php.net

More seriously, as soon as the license is changed upstream, we will merge it. 
But 
we won't be able to do anything before.


[2012-11-15 18:00:52] paj...@php.net

well, the FSF does not like the PHP license either. Nothing worries me here :)


[2012-11-15 17:58:38] ansgar at debian dot org

I just want to note that the FSF[1] and other distributions like Fedora also 
think this license is bad[2].

  [1] 
  [2] , look for 
"JSON License"

So this is not a problem for just Debian.

Ansgar


[2012-11-15 07:39:35] ras...@php.net

Sorry, I don't see us ripping out and rewriting the json code due to this.




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=63520


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


[PHP-BUG] Bug #63589 [NEW]: XMLWriter handling of double-quotes not consistent with other libxml extensions

2012-11-23 Thread franck at cassedanne dot com
From: franck at cassedanne dot com
Operating system: BSD, Linux, OSX
PHP version:  5.3.19
Package:  XML Writer
Bug Type: Bug
Bug description:XMLWriter handling of double-quotes not consistent with other 
libxml extensions

Description:

XMLWriter differs in its handling of double-quotes when compared to other
libxml
based PHP extensions.

Double-quotes using XMLWriter are converted to htmlentities (i.e.
'"').
Using SimpleXML or DOMDocument double-quotes stay unconverted.

It seems to me that XMLWriter should not be converting double-quotes
either.

Tidy seems to also agree -- try the following in a CLI:
$ echo """ | tidy -xml -q

Maybe introducing a flag/constant such as ENT_NOQUOTES to toggle the
conversion of 
these on and off might be pertinent.

Test script:
---
openMemory();
$x->startDocument('1.0', 'UTF-8');
$x->writeElement('tag', '"');
$x->endDocument();
echo $x->flush();


Expected result:

"

Actual result:
--
"

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



[PHP-BUG] Bug #63590 [NEW]: Fileinfo different results in TS and NTS

2012-11-23 Thread a...@php.net
From: ab
Operating system: windows
PHP version:  Irrelevant
Package:  *Directory/Filesystem functions
Bug Type: Bug
Bug description:Fileinfo different results in TS and NTS

Description:

There are two test fork for windows 

ext\fileinfo\tests\finfo_file_regex-win32.phpt
ext\fileinfo\tests\finfo_open_error-win32.phpt

which pass with NTS build and fail with TS one. 

Test script:
---
ext\fileinfo\tests\finfo_file_regex-win32.phpt
ext\fileinfo\tests\finfo_open_error-win32.phpt

Expected result:

tests pass

Actual result:
--
Here is the test diff 

ext\fileinfo\tests\finfo_file_regex-win32.phpt

002+ string(28) "text/plain; charset=us-ascii"
002- string(10) "text/plain"

ext\fileinfo\tests\finfo_open_error-win32.phpt

015+ 
016+ Notice: finfo_open(): Warning: using regular magic file
`C:\snaps\php-test-pack-5.5-ts-windows-vc9-x86-reb4825b\ext\fileinfo\tests\magic'
in
C:\snaps\php-test-pack-5.5-ts-windows-vc9-x86-reb4825b\ext\fileinfo\tests\finfo_open_error-win32.php
on line 16

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



Bug #63590 [PATCH]: Fileinfo different results in TS and NTS

2012-11-23 Thread a...@php.net
Edit report at https://bugs.php.net/bug.php?id=63590&edit=1

 ID: 63590
 Patch added by: a...@php.net
 Reported by:a...@php.net
 Summary:Fileinfo different results in TS and NTS
 Status: Open
 Type:   Bug
 Package:*Directory/Filesystem functions
 Operating System:   windows
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: 63590.path
Revision:   1353699077
URL:
https://bugs.php.net/patch-display.php?bug=63590&patch=63590.path&revision=1353699077


Previous Comments:

[2012-11-23 19:27:20] a...@php.net

Description:

There are two test fork for windows 

ext\fileinfo\tests\finfo_file_regex-win32.phpt
ext\fileinfo\tests\finfo_open_error-win32.phpt

which pass with NTS build and fail with TS one. 

Test script:
---
ext\fileinfo\tests\finfo_file_regex-win32.phpt
ext\fileinfo\tests\finfo_open_error-win32.phpt

Expected result:

tests pass

Actual result:
--
Here is the test diff 

ext\fileinfo\tests\finfo_file_regex-win32.phpt

002+ string(28) "text/plain; charset=us-ascii"
002- string(10) "text/plain"

ext\fileinfo\tests\finfo_open_error-win32.phpt

015+ 
016+ Notice: finfo_open(): Warning: using regular magic file 
`C:\snaps\php-test-pack-5.5-ts-windows-vc9-x86-reb4825b\ext\fileinfo\tests\magic'
 in 
C:\snaps\php-test-pack-5.5-ts-windows-vc9-x86-reb4825b\ext\fileinfo\tests\finfo_open_error-win32.php
 on line 16






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


Bug #63589 [Opn]: XMLWriter handling of double-quotes not consistent with other libxml extensions

2012-11-23 Thread franck at cassedanne dot com
Edit report at https://bugs.php.net/bug.php?id=63589&edit=1

 ID: 63589
 User updated by:franck at cassedanne dot com
 Reported by:franck at cassedanne dot com
 Summary:XMLWriter handling of double-quotes not consistent
 with other libxml extensions
 Status: Open
 Type:   Bug
 Package:XML Writer
 Operating System:   BSD, Linux, OSX
-PHP Version:5.3.19
+PHP Version:5.3.19, 5.4.9
 Block user comment: N
 Private report: N

 New Comment:

The same issue is present on PHP 5.4.9


Previous Comments:

[2012-11-23 18:56:09] franck at cassedanne dot com

Description:

XMLWriter differs in its handling of double-quotes when compared to other libxml
based PHP extensions.

Double-quotes using XMLWriter are converted to htmlentities (i.e. '"').
Using SimpleXML or DOMDocument double-quotes stay unconverted.

It seems to me that XMLWriter should not be converting double-quotes either.

Tidy seems to also agree -- try the following in a CLI:
$ echo """ | tidy -xml -q

Maybe introducing a flag/constant such as ENT_NOQUOTES to toggle the conversion 
of 
these on and off might be pertinent.

Test script:
---
openMemory();
$x->startDocument('1.0', 'UTF-8');
$x->writeElement('tag', '"');
$x->endDocument();
echo $x->flush();


Expected result:

"

Actual result:
--
"






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


Req #63538 [Com]: "Call to undefined function" should be catchable

2012-11-23 Thread lubosdz at hotmail dot com
Edit report at https://bugs.php.net/bug.php?id=63538&edit=1

 ID: 63538
 Comment by: lubosdz at hotmail dot com
 Reported by:indey...@php.net
 Summary:"Call to undefined function" should be catchable
 Status: Open
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 Operating System:   any
 PHP Version:5.5.0alpha1
 Block user comment: N
 Private report: N

 New Comment:

What about function_exists() ?

set_error_handler(function($errno , $errstr){
if (!function_exists('there_is_no_me')) {
function there_is_no_me(){
echo "Here am I!\n";
}
}
});

lubosdz


Previous Comments:

[2012-11-16 10:13:02] indey...@php.net

Description:

At the moment, call to undefined function results as "Fatal error". On the 
other hand, it can be easily handled programmatically either by including 
required file or just defining function dynamically.

Test script:
---
https://bugs.php.net/bug.php?id=63538&edit=1


[PHP-BUG] Bug #63591 [NEW]: Can't write to properties of mysqli classes using Reflection API

2012-11-23 Thread HMWiesinger at gmx dot at
From: HMWiesinger at gmx dot at
Operating system: Linux
PHP version:  5.4.9
Package:  MySQLi related
Bug Type: Bug
Bug description:Can't write to properties of mysqli classes using Reflection API

Description:

It doesn't seem to be possible to get write access to properties of mysqli
classes 
using the Reflection API. 



Test script:
---
$mysqli = new MySQLi();
$reflection = new ReflectionClass('\MySQLi');

$property = $reflection->getProperty('affected_rows');
$property->setAccessible(TRUE);
$property->setValue($mysqli, 10);


Expected result:

No Error

Actual result:
--
Fatal error: ReflectionProperty::setValue(): Cannot write property

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



[PHP-BUG] Bug #63592 [NEW]: class alias are not used/resolved by type hinting

2012-11-23 Thread frederic dot hardy at mageekbox dot net
From: frederic dot hardy at mageekbox dot net
Operating system: macos X mountain lion
PHP version:  5.4.9
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:class alias are not used/resolved by type hinting

Description:

Imagine that you have a A class.
Imagine that you have an alias B on this A class.
Imagine that you have a function/method which require a B as argument.
So, currently, it's not possible to pass a A instance as argument to this 
function/method.

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



Bug #63592 [Opn->Nab]: class alias are not used/resolved by type hinting

2012-11-23 Thread felipe
Edit report at https://bugs.php.net/bug.php?id=63592&edit=1

 ID: 63592
 Updated by: fel...@php.net
 Reported by:frederic dot hardy at mageekbox dot net
 Summary:class alias are not used/resolved by type hinting
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   macos X mountain lion
 PHP Version:5.4.9
 Block user comment: N
 Private report: N

 New Comment:

19:48 @ mageekguy >> you can close my bug report, seems that i made a mistake 
in 
 my script


Previous Comments:

[2012-11-23 21:36:15] frederic dot hardy at mageekbox dot net

Description:

Imagine that you have a A class.
Imagine that you have an alias B on this A class.
Imagine that you have a function/method which require a B as argument.
So, currently, it's not possible to pass a A instance as argument to this 
function/method.

Test script:
---
https://bugs.php.net/bug.php?id=63592&edit=1


[PHP-BUG] Bug #63593 [NEW]: scandir return "?" in place of unicode letter in Windows httpd.

2012-11-23 Thread john dot peterson10 at gmail dot com
From: john dot peterson10 at gmail dot com
Operating system: Windows
PHP version:  5.5Git-2012-11-23 (snap)
Package:  *Unicode Issues
Bug Type: Bug
Bug description:scandir return "?" in place of unicode letter in Windows httpd.

Description:

Reproduce

Program
httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
php-5.5-ts-windows-vc9-x86-r64788e3.zip

Config
httpd-2.2.22-win32-x86-openssl-0.9.8t.msi/program files/Apache Software 
Foundation/Apache2.2/conf/original/httpd.conf.in
php-5.5-ts-windows-vc9-x86-r64788e3.zip/php.ini-development

Command
# cd `httpd ServerRoot`
touch ファイル
curl -v 'http://server/test.php'# return ""
php test.php# return "ファイル"

Test script:
---


Expected result:

See above.

Actual result:
--
See above.

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



Bug #61955 [Com]: Adding DateInterval to DateTime adds 1 additional hour

2012-11-23 Thread whistl0r+php at googlemail dot com
Edit report at https://bugs.php.net/bug.php?id=61955&edit=1

 ID: 61955
 Comment by: whistl0r+php at googlemail dot com
 Reported by:php at arjanonline dot net
 Summary:Adding DateInterval to DateTime adds 1 additional
 hour
 Status: Assigned
 Type:   Bug
 Package:Date/time related
 Operating System:   Linux / Mac
 PHP Version:5.3.12
 Assigned To:derick
 Block user comment: N
 Private report: N

 New Comment:

This bug seems to be still present in PHP 5.3.19. My test script:

setTime( 00, 00, 00 );
$datetime->add( new DateInterval( 'P1D' ) );

// Output
echo 'mktime():' . ( mktime( 23, 59, 59 ) + 1 ) . PHP_EOL;
echo 'gmmktime():  ' . ( gmmktime( 23, 59, 59 ) + 1 ) . PHP_EOL;
echo 'datetime():  ' . $datetime->getTimestamp() . PHP_EOL;
echo 'time():  ' . time() . PHP_EOL;
echo 'microtime(): ' . microtime( true ) . PHP_EOL;
echo 'Used TZ: ' . date_default_timezone_get() . PHP_EOL;
?>

I run this test script at 2012-11-24T00:00:00+01:00. This is my output:

Current date: 2012-11-24T00:00:00+01:00
mktime():1353715200
gmmktime():  1353715200
datetime():  1353715200
time():  1353711600
microtime(): 1353711600.7557
Used TZ: UTC

I am expecting that at least the DateTime value should be equal to time(), 
because both functions should represent a UNIX timestamp (which is per 
definition UTC).

But I am also not sure if the gmmktime() *and* mktime() should be equal... and 
I don't understand the 3600 offset at all - remember, we set UTC timezone 
before...


Previous Comments:

[2012-09-11 19:13:10] chris dot baker dot gr at gmail dot com

To amend my earlier comment: my repro attempts show that if I create an 
instance of DateTime by passing a string to the constructor, everything works 
fine. If I use a timestamp in combination with DateTime::createFromFormat, I 
see the bug affect the results

Use of a string
-   
$start = new DateTime('09/13/2012 7:00pm');
$end = new DateTime('09/13/2012 8:00pm');
$interval = DateInterval::createFromDateString('30 minutes');

// expected, 1 hours, 0 minutes, get 1 hours, 0 minutes
$diff = $start->diff($end);
print 'Diff: '.$diff->h.' hours, '.$diff->i.' minutes'."\n";

$end->add($interval);
$diff = $start->diff($end);
// ecpected: 1 hours, 30 minutes, get 1 hours, 30 minutes
print "\n".'Diff after interval: '.$diff->h.' hours, '.$diff->i.' minutes';


Use of a timestamp
-

$start = DateTime::createFromFormat('U', 1347577200);
$end =  DateTime::createFromFormat('U', 1347580800);
$interval = DateInterval::createFromDateString('30 minutes');

// expected, 1 hours, 0 minutes, get 1 hours, 0 minutes
$diff = $start->diff($end);
print 'Diff: '.$diff->h.' hours, '.$diff->i.' minutes'."\n";

$end->add($interval);
$diff = $start->diff($end);
// ecpected: 1 hours, 30 minutes, get 2 hours, 30 minutes
print "\n".'Diff after interval: '.$diff->h.' hours, '.$diff->i.' minutes';

http://3v4l.org/fivbW

The extra one hour makes less sense considering that my server timezone is -5 
UTC -- not that it makes sense for DateInterval to be sensitive to timezone!


[2012-09-11 14:58:51] chris dot baker dot gr at gmail dot com

Can reproduce this as well, just determined it to be the cause of new errors in 
a scheduling web app after updating to 5.4.


[2012-07-09 19:47:08] jgardynik at endlessrealities dot com

I'm getting the same thing. Any single date_modify() call is causing an extra 
hour to be added. If I add 1 minute, it still adds an extra hour. The commit 
that was bisected is very clearly adding an extra hour. If I use 
Pacific/Honolulu or UTC in date_default_timezone_set() it works fine. 
Apparently the fix was not specific enough in its implementation and it's 
taking effect all the time.

This is causing every single one of my monthly comparison reports to break in a 
rather large system because the time is getting thrown off.

I'm using PHP 5.4.4 on linux.


[2012-05-19 15:03:40] graham at grahamc dot com

One minor clarification - This is occurring in every version above 5.3.8.

After running git bisect, I've narrowed it down to this particular commit: 
https://github.com/php/php-src/commit/7411ae09f5565b3f0dfbbfeb71c8f848fd38d6ca


[2012-05-11 15:51:21] zhanglijiu at gmail dot com

My result is object(DateTime)#2 (3) { ["date"]=> string(19) "1970-01-01 
00:00:05" 
["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" }

My system is MAC 10.6.8 php 5.3.1




The rem

Bug #61955 [Com]: Adding DateInterval to DateTime adds 1 additional hour

2012-11-23 Thread whistl0r+php at googlemail dot com
Edit report at https://bugs.php.net/bug.php?id=61955&edit=1

 ID: 61955
 Comment by: whistl0r+php at googlemail dot com
 Reported by:php at arjanonline dot net
 Summary:Adding DateInterval to DateTime adds 1 additional
 hour
 Status: Assigned
 Type:   Bug
 Package:Date/time related
 Operating System:   Linux / Mac
 PHP Version:5.3.12
 Assigned To:derick
 Block user comment: N
 Private report: N

 New Comment:

I think this bug was introduced with 
http://svn.php.net/viewvc/?view=revision&revision=319767


Previous Comments:

[2012-11-24 00:13:09] whistl0r+php at googlemail dot com

This bug seems to be still present in PHP 5.3.19. My test script:

setTime( 00, 00, 00 );
$datetime->add( new DateInterval( 'P1D' ) );

// Output
echo 'mktime():' . ( mktime( 23, 59, 59 ) + 1 ) . PHP_EOL;
echo 'gmmktime():  ' . ( gmmktime( 23, 59, 59 ) + 1 ) . PHP_EOL;
echo 'datetime():  ' . $datetime->getTimestamp() . PHP_EOL;
echo 'time():  ' . time() . PHP_EOL;
echo 'microtime(): ' . microtime( true ) . PHP_EOL;
echo 'Used TZ: ' . date_default_timezone_get() . PHP_EOL;
?>

I run this test script at 2012-11-24T00:00:00+01:00. This is my output:

Current date: 2012-11-24T00:00:00+01:00
mktime():1353715200
gmmktime():  1353715200
datetime():  1353715200
time():  1353711600
microtime(): 1353711600.7557
Used TZ: UTC

I am expecting that at least the DateTime value should be equal to time(), 
because both functions should represent a UNIX timestamp (which is per 
definition UTC).

But I am also not sure if the gmmktime() *and* mktime() should be equal... and 
I don't understand the 3600 offset at all - remember, we set UTC timezone 
before...


[2012-09-11 19:13:10] chris dot baker dot gr at gmail dot com

To amend my earlier comment: my repro attempts show that if I create an 
instance of DateTime by passing a string to the constructor, everything works 
fine. If I use a timestamp in combination with DateTime::createFromFormat, I 
see the bug affect the results

Use of a string
-   
$start = new DateTime('09/13/2012 7:00pm');
$end = new DateTime('09/13/2012 8:00pm');
$interval = DateInterval::createFromDateString('30 minutes');

// expected, 1 hours, 0 minutes, get 1 hours, 0 minutes
$diff = $start->diff($end);
print 'Diff: '.$diff->h.' hours, '.$diff->i.' minutes'."\n";

$end->add($interval);
$diff = $start->diff($end);
// ecpected: 1 hours, 30 minutes, get 1 hours, 30 minutes
print "\n".'Diff after interval: '.$diff->h.' hours, '.$diff->i.' minutes';


Use of a timestamp
-

$start = DateTime::createFromFormat('U', 1347577200);
$end =  DateTime::createFromFormat('U', 1347580800);
$interval = DateInterval::createFromDateString('30 minutes');

// expected, 1 hours, 0 minutes, get 1 hours, 0 minutes
$diff = $start->diff($end);
print 'Diff: '.$diff->h.' hours, '.$diff->i.' minutes'."\n";

$end->add($interval);
$diff = $start->diff($end);
// ecpected: 1 hours, 30 minutes, get 2 hours, 30 minutes
print "\n".'Diff after interval: '.$diff->h.' hours, '.$diff->i.' minutes';

http://3v4l.org/fivbW

The extra one hour makes less sense considering that my server timezone is -5 
UTC -- not that it makes sense for DateInterval to be sensitive to timezone!


[2012-09-11 14:58:51] chris dot baker dot gr at gmail dot com

Can reproduce this as well, just determined it to be the cause of new errors in 
a scheduling web app after updating to 5.4.


[2012-07-09 19:47:08] jgardynik at endlessrealities dot com

I'm getting the same thing. Any single date_modify() call is causing an extra 
hour to be added. If I add 1 minute, it still adds an extra hour. The commit 
that was bisected is very clearly adding an extra hour. If I use 
Pacific/Honolulu or UTC in date_default_timezone_set() it works fine. 
Apparently the fix was not specific enough in its implementation and it's 
taking effect all the time.

This is causing every single one of my monthly comparison reports to break in a 
rather large system because the time is getting thrown off.

I'm using PHP 5.4.4 on linux.


[2012-05-19 15:03:40] graham at grahamc dot com

One minor clarification - This is occurring in every version above 5.3.8.

After running git bisect, I've narrowed it down to this particular commit: 
https://github.com/php/php-src/commit/7411ae09f5565b3f0dfbbfeb71c8f848fd38d6ca




The remainder of the comments for this report are too long. To view
the rest of the com