#46191 [NEW]: Back-comp break: DOMDocument::saveXML() doesn't accept null anymore

2008-09-28 Thread zizka at seznam dot cz
From: zizka at seznam dot cz
Operating system: Any
PHP version:  5.2.6
PHP Bug Type: DOM XML related
Bug description:  Back-comp break: DOMDocument::saveXML() doesn't accept null 
anymore

Description:

In PHP 5.2.5, DOMDocument::saveXML() accepted null as it's first argument,
which has this documentation:

Use this parameter to output only a specific node without XML declaration
rather than the entire document. 

In PHP 5.2.6, passing null causes error.

Reproduce code:
---
// $doc is a DOM document object.
return $doc-saveXML(null, LIBXML_NOEMPTYTAG);

Expected result:

IMHO null is reasonable value, meaning that whole document should be
saved. I suggest to fix this backward compatibility break.

Actual result:
--
Catchable fatal error: Argument 1 passed to DOMDocument::saveXML() must be
an instance of DOMNode, null given, called in ...\index.php on line 97 and
defined in ...\inc.Menu.php on line 23

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



#46184 [Opn-Bgs]: a problem with internal vars

2008-09-28 Thread nlopess
 ID:   46184
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vasilkov80 at mail dot ru
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: linux mandriva 2007
 PHP Version:  5.2.6
 New Comment:

your regex is wrong.

quote from the PCRE manual:
Outside a character class, a backslash followed by a digit greater
than 0 (and possibly further digits) is a back reference to a capturing
sub-pattern  earlier  (that is, to its left) in the pattern, provided
there have been that many previous capturing left parentheses.



Previous Comments:


[2008-09-26 15:44:59] vasilkov80 at mail dot ru

sorry, expected result:

Array
(
[0] = image.jpg
[1] = 
[2] = image.jpg
)



[2008-09-26 15:38:24] vasilkov80 at mail dot ru

Description:

a problem with internal vars?

/\([^\]+\.jpg)\/ - the pattern works fine...
/([\\'])([^\\1]+\.jpg)\\1/ - a bit more complex pattern doesn't work
as expected!

Reproduce code:
---
if( preg_match(%([\\']{1})([^\\1]+\.jpg)\\1%, '.. bla bla
image.jpg ..  bla bla', $matches) )
print_r($matches);

Expected result:

Array
(
[0] = image.jpg
[1] = image.jpg
)

Actual result:
--
Array
(
[0] = bla bla image.jpg
[1] = 
[2] = bla bla image.jpg
)





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



#46192 [NEW]: ArrayObject Serialization Problem

2008-09-28 Thread s dot tretter at szene1 dot at
From: s dot tretter at szene1 dot at
Operating system: Linux
PHP version:  5.3.0alpha2
PHP Bug Type: Scripting Engine problem
Bug description:  ArrayObject Serialization Problem

Description:

A ArrayObject containing a second ArrayObject cannot be unserialized.
The serialization differs from php5.2 to php5.3:
php5.3
C:11:ArrayObject:180:{
x:i:0;C:11:ArrayObject:140:{
x:i:0;a:5:{
s:4:date;i:1222539347;
s:7:session;s:13:geF9ndWVzdF8w;
s:5:style;i:1;
s:7:friends;i:0;
s:12:friends_list;a:0:{}
};
m:a:0:{}
};
m:a:0:{}}

php5.2
O:11:ArrayObject:5:{
s:4:date;i:1222539347;
s:7:session;s:13:geF9ndWVzdF8w;
s:5:style;i:1;
s:7:friends;
i:0;s:12:friends_list;a:0:{}
}


Reproduce code:
---
$useronline = new ArrayObject(
new ArrayObject(
array('date'=1222539347,
'session'='geF9ndWVzdF8w',
'style'=1,
'friends'=0,
'friends_list'=array()
)
)
);

print_r($useronline);echo \n;

$r = serialize($useronline);
echo $r.\n;

print_r(unserialize($r));

Expected result:

should work like in php 5.2

Actual result:
--
Fatal error: Uncaught exception 'UnexpectedValueException' with message
'Error at offset 6 of 180 bytes' in test.php:18
Stack trace:
#0 [internal function]: ArrayObject-unserialize('x:i:0;C:11:Arr...')
#1 test.php(18): unserialize('C:11:ArrayObje...')
#2 {main}
  thrown in test.php on line 18


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



#46162 [Opn-Fbk]: ftp_nb_fget stops receiveing at magick 2,920 bytes

2008-09-28 Thread felipe
 ID:   46162
 Updated by:   [EMAIL PROTECTED]
 Reported By:  TorokAlpar at Gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Windows
 PHP Version:  5.2.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2008-09-23 17:19:32] TorokAlpar at Gmail dot com

Description:

using ftp_nb_fget() to download a file from ftp always gets only 2,920
bytes. 

Reproduce code:
---
$rStream = fopen('test.zip','x');
ftp_nb_fget($rFtp,$rStream,$fullPath(),FTP_BINARY);
sleep(58);

Expected result:

Download complete file.

Actual result:
--
Downloads only 2,920 bytes, the file size doesn't influence this result
unless less than 2,920 in witch case the function works as expected.
Also tried with FTP_ASCII same result.  





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



#46185 [Opn-Asn]: importNode changes the namespace of an XML element.

2008-09-28 Thread rrichards
 ID:   46185
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robin2008 at altruists dot org
-Status:   Open
+Status:   Assigned
 Bug Type: DOM XML related
 Operating System: Ubuntu
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  rrichards
 New Comment:

Assign to self


Previous Comments:


[2008-09-26 16:29:44] robin2008 at altruists dot org

Description:

The problem occurs when an element has an unused namespace node
xmlns:default which is hanging around, unused.

When imorting a node under certain conditions, the parent node sets an
xmlns:default which is intended to apply to the imported Node, but
doesn't because xmlns:default applies instead.

The net effect is that the imported node changes namespace.

Reproduce code:
---
?php

$aDOM = new DOMDocument;
$aDOM-loadXML('?xml version=1.0?f2f:a
xmlns:f2f=http://friend2friend.net/');
$a= $aDOM-firstChild;
echo 'DOM is add into is '.$aDOM-saveXML().chr(13);
$ok = new DOMDocument;
$ok-loadXML('f2f:ok xmlns:f2f=http://friend2friend.net;
xmlns=REALwatch-me xmlns:default=BOGUS//f2f:ok');
$imported= $aDOM-importNode($ok-firstChild, true);
echo 'Node to import is '.$aDOM-saveXML($imported).chr(13).chr(13);
$a-appendChild($imported);
echo 'Result is '.$aDOM-saveXML();

?


Expected result:

DOM is add into is ?xml version=1.0?
f2f:a xmlns:f2f=http://friend2friend.net/

Node to import is f2f:ok xmlns:f2f=http://friend2friend.net;
xmlns=REALwatch-me xmlns:default=BOGUS//f2f:ok

Result is ?xml version=1.0?
f2f:a xmlns:f2f=http://friend2friend.net;f2f:ok
xmlns:default1=REALdefault1:watch-me
xmlns:default=BOGUS//f2f:ok/f2f:a


Actual result:
--
DOM is add into is ?xml version=1.0?
f2f:a xmlns:f2f=http://friend2friend.net/

Node to import is f2f:ok xmlns:f2f=http://friend2friend.net;
xmlns=REALwatch-me xmlns:default=BOGUS//f2f:ok

Result is ?xml version=1.0?
f2f:a xmlns:f2f=http://friend2friend.net;f2f:ok
xmlns:default=REALdefault:watch-me
xmlns:default=BOGUS//f2f:ok/f2f:a






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



#46191 [Opn-Csd]: Back-comp break: DOMDocument::saveXML() doesn't accept null anymore

2008-09-28 Thread rrichards
 ID:   46191
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zizka at seznam dot cz
-Status:   Open
+Status:   Closed
 Bug Type: DOM XML related
 Operating System: Any
 PHP Version:  5.2.6
 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:


[2008-09-28 10:09:48] zizka at seznam dot cz

Description:

In PHP 5.2.5, DOMDocument::saveXML() accepted null as it's first
argument, which has this documentation:

Use this parameter to output only a specific node without XML
declaration rather than the entire document. 

In PHP 5.2.6, passing null causes error.

Reproduce code:
---
// $doc is a DOM document object.
return $doc-saveXML(null, LIBXML_NOEMPTYTAG);

Expected result:

IMHO null is reasonable value, meaning that whole document should be
saved. I suggest to fix this backward compatibility break.

Actual result:
--
Catchable fatal error: Argument 1 passed to DOMDocument::saveXML() must
be an instance of DOMNode, null given, called in ...\index.php on line
97 and defined in ...\inc.Menu.php on line 23





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



#46192 [Opn-Asn]: ArrayObject Serialization Problem

2008-09-28 Thread colder
 ID:   46192
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot tretter at szene1 dot at
-Status:   Open
+Status:   Assigned
 Bug Type: SPL related
 Operating System: Linux
 PHP Version:  5.3.0alpha2
-Assigned To:  
+Assigned To:  colder


Previous Comments:


[2008-09-28 10:40:42] s dot tretter at szene1 dot at

Description:

A ArrayObject containing a second ArrayObject cannot be unserialized.
The serialization differs from php5.2 to php5.3:
php5.3
C:11:ArrayObject:180:{
x:i:0;C:11:ArrayObject:140:{
x:i:0;a:5:{
s:4:date;i:1222539347;
s:7:session;s:13:geF9ndWVzdF8w;
s:5:style;i:1;
s:7:friends;i:0;
s:12:friends_list;a:0:{}
};
m:a:0:{}
};
m:a:0:{}}

php5.2
O:11:ArrayObject:5:{
s:4:date;i:1222539347;
s:7:session;s:13:geF9ndWVzdF8w;
s:5:style;i:1;
s:7:friends;
i:0;s:12:friends_list;a:0:{}
}


Reproduce code:
---
$useronline = new ArrayObject(
new ArrayObject(
array('date'=1222539347,
'session'='geF9ndWVzdF8w',
'style'=1,
'friends'=0,
'friends_list'=array()
)
)
);

print_r($useronline);echo \n;

$r = serialize($useronline);
echo $r.\n;

print_r(unserialize($r));

Expected result:

should work like in php 5.2

Actual result:
--
Fatal error: Uncaught exception 'UnexpectedValueException' with message
'Error at offset 6 of 180 bytes' in test.php:18
Stack trace:
#0 [internal function]: ArrayObject-unserialize('x:i:0;C:11:Arr...')
#1 test.php(18): unserialize('C:11:ArrayObje...')
#2 {main}
  thrown in test.php on line 18






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



#46127 [Opn-Asn]: [PATCH] php_openssl_tcp_sockop_accept forgets to set context on accepted stream

2008-09-28 Thread pajoye
 ID:   46127
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mark at hell dot ne dot jp
-Status:   Open
+Status:   Assigned
 Bug Type: OpenSSL related
 Operating System: Gentoo Linux
 PHP Version:  5.3.0alpha2
 Assigned To:  pajoye


Previous Comments:


[2008-09-22 10:17:32] mark at hell dot ne dot jp

(Adding [PATCH] tag to bug summary)



[2008-09-21 09:05:42] mark at hell dot ne dot jp

This bug is fixed by the following patch. I found this out while
reading the code and comparing the OpenSSL and non-OpenSSL versions of
the connection accept process.

This one-line-patch shouldn't require that much testing, and fixes this
problem.

NB: Even if the reference to the context wasn't done, the context's
refcount was increased, causing a minor memoryleak if on a ssl server
stream, at least one connection was attempted (and failed).

Fix:

http://ookoo.org/svn/snip/ssl_test/ssl_fix_5.3.0alpha2.diff



[2008-09-19 15:50:36] mark at hell dot ne dot jp

Description:

A SSL socket created with stream_socket_server() isn't able to accept
any connection. It returns an SSL_R_NO_SHARED_CIPHER error, as if the
context wasn't passed from the listener socket to the created socket in
stream_socket_accept()

This is causing me some problems as I'm writing an application which
needs SSL sockets.

Reproduce code:
---
http://ookoo.org/svn/snip/ssl_test/ssl_test.php

Expected result:

Running on 5.2.6-pl6-gentoo
Linux Memol.ooKoo.org 2.6.25-gentoo-r1-tux #1 SMP Sat Apr 19 21:17:22
CEST 2008 x86_64

Actual result:
--
Running on 5.3.0alpha2

Warning: stream_socket_accept(): SSL_R_NO_SHARED_CIPHER: no suitable
shared cipher could be used.  This could be because the server is
missing an SSL certificate (local_cert context option) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: stream_socket_accept(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: stream_socket_accept(): accept failed: Success in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14077410:SSL routines:func(119):reason(1040) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38

Warning: fsockopen(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38

Warning: fsockopen(): unable to connect to ssl://127.0.0.1:21673
(Unknown error) in /home/magicaltux/projects/snip/ssl_test/ssl_test.php
on line 38





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



#42552 [Opn]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-28 Thread weisz at vcpc dot univie dot ac dot at
 ID:   42552
 User updated by:  weisz at vcpc dot univie dot ac dot at
 Reported By:  weisz at vcpc dot univie dot ac dot at
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

The problem is solved by a patch I submitted for Apache bug #45875 (see
https://issues.apache.org/bugzilla/show_bug.cgi?id=45875).


Previous Comments:


[2008-09-24 14:06:05] weisz at vcpc dot univie dot ac dot at

After a digging through the sources pertinent to the functions
apache_getenv() and the related Apache sources the problem picture Bug
45875 appears as follows:
apache_getenv relies on the function apr_table_get() which retrieves
the values of entries into a table generated by the Apache function
ssl_hook_Fixeup(). The latter doesn't take care of DN component entries
that may occur multiple times.

I've thus submitted bug report #45875 to Apache. But please don't yet
close this present bug since an outcome could be a reply from Apache
indicating a different way to access the certificate components made
accessible since Apache HTTP 2.1 that could provide a solution on the
PHP side. I'll turn back to PHP after getting a reply from Apache.



[2008-09-23 18:23:39] weisz at vcpc dot univie dot ac dot at

The proposed patch is only a dirty one (it restricts the number of OUs
to 2 and the DN members with multiplicity to OU), and it unnecessarily
puts the check in the wrong place. I checked the relevant code in
ssl_engine_kernel.c and especially ssl_engine_vars.c.

The function ssl_var_lookup_ssl_cert_dn() in ssl_engine_vars.c takes
care of the retrieving of the DN subentries and I couldn't find a flaw
when analysing its code (Apache 2.2.8 and 2.2.9 which I've tried both
and got the same result). Where in the PHP code is the connection to the
top level function ssl_var_lookup() that descends in multiple steps to
ssl_var_lookup_ssl_cert_dn()?



[2008-09-23 00:13:30] [EMAIL PROTECTED]

I do not see why PHP would not fetch these vars if apache made them
available.

Have you tried:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg17637.html



[2008-09-22 17:13:29] weisz at vcpc dot univie dot ac dot at

Please reopen this bug report that is still present in PHP 5.2.6



[2008-09-22 17:10:11] weisz at vcpc dot univie dot ac dot at

I'm sorry to have overlooked the request to test getenv(): no getenv()
doesnt provide the anser either.

Now I'm at PHP version 5.2.6 and the bug is still there. phpinfo()
shows clearly that only SSL_CLIENT_S_DN_OU is available to PHP, not the
values for SSL_CLIENT_S_DN_OU_n (n being an integer value).

PHP doesn't transmit transparently the value of the string parameter to
Apache, but seems to censor any Apache variable name it seems not to
know.

Please reopen this bug report, change this behavior to enable the use
of important and very helpful developments in Apache.



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

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



#46040 [Opn-Csd]: [PATCH] pcre_internal.h parse error during compilation

2008-09-28 Thread nlopess
 ID:   46040
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: IBM AIX 5.3 5300-08-01-0819
 PHP Version:  5.3CVS-2008-09-10 (snap)
 New Comment:

forwarded upstream: http://bugs.exim.org/show_bug.cgi?id=761


Previous Comments:


[2008-09-16 11:29:20] Bjorn dot Wiberg at its dot uu dot se

Will you report this upstream?
And apply the fix in the meantime?

Many thanks in advance!

Best regards,
Björn



[2008-09-11 12:27:33] [EMAIL PROTECTED]

This really needs to go upstream to
http://bugs.exim.org/enter_bug.cgi?product=PCRE

We can fix it as well though.



[2008-09-11 11:39:10] Bjorn dot Wiberg at its dot uu dot se

Attaching patch below which solves the problem.


*** php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h.ORIGINAL  
2008-09-11 13:19:06.0 +0200
--- php5.3-200809100630-my/ext/pcre/pcrelib/pcre_internal.h
2008-09-11 13:19:46.0 +0200
***
*** 562,570 
  /* Miscellaneous definitions. The #ifndef is to pacify compiler
warnings in
  environments where these macros are defined elsewhere. */
  
! #ifndef FALSE
  typedef int BOOL;
  
  #define FALSE   0
  #define TRUE1
  #endif
--- 562,572 
  /* Miscellaneous definitions. The #ifndef is to pacify compiler
warnings in
  environments where these macros are defined elsewhere. */
  
! #ifndef BOOL
  typedef int BOOL;
+ #endif
  
+ #ifndef FALSE
  #define FALSE   0
  #define TRUE1
  #endif



[2008-09-10 20:13:58] [EMAIL PROTECTED]

Perhaps ?? Why don't you TRY it? And if it works - send us a 
patch.



[2008-09-10 07:49:46] Bjorn dot Wiberg at its dot uu dot se

Description:

using gcc on AIX. Compilation failure due to BOOL not being defined?

Probably due to the ifndef check at
ext/pcre/pcrelib/pcre_internal.h:565:

#ifndef FALSE
typedef int BOOL;

#define FALSE   0
#define TRUE1
#endif

I supposed FALSE is already defined (but apparently not BOOL), and
hence compilation fails.

Perhaps two checks instead would fix this? Something like:

#ifndef BOOL
typedef int BOOL;
#endif

#ifndef FALSE
#define FALSE   0
#define TRUE1
#endif

Best regards,
Björn

Reproduce code:
---
#! /bin/sh
#
# Created by configure

LDFLAGS='-Wl,-bbigtoc' \
CC='gcc' \
'./configure' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-cli' \
'--enable-dba' \
'--enable-dbase' \
'--enable-debug' \
'--enable-exif' \
'--enable-flatfile' \
'--enable-ftp' \
'--enable-gd-jis-conv' \
'--enable-gd-native-ttf' \
'--enable-inifile' \
'--enable-mbstring' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-zip' \
'--enable-zend-multibyte' \
'--prefix=/apache/php' \
'--with-apxs2=/apache/bin/apxs' \
'--with-bz2' \
'--with-cdb' \
'--with-curl' \
'--with-freetype-dir' \
'--with-gd' \
'--with-gdbm' \
'--with-gettext' \
'--with-jpeg-dir' \
'--with-ldap' \
'--with-libxml-dir=/usr/local' \
'--with-mime-magic' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--with-openssl=/opt/freeware' \
'--with-pdo-mysql=mysqlnd' \
'--with-png-dir' \
'--with-xmlrpc' \
'--with-xpm-dir' \
'--with-xsl' \
'--with-zlib' \
'--with-zlib-dir' \
$@

Expected result:

No compile failure.

Actual result:
--
 gcc -I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib
-Iext/pcre/ -I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/
-DPHP_ATOM_INC -I/home/bwiberg/rpm/BUILD/php5.3-200809100630/include
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/main
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/ereg/regex
-I/usr/local/include/libxml2 -I/opt/freeware/include
-I/usr/local/include
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/date/lib
-I/usr/X11R6/include -I/usr/include/freetype2
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/mbstring/oniguruma
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/mbstring/libmbfl
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/mbstring/libmbfl/mbfl
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/sqlite3/libsqlite
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/TSRM
-I/home/bwiberg/rpm/BUILD/php5.3-200809100630/Zend -I/usr/include -g
-fvisibility=hidden -O0 -Wall -c
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_chartables.c
 -DPIC -o ext/pcre/pcrelib/.libs/pcre_chartables.o
In file included from

#45522 [Opn-Asn]: FCGI_GET_VALUES request does not return supplied values

2008-09-28 Thread nlopess
 ID:   45522
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arnaud dot lb at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: CGI related
 Operating System: *
 PHP Version:  5.3CVS-2008-07-15 (CVS)
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2008-07-15 16:02:09] arnaud dot lb at gmail dot com

Description:

FastCGI specifies that a FastCGI application may return the values
supplied by a FCGI_GET_VALUES request.

Actually the FastCGI SAPI returns all standard values (FCGI_MAX_CONNS,
FCGI_MAX_REQS, FCGI_MPXS_CONNS), *except* those supplied.

Also, it seems that the returns values does not reflect the actual
configuration (e.g. FCGI_MAX_CONNS and FCGI_MAX_REQS are always 1).

Reproduce code:
---
Requesting the FCGI_MAX_CONN value using a FCGI_GET_VALUES record in
the FastCGI protocol.


Expected result:

Requesting the FCGI_MAX_CONN returns FCGI_MAX_CONN value.

Actual result:
--
Requesting the FCGI_MAX_CONN returns FCGI_MAX_REQS and FCGI_MPXS_CONNS
values but not FCGI_MAX_CONN.





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



#46074 [Opn-Fbk]: Bus error during running PHP CLI under IRIX 6.5.30

2008-09-28 Thread nlopess
 ID:   46074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  neko at nekochan dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: IRIX 6.5.30
 PHP Version:  5.3.0alpha2
 New Comment:

weird, bus errors on these platforms usually mean unaligned data..
can you please try the following commands in GDB and report back the
output?

p value
p *value
p variable_ptr_ptr
p *variable_ptr_ptr
p **variable_ptr_ptr


Previous Comments:


[2008-09-15 13:51:11] neko at nekochan dot net

No change with latest CVS.

[EMAIL PROTECTED] /opt/build/php5.3-200809151230
 # dbx ./sapi/cli/php core 
dbx version 7.3.7 (96015_Nov16 MR) Nov 16 2004 07:34:16
Core from signal SIGBUS: Bus error
(dbx) where

Thread 0x1
  0 zend_assign_to_variable(0x14a0, 0x1080a55c, 0x0, 0xc, 0x21000, 
0x1000, 0xc, 0x106c6e28) [/opt/build/php5.3-
200809151230/Zend/zend_execute.c:739, 0x103a118c]
   1 ZEND_ASSIGN_SPEC_CV_TMP_HANDLER(0x1080a4e8, 0xd, 0x0, 0xc, 
0x21000, 0x1000, 0xc, 0x106c6e28) [/opt/build/php5.3-
200809151230/Zend/zend_vm_execute.h:25843, 0x103f1d00]
   2 execute(0x106c6840, 0xd, 0x0, 0xc, 0x21000, 0x1000, 0xc, 
0x106c6e28) [/opt/build/php5.3-
200809151230/Zend/zend_vm_execute.h:104, 0x103a29d8]
   3 zend_execute_scripts(0x8, 0xd, 0x3, 0x0, 0x21000, 0x1000, 0xc, 
0x106c6e28) [/opt/build/php5.3-200809151230/Zend/zend.c:1197, 
0x10377038]
   4 php_execute_script(0x14a0, 0xd, 0x0, 0xc, 0x21000, 0x1000, 0xc, 
0x106c6e28) [/opt/build/php5.3-200809151230/main/main.c:2075, 
0x10315798]
   5 main(0xf, 0x7fff2ee4, 0x0, 0xc, 0x21000, 0x1000, 0xc, 0x106c6e28)

[/opt/build/php5.3-200809151230/sapi/cli/php_cli.c:1130, 0x104012e0]
   6 __start() [/xlv55/kudzu-
apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s:177, 0x1004cb68]
(dbx) quit



[2008-09-15 08:00:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi





[2008-09-14 07:15:54] neko at nekochan dot net

Description:

Bus error during 'Generatring phar.php' phase of build; also occurs if

using '--disable-phar' immediately after running 'gmake test'. Bus 
error occurs with both MIPSpro 7.4.4m and GCC-4.3.1 compilers under 
IRIX 6.5.30. Also tested with php5.3-200809140030 with same result.

./configure options:

'./configure' '--prefix=/usr/nekoware/php5' 
'--enable-dba' 
'--enable-calendar'
'--enable-wddx' 
'--with-config-file-path=/usr/nekoware/etc/php5' 
'--with-apxs2=/usr/nekoware/apache2/bin/apxs' 
'--enable-cli' '--with-libxml-dir=/usr/nekoware'
'--with-png-dir=/usr/nekoware' 
'--with-jpeg-dir=/usr/nekoware'
'--with-freetype-dir=/usr/nekoware' 
'--with-zlib-dir=/usr/nekoware' 
'--with-zlib'
'--with-curlwrappers' 
'--with-curl=shared,/usr/nekoware' 
'--with-openssl=shared,/usr/nekoware' 
'--with-mysql=shared,mysqlnd' 
'--with-mysqli=shared,mysqlnd' 
'--with-mhash=shared,/usr/nekoware' 
'--with-mcrypt=shared,/usr/nekoware'
'--with-bz2=shared,/usr/nekoware'
'--enable-ftp=shared' 
'--enable-sockets=shared' 
'--with-gd=shared' 
'--enable-exif=shared'
'--with-xmlrpc' 
'--with-gettext=shared,/usr/nekoware' 
'--with-iconv-dir=/usr/nekoware' 
'--enable-mbstring=shared' 
'--enable-sysvsem=shared'
'--enable-sysvshm=shared' 
'--enable-sysvmsg=shared' 
'--with-xpm-dir=/usr/lib32'
'--enable-zip=shared' 
'--with-pgsql=shared,/usr/nekoware/pgsql' 
'--with-mm=/usr/nekoware



Reproduce code:
---
gmake

or with '--disable-phar':

gmake test

Expected result:

Completed build and ability to run php test process.

Actual result:
--
...
Generating phar.php
gmake: *** [ext/phar/phar.php] Bus error (core dumped)
gmake: *** Deleting file `ext/phar/phar.php'

# dbx ./sapi/cli/php core
dbx version 7.3.7 (96015_Nov16 MR) Nov 16 2004 07:34:16
Core from signal SIGBUS: Bus error
(dbx) where

Thread 0x1
  0 zend_assign_to_variable(0x14a0, 0x107fde5c, 0x0, 0xc, 0x21000, 
0x1000, 0xc, 0x106bab80) [/opt/build/php-
5.3.0alpha2/Zend/zend_execute.c:739, 0x1039ebcc]
   1 ZEND_ASSIGN_SPEC_CV_TMP_HANDLER(0x107fdde8, 0xd, 0x0, 0xc, 
0x21000, 0x1000, 0xc, 0x106bab80) [/opt/build/php-
5.3.0alpha2/Zend/zend_vm_execute.h:25843, 0x103ef740]
   2 execute(0x106ba598, 0xd, 0x0, 0xc, 0x21000, 0x1000, 0xc, 
0x106bab80) [/opt/build/php-5.3.0alpha2/Zend/zend_vm_execute.h:104, 
0x103a0418]
   3 zend_execute_scripts(0x8, 0xd, 0x3, 0x0, 0x21000, 0x1000, 0xc, 
0x106bab80) [/opt/build/php-5.3.0alpha2/Zend/zend.c:1197, 
0x10374a58]
   4 php_execute_script(0x14a0, 0xd, 0x0, 0xc, 0x21000, 0x1000, 0xc, 
0x106bab80) [/opt/build/php-5.3.0alpha2/main/main.c:2074, 
0x10313158]
   

#46193 [NEW]: str_replace() generates unexpected results

2008-09-28 Thread muqtada at hotmail dot com
From: muqtada at hotmail dot com
Operating system: windows
PHP version:  5.2.6
PHP Bug Type: Strings related
Bug description:  str_replace() generates unexpected results

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp


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



#46193 [Opn-Bgs]: str_replace() generates unexpected results

2008-09-28 Thread pajoye
 ID:   46193
 Updated by:   [EMAIL PROTECTED]
 Reported By:  muqtada at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use \\ and not
\.



Previous Comments:


[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp






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



#46193 [Bgs]: str_replace() generates unexpected results

2008-09-28 Thread muqtada at hotmail dot com
 ID:   46193
 User updated by:  muqtada at hotmail dot com
 Reported By:  muqtada at hotmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',/,wwwroot\test\wp2);


Previous Comments:


[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use \\ and not
\.




[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp






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



#46193 [Bgs]: str_replace() generates unexpected results

2008-09-28 Thread tularis
 ID:   46193
 Updated by:   [EMAIL PROTECTED]
 Reported By:  muqtada at hotmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

It's still bogus. do an 
echo wwwroot\test\wp2;

and you'll see why (\t is a tab, you need to escape it properly if
you don't want to have a tab there. If you do, your replace will work as
you expect it.). str_replace works correctly and as intended. The bug is
in your understanding, not the engine.


Previous Comments:


[2008-09-28 21:41:28] muqtada at hotmail dot com

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',/,wwwroot\test\wp2);



[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use \\ and not
\.




[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp






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



#46193 [Bgs]: str_replace() generates unexpected results

2008-09-28 Thread muqtada at hotmail dot com
 ID:   46193
 User updated by:  muqtada at hotmail dot com
 Reported By:  muqtada at hotmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

I guess it becuase of escape sequence,
as wwwroot\test\wp has \t in it, I also tried other strings like
wwwroot\nest\wp, it also produce same result
and when i put an extra slash wwwroot\\test\wp then it gives me good
result


Previous Comments:


[2008-09-28 21:52:46] [EMAIL PROTECTED]

It's still bogus. do an 
echo wwwroot\test\wp2;

and you'll see why (\t is a tab, you need to escape it properly if
you don't want to have a tab there. If you do, your replace will work as
you expect it.). str_replace works correctly and as intended. The bug is
in your understanding, not the engine.



[2008-09-28 21:41:28] muqtada at hotmail dot com

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',/,wwwroot\test\wp2);



[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use \\ and not
\.




[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp






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



#46193 [Bgs]: str_replace() generates unexpected results

2008-09-28 Thread muqtada at hotmail dot com
 ID:   46193
 User updated by:  muqtada at hotmail dot com
 Reported By:  muqtada at hotmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

Ok, but when i use
echo addslashes(wwwroot\test\wp);
it still prints wwwroot est\\wp

so even if use following 
$url= addslashes(wwwroot\test\wp);
echo str_replace(\\,/,$url);

I would have put an exta slash if knew the string always :), since it
is variable, i am be having problem at undersating, but i am getting my
expected results using str_replace();

Thanks


Previous Comments:


[2008-09-28 21:57:22] muqtada at hotmail dot com

I guess it becuase of escape sequence,
as wwwroot\test\wp has \t in it, I also tried other strings like
wwwroot\nest\wp, it also produce same result
and when i put an extra slash wwwroot\\test\wp then it gives me good
result



[2008-09-28 21:52:46] [EMAIL PROTECTED]

It's still bogus. do an 
echo wwwroot\test\wp2;

and you'll see why (\t is a tab, you need to escape it properly if
you don't want to have a tab there. If you do, your replace will work as
you expect it.). str_replace works correctly and as intended. The bug is
in your understanding, not the engine.



[2008-09-28 21:41:28] muqtada at hotmail dot com

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',/,wwwroot\test\wp2);



[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use \\ and not
\.




[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:

i tried following script
print str_replace(wwwroot/test/wp,\);
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace(wwwroot/mycode/wp,\);
its results in wwwroot\mycode\wp



Expected result:

wwwroot/test/wp






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



#42552 [Opn-Fbk]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-28 Thread pajoye
 ID:   42552
 Updated by:   [EMAIL PROTECTED]
 Reported By:  weisz at vcpc dot univie dot ac dot at
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

So it is actually not a php bug?


Previous Comments:


[2008-09-28 19:46:42] weisz at vcpc dot univie dot ac dot at

The problem is solved by a patch I submitted for Apache bug #45875 (see
https://issues.apache.org/bugzilla/show_bug.cgi?id=45875).



[2008-09-24 14:06:05] weisz at vcpc dot univie dot ac dot at

After a digging through the sources pertinent to the functions
apache_getenv() and the related Apache sources the problem picture Bug
45875 appears as follows:
apache_getenv relies on the function apr_table_get() which retrieves
the values of entries into a table generated by the Apache function
ssl_hook_Fixeup(). The latter doesn't take care of DN component entries
that may occur multiple times.

I've thus submitted bug report #45875 to Apache. But please don't yet
close this present bug since an outcome could be a reply from Apache
indicating a different way to access the certificate components made
accessible since Apache HTTP 2.1 that could provide a solution on the
PHP side. I'll turn back to PHP after getting a reply from Apache.



[2008-09-23 18:23:39] weisz at vcpc dot univie dot ac dot at

The proposed patch is only a dirty one (it restricts the number of OUs
to 2 and the DN members with multiplicity to OU), and it unnecessarily
puts the check in the wrong place. I checked the relevant code in
ssl_engine_kernel.c and especially ssl_engine_vars.c.

The function ssl_var_lookup_ssl_cert_dn() in ssl_engine_vars.c takes
care of the retrieving of the DN subentries and I couldn't find a flaw
when analysing its code (Apache 2.2.8 and 2.2.9 which I've tried both
and got the same result). Where in the PHP code is the connection to the
top level function ssl_var_lookup() that descends in multiple steps to
ssl_var_lookup_ssl_cert_dn()?



[2008-09-23 00:13:30] [EMAIL PROTECTED]

I do not see why PHP would not fetch these vars if apache made them
available.

Have you tried:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg17637.html



[2008-09-22 17:13:29] weisz at vcpc dot univie dot ac dot at

Please reopen this bug report that is still present in PHP 5.2.6



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

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



#46164 [Com]: stream_filter_remove() closes the stream

2008-09-28 Thread ilia dot cheishvili at gmail dot com
 ID:  46164
 Comment by:  ilia dot cheishvili at gmail dot com
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:Streams related
 PHP Version: 5.3CVS-2008-09-24 (CVS)
 New Comment:

This is caused by telling php_stream_filter_remove() to destruct the
stream when it is not necessary.

Here is the patch to fix it: http://pastebin.com/fabd37ae

And here is the test: http://pastebin.com/f42d8848c


Previous Comments:


[2008-09-24 04:46:34] [EMAIL PROTECTED]

Description:

Calling stream_filter_remove() closes the stream when the filter is a
user filter.

Reproduce code:
---
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('/tmp/test','w');
$filter = stream_filter_append($fd, 'user_filter');
stream_filter_remove($filter);
var_dump(fclose($fd));

Expected result:

bool(true)

Actual result:
--
Warning: fclose(): 5 is not a valid stream resource in /tmp/rep.php on
line 15
bool(false)





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



#46145 [Com]: printf %e format should make 2 digit exponent

2008-09-28 Thread ilia dot cheishvili at gmail dot com
 ID:   46145
 Comment by:   ilia dot cheishvili at gmail dot com
 Reported By:  lbayuk at pobox dot com
 Status:   Open
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

The patch to fix this is here, along with all of the unit tests that
had to be modified to take the new, correct behavior into account:
http://pastebin.com/f641cf6fd


Previous Comments:


[2008-09-21 19:44:25] lbayuk at pobox dot com

Description:

PHP printf, sprintf, and fprintf with %e scientific notation produce a
1 digit exponent for values less than 1e10.  Other implementation of
functions by the same name produce a minimum of 2 digits in the
exponent, as the C standard requires. Although it can be argued that PHP
is not bound by other standards, the following comment in
main/snprintf.c function php_conv_fp() [line 545] leads one to believe
this is a PHP bug:
/*
 * Make sure the exponent has at least 2 digits
 */


Reproduce code:
---
?php
printf(%8.2e\n, 100);


Expected result:

1.00e+06

Actual result:
--
space1.00e+6





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



#46176 [Opn-Bgs]: Making POST requests do not always return correct Mime Type

2008-09-28 Thread iliaa
 ID:   46176
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dhendric at adobe dot com
-Status:   Open
+Status:   Bogus
 Bug Type: cURL related
 Operating System: Mac OS X Leopard
 PHP Version:  5.2.6
 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.

According to strace, the server returns Content-Type: image/jpeg as you

can see from the trace below. cURL simply returns the data it received

from the server.

recvfrom(3, HTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nLast-
Modified: Mon, 29 Sep 2008 00:27:17 GMT\r\nETag: 
\e106ca30f6e0a2b31d0fdadbb5b85d7f\\r\nContent-Type: 
image/jpeg\r\nContent-Length: 271\r\nExpires: Mon, 29 Sep 2008 10:27:17

GMT\r\nDate: Mon, 29 Sep 2008 00:27:18 GMT\r\nConnection: keep-
alive\r\n\r\n\377\330\377\340\0\20JFIF\0\1\1\0\0\1\0\1\0\0\377\333\0\204
\0\6\4\5\6\5\4\6\6\5\6\7\7\6\10\n\20\n\n\t\t\n\24\16\17\f\20\27\24\30\30
\27\24\26\26\32\35%\37\32\33#\34\26\26 , #\')*)\31\37-0-
(0%()(\1\7\7\7\n\10\n\23\n\n\23(\32\26\32((..., 16384, 0,

NULL, NULL) = 553



Previous Comments:


[2008-09-25 23:09:37] dhendric at adobe dot com

Description:

When using the curl class or the HTTP Request class (Pear) that sends a
POST request, some instances return the wrong mime type in the header
data. Using linux commands POST and wget return correct mime type in
header for the same request.

curl via Mac OS X command line:

deirdra-hendrickss-macbook-pro:~ dhendric$ curl --url
http://s7d4.scene7.com/is/image/sample; -d
fmt=pngreq=catalogprops,text -i
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Last-Modified: Thu, 25 Sep 2008 23:05:41 GMT
ETag: 6d16a6640f1e7e88731e9688556b6596
Content-Type: text/plain
Content-Length: 466
Expires: Thu, 25 Sep 2008 23:05:43 GMT
Date: Thu, 25 Sep 2008 23:05:43 GMT
Connection: keep-alive


Reproduce code:
---
$URL =
http://s7d4.scene7.com/is/image/sample?fmt=pngreq=catalogprops,text;;
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_POST, true);
curl_setopt($c, CURLOPT_URL, $URL);
curl_exec($c);
echo curl_getinfo($c, CURLINFO_CONTENT_TYPE);
curl_close($c);

Expected result:

should echo text/plain

Actual result:
--
echos image/jpeg





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



#46145 [Opn]: printf %e format should make 2 digit exponent

2008-09-28 Thread lbayuk at pobox dot com
 ID:   46145
 User updated by:  lbayuk at pobox dot com
 Reported By:  lbayuk at pobox dot com
 Status:   Open
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

After taking a look at your patch, approximately:
 /*
  * Make sure the exponent has at least 2 digits
  */
+if (t_len = 1) {
+   *s++ = '0';
+}
 while (t_len--) {

I got curious, since the code you added is described by the existing
comment. So I checked back through CVS and sure enough similar code was
there a while ago and was removed. It was:
 if (t_len == 1)
*s++ = '0';
So it looks like the 2-digit minimum exponent code was *removed*.
Certainly we would not want to put the code back in until we determine
why it came out... perhaps there was a good reason. I haven't yet
located the exact file version where the change was made.


Previous Comments:


[2008-09-28 23:07:03] ilia dot cheishvili at gmail dot com

The patch to fix this is here, along with all of the unit tests that
had to be modified to take the new, correct behavior into account:
http://pastebin.com/f641cf6fd



[2008-09-21 19:44:25] lbayuk at pobox dot com

Description:

PHP printf, sprintf, and fprintf with %e scientific notation produce a
1 digit exponent for values less than 1e10.  Other implementation of
functions by the same name produce a minimum of 2 digits in the
exponent, as the C standard requires. Although it can be argued that PHP
is not bound by other standards, the following comment in
main/snprintf.c function php_conv_fp() [line 545] leads one to believe
this is a PHP bug:
/*
 * Make sure the exponent has at least 2 digits
 */


Reproduce code:
---
?php
printf(%8.2e\n, 100);


Expected result:

1.00e+06

Actual result:
--
space1.00e+6





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



#46194 [NEW]: SIGSEGV when requested file is not found

2008-09-28 Thread xuefer at gmail dot com
From: xuefer at gmail dot com
Operating system: linux
PHP version:  5.3CVS-2008-09-29 (CVS)
PHP Bug Type: CGI related
Bug description:  SIGSEGV when requested file is not found

Description:

i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)

  localhost:1026 = (
host = 127.0.0.1, port = 2048,
check-local = disable, disable-time = 1,
broken-scriptfilename = enable,
),
be aware that it is check-local = disable, which mean lighttpd won't
check if the file is exists but will forward the request to php anyway
when i try to request a non existing file, php SIGSEGV

Program received signal SIGSEGV, Segmentation fault.
0x4b319f51 in strstr () from /lib/libc.so.6
(gdb) bt
#0  0x4b319f51 in strstr () from /lib/libc.so.6
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
#2  0x0849d9b2 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/xuefer/src/php/php5/Zend/zend.c:1189
#3  0x08433dbb in php_execute_script (primary_file=0xbfec434c) at
/home/xuefer/src/php/php5/main/main.c:2080
#4  0x0852e362 in main (argc=3, argv=0xbfec44b4) at
/home/xuefer/src/php/php5/sapi/cgi/cgi_main.c:1980
(gdb) up
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
3294if (strstr(file_handle-filename, .phar) 
!strstr(file_handle-filename, ://)) {
(gdb) p file_handle[0]
$2 = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0,
handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0,
  mmap = {len = 0, pos = 1, map = 0x83f, buf = 0xb7f14878
j®\t\b\020ii\r, old_handle = 0xb7f15000, old_closer = 0x807ba17},
  reader = 0x4b2b9840, fsizer = 0x805f4a4, closer = 0x1}},
free_filename = 0 '\0'}



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