#47297 [Opn]: pdo_033.phpt fails on PgSQL

2009-02-03 Thread matteo at beccati dot com
 ID:   47297
 User updated by:  matteo at beccati dot com
 Reported By:  matteo at beccati dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Any
 PHP Version:  5.3.0beta1
 New Comment:

Here's a patch:
http://www.beccati.com/misc/pdo_pgsql_bug47297_php_5.3.patch


Previous Comments:


[2009-02-04 07:24:58] matteo at beccati dot com

Description:

The common test pdo_033.phpt fails on PgSQL because it's using a
char(100) field, which will be right padded with spaces once retrieved,
even though the actual output doesn't show that.

Using a char field with the correct size fixes the issue, while surely
remaining compatible with other database type.

Reproduce code:
---
php -n run-tests.php --show-diff ext/pdo_pgsql/tests/common.phpt

Expected result:

PASS Postgres PDO Common: PDO::quote()
[ext/pdo_pgsql/tests/pdo_033.phpt]


Actual result:
--
TEST 49/55 [ext/pdo/tests/pdo_033.phpt]
DIFF
005+ [t] => 
!"#$%&'()*+,-./0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

005- [t] => 
!"#$%&'()*+,-./0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

DONE
FAIL Postgres PDO Common: PDO::quote()
[ext/pdo_pgsql/tests/pdo_033.phpt]






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



#47297 [NEW]: pdo_033.phpt fails on PgSQL

2009-02-03 Thread matteo at beccati dot com
From: matteo at beccati dot com
Operating system: Any
PHP version:  5.3.0beta1
PHP Bug Type: PDO related
Bug description:  pdo_033.phpt fails on PgSQL

Description:

The common test pdo_033.phpt fails on PgSQL because it's using a char(100)
field, which will be right padded with spaces once retrieved, even though
the actual output doesn't show that.

Using a char field with the correct size fixes the issue, while surely
remaining compatible with other database type.

Reproduce code:
---
php -n run-tests.php --show-diff ext/pdo_pgsql/tests/common.phpt

Expected result:

PASS Postgres PDO Common: PDO::quote() [ext/pdo_pgsql/tests/pdo_033.phpt]


Actual result:
--
TEST 49/55 [ext/pdo/tests/pdo_033.phpt]
DIFF
005+ [t] => 
!"#$%&'()*+,-./0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

005- [t] => 
!"#$%&'()*+,-./0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

DONE
FAIL Postgres PDO Common: PDO::quote() [ext/pdo_pgsql/tests/pdo_033.phpt]


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



#18590 [Com]: Fatal error: Cannot redeclare upon reload

2009-02-03 Thread greg at pwsdb dot com
 ID:   18590
 Comment by:   greg at pwsdb dot com
 Reported By:  armageddon at raydan dot de
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: WinXP Pro
 PHP Version:  5.0.0-dev
 New Comment:

PPS
no, it is not working in the login page now, either.
Same experience as the others above?:  
"First it works, then it doesn't."


Previous Comments:


[2009-02-04 03:46:35] greg at pwsdb dot com

PS
This only happened within a checkout page of ZenCart ("part 3 of 3")  
and not another (not the login page) ... I don't know enough about zc
to know what the significant difference is.



[2009-02-04 02:59:23] greg at pwsdb dot com

this experience/test may help:

I defined a function (fff) in the top of my pgm. (not in a loop)
it spanned from line 5 to 11 and used it in the code below.  
I got this error msg:


Fatal error: Cannot redeclare fff() (previously declared in 
/.../xxx.php:5) in 
/.../xxx.php on line 11


I then removed it to an external file (xx-functions.php) and did a 
"require_once() for xxx-functions.php on line 6  and got these 2 
error messages where there should have only been one. 
IT WAS TRYING TO LOAD THE FUNCTION(PGM) TWICE: 


Warning: require_once(xxx-functions.php) [function.require-once]: 
failed to open stream: No such file or directory in 
/.../xxx.php on line 6

Fatal error: require_once() [function.require]: Failed opening required

'xxx-functions.php' (include_path='.:/usr/share/pear') in 
/.../xxx.php on line 6



[2008-05-30 13:48:47] mark dot php dot net dot special at emceesoftware
dot com

As a followup to my last comment, the way this "error" is being
reported proved a little confusing, and my warrant some minor research
in order to help make it a bit easier to identify when it happens.

My error log reports the following (abbreviated):

PHP Fatal error:  Cannot redeclare simplehtml_rendercontent()
(previously declared in SimpleHTML.php:149) in SimpleHTML.php on line
152

Noteworthy is the fact that the RenderContent() method is declared on
line 149.  The closing brace for the method is on line 152.

It was this difference in line numbers that proved the most confusing. 
If they both reported out at line 149, I suspect I would have more
quickly determined that I was seeing a reload problem of some sort.

Also, if after adjusting the line number being reported, it is
determined that they are identical, it might be helpful to post an
additional line in the error log which suggests the developer look at
replacing an include() with include_once() or require() with
require_once().

With that bit of reporting, I suspect most folks who get bit with this
type of issue will be able to resolve it more quickly (whether
dynamically as I've done, or at the top of a PHP file).



[2008-05-30 12:43:13] mark dot php dot net dot special at emceesoftware
dot com

PHP 5.2.4 (Build date 30 Aug 2007)

I experience this error while using a technique for dispatching method
calls dynamically.

On receipt of an XML packet, an API method determines the php module
(source file) that needs to be loaded to process the XML file.

Next, the method name is loaded into a variable, and the source file is
included.

Finally, the variable is used to call the method.

I've been successfully testing this approach for some time, and am
confused as to why it has started "now".

Code sample (abbreviated):

$moduleName = ... (extracted from XML structure)
$methodName = ... (derived from another parameter)
$sourceFile = $_SERVER["DOCUMENT_ROOT"].'/path/'.$moduleName.'.php';
include( $sourceFile );
$dynamicMethod = $moduleName.'_'.$methodName;
$dynamicMethod();  // attempt the call

My theory is that this code is being called multiple times with the
same value for $moduleName, causing the include() method to attempt to
load it multiple times.  While this doesn't seem to be an issue when
using the static 'include_once' declaration, it appears to be an issue
when loading dynamically.

When changing the above code to use include_once(), the problem seems
(so far) to have gone away.



[2007-09-03 13:52:58] info at rchu dot nl

update: adding a space to the source results in the same 'cannot
redeclare' error. Only changing the function name resolves the problem
at the fist run. Must be some kind of caching problem I suppose. When
running the script on the command line there is no problem, just when I
request in in my browser. I run the pre-installed apache1.3 on Mac OS X
10.4.10 and used the --with-apache-hooks option on compiling because I
do not have the apache.h source file (since I haven't compiled apac

#44597 [Com]: Postgres driver does not prepare booleans correctly

2009-02-03 Thread kenaniah at gmail dot com
 ID:   44597
 Comment by:   kenaniah at gmail dot com
 Reported By:  kenaniah at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Red Hat 4.1.1
 PHP Version:  5.2.5
 New Comment:

This issue seems like it would be a very easy fix and can be reproduced
without fail, regardless of server environment or PHP version. 

A fix would be greatly appreciated


Previous Comments:


[2008-10-07 19:23:48] dac514 at hotmail dot com

This is happening to me too, OS X and CentOS, PHP 5.2.6

I am converting a web application from MySql to PostgreSQL and i've 
run into a roadbloack that is forcing me to find every single boolean 
query and manually binding it instead of benefiting from execute() 
$input_parameters. PITA! I discovered the explanation to this "bug" 
here:

http://ca.php.net/manual/en/pdostatement.execute.php#84990

As of 5.2.6 you still can't use PDOStatement->execute() 
$input_parameters to pass a boolean to PostgreSQL. To do that, you'll 
have to call bindParam() with explicit types for *each* parameter in 
the query.

Pseudo example, where col5 is of type boolean (i.e. tinyint(1) in 
MySQL)

$q = 'INSERT INTO table (col1, col2, col3, col4, col5, col6) VALUES (?
, ?, ?, ?, ?, ?)';
$v = array('foo1', 'foo2', 'foo3', foo4', false, 'foo6');
$st = $db->prepare($q);
$st->execute($v);

PostgreSQL complains and the script dies. Leaving me in the cold and I

have to rewrite the code, which becomes excessively painful when the 
queries are dynamically generated. PostgreSQL workaround, boo!

$q = 'INSERT INTO table (col1, col2, col3, col4, col5, col6) VALUES (?
, ?, ?, ?, ?, ?)';
$v = array('foo1', 'foo2', 'foo3', foo4', false, 'foo6');
$st = $db->prepare($q);
$st->bindParam(1, $v[0]], PDO::PARAM_STR);
$st->bindParam(2, $v[1]], PDO::PARAM_STR);
$st->bindParam(3, $v[2]], PDO::PARAM_STR);
$st->bindParam(4, $v[3]], PDO::PARAM_STR);
$st->bindParam(5, $v[4]], PDO::PARAM_BOOL);
$st->bindParam(6, $v[5]], PDO::PARAM_STR);
$st->execute();

Can we get a fix for this soon?



[2008-04-01 21:00:50] kenaniah at gmail dot com

Description:

When using postgres via PDO and attempting to execute an INSERT or
UPDATE query using $stmt->execute(array_values($data)) syntax, postgres
returns an error for any boolean fields that may be present. 



Reproduce code:
---
prepare($sql);

$stmt->execute($values);

?>

Expected result:

PDO will recognize that the values in the array are boolean, and will
provide these values to the prepared statement as correctly-formatted
booleans.

Actual result:
--
PostgreSQL 8.1.9 returns an error stating that the provided values for
the booleans are not in the correct format, and may need to be
type-casted.





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



#18590 [Com]: Fatal error: Cannot redeclare upon reload

2009-02-03 Thread greg at pwsdb dot com
 ID:   18590
 Comment by:   greg at pwsdb dot com
 Reported By:  armageddon at raydan dot de
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: WinXP Pro
 PHP Version:  5.0.0-dev
 New Comment:

PS
This only happened within a checkout page of ZenCart ("part 3 of 3")  
and not another (not the login page) ... I don't know enough about zc
to know what the significant difference is.


Previous Comments:


[2009-02-04 02:59:23] greg at pwsdb dot com

this experience/test may help:

I defined a function (fff) in the top of my pgm. (not in a loop)
it spanned from line 5 to 11 and used it in the code below.  
I got this error msg:


Fatal error: Cannot redeclare fff() (previously declared in 
/.../xxx.php:5) in 
/.../xxx.php on line 11


I then removed it to an external file (xx-functions.php) and did a 
"require_once() for xxx-functions.php on line 6  and got these 2 
error messages where there should have only been one. 
IT WAS TRYING TO LOAD THE FUNCTION(PGM) TWICE: 


Warning: require_once(xxx-functions.php) [function.require-once]: 
failed to open stream: No such file or directory in 
/.../xxx.php on line 6

Fatal error: require_once() [function.require]: Failed opening required

'xxx-functions.php' (include_path='.:/usr/share/pear') in 
/.../xxx.php on line 6



[2008-05-30 13:48:47] mark dot php dot net dot special at emceesoftware
dot com

As a followup to my last comment, the way this "error" is being
reported proved a little confusing, and my warrant some minor research
in order to help make it a bit easier to identify when it happens.

My error log reports the following (abbreviated):

PHP Fatal error:  Cannot redeclare simplehtml_rendercontent()
(previously declared in SimpleHTML.php:149) in SimpleHTML.php on line
152

Noteworthy is the fact that the RenderContent() method is declared on
line 149.  The closing brace for the method is on line 152.

It was this difference in line numbers that proved the most confusing. 
If they both reported out at line 149, I suspect I would have more
quickly determined that I was seeing a reload problem of some sort.

Also, if after adjusting the line number being reported, it is
determined that they are identical, it might be helpful to post an
additional line in the error log which suggests the developer look at
replacing an include() with include_once() or require() with
require_once().

With that bit of reporting, I suspect most folks who get bit with this
type of issue will be able to resolve it more quickly (whether
dynamically as I've done, or at the top of a PHP file).



[2008-05-30 12:43:13] mark dot php dot net dot special at emceesoftware
dot com

PHP 5.2.4 (Build date 30 Aug 2007)

I experience this error while using a technique for dispatching method
calls dynamically.

On receipt of an XML packet, an API method determines the php module
(source file) that needs to be loaded to process the XML file.

Next, the method name is loaded into a variable, and the source file is
included.

Finally, the variable is used to call the method.

I've been successfully testing this approach for some time, and am
confused as to why it has started "now".

Code sample (abbreviated):

$moduleName = ... (extracted from XML structure)
$methodName = ... (derived from another parameter)
$sourceFile = $_SERVER["DOCUMENT_ROOT"].'/path/'.$moduleName.'.php';
include( $sourceFile );
$dynamicMethod = $moduleName.'_'.$methodName;
$dynamicMethod();  // attempt the call

My theory is that this code is being called multiple times with the
same value for $moduleName, causing the include() method to attempt to
load it multiple times.  While this doesn't seem to be an issue when
using the static 'include_once' declaration, it appears to be an issue
when loading dynamically.

When changing the above code to use include_once(), the problem seems
(so far) to have gone away.



[2007-09-03 13:52:58] info at rchu dot nl

update: adding a space to the source results in the same 'cannot
redeclare' error. Only changing the function name resolves the problem
at the fist run. Must be some kind of caching problem I suppose. When
running the script on the command line there is no problem, just when I
request in in my browser. I run the pre-installed apache1.3 on Mac OS X
10.4.10 and used the --with-apache-hooks option on compiling because I
do not have the apache.h source file (since I haven't compiled apache).



[2007-09-03 13:48:09] info at rchu dot nl

I have sort of the same bug I think.

test.php


works fine the first time. Then after a reload it gives an cannot
redeclare test

#47296 [NEW]: php_admin_value does not work as expected

2009-02-03 Thread ali dot hamad at dci dot net dot sa
From: ali dot hamad at dci dot net dot sa
Operating system: Red Hat Enterprise Linux
PHP version:  5.2.8
PHP Bug Type: *Configuration Issues
Bug description:  php_admin_value does not work as expected

Description:

1) my disable_functions in php.ini :

disable_functions = php_uname

2) in httpd.conf , inside the vhost for the user, I have :




php_admin_value disable_functions "system"




3) Here is my code :

";
echo "php_uname=".php_uname();
echo "";
?>

4) expected result :
disable_functions=system
php_uname= Linux ...etc.

5) Actual result :
disable_functions=system
php_uname=

notice, no output from php_uname and in the php error log :
[04-Feb-2009 06:08:28] PHP Warning:  php_uname() has been disabled for
security reasons in ..etc

I think it is a bug since the ini_get call to disable_functions gave me
what supposed to be disabled, system function. However, php_uname, is still
disabled even if I overwrite disable_functions setting using the
php_admin_value in the user vhost.

Regards,
Ali Hamad.


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



#18590 [Com]: Fatal error: Cannot redeclare upon reload

2009-02-03 Thread greg at pwsdb dot com
 ID:   18590
 Comment by:   greg at pwsdb dot com
 Reported By:  armageddon at raydan dot de
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: WinXP Pro
 PHP Version:  5.0.0-dev
 New Comment:

this experience/test may help:

I defined a function (fff) in the top of my pgm. (not in a loop)
it spanned from line 5 to 11 and used it in the code below.  
I got this error msg:


Fatal error: Cannot redeclare fff() (previously declared in 
/.../xxx.php:5) in 
/.../xxx.php on line 11


I then removed it to an external file (xx-functions.php) and did a 
"require_once() for xxx-functions.php on line 6  and got these 2 
error messages where there should have only been one. 
IT WAS TRYING TO LOAD THE FUNCTION(PGM) TWICE: 


Warning: require_once(xxx-functions.php) [function.require-once]: 
failed to open stream: No such file or directory in 
/.../xxx.php on line 6

Fatal error: require_once() [function.require]: Failed opening required

'xxx-functions.php' (include_path='.:/usr/share/pear') in 
/.../xxx.php on line 6


Previous Comments:


[2008-05-30 13:48:47] mark dot php dot net dot special at emceesoftware
dot com

As a followup to my last comment, the way this "error" is being
reported proved a little confusing, and my warrant some minor research
in order to help make it a bit easier to identify when it happens.

My error log reports the following (abbreviated):

PHP Fatal error:  Cannot redeclare simplehtml_rendercontent()
(previously declared in SimpleHTML.php:149) in SimpleHTML.php on line
152

Noteworthy is the fact that the RenderContent() method is declared on
line 149.  The closing brace for the method is on line 152.

It was this difference in line numbers that proved the most confusing. 
If they both reported out at line 149, I suspect I would have more
quickly determined that I was seeing a reload problem of some sort.

Also, if after adjusting the line number being reported, it is
determined that they are identical, it might be helpful to post an
additional line in the error log which suggests the developer look at
replacing an include() with include_once() or require() with
require_once().

With that bit of reporting, I suspect most folks who get bit with this
type of issue will be able to resolve it more quickly (whether
dynamically as I've done, or at the top of a PHP file).



[2008-05-30 12:43:13] mark dot php dot net dot special at emceesoftware
dot com

PHP 5.2.4 (Build date 30 Aug 2007)

I experience this error while using a technique for dispatching method
calls dynamically.

On receipt of an XML packet, an API method determines the php module
(source file) that needs to be loaded to process the XML file.

Next, the method name is loaded into a variable, and the source file is
included.

Finally, the variable is used to call the method.

I've been successfully testing this approach for some time, and am
confused as to why it has started "now".

Code sample (abbreviated):

$moduleName = ... (extracted from XML structure)
$methodName = ... (derived from another parameter)
$sourceFile = $_SERVER["DOCUMENT_ROOT"].'/path/'.$moduleName.'.php';
include( $sourceFile );
$dynamicMethod = $moduleName.'_'.$methodName;
$dynamicMethod();  // attempt the call

My theory is that this code is being called multiple times with the
same value for $moduleName, causing the include() method to attempt to
load it multiple times.  While this doesn't seem to be an issue when
using the static 'include_once' declaration, it appears to be an issue
when loading dynamically.

When changing the above code to use include_once(), the problem seems
(so far) to have gone away.



[2007-09-03 13:52:58] info at rchu dot nl

update: adding a space to the source results in the same 'cannot
redeclare' error. Only changing the function name resolves the problem
at the fist run. Must be some kind of caching problem I suppose. When
running the script on the command line there is no problem, just when I
request in in my browser. I run the pre-installed apache1.3 on Mac OS X
10.4.10 and used the --with-apache-hooks option on compiling because I
do not have the apache.h source file (since I haven't compiled apache).



[2007-09-03 13:48:09] info at rchu dot nl

I have sort of the same bug I think.

test.php


works fine the first time. Then after a reload it gives an cannot
redeclare test() error. Same error after second reload etc. Modify the
file (add a space or something like that) and it runs OK the first time
but after reload same error.

I have compiled PHP 5.2.4 on Darwin Kernel Version 8.10.2.



[2004-03-31 09:

#44861 [Com]: scrollable cursor don't work with pgsql

2009-02-03 Thread matteo at beccati dot com
 ID:   44861
 Comment by:   matteo at beccati dot com
 Reported By:  php at benjaminschulz dot com
 Status:   Verified
 Bug Type: PDO related
 Operating System: osx
 PHP Version:  5.3CVS-2008-04-29 (CVS)
 New Comment:

Here's the patch, including a phpt file:

http://www.beccati.com/misc/pdo_pgsql_bug44861_php_5.3.patch

A bit of explanations... I've changed the ordering when executing the
query so that if a cursor is needed, it's created before any preparation
happens.

The cursor is now declared as SCROLL-able and WITH HOLD to ensure it
can be used even outside transactions. I was previously trying to avoid
WITH HOLD and enforce requirement for a transaction, but things were
going very bad when the destructor was called after the transaction was
closed, which is a common situation when calling commit() without
previusly unsetting the statement variable.

One thing I'm not really sure about is the behaviour of ORI_ABS and
ORI_REL: ORI_ABS will work for offsets >= 1, while ORI_REL can work
with negative numbers as well. I'm sorry, but it's impossible for me to
guess how they should work just by reading the pdo_oci code or the
Oracle documentation of OCIStmtFetch2.


Previous Comments:


[2009-01-15 22:30:21] andrew at rook dot ca

Same problem.
PHP 5.2.8 on Fedora 8 (2.6.21.7-5.fc8xen) && PostgreSQL 8.2.11



[2008-12-12 11:36:07] denis at edistar dot com

Same problem also in PHP 5.2.6.

I think this is a very serious bug.



[2008-04-29 16:13:24] php at benjaminschulz dot com

Description:

I don't see how to use scrollable cursors with pdo_pgsql

Reproduce code:
---
$db = new Pdo("pgsql:...");
$db->setAttribute(Pdo::ATTR_ERRMODE, Pdo::ERRMODE_EXCEPTION);
$res = $db->prepare("SELECT 'row1' UNION SELECT 'row2' UNION SELECT
'row3' UNION SELECT 'row4'", array(PDO::ATTR_CURSOR =>
PDO::CURSOR_SCROLL));
$res->execute();
var_dump($res->fetch());
// $res->fetch(Pdo::FETCH_NUM, PDO::FETCH_ORI_ABS, 2) won't throw an
exception but return false

Expected result:

array('row1')

Actual result:
--
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[34000]: Invalid cursor name: 7 ERROR: cursor
"pdo_pgsql_cursor_00d78a0c" does not exist' in ...





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



#46048 [Csd]: SimpleXML top-level @attributes not part of iterator (PHP_5_3 and above only!)

2009-02-03 Thread php at isnoop dot net
 ID:   46048
 User updated by:  php at isnoop dot net
 Reported By:  php at isnoop dot net
 Status:   Closed
 Bug Type: SimpleXML related
 Operating System: Ubuntu 8.04 server
 PHP Version:  5.3.0alpha3
 Assigned To:  davidc
 New Comment:

Thank you!  Confirmed fixed in latest CVS.


Previous Comments:


[2009-02-03 21:46:30] dav...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2009-01-29 22:45:54] php at isnoop dot net

Bug confirmed still be present in 5.3.0beta1.



[2009-01-16 20:16:08] php at zjs dot name

I am experiencing the same problem on 5.3. The code used is the same
used above.

sheph...@ursa-minor:~/php5/sapi/cli$ ./php -v; ./php
~/code/scrap/php/bugs/46048.php
PHP 5.3.0alpha4-dev (cli) (built: Jan 15 2009 17:22:45) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
Array
(
[key] => value
)



[2008-12-09 01:51:33] php at isnoop dot net

I have tested this with the two new PHP releases on yet another
server:

5.3.0alpha3 Fails:
[] [...@ianm:~/src/php-5.3.0alpha3/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.3.0alpha3 (cli) (built: Dec  4 2008 17:18:52) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[key] => value
)



5.2.8 Passes:
[] [...@ianm:~/src/php-5.2.8/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.2.8 (cli) (built: Dec  8 2008 17:34:28) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[...@attributes] => Array
(
[id] => 1
)
[key] => value
)



[2008-11-17 21:27:47] php at isnoop dot net

It appears that you're testing against 5.2.7 which I've verified
doesn't exhibit this error.  This problem only appears with the 5.3.0
releases.

Both the 5.2.* releases and 5.3.* use libxml 2.6.31 on my primary test
machine.  It is possible that libxml is part of the problem, but it
still stands that the problem does not manifest prior to 5.3.



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

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



#47285 [Opn->Fbk]: strtotime() still leaks memory

2009-02-03 Thread jani
 ID:   47285
 Updated by:   j...@php.net
 Reported By:  danger at FreeBSD dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Date/time related
 Operating System: FreeBSD
 PHP Version:  5.2.8
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2009-02-03 01:19:36] danger at FreeBSD dot org

Description:

The strtotime() function still leaks memory in patched PHP 5.2.8 after
applying patches from http://news.php.net/php.cvs/55000. The memory leak
itself is much smaller than before applying fixes. Before, it took a few
seconds to leak 1gb of mem, now it takes some minutes however it's still
there.

This bug is related to http://bugs.php.net/bug.php?id=46889.

Reproduce code:
---
while (true)
{
   $tmp = inc_stamp(time(), 1);
}

function inc_stamp($timestamp, $off_days)
{
   return strtotime("+" . $off_days . " day", $timestamp);
}

Actual result:
--
Memory leak reported by top(1). If the script runs for longer time, it
gets killed by kernel since the system is going out of memory and swap.





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



#47290 [Opn->Bgs]: Server Resets when mysql_connect() executes

2009-02-03 Thread jani
 ID:   47290
 Updated by:   j...@php.net
 Reported By:  msumar at abu dot edu dot ng
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Windows Vista
 PHP Version:  5.2.8
 New Comment:

Works fine for me. Try with another machine, if you can reproduce in 
clean setup and after installing everything properly, post a bug.


Previous Comments:


[2009-02-03 21:22:04] msumar at abu dot edu dot ng

I installed Apache 2.2.11 and MySQL 5.1.30 then configured PHP 5.2.8 as
a module. The configuration was properly done because phpinfo() displays
the expected result but any mysql function does not execute at all,
instead, the server always resets.

I configured IIS with the same PHP 5.2.8 and received the same error,
which Windows always reports as unknown error. I then uninstall MySQL
5.1.30 and replaces it with Mysql 5.0.4 beta and
everything worked well. 

This strongly made me conclude that something is wrong
with the PHP 5.2.8 when configured to run with MySQL 5.1.30.



[2009-02-03 16:04:41] msumar at abu dot edu dot ng

Description:

I installed Apache 2.2.11, PHP 5.2.8 and MySQL 5.1.30. The
configuration was properly done because phpinfo() displays as expected
but any mysql function does not execute. The server always resets.

I configured IIS the same and received the same error, 'Unknown error'.
When I uninstall MySQL 5.1.30 and replaces it with Mysql 5.0.4 beta
every thing worked well. So have the believe that something is wrong
with the PHP 5.2.8 when installed with MySQL 5.1.30.






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



#47292 [Opn->Bgs]: I can not read the socket answer

2009-02-03 Thread jani
 ID:   47292
 Updated by:   j...@php.net
 Reported By:  bbarnett at gt dot co dot cr
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows 2003 Server R2
 PHP Version:  5.2.8
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2009-02-03 16:35:57] bbarnett at gt dot co dot cr

Description:

I'm trying to read the answer of a socket after I wrote the information
that I must send before, but the application freeze and don't send me
any message.

I'm monitoring the port using TCPVIEWER and I can see while the
conection is established.

Using CLARION 6 I don't have any problem comunicating with the socket
(writing and reading) my  problem is only with PHP.

I don't now if this is a bug, but after read many information about how
to use the socket I'm giving up.

Please, I need your help because we're developing a new software that
comunicate with many socket's server to pay public services in my
country and in actualy we are using Clarion 6, but with this environment
we don't have enough support.

Reproduce code:
---
$puerto_servicio = 3260;$direccion = '172.25.10.5';
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {echo "socket_create() falló: motivo: " .
socket_strerror(socket_last_error()) . ""; die();
} else {echo "OK.";}
$resultado = socket_connect($socket, $direccion, $puerto_servicio);
if ($resultado === false) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";
} else {echo "OK.";}
$entrada=$trama800; $salida = '';
if (!socket_write($socket, $entrada, strlen($entrada))) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
if (!$salida = socket_read($socket, 426)) {
echo "socket_connect() falló en lectura.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
socket_close($socket);

Expected result:

I wait to recieve a string with 426 chars

Actual result:
--
frezze the browser





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



#47294 [Opn->Bgs]: Class inheritence isn't consistent

2009-02-03 Thread jani
 ID:   47294
 Updated by:   j...@php.net
 Reported By:  dmsuperman at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Linux Ubuntu
 PHP Version:  5.2.8
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2009-02-03 19:03:38] dmsuperman at gmail dot com

Description:

Class inheritence isn't consistent. The attach code basically explains
it all.

Why would it choose to use the child class in the first case, but the
parent class in the second? This seems wrong to me, like it's deciding
when to use one over the other which makes for a confusing programming
environment.

Reproduce code:
---
test);
}
}
class tacos extends blah {
public $test = "B";
}
$tacos = new tacos();
//Output: B
//Expected output: B

class P {
public function __construct() {
$this->fun();
}
private function fun() {
echo 'funny';
}
}
class C extends P {
public function fun(){
echo "oranges";
}
};
$var = new C();
//Output: funny
//Expected output: oranges
?>

Expected result:

Boranges

Actual result:
--
Bfunny





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



#47293 [Opn->Bgs]: Running Configure getting an error

2009-02-03 Thread jani
 ID:   47293
 Updated by:   j...@php.net
 Reported By:  martinf at ca dot ibm dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Linux Redhat 4
 PHP Version:  5.2.8
 New Comment:

This might help:

# ./configure --help |grep xml 

It's --enable-xml like it has always been..


Previous Comments:


[2009-02-03 21:37:48] martinf at ca dot ibm dot com

I was playing even with the error message about no such option of
--with-xml and did a compile which went ok, but the make test came back
with failures and asking me to mail the txt file to
qa-repo...@lists.php.net.

Here is the summary of the make test:
=
TEST RESULT SUMMARY
-
Exts skipped:   52
Exts tested :   27
-

Number of tests : 6673  4958
Tests borked:1 (  0.0%) 
Tests skipped   : 1714 ( 25.7%) 
Tests warned:3 (  0.0%) (  0.1%)
Tests failed:   10 (  0.1%) (  0.2%)
Expected fail   :4 (  0.1%) (  0.1%)
Tests passed: 4941 ( 74.0%) ( 99.7%)
-
Time taken  :  178 seconds
=

My question is, should i skip the --with-xml and proceed with the make
test?  even there are failures and asking me to submit the txt report,
can I just 'make install' and install just like that? Would it work or
am I missing something?  Sorry I am new with PHP and would like some
advice to proceed.  Thanks in advance.



[2009-02-03 18:57:24] martinf at ca dot ibm dot com

Description:

I am trying to install PHP 5.2.8 but getting an error after executing
the ./configure command.

Is --with-xml no longer an option?  I used the ./configure --help and
couldnt locate for it.  I am trying to install IBM Rational BuildForge
and one section asked me to install PHP 5.2.1 but I thought 5.2.8 is the
newest version so used it.  I did google PHP configure issue --with-xml
and zero result of the issue I am having.
I did see someone posted a different issue and used the --with-xml
option.

Or --with-xml only available with 5.2.1?

Please advice.


Reproduce code:
---
./configure --prefix=/usr/local/php-5.2.8
--with-mysqli=/usr/bin/mysql_config
--with-apxs2=/usr/local/apache-2.2.11/bin/apxs --with-ldap
--enable-mbstring --enable-shmop --with-xml --with-zlib

Actual result:
--
It ran all the way without complain til the end:

Thank you for using PHP.

Notice: Following unknown configure options were used:

--with-xml

Check './configure --help' for available options







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



#46048 [Opn->Csd]: SimpleXML top-level @attributes not part of iterator (PHP_5_3 and above only!)

2009-02-03 Thread davidc
 ID:   46048
 Updated by:   dav...@php.net
 Reported By:  php at isnoop dot net
-Status:   Open
+Status:   Closed
 Bug Type: SimpleXML related
 Operating System: Ubuntu 8.04 server
 PHP Version:  5.3.0alpha3
 Assigned To:  davidc
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2009-01-29 22:45:54] php at isnoop dot net

Bug confirmed still be present in 5.3.0beta1.



[2009-01-16 20:16:08] php at zjs dot name

I am experiencing the same problem on 5.3. The code used is the same
used above.

sheph...@ursa-minor:~/php5/sapi/cli$ ./php -v; ./php
~/code/scrap/php/bugs/46048.php
PHP 5.3.0alpha4-dev (cli) (built: Jan 15 2009 17:22:45) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
Array
(
[key] => value
)



[2008-12-09 01:51:33] php at isnoop dot net

I have tested this with the two new PHP releases on yet another
server:

5.3.0alpha3 Fails:
[] [...@ianm:~/src/php-5.3.0alpha3/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.3.0alpha3 (cli) (built: Dec  4 2008 17:18:52) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[key] => value
)



5.2.8 Passes:
[] [...@ianm:~/src/php-5.2.8/sapi/cli] ./php -v;./php
~/sandbox/bug46048.php 
PHP 5.2.8 (cli) (built: Dec  8 2008 17:34:28) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Array
(
[...@attributes] => Array
(
[id] => 1
)
[key] => value
)



[2008-11-17 21:27:47] php at isnoop dot net

It appears that you're testing against 5.2.7 which I've verified
doesn't exhibit this error.  This problem only appears with the 5.3.0
releases.

Both the 5.2.* releases and 5.3.* use libxml 2.6.31 on my primary test
machine.  It is possible that libxml is part of the problem, but it
still stands that the problem does not manifest prior to 5.3.



[2008-11-17 09:49:46] j...@php.net

$ php t.php
Array
(
[...@attributes] => Array
(
[id] => 1
)

[key] => value
)
[j...@localhost ~]$ php -v
PHP 5.2.7-dev (cli) (built: Oct  9 2008 16:54:00) (DEBUG)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

So still no bug. If you experience this even with proper XML, I guess
it's your libxml that is a buggy version. (my PHP is build with libxml
2.7.2)



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

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



#47293 [Opn]: Running Configure getting an error

2009-02-03 Thread martinf at ca dot ibm dot com
 ID:   47293
 User updated by:  martinf at ca dot ibm dot com
 Reported By:  martinf at ca dot ibm dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Linux Redhat 4
 PHP Version:  5.2.8
 New Comment:

I was playing even with the error message about no such option of
--with-xml and did a compile which went ok, but the make test came back
with failures and asking me to mail the txt file to
qa-repo...@lists.php.net.

Here is the summary of the make test:
=
TEST RESULT SUMMARY
-
Exts skipped:   52
Exts tested :   27
-

Number of tests : 6673  4958
Tests borked:1 (  0.0%) 
Tests skipped   : 1714 ( 25.7%) 
Tests warned:3 (  0.0%) (  0.1%)
Tests failed:   10 (  0.1%) (  0.2%)
Expected fail   :4 (  0.1%) (  0.1%)
Tests passed: 4941 ( 74.0%) ( 99.7%)
-
Time taken  :  178 seconds
=

My question is, should i skip the --with-xml and proceed with the make
test?  even there are failures and asking me to submit the txt report,
can I just 'make install' and install just like that? Would it work or
am I missing something?  Sorry I am new with PHP and would like some
advice to proceed.  Thanks in advance.


Previous Comments:


[2009-02-03 18:57:24] martinf at ca dot ibm dot com

Description:

I am trying to install PHP 5.2.8 but getting an error after executing
the ./configure command.

Is --with-xml no longer an option?  I used the ./configure --help and
couldnt locate for it.  I am trying to install IBM Rational BuildForge
and one section asked me to install PHP 5.2.1 but I thought 5.2.8 is the
newest version so used it.  I did google PHP configure issue --with-xml
and zero result of the issue I am having.
I did see someone posted a different issue and used the --with-xml
option.

Or --with-xml only available with 5.2.1?

Please advice.


Reproduce code:
---
./configure --prefix=/usr/local/php-5.2.8
--with-mysqli=/usr/bin/mysql_config
--with-apxs2=/usr/local/apache-2.2.11/bin/apxs --with-ldap
--enable-mbstring --enable-shmop --with-xml --with-zlib

Actual result:
--
It ran all the way without complain til the end:

Thank you for using PHP.

Notice: Following unknown configure options were used:

--with-xml

Check './configure --help' for available options







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



#47290 [Opn]: Server Resets when mysql_connect() executes

2009-02-03 Thread msumar at abu dot edu dot ng
 ID:   47290
 User updated by:  msumar at abu dot edu dot ng
 Reported By:  msumar at abu dot edu dot ng
 Status:   Open
 Bug Type: MySQL related
 Operating System: Windows Vista
 PHP Version:  5.2.8
 New Comment:

I installed Apache 2.2.11 and MySQL 5.1.30 then configured PHP 5.2.8 as
a module. The configuration was properly done because phpinfo() displays
the expected result but any mysql function does not execute at all,
instead, the server always resets.

I configured IIS with the same PHP 5.2.8 and received the same error,
which Windows always reports as unknown error. I then uninstall MySQL
5.1.30 and replaces it with Mysql 5.0.4 beta and
everything worked well. 

This strongly made me conclude that something is wrong
with the PHP 5.2.8 when configured to run with MySQL 5.1.30.


Previous Comments:


[2009-02-03 16:04:41] msumar at abu dot edu dot ng

Description:

I installed Apache 2.2.11, PHP 5.2.8 and MySQL 5.1.30. The
configuration was properly done because phpinfo() displays as expected
but any mysql function does not execute. The server always resets.

I configured IIS the same and received the same error, 'Unknown error'.
When I uninstall MySQL 5.1.30 and replaces it with Mysql 5.0.4 beta
every thing worked well. So have the believe that something is wrong
with the PHP 5.2.8 when installed with MySQL 5.1.30.






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



#38111 [Com]: PHP crashes IIS worker process and application pool

2009-02-03 Thread tser at deltacontrols dot com
 ID:   38111
 Comment by:   tser at deltacontrols dot com
 Reported By:  svendavidh at hotmail dot com
 Status:   No Feedback
 Bug Type: IIS related
 Operating System: Windows Server 2003 Std. Ed. R2
 PHP Version:  5.2.8
 Assigned To:  pajoye
 New Comment:

I have updated the bug with backtrace and have contacted the assigned
developer directly (and convinced him that there is no extension
involved in the crash).

However, since I am not the originator, I cannot change the Status.
Please change the status.
Thanks!


Previous Comments:


[2009-01-26 23:37:29] tser at deltacontrols dot com

PHP 5.2.8 (with no extension)
ISAPI on IIS7 Vista 64 (using a 32 Application Pool)
Just run phpinfo(); and the recycle the Application Pool

Backtrace

ntdll.dll!_dbgbreakpo...@0()
ntdll.dll!_rtlreportcriticalfail...@8()  + 0x2e bytes   
ntdll.dll!_rtlpreportheapfail...@4()  + 0x21 bytes  
ntdll.dll!_rtlplogheapfail...@24()  + 0xab bytes
ntdll.dll!_rtlfreeh...@12()  + 0x2fb4e bytes
kernel32.dll!_heapf...@12()  + 0x14 bytes   
msvcrt.dll!_free()  + 0x39 bytes
php5ts.dll!zend_hash_graceful_reverse_destroy(_hashtable *
ht=0x00c68428)  Line 650 + 0x11 bytes   
php5ts.dll!zend_destroy_rsrc_list(_hashtable * ht=0x00c68428, void *
* * tsrm_ls=0x024906d8)  Line 239 + 0xa bytes   
php5ts.dll!executor_globals_dtor(_zend_executor_globals *
executor_globals=0x00c68298, void * * * tsrm_ls=0x024906d8)  Line 525 +
0x7 bytes
php5ts.dll!tsrm_shutdown()  Line 180 + 0x4 bytesC
php5isapi.dll!DllMain(HINSTANCE__ * hinstDLL=0x0019, unsigned
long fdwReason=0, void * lpvReserved=0x)  Line 964  
php5isapi.dll!__dllmaincrtstar...@12()  + 0x50 bytes
ntdll.dll!_ldrpcallinitrout...@16()  + 0x14 bytes   
ntdll.dll!_ldrpunload...@8()  + 0x4b1a bytes
ntdll.dll!_ldrunload...@4()  + 0x46 bytes   
kernel32.dll!_freelibr...@4()  + 0x19 bytes 
isapi.dll!ISAPI_DLL::Unload()  + 0x38 bytes 
isapi.dll!ISAPI_DLL::~ISAPI_DLL()  + 0x10 bytes 
isapi.dll!ISAPI_DLL::`scalar deleting destructor'()  + 0xd bytes
isapi.dll!ISAPI_DLL::DereferenceIsapiDll()  + 0x37 bytes
isapi.dll!ISAPI_DLL_HASH::AddRefRecord()  + 0x23 bytes  
iisutil.dll!CLKRLinearHashTable::_Clear()  + 0x6f bytes 
iisutil.dll!CLKRLinearHashTable::~CLKRLinearHashTable()  + 0x19
bytes   
iisutil.dll!CLKRLinearHashTable::`scalar deleting destructor'()  +
0xd bytes   
iisutil.dll!CLKRHashTable::_FreeSubTable()  + 0x13 bytes
iisutil.dll!CLKRHashTable::~CLKRHashTable()  + 0x18 bytes   
isapi.dll!ISAPI_DLL_MANAGER::`scalar deleting destructor'()  + 0xe
bytes   
isapi.dll!TerminateIsapiModule()  + 0x16 bytes  
isapi.dll!CIISModuleFactory::Terminate()  + 0x14 bytes  
iiscore.dll!VIRTUAL_MODULE::~VIRTUAL_MODULE()  + 0x3e bytes 
iiscore.dll!VIRTUAL_MODULE::`scalar deleting destructor'()  + 0xd
bytes   
iiscore.dll!VIRTUAL_MODULE::DereferenceVirtualModule()  + 0x20
bytes   
iiscore.dll!MODULE_LIST::FreeModules()  + 0x21 bytes
iiscore.dll!W3_SERVER::TerminateGlobalModules()  + 0x63 bytes   
iiscore.dll!W3_SERVER::Terminate()  + 0x157 bytes   
iiscore.dll!IISCORE_PROTOCOL_MANAGER::StopListenerChannel()  + 0x58
bytes   
w3wphost.dll!LISTENER_CHANNEL::HandleStopListenerChannel()  + 0x65
bytes   
w3wphost.dll!LISTENER_CHANNEL_STOP_WORKITEM::ExecuteWorkItem()  +
0x10 bytes  
w3wphost.dll!W3WP_HOST::ExecuteWorkItem()  + 0x10 bytes 
ntdll.dll!_rtlptpworkcallb...@8()  - 0x2c9 bytes
ntdll.dll!_tppworkerthr...@4()  - 0xbbc bytes   
kernel32.d...@basethreadinitthunk@12()  + 0xe bytes 
ntdll.dll!___rtluserthreadst...@8()  + 0x23 bytes   
ntdll.dll!__rtluserthreadst...@8()  + 0x1b bytes



[2009-01-12 00:08:04] paj...@php.net

"- Use FastCGI rather than ISAPI"

that's definitively the way to go :) 



[2009-01-11 23:44:21] scott at datalink dot com dot au

To help people with this issue, I've scanned all the PHP bugs relating
to this issue and collated a list of workarounds:
- Add w3wp.exe to DEP exclusion list 
- Turn off process recycling
- Use FastCGI rather than ISAPI

To the PHP team - you guys are great and I love your work. I know you
haven't gotten the backtrace, but please don't mark this bug as bogus. 
The community is trying to get what you need and have been very patient
with this issue, but it appears to be difficult to get  because of the
way it crashes.


#46984 [Ana->Bgs]: Strict-Warning when overwriting methods with changed parameters

2009-02-03 Thread stas
 ID:   46984
 Updated by:   s...@php.net
 Reported By:  d_quijote at web dot de
-Status:   Analyzed
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.3.0alpha3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Overriding foo($x) with foo($x, $y) - with both parameters required -
leads to calls to foo with one argument be wrong for child - thus
violating LSP and warranting E_STRICT. 


Previous Comments:


[2009-02-03 19:51:56] cel...@php.net

the error occurs regardless of implementing an interface, and is, I
believe, correct.  If $y were optional, there is no problem, and no
error



[2009-01-01 00:21:51] fel...@php.net

I agree with you, here is a patch:
http://felipe.ath.cx/diff/bug46984.diff

However it broken some tests, that for me, looks as even they are
wrong.
method overloading with different method signature
[Zend/tests/objects_002.phpt]
method overloading with different method signature
[Zend/tests/objects_003.phpt]
method overloading with different method signature
[Zend/tests/objects_004.phpt]
method overloading with different method signature
[Zend/tests/objects_005.phpt]
method overloading with different method signature
[Zend/tests/objects_006.phpt]
method overloading with different method signature
[Zend/tests/objects_007.phpt]
method overloading with different method signature
[Zend/tests/objects_008.phpt]
method overloading with different method signature
[Zend/tests/objects_009.phpt]

Let's decide the expected behavior, wait...



[2008-12-31 12:52:32] d_quijote at web dot de

Description:

A Strict-Warning is raised when the parameters of the subclass differ
from the parameters of the overwritten superclass method. This error
seems only to occure if any interface is included in the superclass

Reproduce code:
---
class A implements Iterator {
public function current() {}
public function key() {}
public function next() {}
public function rewind() {}
public function valid() {}

public function f($x) {
echo $x.PHP_EOL;
}
}

class B extends A {
public function f($x,$y) {
echo __METHOD__.'('.$x.', '.$y.')'.PHP_EOL;
}
}

$b = new B();
$b->f(1,2);

Expected result:

B::f(1, 2)

Actual result:
--
Strict Standards: Declaration of B::f() should be compatible with that
of A::f() in /index.php on line 19





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



#46984 [Ana]: Strict-Warning when overwriting methods with changed parameters

2009-02-03 Thread cellog
 ID:   46984
 Updated by:   cel...@php.net
 Reported By:  d_quijote at web dot de
 Status:   Analyzed
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.3.0alpha3
 New Comment:

the error occurs regardless of implementing an interface, and is, I
believe, correct.  If $y were optional, there is no problem, and no
error


Previous Comments:


[2009-01-01 00:21:51] fel...@php.net

I agree with you, here is a patch:
http://felipe.ath.cx/diff/bug46984.diff

However it broken some tests, that for me, looks as even they are
wrong.
method overloading with different method signature
[Zend/tests/objects_002.phpt]
method overloading with different method signature
[Zend/tests/objects_003.phpt]
method overloading with different method signature
[Zend/tests/objects_004.phpt]
method overloading with different method signature
[Zend/tests/objects_005.phpt]
method overloading with different method signature
[Zend/tests/objects_006.phpt]
method overloading with different method signature
[Zend/tests/objects_007.phpt]
method overloading with different method signature
[Zend/tests/objects_008.phpt]
method overloading with different method signature
[Zend/tests/objects_009.phpt]

Let's decide the expected behavior, wait...



[2008-12-31 12:52:32] d_quijote at web dot de

Description:

A Strict-Warning is raised when the parameters of the subclass differ
from the parameters of the overwritten superclass method. This error
seems only to occure if any interface is included in the superclass

Reproduce code:
---
class A implements Iterator {
public function current() {}
public function key() {}
public function next() {}
public function rewind() {}
public function valid() {}

public function f($x) {
echo $x.PHP_EOL;
}
}

class B extends A {
public function f($x,$y) {
echo __METHOD__.'('.$x.', '.$y.')'.PHP_EOL;
}
}

$b = new B();
$b->f(1,2);

Expected result:

B::f(1, 2)

Actual result:
--
Strict Standards: Declaration of B::f() should be compatible with that
of A::f() in /index.php on line 19





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



#47193 [NoF->Csd]: Bad field length in header (type D and L)

2009-02-03 Thread maxwer at ukr dot net
 ID:   47193
 User updated by:  maxwer at ukr dot net
 Reported By:  maxwer at ukr dot net
-Status:   No Feedback
+Status:   Closed
 Bug Type: dBase related
 Operating System: Win2000SP4
 PHP Version:  5.2.8
 New Comment:

Works. Thank you


Previous Comments:


[2009-01-30 01:01:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2009-01-22 18:39:42] fel...@php.net

Please try using this CVS snapshot:

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

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





[2009-01-22 18:31:22] maxwer at ukr dot net

Description:

When create or read or write qBase file, in header write field length
for D and L type = 0

Reproduce code:
---







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



#47289 [Opn->Fbk]: socket_read falls into endless loop if remote host disconnects

2009-02-03 Thread iliaa
 ID:   47289
 Updated by:   il...@php.net
 Reported By:  patryk dot szczyglowski at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.6
 PHP Version:  5.2.8
 New Comment:

There is no loop in the code, how would it get stuck unless you are 
doing while(socket_read()) ?


Previous Comments:


[2009-02-03 15:44:28] patryk dot szczyglowski at gmail dot com

Description:

When PHP wants to read from a blocking socket when the remote host
disconnects, PHP ignores 0 return code from recv() system function and
drops into endless loop.

Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($socket, $ip, $port);
// disconnect remote host here
$rcv = socket_read($this->socket, 65536, PHP_BINARY_READ); // this line
never returns

Expected result:

socket_read returns with FALSE

--- php-5.2.8/ext/sockets/sockets.c.orig2008-10-23 22:21:30.0
+0200
+++ php-5.2.8/ext/sockets/sockets.c 2009-01-29 17:32:53.0
+0100
@@ -903,6 +903,14 @@
RETURN_FALSE;
}
 
+   if (retval == 0) {
+   php_sock->error = errno;
+   SOCKETS_G(last_error) = errno;
+
+   efree(tmpbuf);
+   RETURN_FALSE;
+   }
+
tmpbuf = erealloc(tmpbuf, retval + 1);
tmpbuf[retval] = '\0' ;
  

Actual result:
--
socket_read never returns, it gets looped in ext/sockets/sockets.c:885





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



#47294 [NEW]: Class inheritence isn't consistent

2009-02-03 Thread dmsuperman at gmail dot com
From: dmsuperman at gmail dot com
Operating system: Linux Ubuntu
PHP version:  5.2.8
PHP Bug Type: Class/Object related
Bug description:  Class inheritence isn't consistent

Description:

Class inheritence isn't consistent. The attach code basically explains it
all.

Why would it choose to use the child class in the first case, but the
parent class in the second? This seems wrong to me, like it's deciding when
to use one over the other which makes for a confusing programming
environment.

Reproduce code:
---
test);
}
}
class tacos extends blah {
public $test = "B";
}
$tacos = new tacos();
//Output: B
//Expected output: B

class P {
public function __construct() {
$this->fun();
}
private function fun() {
echo 'funny';
}
}
class C extends P {
public function fun(){
echo "oranges";
}
};
$var = new C();
//Output: funny
//Expected output: oranges
?>

Expected result:

Boranges

Actual result:
--
Bfunny

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



#46026 [Asn->Csd]: bz2.decompress/zlib.inflate filter tries to decompress after end of stream

2009-02-03 Thread cellog
 ID:   46026
 Updated by:   cel...@php.net
 Reported By:  Keisial at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Bzip2 Related
 Operating System: *
 PHP Version:  5.2CVS-2008-09-08 (snap)
 Assigned To:  cellog
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

re-fixed in 5.3 and HEAD


Previous Comments:


[2008-10-11 21:54:13] Keisial at gmail dot com

Wow, thank you very much. :-)

Sorry about the tabs. My editor messed them (I know, I know, real
programmers use butterflies...).

However, consider doing this:
if (SUCCESS == zend_hash_find(HASH_OF(filterparams), "concatenated",
sizeof("concatenated"), (void **) &tmpzval) ) {
-SEPARATE_ZVAL(tmpzval);
-convert_to_boolean_ex(tmpzval);
 data->expect_concatenated = Z_LVAL_PP(tmpzval);
-zval_ptr_dtor(tmpzval);
 tmpzval = NULL;
}

There were memory corruption problems with the previous patch, and
zval_ptr_dtor seemed to be the source (thanks to rrichards and pajoye
for their help on this on irc). Also, the other zval_ptr_dtor below
(present there since first version by Sara) would be a "good possible
candidate for another possible point of mem corruption".



[2008-10-11 19:15:22] cel...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

fixed in PHP 5.2, 5.3, 6.0.  Concatenation was only added in PHP 5.3
and 6.0, as new features cannot be added to PHP 5.2



[2008-10-11 19:08:35] cel...@php.net

changing summary to reflect addition of zlib problem



[2008-10-11 18:25:14] cel...@php.net

In the future, please follow 2 important elements of the coding
standards:

1) use tabs instead of spaces
2) always use {} around if/else blocks

I had to waste 15 minutes just getting the patch formatted correctly
before I could even begin testing it.  I don't like wasting time.



[2008-10-11 17:12:10] cel...@php.net

this same bug applies to zlib stream filter, and also happens simply
when trying to read from a filtered stream that contains a limited
amount of compressed data (as in a zip archive with a bz2-compressed
file), as php_stream_fill_read_buffer reads in maxlen data, triggering
the problem you found.  I'll try to get this fixed up and put in a few
tests



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

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



#47263 [Opn->Csd]: xmlrpc_set_type() doesn't respect timezone settings

2009-02-03 Thread iliaa
 ID:  47263
 Updated by:  il...@php.net
 Reported By: daniel dot oconnor at gmail dot com
-Status:  Open
+Status:  Closed
 Bug Type:XMLRPC-EPI related
 PHP Version: 5.2.8
 New Comment:

Works fine on *nix as well...


Previous Comments:


[2009-02-02 23:43:43] daniel dot oconnor at gmail dot com

Windows: working happily now


C:\>php -v
PHP 5.2.9-dev (cli) (built: Feb  2 2009 11:39:58)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

C:\>php 147263.php
20060116T19:14:03
1137438843
1137438843
2006-01-16 19:14:03
2006-01-16 19:14:03
C:\>



[2009-02-02 21:29:38] j...@php.net

Please try using this CVS snapshot:

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

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





[2009-02-01 16:12:37] daniel dot oconnor at gmail dot com

Description:

xmlrpc_set_type() doesn't appear to respect my timezone settings 

(alternatively, it should parse everything as GMT/UTC?)

Tested on 5.2.6 & 5.2.8

Reproduce code:
---
timestamp . "\n";;

print date("Y-m-d H:i:s", $time) . "\n";
print date("Y-m-d H:i:s", $xmlrpc_date->timestamp);

/* 5.2.6 / ubuntu says:
20060116T19:14:03
1137438843
1137401043
2006-01-16 19:14:03
2006-01-16 08:44:03
*/

Expected result:

20060116T19:14:03
1137438843
1137438843
2006-01-16 19:14:03
2006-01-16 19:14:03

Actual result:
--
20060116T19:14:03
1137438843
1137401043
2006-01-16 19:14:03
2006-01-16 08:44:03





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



#47287 [Opn->Bgs]: Accessing non existant body element cause segfault

2009-02-03 Thread iliaa
 ID:   47287
 Updated by:   il...@php.net
 Reported By:  msiekkinen at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: CentOS 5.2
 PHP Version:  5.2CVS-2009-02-03 (snap)
 New Comment:

Seems to work fine in CVS, I presume $text should be replacing 
file_get_contents() in your example?


Previous Comments:


[2009-02-03 03:08:24] msiekkinen at gmail dot com

Description:

OS

Linux myserver 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 11:57:43 EST 2008
x86_64 x86_64 x86_64 GNU/Linux

CentOS release 5.2 (Final)

PHP

PHP 5.2.4 (cli) (built: Nov 14 2008 11:28:15)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Tidy

Tidy support => enabled
libTidy Release => 18 March 2008
Extension Version => 2.0 ($Id: tidy.c,v 1.66.2.8.2.23 2007/05/04
17:11:05
nlopess Exp $)


Calling tidy's body() method when none is present results in a segfault

Reproduce code:
---
$text='

Assistant (Legal issues) m/w


 



';

$tidy = new tidy();
$tidyConfig=array('char-encoding'=>'utf8','input-encoding'=>'utf8','output-
bom'=>'false','output-encoding'=>'utf8');

$tidy->parseString(file_get_contents('wtf.html'),$tidyConfig,'utf8');

print "Parsed it at least\n";
$tidy->CleanRepair();
print "Repaired\n";
$body = $tidy->body();
print "This message will not see the light of day";
var_dump($body);

Expected result:

I would expect it to run through and output *something* in the
var_dump(), but it segfaults before it can get that far.

Actual result:
--
#0 0x00cd86aa in tidyGetChild () from /usr/local/lib/libtidy-0.99.so.0
#1 0x082d8495 in tidy_add_default_properties (obj=0xb7439358,
type=is_node) at /usr/local/src/php-5.2.4/ext/tidy/tidy.c:811
#2 0x082d88ee in php_tidy_create_node (ht=0, return_value=0xb67a947c,
return_value_ptr=0x0, this_ptr=0xb692c690, return_value_used=1,
node=is_body_node) at /usr/local/src/php-5.2.4/ext/tidy/tidy.c:902
#3 0x082dad5d in zif_tidy_get_body (ht=0, return_value=0xb67a947c,
return_value_ptr=0x0, this_ptr=0xb692c690, return_value_used=1) at
/usr/local/src/php-5.2.4/ext/tidy/tidy.c:1548
#4 0x08358d8f in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfef4af0) at
/usr/local/src/php-5.2.4/Zend/zend_vm_execute.h:200
#5 0x083597a5 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbfef4af0) at
/usr/local/src/php-5.2.4/Zend/zend_vm_execute.h:322
#6 0x083589a4 in execute (op_array=0xb7f42bc4) at
/usr/local/src/php-5.2.4/Zend/zend_vm_execute.h:92
#7 0x083393c2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/src/php-5.2.4/Zend/zend.c:1134
#8 0x082f2bfd in php_execute_script (primary_file=0xbfef6eb0) at
/usr/local/src/php-5.2.4/main/main.c:1982
#9 0x0839f299 in main (argc=2, argv=0xbfef6f84) at
/usr/local/src/php-5.2.4/sapi/cli/php_cli.c:1140







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



#47019 [Opn->Bgs]: \ReflectionParameter->getClass()->getName() is broken.

2009-02-03 Thread stas
 ID:   47019
 Updated by:   s...@php.net
 Reported By:  daniel dot gorski at develnet dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Reflection related
 Operating System: Linux
 PHP Version:  5.3CVS-2009-01-06 (CVS)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Leading slash is not a part of the class name. Try this:

namespace test;

class test {
  static function foo() { echo __CLASS__; }
}

test::foo();


Previous Comments:


[2009-01-06 11:49:57] daniel dot gorski at develnet dot org

Description:

The \ReflectionParameter->getClass()->getName() method returns a wrong
value. It omits the leading namespace slash.

Reproduce code:
---
namespace A\B\C;
class Bar {}

namespace D;
class Foo { function foo(\A\B\C\Bar $x) {} }

$rm = new \ReflectionMethod('\D\Foo', 'foo');
$rp = $rm->getParameters();

echo $rp[0]->getClass()->getName();

Expected result:

\A\B\C\Bar

Actual result:
--
A\B\C\Bar





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



#47288 [Opn->Bgs]: Component parameter in parse_url does not work properly

2009-02-03 Thread iliaa
 ID:   47288
 Updated by:   il...@php.net
 Reported By:  hakan at e-bite dot se
-Status:   Open
+Status:   Bogus
 Bug Type: *URL Functions
 Operating System: XP and Linux
 PHP Version:  5.2.8
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The url does not have a trailing /, so there is no path...


Previous Comments:


[2009-02-03 13:31:15] hakan at e-bite dot se

PS PHP_URL_PATH is just an example. Expected result for scheme and host
is not as stated. I also tried PHP_URL_SCHEME and  PHP_URL_HOST with
slightly different results. 
Håkan



[2009-02-03 13:26:06] hakan at e-bite dot se

Description:

Parse_url() function does not work properly with component parameter as
manual:
http://www.php.net/manual/en/function.parse-url.php

The function works well without the parameter

Tested:
PHP Version 5.2.8 on Win XP
PHP Version 5.2.0-8+etch13 on Linux


Håkan Askengren
e-bite


Reproduce code:
---
$url="http://www.php.net";;

//Without component parameter, Works OK
$urlInfo = parse_url($url );
var_dump($urlInfo);


//With component parameter
$urlInfo = parse_url($url, PHP_URL_PATH );
var_dump($urlInfo);



Expected result:

Expected:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}


Actual result:
--
Actual:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

NULL





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



#47293 [NEW]: Running Configure getting an error

2009-02-03 Thread martinf at ca dot ibm dot com
From: martinf at ca dot ibm dot com
Operating system: Linux Redhat 4
PHP version:  5.2.8
PHP Bug Type: PHP options/info functions
Bug description:  Running Configure getting an error

Description:

I am trying to install PHP 5.2.8 but getting an error after executing the
./configure command.

Is --with-xml no longer an option?  I used the ./configure --help and
couldnt locate for it.  I am trying to install IBM Rational BuildForge and
one section asked me to install PHP 5.2.1 but I thought 5.2.8 is the newest
version so used it.  I did google PHP configure issue --with-xml and zero
result of the issue I am having.
I did see someone posted a different issue and used the --with-xml
option.

Or --with-xml only available with 5.2.1?

Please advice.


Reproduce code:
---
./configure --prefix=/usr/local/php-5.2.8
--with-mysqli=/usr/bin/mysql_config
--with-apxs2=/usr/local/apache-2.2.11/bin/apxs --with-ldap
--enable-mbstring --enable-shmop --with-xml --with-zlib

Actual result:
--
It ran all the way without complain til the end:

Thank you for using PHP.

Notice: Following unknown configure options were used:

--with-xml

Check './configure --help' for available options



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



#47085 [Asn->Csd]: rename() returns true even if the file in PHAR does not exist

2009-02-03 Thread cellog
 ID:   47085
 Updated by:   cel...@php.net
 Reported By:  vr...@php.net
-Status:   Assigned
+Status:   Closed
 Bug Type: PHAR related
 Operating System: Windows
 PHP Version:  5.3.0alpha3
 Assigned To:  cellog
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

fixed and added a new test (tests/bug47085.phpt).

This one was easy - I simply hadn't implemented the error on failed
rename (oops)


Previous Comments:


[2009-02-03 17:10:39] cel...@php.net

didn't realize this one was out there, I'll take a look



[2009-01-13 11:27:03] vr...@php.net

Description:

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

Reproduce code:
---



Expected result:

bool(false) and some warning

Actual result:
--
bool(true)





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



#47265 [Asn->Csd]: generating phar.phar failes because of safe_mode

2009-02-03 Thread cellog
 ID:   47265
 Updated by:   cel...@php.net
 Reported By:  lars at larswolter dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: PHAR related
 Operating System: Linux
 PHP Version:  5.3.0beta1
 Assigned To:  cellog
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2009-02-03 17:12:29] cel...@php.net

I'll handle this one



[2009-02-01 23:28:33] lars at larswolter dot de

Description:

Compilation failes while generating phar.phar. This happens if php is
configured with safe_mode to on.

Workaround?
Add -d 'safe_mode=0' to PHP_PHARCMD_SETTINGS

Reproduce code:
---
'./configure' '--without-mm' \
'--with-mysql' '--prefix=/usr/lib/php5' \
'--with-mcrypt' \
'--enable-safe-mode' \
'--with-openssl' '--with-zlib' '--enable-calendar' \
'--enable-exif' '--enable-ftp' \
'--with-gd' '--with-imap' '--with-kerberos' \
'--with-imap-ssl' \
'--enable-gd-native-ttf' \
'--enable-force-cgi-redirect' \
'--with-freetype-dir=/usr/include/freetype2' \
'--with-jpeg-dir=/usr/lib' \
'--with-gettext' '--with-iconv' '--enable-mbstring=all' \
'--enable-mbregex' '--with-xsl' '--with-pdo-mysql'

Expected result:

Build complete.

Actual result:
--
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/home/lars/php-5.3.0beta1/ext/phar/phar.php on line 706
Pear package PHP_Archive or Archive.php class file not found.

Warning: Phar::__construct(): SAFE MODE Restriction in effect.  The
script whose uid is 0 is not allowed to access
/home/lars/php-5.3.0beta1/ext/phar owned by uid 1001 in
/home/lars/php-5.3.0beta1/ext/phar/phar.php on line 1055

Fatal error: Uncaught exception 'UnexpectedValueException' with message
'Phar creation or opening failed' in
/home/lars/php-5.3.0beta1/ext/phar/phar.php:1055
Stack trace:
#0 /home/lars/php-5.3.0beta1/ext/phar/phar.php(1055):
Phar->__construct('/home/lars/php-5.3.0...', 0, 'pharcommand')
#1 [internal function]: PharCommand->cli_cmd_run_pack(Array)
#2 /home/lars/php-5.3.0beta1/ext/phar/phar.php(225):
call_user_func(Array, Array)
#3 /home/lars/php-5.3.0beta1/ext/phar/phar.php(2078):
CLICommand->__construct(19, Array)
#4 {main}
  thrown in /home/lars/php-5.3.0beta1/ext/phar/phar.php on line 1055
make: *** [ext/phar/phar.phar] Fehler 255





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



#43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible

2009-02-03 Thread danielc
 ID:   43817
 Updated by:   dani...@php.net
 Reported By:  losd at mail dot dk
 Status:   Assigned
 Bug Type: Directory function related
 Operating System: Windows Server 2003
-PHP Version:  5.2.5
+PHP Version:  5.3.0beta1
 Assigned To:  dmitry
 New Comment:

Changing version from 5.2.5 to 5.3.0beta1 to facilitate this getting
fixed before the next release.


Previous Comments:


[2009-02-03 15:31:49] dani...@php.net

This problem still exists in 5.3.0 beta 1
(http://windows.php.net/downloads/qa/php-5.3.0beta1-Win32-VC6-x86.zip)



[2008-08-12 09:42:06] dmi...@php.net

Fixed in CVS HEAD and PHP_5_3.



[2008-03-01 09:09:15] losd at mail dot dk

Doh, sorry, thought I could edit the original text. Just delete that
comment.

But yes, as Daniel correctly points out, it's all Windows permission
handling (As my reproduce code also shows), not just related to network
shares... I experienced it in one at first, I guess that's why it stuck
in my brain.



[2008-03-01 09:02:02] losd at mail dot dk

Description:

If the parent directory of a Windows directory is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's

subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir

Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?



[2008-03-01 01:10:46] dani...@php.net

I am experiencing this issue as well, but on local directories, not
network shares.  My OS is Windows XP Pro.  The opendir() functionality
works correctly in release 5.2.1.  The functionality is broken in
releases 5.2.2 through 5.2.5, plus the 526-php5.2-win32-200802292130 and
php5.3-win32-200802201330 snapshots.



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

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



#47265 [Opn->Asn]: generating phar.phar failes because of safe_mode

2009-02-03 Thread cellog
 ID:   47265
 Updated by:   cel...@php.net
 Reported By:  lars at larswolter dot de
-Status:   Open
+Status:   Assigned
 Bug Type: PHAR related
 Operating System: Linux
 PHP Version:  5.3.0beta1
-Assigned To:  
+Assigned To:  cellog
 New Comment:

I'll handle this one


Previous Comments:


[2009-02-01 23:28:33] lars at larswolter dot de

Description:

Compilation failes while generating phar.phar. This happens if php is
configured with safe_mode to on.

Workaround?
Add -d 'safe_mode=0' to PHP_PHARCMD_SETTINGS

Reproduce code:
---
'./configure' '--without-mm' \
'--with-mysql' '--prefix=/usr/lib/php5' \
'--with-mcrypt' \
'--enable-safe-mode' \
'--with-openssl' '--with-zlib' '--enable-calendar' \
'--enable-exif' '--enable-ftp' \
'--with-gd' '--with-imap' '--with-kerberos' \
'--with-imap-ssl' \
'--enable-gd-native-ttf' \
'--enable-force-cgi-redirect' \
'--with-freetype-dir=/usr/include/freetype2' \
'--with-jpeg-dir=/usr/lib' \
'--with-gettext' '--with-iconv' '--enable-mbstring=all' \
'--enable-mbregex' '--with-xsl' '--with-pdo-mysql'

Expected result:

Build complete.

Actual result:
--
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/home/lars/php-5.3.0beta1/ext/phar/phar.php on line 706
Pear package PHP_Archive or Archive.php class file not found.

Warning: Phar::__construct(): SAFE MODE Restriction in effect.  The
script whose uid is 0 is not allowed to access
/home/lars/php-5.3.0beta1/ext/phar owned by uid 1001 in
/home/lars/php-5.3.0beta1/ext/phar/phar.php on line 1055

Fatal error: Uncaught exception 'UnexpectedValueException' with message
'Phar creation or opening failed' in
/home/lars/php-5.3.0beta1/ext/phar/phar.php:1055
Stack trace:
#0 /home/lars/php-5.3.0beta1/ext/phar/phar.php(1055):
Phar->__construct('/home/lars/php-5.3.0...', 0, 'pharcommand')
#1 [internal function]: PharCommand->cli_cmd_run_pack(Array)
#2 /home/lars/php-5.3.0beta1/ext/phar/phar.php(225):
call_user_func(Array, Array)
#3 /home/lars/php-5.3.0beta1/ext/phar/phar.php(2078):
CLICommand->__construct(19, Array)
#4 {main}
  thrown in /home/lars/php-5.3.0beta1/ext/phar/phar.php on line 1055
make: *** [ext/phar/phar.phar] Fehler 255





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



#47085 [Opn->Asn]: rename() returns true even if the file in PHAR does not exist

2009-02-03 Thread cellog
 ID:   47085
 Updated by:   cel...@php.net
 Reported By:  vr...@php.net
-Status:   Open
+Status:   Assigned
 Bug Type: PHAR related
 Operating System: Windows
 PHP Version:  5.3.0alpha3
-Assigned To:  
+Assigned To:  cellog
 New Comment:

didn't realize this one was out there, I'll take a look


Previous Comments:


[2009-01-13 11:27:03] vr...@php.net

Description:

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

Reproduce code:
---



Expected result:

bool(false) and some warning

Actual result:
--
bool(true)





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



#47292 [NEW]: I can not read the socket answer

2009-02-03 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: Windows 2003 Server R2
PHP version:  5.2.8
PHP Bug Type: Sockets related
Bug description:  I can not read the socket answer

Description:

I'm trying to read the answer of a socket after I wrote the information
that I must send before, but the application freeze and don't send me any
message.

I'm monitoring the port using TCPVIEWER and I can see while the conection
is established.

Using CLARION 6 I don't have any problem comunicating with the socket
(writing and reading) my  problem is only with PHP.

I don't now if this is a bug, but after read many information about how to
use the socket I'm giving up.

Please, I need your help because we're developing a new software that
comunicate with many socket's server to pay public services in my country
and in actualy we are using Clarion 6, but with this environment we don't
have enough support.

Reproduce code:
---
$puerto_servicio = 3260;$direccion = '172.25.10.5';
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {echo "socket_create() falló: motivo: " .
socket_strerror(socket_last_error()) . ""; die();
} else {echo "OK.";}
$resultado = socket_connect($socket, $direccion, $puerto_servicio);
if ($resultado === false) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";
} else {echo "OK.";}
$entrada=$trama800; $salida = '';
if (!socket_write($socket, $entrada, strlen($entrada))) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
if (!$salida = socket_read($socket, 426)) {
echo "socket_connect() falló en lectura.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
socket_close($socket);

Expected result:

I wait to recieve a string with 426 chars

Actual result:
--
frezze the browser

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



#47291 [NEW]: get and set are not fixed

2009-02-03 Thread ies_clan at hotmail dot com
From: ies_clan at hotmail dot com
Operating system: Windows XP
PHP version:  5.2.8
PHP Bug Type: Class/Object related
Bug description:  get and set are not fixed

Description:

get and set are not fixed: http://bugs.php.net/bug.php?id=39449

Reproduce code:
---
vars)){
return $this->vars[$Key];
}
}

public function __set($Key, $Value)
{
 $this->vars[$Key] = $Value;
}
}

class Human extends Property {}
class Pet extends Property {}

$Pet = new Pet();
$Pet->Name = 'I am a pet';

$Human = new Human();
$Human->Mypet = $Pet;
$Human->Mypet->Options['HumanID'] = 1;

print_r($Human);
?>

Expected result:

Human Object
(
[vars:protected] => Array
(
[Mypet] => Pet Object
(
[vars:protected] => Array
(
[Name] => I am a pet
)

)

)

)

Actual result:
--
Notice:  Only variable references should be returned by reference in
D:\apache\htdocs\phpbug\index.php on line 15

Notice:  Indirect modification of overloaded property Pet::$Options has no
effect in D:\apache\htdocs\phpbug\index.php on line 31

Human Object
(
[vars:protected] => Array
(
[Mypet] => Pet Object
(
[vars:protected] => Array
(
[Name] => I am a pet
)

)

)

)

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



#47290 [NEW]: Server Resets when mysql_connect() executes

2009-02-03 Thread msumar at abu dot edu dot ng
From: msumar at abu dot edu dot ng
Operating system: Windows Vista
PHP version:  5.2.8
PHP Bug Type: MySQL related
Bug description:  Server Resets when mysql_connect() executes

Description:

I installed Apache 2.2.11, PHP 5.2.8 and MySQL 5.1.30. The configuration
was properly done because phpinfo() displays as expected but any mysql
function does not execute. The server always resets.

I configured IIS the same and received the same error, 'Unknown error'.
When I uninstall MySQL 5.1.30 and replaces it with Mysql 5.0.4 beta every
thing worked well. So have the believe that something is wrong with the PHP
5.2.8 when installed with MySQL 5.1.30.


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



#47289 [NEW]: socket_read falls into endless loop if remote host disconnects

2009-02-03 Thread patryk dot szczyglowski at gmail dot com
From: patryk dot szczyglowski at gmail dot com
Operating system: Linux 2.6
PHP version:  5.2.8
PHP Bug Type: Sockets related
Bug description:  socket_read falls into endless loop if remote host disconnects

Description:

When PHP wants to read from a blocking socket when the remote host
disconnects, PHP ignores 0 return code from recv() system function and
drops into endless loop.

Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($socket, $ip, $port);
// disconnect remote host here
$rcv = socket_read($this->socket, 65536, PHP_BINARY_READ); // this line
never returns

Expected result:

socket_read returns with FALSE

--- php-5.2.8/ext/sockets/sockets.c.orig2008-10-23 22:21:30.0
+0200
+++ php-5.2.8/ext/sockets/sockets.c 2009-01-29 17:32:53.0 +0100
@@ -903,6 +903,14 @@
RETURN_FALSE;
}
 
+   if (retval == 0) {
+   php_sock->error = errno;
+   SOCKETS_G(last_error) = errno;
+
+   efree(tmpbuf);
+   RETURN_FALSE;
+   }
+
tmpbuf = erealloc(tmpbuf, retval + 1);
tmpbuf[retval] = '\0' ;
  

Actual result:
--
socket_read never returns, it gets looped in ext/sockets/sockets.c:885

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



#45393 [Com]: compile fails: cannot find -lintl

2009-02-03 Thread administrateur at goldzoneweb dot info
 ID:   45393
 Comment by:   administrateur at goldzoneweb dot info
 Reported By:  fborot at hotmail dot com
 Status:   Analyzed
 Bug Type: Sybase-ct (ctlib) related
 Operating System: linux-redhat
 PHP Version:  5.2.6
 Assigned To:  thekid
 New Comment:

Hi all,

I made a patch. It works with RHEL 5 U3, PHP 5.1.6 and Sybase 12.5 et
15.0.3.

--- php-5.1.6/ext/sybase_ct/config.m4   2009-02-03 12:11:44.0
+0100
+++ php-5.1.6/ext/sybase_ct/config.m4-ct2009-02-03
14:04:45.0 +0100
@@ -35,15 +35,15 @@
 PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
 SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
   else
-PHP_ADD_LIBRARY(cs,, SYBASE_CT_SHARED_LIBADD)
-PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD)
-PHP_ADD_LIBRARY(comn,, SYBASE_CT_SHARED_LIBADD)
-PHP_ADD_LIBRARY(intl,, SYBASE_CT_SHARED_LIBADD)
-  
-SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
+PHP_ADD_LIBRARY(sybcs,, SYBASE_CT_SHARED_LIBADD)
+PHP_ADD_LIBRARY(sybct,, SYBASE_CT_SHARED_LIBADD)
+PHP_ADD_LIBRARY(sybcomn,, SYBASE_CT_SHARED_LIBADD)
+PHP_ADD_LIBRARY(sybintl,, SYBASE_CT_SHARED_LIBADD)

-PHP_CHECK_LIBRARY(tcl, netg_errstr, [
-  PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD)
+SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs -lsybct -lsybcomn
-lsybintl"
+ 
+PHP_CHECK_LIBRARY(sybtcl, netg_errstr, [
+  PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD)
 ],[
   PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD)
 ],[


Previous Comments:


[2008-11-09 13:13:00] the...@php.net

Please see if http://sitten-polizei.de/php/sybase-configm4.diff works
for you.



[2008-10-30 10:50:35] fel...@php.net

Assigned to the maintainer.



[2008-08-01 19:16:50] pioklo at serveradmin dot pl

The reason is that with OpenClient15 the library "libintl" is renamed
in
"libsybintl" 

Try this patch 

--- php-5.2.6/ext/sybase_ct/config.m4   2007-07-03 19:25:35.0
+0200
+++ php-5.2.6/ext/sybase_ct/config.m4.diff  2008-08-01
20:40:36.0 +0200
@@ -40,7 +40,7 @@
 PHP_ADD_LIBRARY(comn,, SYBASE_CT_SHARED_LIBADD)
 PHP_ADD_LIBRARY(intl,, SYBASE_CT_SHARED_LIBADD)

-SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
+SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR  -lsybcs -lsybct -lsybcomn
-lsybintl"

 PHP_CHECK_LIBRARY(tcl, netg_errstr, [
   PHP_ADD_LIBRARY(tcl,,SYBASE_CT_SHARED_LIBADD)



[2008-06-30 18:13:47] fborot at hotmail dot com

Now I used --with-sybase-ct=/opt/sybase-11.9.2/OCS-15_0 as suggested
online since sybase changed the location of the include folder and now 
it goes a little furhter but the new error is:


Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo
Zend/zend_objects_API.lo Zend/zend_default_classes.lo
Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/getopt.lo
main/internal_functions.lo -lcrypt -lsybtcl -lintl -lcomn -lct -lcs
-lcrypt -lrt -lmysqlclient -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2
-lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz
-lm -lcrypt  -o sapi/cgi/php-cgi
/usr/bin/ld: cannot find -lintl
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
[r...@rhel-28 php-5.2.6]#



[2008-06-30 17:46:43] fborot at hotmail dot com

Description:

Hello
When running "make" after a successful "configure
--with-sybase-c=path/to/sybase/" the compile process stops and yileds
several errors, starting with:

/bin/sh /usr/local/php-5.2.6/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/sybase/ -I/usr/local/php-5.2.6/ext/sybase/
-DPHP_ATOM_INC -I/usr/local/php-5.2.6/include
-I/usr/local/php-5.2.6/main -I/usr/local/php-5.2.6
-I/usr/include/libxml2 -I/usr/local/php-5.2.6/ext/date/lib
-I/usr/include/mysql -I/home/sybase/include -I/usr/local/php-5.2.6/TSRM
-I/usr/local/php-5.2.6/Zend-I/usr/include -g -O2  -prefer-non-pic -c
/usr/local/php-5.2.6/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.lo
/usr/local/php-5.2.6/ext/sybase/php_sybase_db.c:39:22: error:
sybfront.h: No such file or directory
/usr/local/php-5.2.6/ext/sybase/php_sybase_db.c:40:19: error: sybdb.h:
No such file or directory
/usr/local/php-5.2.6/ext/sybase/php_sybase_db.c:41:22: error:
syberror.h: No such file or directory

it looks like sybdb.h, sybfront.h and syberror.h can no be found






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



#47252 [Com]: Memory corruption bug in extract()

2009-02-03 Thread a dot boykov at timeweb dot ru
 ID:   47252
 Comment by:   a dot boykov at timeweb dot ru
 Reported By:  a dot boykov at timeweb dot ru
 Status:   Feedback
 Bug Type: Arrays related
 Operating System: Gentoo Linux 2008.0
 PHP Version:  5.2.8
 New Comment:

To create a simple example, unfortunately, it will not turn out. 

On a simple example all works correctly. 

And in a ready product already there is such error. 

It was possible to spend debugging with the help gdb:

...
0x7f8b8c8c9073 in select () from /lib/libc.so.6
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f8b8d8bd6f0 (LWP 9423)]
zend_hash_exists (ht=0xb37b98, arKey=0x213f000 , nKeyLength=4620568) at
/usr/src/php-5.2.8/Zend/zend_hash.h:260
260 hash = ((hash << 5) + hash) + *arKey++;

(gdb) info program
Using the running image of attached Thread 0x7f8b8d8bd6f0 (LWP 9423).
Program stopped at 0x7f8b8b856590.
It stopped with signal SIGSEGV, Segmentation fault.

(gdb) info registers
rax0xef6512c00c2f6985   -1196529509949544059
rbx0x1faabb833205176
rcx0xeca2580185ed30a0   -1395456170966306656
rdx0x0  0
rsi0x213f00034861056
rdi0xb37b98 11762584
rbp0x7f8b8bed55c0   0x7f8b8bed55c0
rsp0x7fff959d94a0   0x7fff959d94a0
r8 0x468118 4620568
r9 0xdc076ac1921c9a25   -2591985680915850715
r100xa  10
r110x5fc560 6276448
r120x0  0
r130x7f8b8beb72a8   140237324645032
r140xac47a0 11290528
r150x1faabe833205224
rip0x7f8b8b856590   0x7f8b8b856590 
eflags 0x10206  [ PF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0  0
es 0x0  0
fs 0x0  0
gs 0x0  0
fctrl  Couldn't get floating point status: No such process.

(gdb) info line
Line 260 of "/usr/src/php-5.2.8/Zend/zend_hash.h" starts at address
0x7f8b8b8557c0  and ends at 0x7f8b8b8557c4
.

If you tell me how to make core dump of process (PHP working as the
module) - I also will give it.


Previous Comments:


[2009-01-30 20:59:56] fel...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-01-30 18:31:19] a dot boykov at timeweb dot ru

Description:

In function extract() not the length of a line key always is correctly
defined. 

Sometimes it is calculated incorrectly and any following operation with
this string leads to memory corruption. 

Here an example which has been received at debugging.

name: bDescPageNumbering, len: 6276448

[Fri Jan 30 21:18:08 2009] [notice] child pid 19801 exit signal
Segmentation fault (11)

We are used this patch to fix problem:

--- php-5.2.8/ext/standard/array.c  2009-01-30 21:23:25.0
+0300
+++ php-5.2.8/ext/standard/array.c  2009-01-30 21:24:35.0
+0300
@@ -1397,6 +1397,9 @@
key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(var_array),
&var_name, &var_name_len, &num_key, 0, &pos);
var_exists = 0;

+if (key_type == HASH_KEY_IS_STRING)
+  var_name_len = strlen(var_name);
+
if (key_type == HASH_KEY_IS_STRING) {
  var_name_len--;
  var_exists = zend_hash_exists(EG(active_symbol_table), var_name,
var_name_len + 1);


With this patch all works well, but I think it does not exclude a
problem source.

name: bDescPageNumbering, len: 18






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



#43817 [Csd->Asn]: opendir() fails on Windows directories with parent directory unaccessible

2009-02-03 Thread danielc
 ID:   43817
 Updated by:   dani...@php.net
 Reported By:  losd at mail dot dk
-Status:   Closed
+Status:   Assigned
 Bug Type: Directory function related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 Assigned To:  dmitry
 New Comment:

This problem still exists in 5.3.0 beta 1
(http://windows.php.net/downloads/qa/php-5.3.0beta1-Win32-VC6-x86.zip)


Previous Comments:


[2008-08-12 09:42:06] dmi...@php.net

Fixed in CVS HEAD and PHP_5_3.



[2008-03-01 09:09:15] losd at mail dot dk

Doh, sorry, thought I could edit the original text. Just delete that
comment.

But yes, as Daniel correctly points out, it's all Windows permission
handling (As my reproduce code also shows), not just related to network
shares... I experienced it in one at first, I guess that's why it stuck
in my brain.



[2008-03-01 09:02:02] losd at mail dot dk

Description:

If the parent directory of a Windows directory is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's

subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir

Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?



[2008-03-01 01:10:46] dani...@php.net

I am experiencing this issue as well, but on local directories, not
network shares.  My OS is Windows XP Pro.  The opendir() functionality
works correctly in release 5.2.1.  The functionality is broken in
releases 5.2.2 through 5.2.5, plus the 526-php5.2-win32-200802292130 and
php5.3-win32-200802201330 snapshots.



[2008-01-11 13:36:50] losd at mail dot dk

Temporary workaround found, but only if there is a known subdirectory
inside the top accessible directory:

opendir("C:/Test/NoAccess/Access/Subdir/..");



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

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



#47206 [Asn->Bgs]: Unintended API change in XSLTProcessor

2009-02-03 Thread rrichards
 ID:   47206
 Updated by:   rricha...@php.net
 Reported By:  nfor...@php.net
-Status:   Assigned
+Status:   Bogus
 Bug Type: XSLT related
 Operating System: Linux
 PHP Version:  5.3CVS-2009-01-24 (snap)
 Assigned To:  rrichards
 New Comment:

The type hint added in 5.2.6 broke BC and wasn't detected until post 
5.2.8 where it was fixed. It shouldn't have been added in the first 
place


Previous Comments:


[2009-02-03 12:06:18] chr...@php.net

dmitry changed that 8 weeks ago with the message:

***
MFH: fix arginfo - these also accept SimpleXMLElement
***

http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?
r1=1.39.2.2.2.9.2.13&r2=1.39.2.2.2.9.2.14

So, the removing of the typehint has a reason and I don't see a way to

make it BC *and* accept SimpleXMLElement




[2009-01-30 17:04:17] david dot zuelke at bitextender dot com

(mind you, Rob, that this applies to transformToDoc(), too)



[2009-01-30 17:01:14] johan...@php.net

Rob,

any problem with a atch like 

Index: ext/xsl/xsltprocessor.c
===
RCS file: /repository/php-src/ext/xsl/xsltprocessor.c,v
retrieving revision 1.39.2.2.2.9.2.15
diff -u -p -r1.39.2.2.2.9.2.15 xsltprocessor.c
--- ext/xsl/xsltprocessor.c 31 Dec 2008 11:15:47
-   1.39.2.2.2.9.2.15
+++ ext/xsl/xsltprocessor.c 30 Jan 2009 16:59:15 -
@@ -29,7 +29,7 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0,
0, 1)
-   ZEND_ARG_INFO(0, doc)
+   ZEND_ARG_OBJ_INFO(0, doc, "DOMDocument", 0)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0,
0, 1)


I didn't properly test it but it should work ...



[2009-01-30 15:01:22] david dot zuelke at bitextender dot com

Same problem here. Subclasses of XSLTProcessor can work without
E_STRICT 
warning either in 5.2 or in 5.3, but not in both :(



[2009-01-24 05:02:08] nfor...@php.net

Description:

In 5.3, attempting to extend XSLTProcessor in the same way as in 5.2
(with type hinting on the method parameters) yields an E_STRICT message:
"Declaration of ExtendedXSLTProcessor::importStylesheet() should be
compatible with that of XSLTProcessor::importStylesheet()".

Removing the type hint fixes the problem in 5.3. I am assuming this
behavior is unintentional, and that the type hint should still be
associated with the methods.

This applies to both ::importStylesheet() and ::transformToDoc(), and
potentially other methods as well.

Reproduce code:
---


Actual result:
--
Strict Standards: Declaration of
ExtendedXSLTProcessor::importStylesheet() should be compatible with that
of XSLTProcessor::importStylesheet() in /.../test.php on line 8





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



#47137 [Opn->Bgs]: LIBXML_NOXMLDECL is not working anymore

2009-02-03 Thread rrichards
 ID:   47137
 Updated by:   rricha...@php.net
 Reported By:  romain dot lalaut at laposte dot net
-Status:   Open
+Status:   Bogus
 Bug Type: XML related
 Operating System: Linux
 PHP Version:  5.3.0alpha3
 New Comment:

That is a save option which hasn't yet been implemented so has never 
worked


Previous Comments:


[2009-01-17 13:58:07] romain dot lalaut at laposte dot net

Description:

It seems that saving a DOMDocument which is loaded with
LIBXML_NOXMLDECL doesn't avoid to get the xml declaration.
It is a big problem to produce a xhtml document for internet because 
IE6 is not dead yet.

Tested with libxml2 2.6.32 and 2.7.2

Reproduce code:
---
';

$doc = new DOMDocument();
$doc->loadXml($xml, LIBXML_NOXMLDECL);

echo $doc->saveXML();

Expected result:



Actual result:
--







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



#46026 [Csd->Asn]: bz2.decompress/zlib.inflate filter tries to decompress after end of stream

2009-02-03 Thread lsmith
 ID:   46026
 Updated by:   lsm...@php.net
 Reported By:  Keisial at gmail dot com
-Status:   Closed
+Status:   Assigned
 Bug Type: Bzip2 Related
 Operating System: *
 PHP Version:  5.2CVS-2008-09-08 (snap)
 Assigned To:  cellog


Previous Comments:


[2008-10-11 21:54:13] Keisial at gmail dot com

Wow, thank you very much. :-)

Sorry about the tabs. My editor messed them (I know, I know, real
programmers use butterflies...).

However, consider doing this:
if (SUCCESS == zend_hash_find(HASH_OF(filterparams), "concatenated",
sizeof("concatenated"), (void **) &tmpzval) ) {
-SEPARATE_ZVAL(tmpzval);
-convert_to_boolean_ex(tmpzval);
 data->expect_concatenated = Z_LVAL_PP(tmpzval);
-zval_ptr_dtor(tmpzval);
 tmpzval = NULL;
}

There were memory corruption problems with the previous patch, and
zval_ptr_dtor seemed to be the source (thanks to rrichards and pajoye
for their help on this on irc). Also, the other zval_ptr_dtor below
(present there since first version by Sara) would be a "good possible
candidate for another possible point of mem corruption".



[2008-10-11 19:15:22] cel...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

fixed in PHP 5.2, 5.3, 6.0.  Concatenation was only added in PHP 5.3
and 6.0, as new features cannot be added to PHP 5.2



[2008-10-11 19:08:35] cel...@php.net

changing summary to reflect addition of zlib problem



[2008-10-11 18:25:14] cel...@php.net

In the future, please follow 2 important elements of the coding
standards:

1) use tabs instead of spaces
2) always use {} around if/else blocks

I had to waste 15 minutes just getting the patch formatted correctly
before I could even begin testing it.  I don't like wasting time.



[2008-10-11 17:12:10] cel...@php.net

this same bug applies to zlib stream filter, and also happens simply
when trying to read from a filtered stream that contains a limited
amount of compressed data (as in a zip archive with a bz2-compressed
file), as php_stream_fill_read_buffer reads in maxlen data, triggering
the problem you found.  I'll try to get this fixed up and put in a few
tests



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

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



#34657 [Bgs]: If you get a communication problem when loading the WSDL, it fatal's

2009-02-03 Thread cweiske
 ID:   34657
 Updated by:   cwei...@php.net
 Reported By:  gareth at wsys dot co dot uk
 Status:   Bogus
 Bug Type: SOAP related
 Operating System: Windows, Linux
 PHP Version:  5.1.6
 Assigned To:  dmitry
 New Comment:

http://bugs.xdebug.org/view.php?id=249


Previous Comments:


[2007-03-30 10:10:52] dmi...@php.net

This is a XDEBUG issue, ext/soap may fix nothing.



[2007-03-26 15:41:48] justin dot hendrickson+pear at gmail dot com

Work around:

try {
if(!...@file_get_contents($wsdl)) {
throw new SoapFault('Server', 'No WSDL found at ' . $wsdl);
}
$soap = new SoapClient($wsdl);
// ...
} catch(SoapFault $e) {
// ...
}



[2007-03-15 10:24:30] craigf at togetheragency dot co dot uk

Contrary to my previous post, the error is not platform specific, but
rather, a conflict with the xdebug module. With xdebug enabled, the
soapfault does not get raised. Using xdebug_disable() prior to the
try/catch block will result in the expected result of a catch with
soapfault.

Warnings still exist, but can be disabled with error_reporting() prior
to the try/catch as with xdebug.



[2007-03-14 23:01:35] craigf at togetheragency dot co dot uk

5.2.2-dev as of today (and 5.2.1) on windows is not raising a SoapFault
exception regardless of if exceptions is true or false, as stated by
jhendric. However, 5.2.1 on FreeBSD 4 (installed from ports) is raising
an uncaught SoapFault exception as was stated by gareth . So it appears
to be platform specific. In both cases, 3 additional warnings are
raised.

IIS:

Warning: SoapClient::SoapClient(): php_network_getaddresses:
getaddrinfo failed: No such host is known. in c:\web\test.php on line 2
Warning: SoapClient::SoapClient(h^tp://some.random.host/test.wsdl):
failed to open stream: No such file or directory in c:\web\test.php on
line 2
Warning: SoapClient::SoapClient(): I/O warning : failed to load
external entity "h^tp://some.random.host/test.wsdl" in c:\web\test.php
on line 2
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from
'h^tp://some.random.host/test.wsdl' in c:\web\test.php on line 2

FreeBSD 4:

Warning: SoapClient::SoapClient(): php_network_getaddresses:
getaddrinfo failed: No address associated with hostname in
/usr/home/www/test.php on line 2
Warning: SoapClient::SoapClient(h^tp://some.random.host/test.wsdl):
failed to open stream: Unknown error: 0 in /usr/home/www/test.php on
line 2
Warning: SoapClient::SoapClient(): I/O warning : failed to load
external entity "h^tp://some.random.host/test.wsdl" in
/usr/home/www/test.php on line 2
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from 'h^tp://some.random.host/test.wsdl' in
/usr/home/www/test.php:2 Stack trace: #0 /usr/home/www/test.php(2):
SoapClient->SoapClient('h^tp://some.ran...') #1 {main} thrown in
/usr/home/www/test.php on line 2

Note: had to replace http due to spam filter.



[2007-02-21 17:25:59] lsm...@php.net

In general nothing in ext/soap should be fatal if its not within the
control of the local php application. This means missing WSDL, changes
to the WSDL etc. All of this needs to be catchable in some way or
another (exception, returning false .. etc).

Also if an exception is thrown no warnings should be thrown for the
same issue.



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

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



#47288 [Opn]: Component parameter in parse_url does not work properly

2009-02-03 Thread hakan at e-bite dot se
 ID:   47288
 User updated by:  hakan at e-bite dot se
 Reported By:  hakan at e-bite dot se
 Status:   Open
 Bug Type: *URL Functions
 Operating System: XP and Linux
 PHP Version:  5.2.8
 New Comment:

PS PHP_URL_PATH is just an example. Expected result for scheme and host
is not as stated. I also tried PHP_URL_SCHEME and  PHP_URL_HOST with
slightly different results. 
Håkan


Previous Comments:


[2009-02-03 13:26:06] hakan at e-bite dot se

Description:

Parse_url() function does not work properly with component parameter as
manual:
http://www.php.net/manual/en/function.parse-url.php

The function works well without the parameter

Tested:
PHP Version 5.2.8 on Win XP
PHP Version 5.2.0-8+etch13 on Linux


Håkan Askengren
e-bite


Reproduce code:
---
$url="http://www.php.net";;

//Without component parameter, Works OK
$urlInfo = parse_url($url );
var_dump($urlInfo);


//With component parameter
$urlInfo = parse_url($url, PHP_URL_PATH );
var_dump($urlInfo);



Expected result:

Expected:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}


Actual result:
--
Actual:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

NULL





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



#47288 [NEW]: Component parameter in parse_url does not work properly

2009-02-03 Thread hakan at e-bite dot se
From: hakan at e-bite dot se
Operating system: XP and Linux
PHP version:  5.2.8
PHP Bug Type: *URL Functions
Bug description:  Component parameter in parse_url does not work properly

Description:

Parse_url() function does not work properly with component parameter as
manual:
http://www.php.net/manual/en/function.parse-url.php

The function works well without the parameter

Tested:
PHP Version 5.2.8 on Win XP
PHP Version 5.2.0-8+etch13 on Linux


Håkan Askengren
e-bite


Reproduce code:
---
$url="http://www.php.net";;

//Without component parameter, Works OK
$urlInfo = parse_url($url );
var_dump($urlInfo);


//With component parameter
$urlInfo = parse_url($url, PHP_URL_PATH );
var_dump($urlInfo);



Expected result:

Expected:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}


Actual result:
--
Actual:
array(2) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "www.php.net"
}

NULL

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



#47031 [Asn->Csd]: DualIterator example uses wrong constants

2009-02-03 Thread colder
 ID:   47031
 Updated by:   col...@php.net
 Reported By:  jpetso at gmx dot at
-Status:   Assigned
+Status:   Closed
 Bug Type: SPL related
 Operating System: *
 PHP Version:  5.3.0alpha3
 Assigned To:  colder
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch!


Previous Comments:


[2009-01-07 19:15:07] jpetso at gmx dot at

Oops, forgot to change the default flags for the constructor, and to
fix up the method docs as well. Here's the improved patch.

--- dualiterator.1.4.inc2009-01-07 19:47:18.0 +0100
+++ dualiterator.fixed.inc  2009-01-07 20:12:59.0 +0100
@@ -23,10 +23,9 @@ class DualIterator implements Iterator
 
const KEY_LHS   = 0x10;
const KEY_RHS   = 0x20;
-   const KEY_ARRAY = 0x30;
const KEY_0 = 0x00;

-   const DEFAULT_FLAGS = 0x33;
+   const DEFAULT_FLAGS = 0x13;

private $lhs;
private $rhs;
@@ -38,8 +37,8 @@ class DualIterator implements Iterator
 * @param rhs   Right Hand Side Iterator
 * @param flags iteration flags
 */
-   function __construct(Iterator $lhs, Iterator $rhs, 
-   $flags = 0x33
/*DualIterator::DEFAULT_FLAGS*/)
+   function __construct(Iterator $lhs, Iterator $rhs,
+   $flags = 0x13
/*DualIterator::DEFAULT_FLAGS*/)
{
$this->lhs   = $lhs;
$this->rhs   = $rhs;
@@ -107,20 +106,18 @@ class DualIterator implements Iterator
}
}
 
-   /** @return current value depending on KEY_* flags
+   /** @return key value depending on KEY_* flags
 */ 
function key()
{
switch($this->flags & 0xF0)
{
default:
-   case self::CURRENT_ARRAY:
-   return array($this->lhs->key(), $this->rhs-
-   case self::CURRENT_LHS:
+   case self::KEY_LHS:
return $this->lhs->key();
-   case self::CURRENT_RHS:
+   case self::KEY_RHS:
return $this->rhs->key();
-   case self::CURRENT_0:
+   case self::KEY_0:
return NULL;
}
}



[2009-01-07 19:04:23] jpetso at gmx dot at

The diff to fix the bug.

--- dualiterator.1.4.inc2009-01-07 19:47:18.0 +0100
+++ dualiterator.fixed.inc  2009-01-07 20:01:31.0 +0100
@@ -23,10 +23,9 @@ class DualIterator implements Iterator
 
const KEY_LHS   = 0x10;
const KEY_RHS   = 0x20;
-   const KEY_ARRAY = 0x30;
const KEY_0 = 0x00;

-   const DEFAULT_FLAGS = 0x33;
+   const DEFAULT_FLAGS = 0x13;

private $lhs;
private $rhs;
@@ -114,13 +113,11 @@ class DualIterator implements Iterator
switch($this->flags & 0xF0)
{
default:
-   case self::CURRENT_ARRAY:
-   return array($this->lhs->key(), $this->rhs-
-   case self::CURRENT_LHS:
+   case self::KEY_LHS:
return $this->lhs->key();
-   case self::CURRENT_RHS:
+   case self::KEY_RHS:
return $this->rhs->key();
-   case self::CURRENT_0:
+   case self::KEY_0:
return NULL;
}
}



[2009-01-07 19:03:29] jpetso at gmx dot at

Description:

Regarding the DualIterator example, current version:
http://cvs.php.net/viewvc.cgi/php-

In its API documentation, the key() method claims to use the
DualIterator::KEY_* constants, but the code makes use of CURRENT_*
instead.

Also, does the *_ARRAY option (which is used by default even for
key()) does not make a lot of sense because arrays cannot be used as
keys at least for foreach loops. (Might work with low-level iterator
usage, but then again keys should probably be *real* keys in any
case.)

It would be nice to have these issues fixed (diff attached further
down).

Related feature request, totally not in scope for this bug report
(sorry): it might be worthwhile to extend the flags to
{CURRENT,KEY}_{LHS,RHS}_{KEY,VALUE} in order to make it possible to
e.g. use the left hand side's current value as key for the iterator.
At least, that's what I'm going to use my derived class for.

Thanks for having a look (and for your work on PHP), reg

#47206 [Asn]: Unintended API change in XSLTProcessor

2009-02-03 Thread chregu
 ID:   47206
 Updated by:   chr...@php.net
 Reported By:  nfor...@php.net
 Status:   Assigned
 Bug Type: XSLT related
 Operating System: Linux
 PHP Version:  5.3CVS-2009-01-24 (snap)
 Assigned To:  rrichards
 New Comment:

dmitry changed that 8 weeks ago with the message:

***
MFH: fix arginfo - these also accept SimpleXMLElement
***

http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?
r1=1.39.2.2.2.9.2.13&r2=1.39.2.2.2.9.2.14

So, the removing of the typehint has a reason and I don't see a way to

make it BC *and* accept SimpleXMLElement



Previous Comments:


[2009-01-30 17:04:17] david dot zuelke at bitextender dot com

(mind you, Rob, that this applies to transformToDoc(), too)



[2009-01-30 17:01:14] johan...@php.net

Rob,

any problem with a atch like 

Index: ext/xsl/xsltprocessor.c
===
RCS file: /repository/php-src/ext/xsl/xsltprocessor.c,v
retrieving revision 1.39.2.2.2.9.2.15
diff -u -p -r1.39.2.2.2.9.2.15 xsltprocessor.c
--- ext/xsl/xsltprocessor.c 31 Dec 2008 11:15:47
-   1.39.2.2.2.9.2.15
+++ ext/xsl/xsltprocessor.c 30 Jan 2009 16:59:15 -
@@ -29,7 +29,7 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0,
0, 1)
-   ZEND_ARG_INFO(0, doc)
+   ZEND_ARG_OBJ_INFO(0, doc, "DOMDocument", 0)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0,
0, 1)


I didn't properly test it but it should work ...



[2009-01-30 15:01:22] david dot zuelke at bitextender dot com

Same problem here. Subclasses of XSLTProcessor can work without
E_STRICT 
warning either in 5.2 or in 5.3, but not in both :(



[2009-01-24 05:02:08] nfor...@php.net

Description:

In 5.3, attempting to extend XSLTProcessor in the same way as in 5.2
(with type hinting on the method parameters) yields an E_STRICT message:
"Declaration of ExtendedXSLTProcessor::importStylesheet() should be
compatible with that of XSLTProcessor::importStylesheet()".

Removing the type hint fixes the problem in 5.3. I am assuming this
behavior is unintentional, and that the type hint should still be
associated with the methods.

This applies to both ::importStylesheet() and ::transformToDoc(), and
potentially other methods as well.

Reproduce code:
---


Actual result:
--
Strict Standards: Declaration of
ExtendedXSLTProcessor::importStylesheet() should be compatible with that
of XSLTProcessor::importStylesheet() in /.../test.php on line 8





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



#45468 [Fbk]: socket file problem when mysqlnd is enabled

2009-02-03 Thread andrey
 ID:   45468
 Updated by:   and...@php.net
 Reported By:  michael dot kofler at gmx dot com
 Status:   Feedback
 Bug Type: MySQLi related
 Operating System: *
 PHP Version:  5.3.0alpha1
 Assigned To:  mysql
 New Comment:

 Hi,
it was a problem, the Unix path, in the extensions, not mysqlnd. Yes,
mysqlnd uses /tmp/mysql.sock, but actually there are no configure
options for mysqlnd. --with-mysql-sock is actually an option of
ext/mysql . It wasn't used in the past, as far as I recall, but current
5_3 and HEAD do use it to set default value for the socket path, which
can be overwritten by the user. Both for ext/mysql and mysqli.
This if from ext/mysql/php_mysql.c :
#ifdef MYSQL_UNIX_ADDR
STD_PHP_INI_ENTRY("mysql.default_socket",   
MYSQL_UNIX_ADDR,PHP_INI_ALL,OnUpdateStringUnempty,  default_socket, 
zend_mysql_globals, mysql_globals)
#else
STD_PHP_INI_ENTRY("mysql.default_socket",   NULL,   
PHP_INI_ALL,OnUpdateStringUnempty,  default_socket, 
zend_mysql_globals, mysql_globals)
#endif


This is from ext/mysqli/mysql.c :
#ifdef PHP_MYSQL_UNIX_SOCK_ADDR
STD_PHP_INI_ENTRY("mysqli.default_socket",  
MYSQL_UNIX_ADDR,PHP_INI_ALL,OnUpdateStringUnempty,  default_socket, 
zend_mysqli_globals,mysqli_globals)
#else
STD_PHP_INI_ENTRY("mysqli.default_socket",  NULL,   
PHP_INI_ALL,OnUpdateStringUnempty,  default_socket, 
zend_mysqli_globals,mysqli_globals)
#endif

MYSQL_UNIX_ADDR is a macro, for PHP_MYSQL_UNIX_ADDR, which is defined
by the configure script if --with-mysql-sock is used.

In this regard, PDO doesn't use --with-mysql-sock. PDO_MYSQL used
mysql_config to find the socket, but for mysqln defaults to
/tmp/mysql.sock , which seems like bug, because of inconsistency.
This is something for Johannes

Best,
Andrey


Previous Comments:


[2009-02-03 11:43:38] johan...@php.net

Please try using this CVS snapshot:

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

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

--with-mysql-sock should work now properly



[2008-08-19 20:32:28] bob dot kellum at gmail dot com

Another possibility is to use the method described on this page:
http://dev.mysql.com/doc/refman/5.1/en/old-client.html
to craft an account that uses the older authentication scheme.
This page states that many PHP applications may need to use this
workaround.
I found it (and this page) while troubleshooting a different "old
client" issue.



[2008-08-07 08:01:44] michael dot kofler at gmx dot com

re-tested on Linux with alpha1, compiled with this configuration:

configure --with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--enable-pdo \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/usr/bin/apxs2 \
--with-zlib \
--with-gd \
--with-config-file-scan-dir=/etc/php5/apache2 \
--with-jpeg-dir=/usr/lib \
--enable-exif \
--libdir=/usr/lib \
--enable-mbstring  

also tried

--with-mysql-sock=/var/run/mysqld \

result: mysql, mysqli and PDO/mysql, all using mysqlnd, still look for
the socket file /tmp/mysql.sock and ignore --with-mysql-sock

if I compile without mysqlnd and without the --with-mysql-sock option,
PHP automatically finds the right socket file, probably because libmysql
reads the [client] settings in /etc/mysql/my.cnf

my solution for now: I changed all socket options in /etc/mysql/my.cnf
and /etc/mysql/debian.cnf

it would be better either to provide a working configure option for PHP
(--mysqlnd-sock=...) or to evaluate my.cnf within mysqlnd

--

PS: as to mysqlnd not supporting old MySQL authentication: perfectly
fine for me, but *do document* it in some PHP 5.3 update advisory;
otherwise I am pretty sure the update to PHP 5.3 will cause trouble for
many MySQL users



[2008-07-23 11:37:26] u...@php.net

>From the begin on mysqlnd has been described as MySQL 4.1+. We won't
make it work with any MySQL <4.1. See also the MySQL Lifecycle Policy.

Those distributions that use old_passwords=1 have two choices: use a
different configure for PHP and use libmysql like ever since or take the
challenge of an upgrade. PHP 4 will become history at some point in time
and so will MySQL 4.1.

If you are using MySQL < 4.1 and it works with libmysql all is fine.
mysqlnd is does not support MySQL <4.1 nor does it support
old_passwords=1: no bug.



[2008-07-21 18:23:31] and...@php.net

The old authentication method is insecure and should not be used. Also
MySQL serve

#47017 [Opn->Asn]: mysqlnd does not work with MYSQL_CLIENT_COMPRESS flag

2009-02-03 Thread johannes
 ID:   47017
 Updated by:   johan...@php.net
 Reported By:  surfchen at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MySQL related
 Operating System: Mac OSX
 PHP Version:  5.3CVS-2009-01-06 (snap)
-Assigned To:  
+Assigned To:  mysql
 New Comment:

MYSQL_CLIENT_COMPRESS, in most cases, costs CPU but doesn't result in a
measurable gain in throughput. It will most likely not be implemented in
mysqlnd till 5.3.0 is released.


Previous Comments:


[2009-01-19 09:56:17] surfchen at gmail dot com

typo:
there is error,warning => there is no error,warning



[2009-01-08 12:22:35] surfchen at gmail dot com

> Is the bug that the connection cannot be used after setting the flag
or that the compressed protocol is not supported? 
This is can be used for mysql_get_server_info()(maybe this function was
getting these info on connecting) and similar functions,but can't be
used for mysql_query().What's more,when using for mysql_set_charset(),a
large memory was allocated(Fatal error: Allowed memory size of 134217728
bytes exhausted (tried to allocate 807601282 bytes)),It's so
strange.(memory problem is another topic, sorry for explaining here.)


> Do you use the compression and how does it make your application run
faster? 
I can't follow your meaning.This question seems not related to our
topic.

> Is your MySQL server on the local network or remote?
I have tested both unix socket and tcp in my box.No "network".And my
mysql server have compression enabled(it need to be enable?I forget.).It
can be connected and used with php ext/mysql driven by lib libmysql with
the MYSQL_CLIENT_COMPRESS.so it's not a server problem.

Let me desc more detail.

I don't know mysqlnd how to link and use compression lib,but I have
compile with "./configure --with-mysql=mysqlnd --with-zlib
--with-zlib-dir=/usr/local" and I can see "ZLib Support => enabled" in
php -i(means that the zlib dir are correct.), and During the
compilation,there is error ,warning or notice tell me that "you was
doing incorrectly".

This bug is raised whether enable zts or not.



[2009-01-08 10:48:51] and...@php.net

Is the bug that the connection cannot be used after setting the flag or
that the compressed protocol is not supported? Do you use the
compression and how does it make your application run faster? Is your
MySQL server on the local network or remote?

Thanks you!
Andrey



[2009-01-06 10:45:39] surfchen at gmail dot com

Description:

If mysql_connect(use mysqlnd as driver) with MYSQL_CLIENT_COMPRESS,the
script blocks on mysql_query calling for a while and output warning.

Reproduce code:
---
mysql_connect('127.0.0.1:3306','root','urpig',false,MYSQL_CLIENT_COMPRESS);
mysql_query('SELECT 1');

Expected result:

no warning

Actual result:
--
Warning: mysql_query(): Error while reading SET_OPTION's EOF packet.
PID=20646





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



#45468 [Asn->Fbk]: socket file problem when mysqlnd is enabled

2009-02-03 Thread johannes
 ID:   45468
 Updated by:   johan...@php.net
 Reported By:  michael dot kofler at gmx dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: *
 PHP Version:  5.3.0alpha1
 Assigned To:  mysql
 New Comment:

Please try using this CVS snapshot:

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

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

--with-mysql-sock should work now properly


Previous Comments:


[2008-08-19 20:32:28] bob dot kellum at gmail dot com

Another possibility is to use the method described on this page:
http://dev.mysql.com/doc/refman/5.1/en/old-client.html
to craft an account that uses the older authentication scheme.
This page states that many PHP applications may need to use this
workaround.
I found it (and this page) while troubleshooting a different "old
client" issue.



[2008-08-07 08:01:44] michael dot kofler at gmx dot com

re-tested on Linux with alpha1, compiled with this configuration:

configure --with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--enable-pdo \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/usr/bin/apxs2 \
--with-zlib \
--with-gd \
--with-config-file-scan-dir=/etc/php5/apache2 \
--with-jpeg-dir=/usr/lib \
--enable-exif \
--libdir=/usr/lib \
--enable-mbstring  

also tried

--with-mysql-sock=/var/run/mysqld \

result: mysql, mysqli and PDO/mysql, all using mysqlnd, still look for
the socket file /tmp/mysql.sock and ignore --with-mysql-sock

if I compile without mysqlnd and without the --with-mysql-sock option,
PHP automatically finds the right socket file, probably because libmysql
reads the [client] settings in /etc/mysql/my.cnf

my solution for now: I changed all socket options in /etc/mysql/my.cnf
and /etc/mysql/debian.cnf

it would be better either to provide a working configure option for PHP
(--mysqlnd-sock=...) or to evaluate my.cnf within mysqlnd

--

PS: as to mysqlnd not supporting old MySQL authentication: perfectly
fine for me, but *do document* it in some PHP 5.3 update advisory;
otherwise I am pretty sure the update to PHP 5.3 will cause trouble for
many MySQL users



[2008-07-23 11:37:26] u...@php.net

>From the begin on mysqlnd has been described as MySQL 4.1+. We won't
make it work with any MySQL <4.1. See also the MySQL Lifecycle Policy.

Those distributions that use old_passwords=1 have two choices: use a
different configure for PHP and use libmysql like ever since or take the
challenge of an upgrade. PHP 4 will become history at some point in time
and so will MySQL 4.1.

If you are using MySQL < 4.1 and it works with libmysql all is fine.
mysqlnd is does not support MySQL <4.1 nor does it support
old_passwords=1: no bug.



[2008-07-21 18:23:31] and...@php.net

The old authentication method is insecure and should not be used. Also
MySQL servers before 4.1 are already antique. If you have an application
that uses them you might don't want to change you PHP, and you still
have the possibility to compile PHP with libmysql. mysqlnd will never
support the old authentication. This saves hassles when checking what is
possible and what not. 4.0 and earlier are too old.
I just committed a fix, so it will be possible to configure PHP with
--with-mysql-sock to use another socket. However, the problem _wasn't_
in mysqlnd but in the extensions that sit on it. If you use libmysql it
will look by default for a socket under /tmp/mysql.sock . That's the
default. During server compilation you can set different default value
which will appear then in mysql_version.h that comes with libmysql and
what is used by the binary. mysqlnd uses /tmp/mysql.sock and there is no
way to change it on it's level, but with the existing option it will be
on the extension level.



[2008-07-15 07:36:41] michael dot kofler at gmx dot com

Linux: you were right, it's a socket problem

--with-mysqli=mysqlnd looks for the socket file at /tmp/mysql.sock

is there a ./configure option or another way to set the default socket
file? I set a link from /tmp/mysql.sock to /var/run/mysqld/mysqld.sock,
but that's a hack and no solution

Windows: no error message is shown; the browser waits for ever for an
answer but does not get one; the Apache log file also shows no errors

PS: if mysqlnd is to be used by default in PHP 5.3, it really should be
*completely* backward compatible (as advertised); right now, this is not
the case; while the socket file problem can probably fixed with the
right configuration, mysqlnd apparently requires the new MySQL
authenticati

#46767 [Opn->Asn]: FastCGI Error is returned when connecting to a MySQL server with PHP 5.3 Alpha3

2009-02-03 Thread lsmith
 ID:   46767
 Updated by:   lsm...@php.net
 Reported By:  peaceable_whale at hotmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MySQLi related
 Operating System: win32 only
 PHP Version:  5.3.0alpha3
 Assigned To:  mysql


Previous Comments:


[2009-02-02 14:06:14] peaceable_whale at hotmail dot com

No. The error occurs once the script connects to a database.

Test case:

close();
echo $connection_closed?"Database connection has been closed
successfully":"An error occurred when closing database connection";
?>



[2009-02-02 13:43:30] johan...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Does a simple mysql_connect() or mysqli_connect() work? Do simple
queries work? Do other applications than phpMyAdmin work?



[2009-02-02 13:35:42] peaceable_whale at hotmail dot com

Thanks for changing it to Assigned :)



[2009-02-02 13:33:57] paj...@php.net

oh my bad, right.

So not related (it must be the 1st report in weeks not related to 5.1
=)

> assigned to mysql



[2009-02-02 13:32:22] peaceable_whale at hotmail dot com

Well, mysqlnd is in use as it is turned on by default in the Windows
builds:

mysqli

MysqlI Support  enabled
Client API library version  mysqlnd 5.0.5-dev - 081106 - $Revision:
1.3.2.21 $
Active Persistent Links 0
Inactive Persistent Links   0
Active Links0 

mysqlnd

mysqlnd enabled
Version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.21 $
Command buffer size 2048
Read buffer size32768
Collecting statistics   Yes
Collecting memory statisticsNo



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

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



#47021 [Opn->Asn]: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"

2009-02-03 Thread lsmith
 ID:   47021
 Updated by:   lsm...@php.net
 Reported By:  daniel dot gorski at develnet dot org
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.3CVS-2009-01-06 (CVS)
 Assigned To:  dmitry


Previous Comments:


[2009-01-26 10:54:53] giovanni at giacobbi dot net

Please see related discussion:
http://marc.info/?t=12329199332&r=1&w=2

See also bug report #43069 which actually caused this bug.



[2009-01-22 15:35:02] ml at x-net dot be

I can confirm this bug. I tried avoiding the chunking in Apache by
using mod_deflate, but the PHP SOAP client probably doesn't send an
Accept-Encoding header with gzip in it.



[2009-01-06 16:28:52] daniel dot gorski at develnet dot org

Description:

The \SoapClient (and probably the \SoapServer) stumble over WSDL files
that are delivered via HTTP in chunks, carrying the HTTP response header
"Transfer-Encoding: chunked".


Reproduce code:
---
$sc = \SoapClient('http://any.wsdl/that/is/delivered/in/chunks');

Expected result:

No error, intantiation and initialization of the \SoapClient object.

Actual result:
--
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from [URL]: Start tag expected, '<' not found in
[FILE]





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



#47286 [Opn->Asn]: oci8 and pdo_oci aren't in 5.3.0B1 builds

2009-02-03 Thread lsmith
 ID:   47286
 Updated by:   lsm...@php.net
 Reported By:  christopher dot jones at oracle dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: Windows
 PHP Version:  5.3.0beta1
 Assigned To:  pierre


Previous Comments:


[2009-02-03 01:31:32] christopher dot jones at oracle dot com

Description:

The 5.3.0beta1 bundles from http://windows.php.net/qa/ are
missing php_oci8.dll, php_oci8_11g.dll and pdo_oci.dll.  
These extensions are present in the PHP 5.3 snaps on
http://windows.php.net/snapshots/







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



#45155 [Com]: Constructors not called when using classmap option in SoapClient

2009-02-03 Thread r dot swets at gmail dot com
 ID:   45155
 Comment by:   r dot swets at gmail dot com
 Reported By:  david at globulebleu dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: *
 PHP Version:  5.2.6
 New Comment:

i can imagine that instead of using the constructor, the __wakeup
method is called.


Previous Comments:


[2008-06-03 09:43:30] david at globulebleu dot com

Description:

When using classmap to map the SOAP results to a class, the constructor
of the object you've mapped to is not called. 

Reproduce code:
---
$client = new SoapClient("url_to_wsdl", 
   array('classmap' => array('contact' => "Contact"));

$params = array("1");

$contact = $client->__soapCall("get_contact", $params);

Expected result:

A contact object that has properties initialized (i.e. db connections,
...).

Actual result:
--
A contact object without the properties.





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