[PHP-BUG] Req #64871 [NEW]: The ::class operator should verify the class name

2013-05-17 Thread vr...@php.net
From: vr...@php.net
Operating system: Any
PHP version:  5.5.0RC1
Package:  Class/Object related
Bug Type: Feature/Change Request
Bug description:The ::class operator should verify the class name

Description:

One of the main advantages of the ::class operator could be that it
verifies the class name upon creating the string instead of upon usage. It
should trigger autoloading if the class doesn't exist.

I know that it's somewhat late to change this in PHP 5.5 but I was really
surprised by the lack of this feature and about the fact that it wasn't
considered in RFC.


Test script:
---
?php
// I want to know about this typo.
echo stdClas::class;


Expected result:

Fatal error: Class 'stdClas' not found

Actual result:
--
stdClas

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



[PHP-BUG] Bug #64863 [NEW]: PHP_INT_SIZE is 4 instead of 8 on 64bit Windows build

2013-05-16 Thread vr...@php.net
From: vrana
Operating system: Windows 64bit
PHP version:  5.5.0RC1
Package:  *Compile Issues
Bug Type: Bug
Bug description:PHP_INT_SIZE is 4 instead of 8 on 64bit Windows build

Description:

I want to work with DB bigint data type without troubles, I want to call
mysql_insert_id() safely.

Also some problems in Google Code Jam require 8 bytes int and it's very
hard to solve them with 4 bytes int because BC is too slow.

I know that this might be by design but it is a bad design. Especially
given that Linux 64 bits builds have 8 bytes int.

Also the main advantage of 64 bits is to be able to use these 64 bits.


Test script:
---
?php
echo PHP_INT_SIZE; // with php-5.5.0RC1-Win32-VC11-x64.zip


Expected result:

8

Actual result:
--
4

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



[PHP-BUG] Bug #64849 [NEW]: imagescale() ignores method parameter

2013-05-15 Thread vr...@php.net
From: vrana
Operating system: Any
PHP version:  5.5.0RC1
Package:  GD related
Bug Type: Bug
Bug description:imagescale() ignores method parameter

Description:

See https://github.com/php/php-src/blob/php-5.5.0RC1/ext/gd/gd.c#L5076.


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



[PHP-BUG] Bug #64851 [NEW]: DateTimeImmutable::createFromFormat() returns DateTime

2013-05-15 Thread vr...@php.net
From: vrana
Operating system: Any
PHP version:  5.5.0RC1
Package:  Date/time related
Bug Type: Bug
Bug description:DateTimeImmutable::createFromFormat() returns DateTime

Description:

It should return DateTimeImmutable.

Test script:
---
?php
echo get_class(DateTimeImmutable::createFromFormat('j-M-Y',
'15-Feb-2009'));
?


Expected result:

DateTimeImmutable

Actual result:
--
DateTime

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



Bug #64849 [Com]: imagescale() ignores method parameter

2013-05-15 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=64849edit=1

 ID: 64849
 Comment by: vr...@php.net
 Reported by:vr...@php.net
 Summary:imagescale() ignores method parameter
 Status: Assigned
 Type:   Bug
 Package:GD related
 Operating System:   Any
 PHP Version:5.5.0RC1
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

Hmmm, but the $method parameter isn't used, is it? We should either use it or 
kill it.


Previous Comments:

[2013-05-15 19:49:56] paj...@php.net

See http://lxr.php.net/xref/PHP_5_5/ext/gd/libgd/gd_interpolation.c#1626


[2013-05-15 19:29:56] vr...@php.net

Pierre, can you please take a look?


[2013-05-15 19:29:14] vr...@php.net

Description:

See https://github.com/php/php-src/blob/php-5.5.0RC1/ext/gd/gd.c#L5076.







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


[PHP-BUG] Bug #64852 [NEW]: Allow binding arrays in PDO

2013-05-15 Thread vr...@php.net
From: vrana
Operating system: Any
PHP version:  5.5.0RC1
Package:  PDO related
Bug Type: Bug
Bug description:Allow binding arrays in PDO

Description:

Binding arrays would be useful in these queries:

WHERE id IN ?
INSERT INTO ... VALUES ?

Most database systems don't support binding complex data structures on
server side but PDO supports client side data binding so it can expand
arrays to scalars and use them. Example:

?php
$stmt = $pdo-prepare(SELECT * FROM table WHERE id IN ?);
$stmt-execute([ array('1', '2', '3') ]);

// This will be executed with client side data binding:
// SELECT * FROM table WHERE id IN ('1', '2', '3')

// With server side data binding:
// SELECT * FROM table WHERE id IN (?, ?, ?) -- bind values: '1', '2', '3'
?

It means that with server side data binding, arrays will be expanded to
variable number of placeholders and the elements in the array will be
bound.

There is a risk that the same statement would be used with a differently
structured array or with non-array. Example:

?php
$stmt = $pdo-prepare(SELECT * FROM table WHERE id IN ?);

// Expands query to: SELECT * FROM table WHERE id IN (?, ?, ?)
$stmt-execute([ array(1, 2, 3) ]);

// This subsequent call should throw.
$stmt-execute([ array(1, 2, 3, 4) ]);

// This subsequent call should also throw.
$stmt-execute([ 1 ]);
?

This is a very rare usage and throwing an error in this case seems like a
good solution.

=== Named parameters ===

Named parameters could expand to name-key pair:

?php
$stmt = $pdo-prepare(SELECT * FROM table WHERE id IN :ids);

// Expands query to: SELECT * FROM table WHERE id IN (:ids_0, :ids_1,
:ids_2)
$stmt-execute([ 'ids' = array(1, 2, 3) ]);
?

However, there could be a collision: WHERE id = :ids_0 OR id IN :ids. PDO
could solve it by some sort of escaping - e.g. by prepending a magic string
to all array names or by prepending something else also to all non-array
names. Or it could just throw as this would be a rare and easily fixable
problem.

=== Nested arrays ===

Expanding arrays should be recursive to support these queries:

?php
$stmt = $pdo-prepare(SELECT * FROM table WHERE (type, type_id) IN ?);

// Expands to SELECT * FROM table WHERE (type, type_id) IN ((?, ?), (?,
?))
$types = array();
$types[] = array('article', 1);
$types[] = array('comment', 11);
$stmt-execute([ $types ]);
?

=== Braces or no braces ===

Array should expand to comma-delimited, braces-enclosed string. This
expansion would support queries WHERE (type, type_id) IN ?. It
unfortunately wouldn't support this query:

INSERT INTO ... VALUES (...), (...), ...

This query needs braces in inner array and no braces in outer array so
there's no consistent way to support this type of query.

=== Empty arrays ===

Empty arrays should be treated same as other arrays so they should expand
to (). INSERT INTO table () VALUES () is a valid query, at least in MySQL
(it inserts a row with all default values). This would cause a syntax error
in query WHERE id IN () but that's a good behavior as there's no way to
tell database to not match anything. WHERE id IN (NULL) would be a
solution in this particular query (as NULL doesn't equal to NULL) but
WHERE id NOT IN (NULL) wouldn't return NULL rows. So empty array must
expand to ().

=== Debugging ===

PDO should disclose a method returning the real query sent to the server.
It would be useful even without arrays, especially with client-side
binding.

=== Implementation ===

Implementation would be tricky as the statement couldn't be prepared until
it's executed. It means that PDO wouldn't talk to the database server in
prepare() even with server-side binding (this is the current behavior with
client-side binding). The query would be both prepared and executed in
execute().



-- 
Edit bug report at https://bugs.php.net/bug.php?id=64852edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64852r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64852r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=64852r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=64852r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=64852r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64852r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=64852r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=64852r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=64852r=support
Expected behavior:  https://bugs.php.net/fix.php?id=64852r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64852r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64852r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=64852r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64852r=php4
Daylight Savings:   

[PHP-BUG] Bug #64552 [NEW]: Some extensions missing from x64 Windows distribution

2013-03-30 Thread vr...@php.net
From: vrana
Operating system: Windows
PHP version:  5.5.0beta1
Package:  Windows Installer
Bug Type: Bug
Bug description:Some extensions missing from x64 Windows distribution

Description:

I've downloaded php-5.5.0beta2-Win32-VC11-x64.zip from
http://windows.php.net/qa/ and there's bunch of extensions missing compared
to x86 distributions:

php_gd2.dll
php_gettext.dll
php_oci8.dll
php_oci8_11g.dll
php_pdo_oci.dll



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



[PHP-BUG] Bug #61409 [NEW]: Bad formatting on php_info()

2012-03-15 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.4SVN-2012-03-15 (SVN)
Package:  PHP options/info functions
Bug Type: Bug
Bug description:Bad formatting on php_info()

Description:

The whole row of Registered PHP Streams (and two others) is formatted as
value. It should be formatted same as other rows.

Test script:
---
?php
php_info();


Expected result:

trtd class=eRegistered PHP Streams/tdtd class=v.../td/tr
trtd class=eRegistered Stream Socket Transports/tdtd
class=v.../td/tr
trtd class=eRegistered Stream Filters/tdtd
class=v.../td/tr


Actual result:
--
tr class=vtdRegistered PHP Streams/tdtd.../td/tr
tr class=vtdRegistered Stream Socket
Transports/tdtd.../td/tr
tr class=vtdRegistered Stream Filters/tdtd.../td/tr


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



[PHP-BUG] Bug #61378 [NEW]: php -H doesn't work

2012-03-13 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.4.0
Package:  CGI/CLI related
Bug Type: Bug
Bug description:php -H doesn't work

Description:

`php -H` or `php --hide-args` should hide passed arguments from the running
script but it does nothing. I've tried it on Windows and Linux.

I think that this feature can be safely removed because it doesn't work for
ages (at least since PHP 5.2.10 but probably longer) and I see only a
little value in it. It is also the only undocumented option at
http://php.net/features.commandline.options


Test script:
---
php -H argv.php a b

argv.php:
?php
print_r($argv);
?


Expected result:

Array
(
)


Actual result:
--
Array
(
[0] = argv.php
[1] = a
[2] = b
)


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



Bug #61378 [PATCH]: php -H doesn't work

2012-03-13 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=61378edit=1

 ID: 61378
 Patch added by: vr...@php.net
 Reported by:vr...@php.net
 Summary:php -H doesn't work
 Status: Open
 Type:   Bug
 Package:CGI/CLI related
 Operating System:   Irrelevant
 PHP Version:5.4.0
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: hide-args.patch
Revision:   1331667921
URL:
https://bugs.php.net/patch-display.php?bug=61378patch=hide-args.patchrevision=1331667921


Previous Comments:

[2012-03-13 19:44:54] vr...@php.net

Description:

`php -H` or `php --hide-args` should hide passed arguments from the running 
script but it does nothing. I've tried it on Windows and Linux.

I think that this feature can be safely removed because it doesn't work for 
ages (at least since PHP 5.2.10 but probably longer) and I see only a little 
value in it. It is also the only undocumented option at 
http://php.net/features.commandline.options


Test script:
---
php -H argv.php a b

argv.php:
?php
print_r($argv);
?


Expected result:

Array
(
)


Actual result:
--
Array
(
[0] = argv.php
[1] = a
[2] = b
)







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


[PHP-BUG] Bug #61173 [NEW]: Unable to detect error from finfo constructor

2012-02-23 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.4.0RC8
Package:  Filesystem function related
Bug Type: Bug
Bug description:Unable to detect error from finfo constructor

Description:

There is currently no way to detect error in finfo::__construct() other
than defining own set_error_handler(). It should throw an exception in case
of an error.

new finfo() always creates the object but this object is unusable if
constructor doesn't succeed.

Test script:
---
$finfo = null;
try {
$finfo = new finfo(1, '', false);
} catch (Exception $e) {
echo Error creating finfo.\n;
}
var_dump($finfo);


Expected result:

Error creating finfo.
NULL


Actual result:
--
object(finfo)#1 (0) {
}


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



[PHP-BUG] Bug #61116 [NEW]: HTML functions use encoding, not charset

2012-02-16 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  trunk-SVN-2012-02-16 (SVN)
Package:  Strings related
Bug Type: Bug
Bug description:HTML functions use encoding, not charset

Description:

HTML functions use encoding, not charset.

E.g. ISO-8859-1 is both character set and encoding but UTF-8 is encoding of
Unicode character set.

There's also missing arg_info in get_html_translation_table().

I've already fixed Manual.


Test script:
---
Reflection::export(new ReflectionFunction('htmlspecialchars'));
Reflection::export(new ReflectionFunction('get_html_translation_table'));


Expected result:

Function [ internal:standard function htmlspecialchars ] {

  - Parameters [4] {
Parameter #0 [ required $string ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $encoding ]
Parameter #3 [ optional $double_encode ]
  }
}

Function [ internal:standard function get_html_translation_table ] {

  - Parameters [2] {
Parameter #0 [ optional $table ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $encoding ]
  }
}



Actual result:
--
Function [ internal:standard function htmlspecialchars ] {

  - Parameters [4] {
Parameter #0 [ required $string ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $charset ]
Parameter #3 [ optional $double_encode ]
  }
}

Function [ internal:standard function get_html_translation_table ] {

  - Parameters [2] {
Parameter #0 [ optional $table ]
Parameter #1 [ optional $quote_style ]
  }
}



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



Bug #61116 [PATCH]: HTML functions use encoding, not charset

2012-02-16 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=61116edit=1

 ID: 61116
 Patch added by: vr...@php.net
 Reported by:vr...@php.net
 Summary:HTML functions use encoding, not charset
 Status: Open
 Type:   Bug
 Package:Strings related
 Operating System:   Irrelevant
 PHP Version:trunk-SVN-2012-02-16 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: php-src
Revision:   1329436461
URL:
https://bugs.php.net/patch-display.php?bug=61116patch=php-srcrevision=1329436461


Previous Comments:

[2012-02-16 23:54:14] vr...@php.net

Description:

HTML functions use encoding, not charset.

E.g. ISO-8859-1 is both character set and encoding but UTF-8 is encoding of 
Unicode character set.

There's also missing arg_info in get_html_translation_table().

I've already fixed Manual.


Test script:
---
Reflection::export(new ReflectionFunction('htmlspecialchars'));
Reflection::export(new ReflectionFunction('get_html_translation_table'));


Expected result:

Function [ internal:standard function htmlspecialchars ] {

  - Parameters [4] {
Parameter #0 [ required $string ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $encoding ]
Parameter #3 [ optional $double_encode ]
  }
}

Function [ internal:standard function get_html_translation_table ] {

  - Parameters [2] {
Parameter #0 [ optional $table ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $encoding ]
  }
}



Actual result:
--
Function [ internal:standard function htmlspecialchars ] {

  - Parameters [4] {
Parameter #0 [ required $string ]
Parameter #1 [ optional $quote_style ]
Parameter #2 [ optional $charset ]
Parameter #3 [ optional $double_encode ]
  }
}

Function [ internal:standard function get_html_translation_table ] {

  - Parameters [2] {
Parameter #0 [ optional $table ]
Parameter #1 [ optional $quote_style ]
  }
}








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


Bug #55056 [Com]: missing php_gd2.dll in windows.php.net builds

2012-02-03 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=55056edit=1

 ID: 55056
 Comment by: vr...@php.net
 Reported by:giorgio dot liscio at email dot it
 Summary:missing php_gd2.dll in windows.php.net builds
 Status: Re-Opened
 Type:   Bug
 Package:*General Issues
 Operating System:   windows
 PHP Version:5.4.0RC7
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

But it is present in php-5.4-nts-windows-vc9-x86-r323040.zip again. Just please 
make sure that it will be in a final version :-).


Previous Comments:

[2012-02-03 22:55:00] vr...@php.net

The file is missing in php-5.4.0RC7-nts-Win32-VC9-x86.zip.


[2011-06-28 18:59:54] paj...@php.net

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Fixed, there was a bug in the scripts. Snaps and alpha1 should have the missing 
exts now.


[2011-06-28 17:37:31] giorgio dot liscio at email dot it

Description:

hi, php_gd2.dll is missing in the windows snaps of 5.4 and trunk (vc9 ts)

http://windows.php.net/downloads/snaps/php-5.4/

if you download any of this you will not find the php_gd2.dll

thanks in advance







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


[PHP-BUG] Bug #60732 [NEW]: php_error_docref links to invalid pages

2012-01-12 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.4SVN-2012-01-12 (SVN)
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:php_error_docref links to invalid pages

Description:

Links to PHP Manual generated in case of an error are wrong if the function
or method begins by __.

Test script:
---
try {
new DateTimeZone(x);
} catch (Exception $e) {
echo $e-getMessage();
}


Expected result:

DateTimeZone::__construct() [datetimezone.construct.php]: Unknown or bad
timezone (x)

Actual result:
--
DateTimeZone::__construct() [datetimezone.--construct.php]: Unknown or bad
timezone (x)

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



Bug #60732 [PATCH]: php_error_docref links to invalid pages

2012-01-12 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=60732edit=1

 ID: 60732
 Patch added by: vr...@php.net
 Reported by:vr...@php.net
 Summary:php_error_docref links to invalid pages
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Irrelevant
 PHP Version:5.4SVN-2012-01-12 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: php_error_docref-strip-leading-dashes
Revision:   1326388963
URL:
https://bugs.php.net/patch-display.php?bug=60732patch=php_error_docref-strip-leading-dashesrevision=1326388963


Previous Comments:

[2012-01-12 17:18:05] vr...@php.net

Description:

Links to PHP Manual generated in case of an error are wrong if the function or 
method begins by __.

Test script:
---
try {
new DateTimeZone(x);
} catch (Exception $e) {
echo $e-getMessage();
}


Expected result:

DateTimeZone::__construct() [datetimezone.construct.php]: Unknown or bad 
timezone (x)

Actual result:
--
DateTimeZone::__construct() [datetimezone.--construct.php]: Unknown or bad 
timezone (x)






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


[PHP-BUG] Bug #60707 [NEW]: max_input_vars allows one extra var

2012-01-10 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.3.9
Package:  Variables related
Bug Type: Bug
Bug description:max_input_vars allows one extra var

Description:

Setting max_input_vars to N allows N+1 variables.

Test script:
---
form action= method=post
?php
$max_input_vars = ini_get('max_input_vars');
for ($i=0; $i  $max_input_vars + 2; $i++) {
echo input type='hidden' name='a$i' value='$i'\n;
}
var_dump($max_input_vars);
var_dump(count($_POST));
?
input type=submit
/form


Expected result:

string(4) 1000
int(1000)


Actual result:
--
string(4) 1000
int(1001)


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



[PHP-BUG] Bug #60668 [NEW]: Setting user_agent can send other headers

2012-01-06 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.4.0RC5
Package:  HTTP related
Bug Type: Bug
Bug description:Setting user_agent can send other headers

Description:

Setting 'user_agent' INI value to a string containing a newline causes
sending a new header. This behavior is even documented:
http://php.net/wrappers.http#wrappers.http.example.custom.headers

It is wrong for two reasons:

1. 'user_agent' INI setting should be used only for setting a User-Agent
header and not for anything else.

2. It is a potential security risk (header injection) similar to the one
fixed in PHP 5.1.2 (but with low impact).

(See also bug #52979 but I believe that I am providing a better reasoning.)

Test script:
---
?php
$_POST['user_agent'] = Robot\r\nX-Command: delete-all;
ini_set('user_agent', $_POST['user_agent']);
readfile('http://private/service.php');
?


Expected result:

Sending just a User-Agent header, not X-Command header.

Actual result:
--
Sending User-Agent and X-Command headers.

If http://private/service.php accepts connections only from trusted sources
and parses its commands from headers then it will execute the malicious
action.

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



[PHP-BUG] Bug #60639 [NEW]: ReflectionFunction::IS_DEPRECATED is not used anywhere

2012-01-02 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  trunk-SVN-2012-01-03 (SVN)
Package:  Reflection related
Bug Type: Bug
Bug description:ReflectionFunction::IS_DEPRECATED is not used anywhere

Description:

The ReflectionFunction class defines a constant IS_DEPRECATED which is not
used anywhere. There is a method ReflectionFunction::isDeprecated() but it
doesn't use this constant.



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



[PHP-BUG] Bug #60468 [NEW]: Output is not discarded when ob_start() callback returns

2011-12-08 Thread vr...@php.net
From: vrana
Operating system: Windows
PHP version:  5.4.0RC2
Package:  Output Control
Bug Type: Bug
Bug description:Output is not discarded when ob_start() callback returns 

Description:

If ob_start() callback returns an empty string then nothing should be
printed. This is the current behavior in PHP 5.3. Behavior in PHP 5.4 is
different - if a callback returns an empty string then the result is same
as if it wouldn't be called at all - next call is prepended by last call
value.

So there is no way for callback how to discard the output.


Test script:
---
ob_start(function ($s) {
fwrite(STDERR, strlen($s) . \n);
if ($s == b\n) {
return $s;
}
return ;
}, 2);
echo a\n;
echo b\n;
exit;


Expected result:

2
2
b
0


Actual result:
--
2
4
4


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



[PHP-BUG] Bug #60369 [NEW]: Crash with static property in trait

2011-11-23 Thread vr...@php.net
From: vrana
Operating system: Windows 7
PHP version:  5.4.0RC1
Package:  Class/Object related
Bug Type: Bug
Bug description:Crash with static property in trait

Description:

PHP crashes when there is a static property defined in a trait plus there
is a normal property of the same name in a class using this trait.

Test script:
---
?php
trait PropertiesTrait {
static $same = true;
}

class Properties {
use PropertiesTrait;
public $same = true;
}
?


Expected result:

Exit code: 0

Actual result:
--
Exit code: -1073741819

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



Bug #60369 [Com]: Crash with static property in trait

2011-11-23 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=60369edit=1

 ID: 60369
 Comment by: vr...@php.net
 Reported by:vr...@php.net
 Summary:Crash with static property in trait
 Status: Verified
 Type:   Bug
 Package:Class/Object related
 Operating System:   Windows 7
 PHP Version:5.4.0RC1
 Assigned To:gron
 Block user comment: N
 Private report: N

 New Comment:

Backtrace:

Entry point   php!mainCRTStartup 
Create time   11/23/2011 12:31:14 PM 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.0 

Function Arg 1 Arg 2 Arg 3   Source 
ntdll!ZwRaiseException+12 009ce3c4 009ce414 
ntdll!KiUserExceptionDispatcher+2a 0023 009cfb08 002b
php5!_php_import_environment_variables+39f 0023 009cfb08 
002b
php5!_php_import_environment_variables+39f   


PHP5!ZEND_DO_BEGIN_CATCH+244In 
php__PID__8020__Date__11_23_2011__Time_12_31_24PM__22__Second_Chance_Exception_C005.dmp
 the assembly instruction at php5!zend_do_begin_catch+244 in C:\Program Files 
(x86)\PHP 5.4\php5.dll from The PHP Group has caused an access violation 
exception (0xC005) when trying to read from memory location 0x on 
thread 0


Previous Comments:

[2011-11-23 20:35:18] vr...@php.net

Description:

PHP crashes when there is a static property defined in a trait plus there is a 
normal property of the same name in a class using this trait.

Test script:
---
?php
trait PropertiesTrait {
static $same = true;
}

class Properties {
use PropertiesTrait;
public $same = true;
}
?


Expected result:

Exit code: 0

Actual result:
--
Exit code: -1073741819






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


[PHP-BUG] Bug #55101 [NEW]: Functions symlink() and readlink() are missing on Windows Vista

2011-07-01 Thread vr...@php.net
From: 
Operating system: Windows XP
PHP version:  5.4.0alpha1
Package:  Reflection related
Bug Type: Bug
Bug description:Functions symlink() and readlink() are missing on Windows  
Vista

Description:

These two functions are available on Windows = Vista since PHP 5.3.0. The
problem is that reflection have some pointers on them even in Windows 
Vista (e.g. XP) where they are not available.


Test script:
---
?php
$r = new ReflectionExtension(standard);
$r-getFunctions();
?


Expected result:

bool(false)


Actual result:
--
bool(false)

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find
extension function readlink in global function table

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find
extension function symlink in global function table


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



Bug #55101 [Opn]: Functions symlink() and readlink() are missing on Windows Vista

2011-07-01 Thread vr...@php.net
Edit report at https://bugs.php.net/bug.php?id=55101edit=1

 ID: 55101
 User updated by:vr...@php.net
 Reported by:vr...@php.net
 Summary:Functions symlink() and readlink() are missing on
 Windows  Vista
 Status: Open
 Type:   Bug
 Package:Reflection related
 Operating System:   Windows XP
 PHP Version:5.4.0alpha1
 Block user comment: N
 Private report: N

 New Comment:

The first line of Test script should be:

var_dump(function_exists('readlink'));

It outputs bool(false) mentioned in the result.


Previous Comments:

[2011-07-01 08:51:51] vr...@php.net

Description:

These two functions are available on Windows = Vista since PHP 5.3.0. The 
problem is that reflection have some pointers on them even in Windows  Vista 
(e.g. XP) where they are not available.


Test script:
---
?php
$r = new ReflectionExtension(standard);
$r-getFunctions();
?


Expected result:

bool(false)


Actual result:
--
bool(false)

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find 
extension function readlink in global function table

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find 
extension function symlink in global function table







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


[PHP-BUG] Bug #55085 [NEW]: Undocumented BC break with changing __construct() signature

2011-06-30 Thread vr...@php.net
From: 
Operating system: Irrelevant
PHP version:  5.4.0alpha1
Package:  Class/Object related
Bug Type: Bug
Bug description:Undocumented BC break with changing __construct() signature

Description:

PHP 5.* allows changing an abstract __construct() signature without any
notice. PHP 5.4 issues fatal error.

I didn't find this BC break in news.txt so I think that it is a bug.


Test script:
---
?php
abstract class P {
abstract function __construct();
}
class C extends P {
function __construct($a) {
}
}
?


Expected result:

Nothing - same as in PHP 5.*.

The strange thing is that if we replace abstract function __construct();
by function __construct() {} then the behavior is same as in previous
versions.

Actual result:
--
Fatal error: Declaration of C::__construct() must be compatible with that
of P::__construct()


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



[PHP-BUG] Bug #55084 [NEW]: Function registered by header_register_callback is called only once per process

2011-06-30 Thread vr...@php.net
From: 
Operating system: Windows
PHP version:  5.4.0alpha1
Package:  HTTP related
Bug Type: Bug
Bug description:Function registered by header_register_callback is called only 
once per process

Description:

I use Apache 2.2.19. Function registered by header_register_callback() is
called only after the server restart.

Test script:
---
?php
header_register_callback(function () {
echo OK;
});
?


Expected result:

OK each time the script is run.

Actual result:
--
OK only for the first time, nothing in the next runs.

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



[PHP-BUG] Req #52390 [NEW]: mysqli_report() should be per-request setting

2010-07-21 Thread vr...@php.net
From: vrana
Operating system: Irrelevant
PHP version:  5.3.2
Package:  MySQLi related
Bug Type: Feature/Change Request
Bug description:mysqli_report() should be per-request setting

Description:

The report_mode variable set by mysqli_report() should be initialized in
request init instead of global init to achieve a consistent behavior.

Test script:
---
?php

$mysqli = mysqli_connect();

mysqli_query($mysqli, SEL);

?



Expected result:

No error message or exception.

Actual result:
--
Nothing, error message or exception depending on mysqli_report() set by
previous request in the same process.

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



[PHP-BUG] Bug #52120 [NEW]: Unable to call inherited protected __construct

2010-06-18 Thread vr...@php.net
From: vrana
Operating system: *
PHP version:  5.3.2
Package:  Class/Object related
Bug Type: Bug
Bug description:Unable to call inherited protected __construct

Description:

Protected visibility allows accessing parent members and also members of
parent's children. If class A defines protected method f() and classes B
and C are children of A then B can call C::f(). This is true for all
methods except __construct().

Test script:
---
class A {

protected function __construct() {

}

}



class B extends A {

static function test() {

new C;

}

}



class C extends A {

protected function __construct() {

echo OK\n;

}

}



B::test();



Expected result:

OK

Actual result:
--
Fatal error: Call to protected C::__construct() from context 'B' on line 9

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



[PHP-BUG] Bug #51690 [NEW]: Phar::setStub looks for case-sensitive __HALT_COMPILER()

2010-04-28 Thread vr...@php.net
From: vrana
Operating system: Any
PHP version:  5.3.2
Package:  PHAR related
Bug Type: Bug
Bug description:Phar::setStub looks for case-sensitive __HALT_COMPILER()

Description:

Functions in PHP are case-insensitive. This is valid also for
__HALT_COMPILER(). Phar::setStub however looks for case-sensitive variant.

Test script:
---
$phar = new Phar(resource.phar);

try {

$phar-setStub(?php __halt_compiler(););

} catch (Exception $e) {

echo get_class($e) . :  . $e-getMessage() . \n;

}



Expected result:

Nothing

Actual result:
--
PharException: illegal stub for phar C:/Download/resource.phar



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



[PHP-BUG] Bug #51615 [NEW]: PHP crash with wrong HTML in SimpleXML

2010-04-20 Thread vr...@php.net
From: vrana
Operating system: Windows XP
PHP version:  5.3.2
Package:  SimpleXML related
Bug Type: Bug
Bug description:PHP crash with wrong HTML in SimpleXML

Description:

It is possible to load incorrect HTML by DOM and import it to
simplexml_import_dom().



Under certain circumstances, PHP crashes after attempt of working with this
HTML.

Test script:
---
?php

$dom = new DOMDocument;

$dom-loadHTML('span title=yx/span');

$html = simplexml_import_dom($dom);

echo ($html-body-span ? $html-body-span : '');

?



Expected result:

x

Actual result:
--
Thread 0 - System ID 5696

Entry point   php!mainCRTStartup 

Create time   20.4. 13:24:02 

Time spent in user mode   0 Days 0:0:0.437 

Time spent in kernel mode   0 Days 0:0:0.140 



Function Arg 1 Arg 2 Arg 3   Source 

php5ts!_estrdup+d  01cbd968 

php5ts!sxe_get_prop_hash+1b8 011d0c78 011d0a60 00372740

php5ts!sxe_object_cast+36 011d08b0 00c0fb94 0003

php5ts!ZEND_JMPZ_SPEC_VAR_HANDLER+12f 00c0fc0c 00372740
00c0fea8

php5ts!execute+2fe 01200080 00372700 

php5ts!zend_execute_scripts+f6 0008 00372740 

php5ts!php_execute_script+245 00c0fea8 00372740 

php!main+bf1 0002 003726d0 00372cd0

php!mainCRTStartup+e3   7ffdf000

kernel32!BaseProcessStart+23 00402d78  



PHP5TS!_ESTRDUP+DIn
php__PID__5476__Date__04_20_2010__Time_01_24_03PM__267__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!_estrdup+d in C:\Program
Files\PHP\php5ts.dll from The PHP Group has caused an access violation
exception (0xC005) when trying to read from memory location 0x
on thread 0

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



#49566 [NEW]: addcslashes() requires strictly binary string

2009-09-15 Thread vr...@php.net
From: vr...@php.net
Operating system: Irrelevant
PHP version:  6SVN-2009-09-15 (snap)
PHP Bug Type: Strings related
Bug description:  addcslashes() requires strictly binary string

Description:

addcslashes() should allow Unicode string in both parameters.

I use addcslashes() to escape Unicode string, for example to escape % and
_ characters for SQL LIKE operator.

Reproduce code:
---
addcslashes(abc, %_);


Expected result:

abc

Actual result:
--
Warning: addcslashes() expects parameter 1 to be strictly a binary string,
Unicode string given


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



#49442 [NEW]: Some queries crash PHP with mysqli_real_connect()

2009-09-02 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.3.0
PHP Bug Type: MySQLi related
Bug description:  Some queries crash PHP with mysqli_real_connect()

Description:

LOAD DATA LOCAL INFILE query together with connecting by
mysqli_real_connect() causes PHP crash. Maybe it is not the single crashing
query but common queries like SELECT or INSERT work.

When I replace mysqli_init() + mysqli_real_connect() by mysqli_connect()
then everything works (no crash).

Reproduce code:
---
?php
$dbh = mysqli_init();
$dbh-real_connect(, ODBC, , cds);
$dbh-query(LOAD DATA LOCAL INFILE 'songs.csv' INTO TABLE songs);
?


Expected result:

Query executed OK.

Actual result:
--
PHP crashes.

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



#48314 [NEW]: PDO_MySQL doesn't use prepared statements

2009-05-18 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.2.9
PHP Bug Type: PDO related
Bug description:  PDO_MySQL doesn't use prepared statements

Description:

It seems that PDO_MySQL doesn't use prepared statements even with disabled
PDO::MYSQL_ATTR_DIRECT_QUERY. If the prepared statements would by used then
the binary data passed in the example wouldn't cause a parse error.

MySQL version: 5.1.26

Reproduce code:
---
?php
$pdo = new PDO(mysql:host=localhost, ODBC, );
$pdo-setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
$pdo-exec(SET NAMES gbk);
$stmt = $pdo-prepare(SELECT ?);
$stmt-execute(array(chr(0xbf) . chr(0x27)));
print_r($stmt-errorInfo());
?


Expected result:

Array
(
[0] = 0
)


Actual result:
--
Array
(
[0] = 42000
[1] = 1064
[2] = You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
''¿\''' at line 1
)


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



#47689 [NEW]: Apache crash with certain regular expression

2009-03-17 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.2.9
PHP Bug Type: PCRE related
Bug description:  Apache crash with certain regular expression

Description:

Apache 2.2.11 crashes with PHP 5.2.9-1 on the following code. The same
script run from CLI executes without crash.

Reproduce code:
---
?php
$contents = '/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * License); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */';
// shortest possible example, omitting last line causes no crash

$contents = preg_replace('@/\\*(?:.|[\\n\\r])*?\\*/@', '', $contents);
?


Expected result:

Empty string in $contents.

Actual result:
--
Apache crash.

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



#47089 [Fbk-Csd]: Shebang is printed under Windows

2009-01-19 Thread vr...@php.net
 ID:   47089
 User updated by:  vr...@php.net
 Reported By:  vr...@php.net
-Status:   Feedback
+Status:   Closed
 Bug Type: CGI related
 Operating System: win32 only
 PHP Version:  5.3.0alpha4-dev
 Assigned To:  pajoye
 New Comment:

Works as expected, thanks.


Previous Comments:


[2009-01-19 00:01:09] paj...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Works with all 5.3.0 snaps, VC9VC6 TS and NTS:

C:\Users\..\php53snapphp \php-sdk\php53\vc9\x86\PHP_5_3\shebang.php
5.3.0alpha4-dev

Can you try again using a recent snapshot please?





[2009-01-14 20:04:56] paj...@php.net

I have to check (assigned to me +)



[2009-01-14 19:31:44] il...@php.net

Pierre,

Is there a problem with mmap() on windows where it ignores the start 
offset?



[2009-01-14 09:19:47] vr...@php.net

php.exe in Windows distribution is CLI. ?php echo PHP_SAPI; ? prints
cli.



[2009-01-13 18:18:12] il...@php.net

What SAPI are you using?



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/47089

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



#47089 [Opn]: Shebang is printed under Windows

2009-01-14 Thread vr...@php.net
 ID:   47089
 User updated by:  vr...@php.net
 Reported By:  vr...@php.net
 Status:   Open
 Bug Type: CGI related
 Operating System: win32 only
 PHP Version:  5.3.0alpha4-dev
 New Comment:

php.exe in Windows distribution is CLI. ?php echo PHP_SAPI; ? prints
cli.


Previous Comments:


[2009-01-13 18:18:12] il...@php.net

What SAPI are you using?



[2009-01-13 12:44:46] vr...@php.net

Description:

The shebang line (e.g. #!/usr/bin/php) is printed in PHP
5.3.0alpha4-dev by php.exe while it was not printed in earlier versions
(e.g. PHP 5.2.8).

This is a backwards incompatible change which brings platform
difference.

Reproduce code:
---
#!/usr/bin/php
?php
echo PHP_VERSION;
?


Expected result:

5.3.0alpha4-dev

Actual result:
--
#!/usr/bin/php
5.3.0alpha4-dev





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



#47085 [NEW]: rename() returns true even if the file in PHAR does not exist

2009-01-13 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.3.0alpha3
PHP Bug Type: PHAR related
Bug description:  rename() returns true even if the file in PHAR does not exist

Description:

rename() returns true with phar:// stream wrapper even if the oldfile
doesn't exist.

Reproduce code:
---
?php
rename(phar://a.phar/x, phar://a.phar/y);
var_dump(rename(phar://a.phar/x, phar://a.phar/y));
?


Expected result:

bool(false) and some warning

Actual result:
--
bool(true)

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



#47087 [NEW]: Second parameter of mssql_fetch_array() is ignored

2009-01-13 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.3.0alpha3
PHP Bug Type: MSSQL related
Bug description:  Second parameter of mssql_fetch_array() is ignored

Description:

It seems that the result_type parameter of mssql_fetch_array() is always
set to MSSQL_BOTH.

Reproduce code:
---
?php
print_r(mssql_fetch_array($result, MSSQL_ASSOC));
?


Expected result:

Array
(
[id] = 1
)


Actual result:
--
Array
(
[0] = 1
[id] = 1
)


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



#47089 [NEW]: Shebang is printed under Windows

2009-01-13 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.3.0alpha4-dev
PHP Bug Type: CGI related
Bug description:  Shebang is printed under Windows

Description:

The shebang line (e.g. #!/usr/bin/php) is printed in PHP 5.3.0alpha4-dev
by php.exe while it was not printed in earlier versions (e.g. PHP 5.2.8).

This is a backwards incompatible change which brings platform difference.

Reproduce code:
---
#!/usr/bin/php
?php
echo PHP_VERSION;
?


Expected result:

5.3.0alpha4-dev

Actual result:
--
#!/usr/bin/php
5.3.0alpha4-dev

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



#47050 [NEW]: mysqli_poll() modifies improper variables

2009-01-09 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.3.0alpha3
PHP Bug Type: MySQLi related
Bug description:  mysqli_poll() modifies improper variables

Description:

mysqli_poll() modifies the variable which was assigned to variables passed
to mysqli_poll().

The reason probably is that mysqli_poll() doesn't copy zvals on write as
it should.

Reproduce code:
---
?php
$link1 = mysqli_connect();
$link1-query(SELECT 'test', MYSQLI_ASYNC);
$all_links = array($link1);
$links = $errors = $reject = $all_links;
mysqli_poll($links, $errors, $reject, 1);
print_r($all_links);


Expected result:

Array
(
[0] = mysqli Object
)

Actual result:
--
Array
(
)


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



#46759 [NEW]: magic_quotes_gpc doesn't work

2008-12-05 Thread vr...@php.net
From: [EMAIL PROTECTED]
Operating system: Windows
PHP version:  5.2.7
PHP Bug Type: Variables related
Bug description:  magic_quotes_gpc doesn't work

Description:

magic_quotes_gpc doesn't escape $_GET, $_POST, $_COOKIE and $_REQUEST
variables. It worked with the same configuration under 5.2.6.

I have magic_quotes_gpc set in php.ini.

Reproduce code:
---
URL: ?q='

?php
var_dump(PHP_VERSION);
var_dump(get_magic_quotes_gpc());
var_dump($_GET[q]);


Expected result:

string(5) 5.2.7
int(1)
string(2) \'


Actual result:
--
string(5) 5.2.7
int(1)
string(2) '


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