#46039 [NEW]: ArrayObject iteration is slow

2008-09-10 Thread anthony at anthonybush dot com
From: anthony at anthonybush dot com
Operating system: Mac OS X 10.5.4
PHP version:  5.2.6
PHP Bug Type: Performance problem
Bug description:  ArrayObject iteration is slow

Description:

ArrayObject iteration is slow.  I iterated over an ArrayObject (small 
and large) many times.  I expected iteration performance to be near that 
of a regular array.  Instead, iteration on ArrayObject actually took 5.5 
to 6 times longer than using a regular array.  This caused my real-world 
script to go from 8 seconds execution time to 47 seconds on average.

See also "bogus" bug 38528: http://bugs.php.net/bug.php?id=38528






Reproduce code:
---




Expected result:

ANY seconds.
ANY seconds.
ArrayObject took 1 times longer.






Actual result:
--
0.00055193901062 seconds.
0.00314903259277 seconds.
ArrayObject took 5.71 times longer.






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



#46037 [Opn]: array_walk not passing third parameter by reference

2008-09-10 Thread bastard dot internets at gmail dot com
 ID:   46037
 User updated by:  bastard dot internets at gmail dot com
-Reported By:  bastard dot internets at google dot com
+Reported By:  bastard dot internets at gmail dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: ubuntu 8.04 (server)
 PHP Version:  5.2CVS-2008-09-10 (snap)
 New Comment:

Fixing email contact.


Previous Comments:


[2008-09-10 05:45:37] bastard dot internets at gmail dot com

Description:

When array_walk function is used inside __construct function of an
object, array_walk allows passing of its third parameter to the user
defined function by reference.  This is expected.

In any other case, function, or scope, this parameter cannot be passed
by reference, instead passing by value yet producing no error even when
the user defined function demands passing this third parameter by
reference.  Possibly similar to bug 45780, but unlikely due to function
scope behaviour.

Testing on php 5.2.4 (cvs/snap unknown); apache 2.2; ubuntu 8.04
server.  PHP packaged with ubuntu 8.04 lamp.

Reproduce code:
---
 1, "val_2" => 2, "val_3" 
=> 3);
array_walk($class_test_array,create_function('$v,$k,&$that','if
(property_exists($that,$k)) {$that->$k = $v;}'),$this);
}

}


function alter_test_array($val, $key, &$test_array) {
$test_array[] = $val;
}

$class_test_obj = new ClassTest();
$normal_test_array_1 = array(1,2,3);
$normal_test_array_2 = array();
$normal_test_array_3 = array();

array_walk($normal_test_array_1,
create_function('$val,$key,&$test_array', '$test_array[] = $val;'),
$normal_test_array_2);
array_walk($normal_test_array_1, alter_test_array,
$normal_test_array_3);




Expected result:

$class_test_obj === object(1,2)
$normal_test_array_2 === array(1,2,3)
$normal_test_array_3 === array(1,2,3)

Actual result:
--
$class_test_obj === object(1,2)
$normal_test_array_2 === array(0)
$normal_test_array_3 === array(0)





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



#46040 [NEW]: pcre_internal.h parse error during compilation

2008-09-10 Thread Bjorn dot Wiberg at its dot uu dot se
From: Bjorn dot Wiberg at its dot uu dot se
Operating system: IBM AIX 5.3 5300-08-01-0819
PHP version:  5.3CVS-2008-09-10 (snap)
PHP Bug Type: Compile Failure
Bug description:  pcre_internal.h parse error during compilation

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
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_chartables.c:25:
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:976:
error: parse error before 'BOOL'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:976:
warning: no semicolon at end of struct or union
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
error: parse error before '}' token
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
warning: type defaults to 'int' in declaration of 'compile_data'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
warning: data definition has no type or storage class
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1027:
error: parse error before 'BOOL'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1027:
warning: no semicolon at end of struct or union
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1028:
warning: type defaults to 'int' in declaration of 'notbol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1028:
warning: data definition has no type or storage class
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
error: parse error before 'noteol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
warning: type defaults to 'int' in declaration of 'noteol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
warning: data definition has no type or storage class
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1030:
error: parse error before 'utf8'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1030:
warning: type defaults to 'int' in declaration of 'utf8'
/home/bwi

#43639 [Com]: php-5.2.5-win32-installer.msi stops before it is finished.

2008-09-10 Thread stonesben at googlemail dot com
 ID:   43639
 Comment by:   stonesben at googlemail dot com
 Reported By:  erik dot kullberg at telia dot com
 Status:   No Feedback
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

This is disgusting. No workaround since 2007. Lazy or incompetent at
fixing bugs?


Previous Comments:


[2008-09-08 11:40:31] pdanailov at yahoo dot com

I have the same problem. My system is 
Win XP Prof SP2, PHP 5.2.6 and PHP 5.2.7
Bulgarian settings changed to English for the decimal separator
None of the solutions worked. PHP Sucks:



[2008-08-24 01:03:09] nospam at gmail dot com

I'd like to confirm that this error occurs on 32-bit Vista systems in
Dutch locale, also.

Running the installer from a batch as suggested above successfully
executed the installation, however.



[2008-08-11 14:18:05] paour at free dot fr

Hello,
same bug in french system (decimal separator is comma)
Script run with dot separator.
Nicolas



[2008-08-10 03:32:36] davis1089 at mint dot us dot to

I can confirm this bug in the installer!

My system is Norwegian, and uses , as decimal point, and when i changed
regional options to english as "tamasmatrai" pointed out, installer
finished successfully.



[2008-07-26 19:02:01] tamasmatrai at yahoo dot com

Solution!!!

I had the same problem on Windows XP. I read the event viewer and found
detailed info:

"Product: PHP 5.2.6 -- Error 1720. There is a problem with this Windows
Installer package. A script required for this install to complete could
not be run. Contact your support personnel or package vendor.  Custom
action configIIS4 script error -2146828275, Microsoft VBScript
futásidejû hiba: Típuseltérés: '[string: "5.1"]' Line 179, Column 5,  "

The key was this: "Típuseltérés: '[string: "5.1"]' Line 179, Column 5, 
." 'Típuseltérés' is a Hungarian term, which means 'data type error'.
So, '5.1' is not a number in a vb script which is run by the
installation. 

Decimal separator was ',' (comma) on my system and when I changed it to
'.' (dot), then installation was completed successfully! 

So try this! It is a bug and this was the first time I tried to install
PHP. After such a problem I will think 1 times if I use PHP. :o I am
a programmer and if I would leave such a bug in my application, I would
be sacked from my workplace without any doubt.

Best Regards:
Tamas



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

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



#45928 [Ctl->Csd]: large scripts from stdin are stripped at 16K border

2008-09-10 Thread lbarnaud
 ID:   45928
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Critical
+Status:   Closed
 Bug Type: CGI related
 Operating System: Mac OS X 10.5
 PHP Version:  5.3CVS-2008-08-26 (CVS)
 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-09 12:00:55] cschneid at cschneid dot com

I had a quick look at this bug and found the problem to be in
Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to
determine the filesize which on MacOS X for pipes returns either 0 (my
interpretation: no data from the pipe ready yet) or a number up to 16384
(my interpretation: data from the pipe ready but the maximum buffer size
is 16k).

I see several solutions but I'm not sure which is the desired one:
- return 0 (size unknown) if the file is a pipe (or socket, ...)
- return 0 if the file is not a regular file (or symlink, dir?)
- look into a way of determining EOF reached

As a quick test I changed
return buf.st_size;
in function zend_stream_fsize() to
return 0;
and cat 30k.php | php worked after that.

I posted this to [EMAIL PROTECTED] but did not get any reply so I'm not
sure how to proceed.



[2008-08-26 18:24:52] [EMAIL PROTECTED]

Description:

any php-file which is larger that 16Kb will result in parse error on
Mac OS X, if run as following:
cat largefile.php|php -l

while the following options will work:
php -l largefile.php
php -l < largefile.php

"-l" flag is optional. it can be reproduced without it too

I discussed this with Rasmus (he was able to reproduce this problem
too), and he mentioned, that this bug is most likely re2c-related

Expected result:

No syntax errors detected in -

Actual result:
--
PHP Parse error:  syntax error, unexpected $end in …





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



#45553 [Opn->Csd]: Using XPath to return values for attributes with a namespace does not work

2008-09-10 Thread rrichards
 ID:   45553
 Updated by:   [EMAIL PROTECTED]
 Reported By:  njones at art-k-tec dot com
-Status:   Open
+Status:   Closed
 Bug Type: SimpleXML related
 Operating System: OSX
 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-07-18 11:07:09] njones at art-k-tec dot com

Description:

Using XPath to return values for attributes with a namespace does not
work. It seems to be dropping any namespaces for attributes when using
XPath. But the namespace is clearly registered because it can be used to
access nodes, when using XPath.

Reproduce code:
---
$xml =<
test1
test2

XML;

$x = simplexml_load_string($xml);
$x->registerXPathNamespace("a", "http://a";);

var_dump($x->xpath("/xml/data/@a:label"));
echo "";
var_dump($x->xpath("/xml/a:data"));
echo "";
var_dump($x->xpath("/xml/a:data/@a:label"));
echo "";
var_dump($x->data->attributes("http://a";));

Expected result:

array(1) { [0]=>  object(SimpleXMLElement)#2 (1) { ["@attributes"]=> 
array(1) { ["label"]=>  string(12) "I am A" } } }

array(1) { [0]=> object(SimpleXMLElement)#2 (2) { ["@attributes"]=>
array(1) { ["label"]=> string(14) "I am a:Nothing" } [0]=> string(5)
"test2" } }

array(1) { [0]=> object(SimpleXMLElement)#2 (1) { ["@attributes"]=>
array(1) { ["label"]=> string(14) "I am a:A" } } } 

object(SimpleXMLElement)#4 (1) { ["@attributes"]=> array(1) {
["label"]=> string(6) "I am A" } }

Actual result:
--
array(1) { [0]=>  object(SimpleXMLElement)#2 (1) { ["@attributes"]=> 
array(1) { ["label"]=>  string(12) "I am Nothing" } } }

array(1) { [0]=> object(SimpleXMLElement)#2 (2) { ["@attributes"]=>
array(1) { ["label"]=> string(14) "I am a:Nothing" } [0]=> string(5)
"test2" } }

array(1) { [0]=> object(SimpleXMLElement)#2 (1) { ["@attributes"]=>
array(1) { ["label"]=> string(14) "I am a:Nothing" } } }

object(SimpleXMLElement)#4 (1) { ["@attributes"]=> array(1) {
["label"]=> string(6) "I am A" } }





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



#43639 [NoF->Asn]: php-5.2.5-win32-installer.msi stops before it is finished.

2008-09-10 Thread pajoye
 ID:   43639
 Updated by:   [EMAIL PROTECTED]
 Reported By:  erik dot kullberg at telia dot com
-Status:   No Feedback
+Status:   Assigned
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.2.5
-Assigned To:  
+Assigned To:  jmertic
 New Comment:

Having this bug assigned to the installer maintainer will help to
actually get it solved. Especially when so many different problems are
discussed within the same bug.


Previous Comments:


[2008-09-10 10:22:15] stonesben at googlemail dot com

This is disgusting. No workaround since 2007. Lazy or incompetent at
fixing bugs?



[2008-09-08 11:40:31] pdanailov at yahoo dot com

I have the same problem. My system is 
Win XP Prof SP2, PHP 5.2.6 and PHP 5.2.7
Bulgarian settings changed to English for the decimal separator
None of the solutions worked. PHP Sucks:



[2008-08-24 01:03:09] nospam at gmail dot com

I'd like to confirm that this error occurs on 32-bit Vista systems in
Dutch locale, also.

Running the installer from a batch as suggested above successfully
executed the installation, however.



[2008-08-11 14:18:05] paour at free dot fr

Hello,
same bug in french system (decimal separator is comma)
Script run with dot separator.
Nicolas



[2008-08-10 03:32:36] davis1089 at mint dot us dot to

I can confirm this bug in the installer!

My system is Norwegian, and uses , as decimal point, and when i changed
regional options to english as "tamasmatrai" pointed out, installer
finished successfully.



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

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



#46042 [NEW]: Mem. leaks when calling mb_convert_encoding using Reflection

2008-09-10 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  5.3CVS-2008-09-10 (CVS)
PHP Bug Type: mbstring related
Bug description:  Mem. leaks when calling mb_convert_encoding using Reflection

Description:

See below.

Reproduce code:
---
invokeArgs(array(1, 2, 3));

Expected result:

Warning: mb_convert_encoding(): Unknown encoding "2" in %s on line %d
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3120) :  Freeing 0x08BC5F94
(20 bytes), script=%s
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/main/spprintf.c(764) :  Freeing 0x08BC5FD8 (79
bytes), script=%s
=== Total 2 memory leaks detected ===



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



#46042 [Opn]: Mem. leaks when calling mb_convert_encoding using Reflection

2008-09-10 Thread felipe
 ID:  46042
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:mbstring related
 PHP Version: 5.3CVS-2008-09-10 (CVS)
 New Comment:

See also:

$x = new reflectionfunction('mb_detect_encoding');
$x->invokeArgs(array(1,2,3));
Warning: mb_detect_encoding(): Illegal argument in %s on line 4
[Wed Sep 10 09:33:38 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3241) :  Freeing
0x08BC5F14 (20 bytes), script=%s
[Wed Sep 10 09:33:38 2008]  Script:  '%s'
/home/felipe/dev/php5/main/spprintf.c(764) :  Freeing 0x08BC5F58 (79
bytes), script=%s

---

$x = new reflectionfunction('mb_substitute_character');
$x->invoke(array());
Warning: mb_substitute_character(): Unknown character. in %s on line 8
[Wed Sep 10 09:32:46 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(2035) :  Freeing
0x08BC5BCC (20 bytes), script=%s
=== Total 1 memory leaks detected ===



Previous Comments:


[2008-09-10 12:14:14] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
invokeArgs(array(1, 2, 3));

Expected result:

Warning: mb_convert_encoding(): Unknown encoding "2" in %s on line %d
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3120) :  Freeing
0x08BC5F94 (20 bytes), script=%s
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/main/spprintf.c(764) :  Freeing 0x08BC5FD8 (79
bytes), script=%s
=== Total 2 memory leaks detected ===







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



#46043 [NEW]: file_get_contents() gives "stream does not support seeking" error with offset

2008-09-10 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Linux, debian
PHP version:  5.2.6
PHP Bug Type: Streams related
Bug description:  file_get_contents() gives "stream does not support seeking" 
error with offset

Description:

file_get_contents() supports an offset. However, at certain times this
gives an "stream does not support seeking" at a certain offset. This offset
might differ with installations and the website a resource is requested
from.



Reproduce code:
---
file_get_contents("http://stock.ter.dk/taske.jpg";, null, null, 8000,
1000);

Expected result:

The content should be returned

Actual result:
--
Warning: file_get_contents(): stream does not support seeking in Command
line code on line 1

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in Command line code on line 1



The exact cutoff-point seem to differ. A script such as the following
gives different results at different servers.

http://stock.ter.dk/taske.jpg";, null,
null, $offset, $length)) {
  print "$offset, $length\n";
  $offset += $length;
}
?>

PHP 5.2.6-0.dotdeb.1 with Suhosin-Patch 0.9.6.2 (cli):

0, 500
500, 500
1000, 500
1500, 500
2000, 500
2500, 500
3000, 500
3500, 500
4000, 500
4500, 500
5000, 500
5500, 500
6000, 500
6500, 500
7000, 500
7500, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in /home/penguin/- on line 4

PHP 5.2.0 (cli) (built: Nov 26 2006 10:25:07):

0, 500
500, 500
1000, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 1500 in the
stream. in /home/penguin/- on line 4



The behaviour is the same whether php-cli or mod_php is used, as seen at
http://stock.ter.dk/filegetbug.php


(as a side note, file_get_contents() [or rather, the http stream] could
try to use a ranged request when an offset and range is present, with a
fallback to the current behaviour if the webserver returns the whole file)


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



#46029 [Opn->Csd]: Segfault in DOMText when using with Reflection

2008-09-10 Thread rrichards
 ID:   46029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: DOM XML related
 Operating System: *
 PHP Version:  5.2CVS, 5.3CVS, 6CVS
 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-09 14:22:56] [EMAIL PROTECTED]

See also:

$x = new ReflectionMethod('domcomment', '__construct');
$x->invoke(new domcomment);



[2008-09-09 14:11:54] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
invoke(new domtext);
print "ok!\n";


Expected result:

ok
ok

Actual result:
--
==7575== Process terminating with default action of signal 11
(SIGSEGV)
==7575==  Bad permissions for mapped region at address 0x41BFAB4
==7575==at 0x808B987: php_libxml_clear_object (libxml.c:147)
==7575==by 0x808B9E8: php_libxml_unregister_node (libxml.c:162)
==7575==by 0x808DDEB: php_libxml_node_free_resource
(libxml.c:1008)
==7575==by 0x80F55FC: zim_domtext___construct (text.c:96)
==7575==by 0x83402CD: zend_call_function (zend_execute_API.c:1027)
==7575==by 0x819DE85: zim_reflection_method_invoke
(php_reflection.c:2376)
==7575==by 0x8378AF9: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==7575==by 0x8379AE7: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:322)
==7575==by 0x8378593: execute (zend_vm_execute.h:92)
==7575==by 0x834F898: zend_execute_scripts (zend.c:1134)
==7575==by 0x82E8D09: php_execute_script (main.c:2011)
==7575==by 0x83D8C82: main (php_cli.c:1134)






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



#46034 [Fbk->Opn]: php cli -d include_path only accepts first parameter

2008-09-10 Thread php at ryank dot net
 ID:   46034
 User updated by:  php at ryank dot net
 Reported By:  php at ryank dot net
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: WinXP
 PHP Version:  5.2.6
 New Comment:

Double quotes do not appear to help:

C:\>php -r "print ini_get('include_path');" 
-d include_path=".;:\test1;c:\test2"
.;c:\test1;c:\test2

C:\>php -r "print ini_get('include_path');" 
-d include_path="c:\test1;c:\test2"
c:\test1

Single quotes become part of the directive:

C:\>php -r "print ini_get('include_path');" -d
include_path='c:\test1;c:\test2'
'c:\test1


Previous Comments:


[2008-09-09 18:41:50] [EMAIL PROTECTED]

You may enclose the value with ' or " like in php.ini



[2008-09-09 18:14:17] php at ryank dot net

This apparently works fine though...

C:\>php -r "print ini_get('include_path');" -d include
_path=.;c:\test1;c:\test2

.;c:\test1;c:\test2



[2008-09-09 18:08:29] php at ryank dot net

Description:

When using the -d flag in php-cli on the include_path directive, only
the first parameter is assigned to include_path.

C:\>php -v

PHP 5.2.6 (cli) (built: May  2 2008 18:02:07)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

Reproduce code:
---
C:\>php -r "print ini_get('include_path');" -d include
_path=c:\test1.ini;c:\test2.ini

Expected result:

c:\test1.ini;c:\test2.ini

Actual result:
--
c:\test1.ini





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



#46037 [Opn->Bgs]: array_walk not passing third parameter by reference

2008-09-10 Thread bastard dot internets at gmail dot com
 ID:   46037
 User updated by:  bastard dot internets at gmail dot com
 Reported By:  bastard dot internets at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: ubuntu 8.04 (server)
 PHP Version:  5.2CVS-2008-09-10 (snap)
 New Comment:

Found http://bugs.php.net/bug.php?id=4116

Not a bug, but working as it should.  Third parameter must be passed by
reference into array_walk function itself to be passed by reference on
to the callback function.

Closing case.


Previous Comments:


[2008-09-10 06:44:50] bastard dot internets at gmail dot com

Fixing email contact.



[2008-09-10 05:45:37] bastard dot internets at gmail dot com

Description:

When array_walk function is used inside __construct function of an
object, array_walk allows passing of its third parameter to the user
defined function by reference.  This is expected.

In any other case, function, or scope, this parameter cannot be passed
by reference, instead passing by value yet producing no error even when
the user defined function demands passing this third parameter by
reference.  Possibly similar to bug 45780, but unlikely due to function
scope behaviour.

Testing on php 5.2.4 (cvs/snap unknown); apache 2.2; ubuntu 8.04
server.  PHP packaged with ubuntu 8.04 lamp.

Reproduce code:
---
 1, "val_2" => 2, "val_3" 
=> 3);
array_walk($class_test_array,create_function('$v,$k,&$that','if
(property_exists($that,$k)) {$that->$k = $v;}'),$this);
}

}


function alter_test_array($val, $key, &$test_array) {
$test_array[] = $val;
}

$class_test_obj = new ClassTest();
$normal_test_array_1 = array(1,2,3);
$normal_test_array_2 = array();
$normal_test_array_3 = array();

array_walk($normal_test_array_1,
create_function('$val,$key,&$test_array', '$test_array[] = $val;'),
$normal_test_array_2);
array_walk($normal_test_array_1, alter_test_array,
$normal_test_array_3);




Expected result:

$class_test_obj === object(1,2)
$normal_test_array_2 === array(1,2,3)
$normal_test_array_3 === array(1,2,3)

Actual result:
--
$class_test_obj === object(1,2)
$normal_test_array_2 === array(0)
$normal_test_array_3 === array(0)





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



#46003 [Opn->Csd]: isset on nonexisting nodes return unexpected results

2008-09-10 Thread rrichards
 ID:   46003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kiryl dot zhybul at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: SimpleXML related
 Operating System: linux
 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-05 15:17:45] kiryl dot zhybul at gmail dot com

Description:

isset on nonexisting nodes return unexpected results

Reproduce code:
---
$a = simplexml_load_string("

Test

  
  


");

var_dump(isset($a->o->zz));
var_dump(isset($a->o->text));

Expected result:

bool(false)
bool(false)

Actual result:
--
bool(false)
bool(true)





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



#46037 [Bgs]: array_walk not passing third parameter by reference

2008-09-10 Thread bastard dot internets at gmail dot com
 ID:   46037
 User updated by:  bastard dot internets at gmail dot com
 Reported By:  bastard dot internets at gmail dot com
 Status:   Bogus
 Bug Type: Arrays related
-Operating System: ubuntu 8.04 (server)
+Operating System: n/a
-PHP Version:  5.2CVS-2008-09-10 (snap)
+PHP Version:  n/a
 New Comment:

-


Previous Comments:


[2008-09-10 16:29:17] bastard dot internets at gmail dot com

Found http://bugs.php.net/bug.php?id=4116

Not a bug, but working as it should.  Third parameter must be passed by
reference into array_walk function itself to be passed by reference on
to the callback function.

Closing case.



[2008-09-10 06:44:50] bastard dot internets at gmail dot com

Fixing email contact.



[2008-09-10 05:45:37] bastard dot internets at gmail dot com

Description:

When array_walk function is used inside __construct function of an
object, array_walk allows passing of its third parameter to the user
defined function by reference.  This is expected.

In any other case, function, or scope, this parameter cannot be passed
by reference, instead passing by value yet producing no error even when
the user defined function demands passing this third parameter by
reference.  Possibly similar to bug 45780, but unlikely due to function
scope behaviour.

Testing on php 5.2.4 (cvs/snap unknown); apache 2.2; ubuntu 8.04
server.  PHP packaged with ubuntu 8.04 lamp.

Reproduce code:
---
 1, "val_2" => 2, "val_3" 
=> 3);
array_walk($class_test_array,create_function('$v,$k,&$that','if
(property_exists($that,$k)) {$that->$k = $v;}'),$this);
}

}


function alter_test_array($val, $key, &$test_array) {
$test_array[] = $val;
}

$class_test_obj = new ClassTest();
$normal_test_array_1 = array(1,2,3);
$normal_test_array_2 = array();
$normal_test_array_3 = array();

array_walk($normal_test_array_1,
create_function('$val,$key,&$test_array', '$test_array[] = $val;'),
$normal_test_array_2);
array_walk($normal_test_array_1, alter_test_array,
$normal_test_array_3);




Expected result:

$class_test_obj === object(1,2)
$normal_test_array_2 === array(1,2,3)
$normal_test_array_3 === array(1,2,3)

Actual result:
--
$class_test_obj === object(1,2)
$normal_test_array_2 === array(0)
$normal_test_array_3 === array(0)





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



#46032 [Opn]: PharData::__construct() - wrong memory read

2008-09-10 Thread felipe
 ID:   46032
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: PHAR related
 Operating System: *
 PHP Version:  5.2CVS-2008-09-09 (CVS)
 New Comment:

See also:

__construct('`hf???0...')
#1 {main}
  thrown in %s on line %d






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



#46044 [NEW]: Mysqli - wrong error message

2008-09-10 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  5.3CVS-2008-09-10 (CVS)
PHP Bug Type: MySQLi related
Bug description:  Mysqli - wrong error message

Description:

See below.

Reproduce code:
---
new mysqli_result(1); // Error! OK
Warning: mysqli_result::mysqli_result() expects parameter 1 to be mysqli,
integer given in /home/felipe/public_html/bug.php on line 4

new mysqli('localhost', 'root'); // No error, OK!


new mysqli_result(new mysqli('localhost', 'root')); // hm!?!?!?
Warning: mysqli::mysqli() expects parameter 1 to be string, object given
in /home/felipe/public_html/bug.php on line 4


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



#46044 [Opn]: Mysqli - wrong error message

2008-09-10 Thread felipe
 ID:  46044
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:MySQLi related
 PHP Version: 5.3CVS-2008-09-10 (CVS)
 New Comment:

See also:

new mysqli_stmt(new mysqli('localhost', 'root'));


Previous Comments:


[2008-09-10 17:41:08] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
new mysqli_result(1); // Error! OK
Warning: mysqli_result::mysqli_result() expects parameter 1 to be
mysqli, integer given in /home/felipe/public_html/bug.php on line 4

new mysqli('localhost', 'root'); // No error, OK!


new mysqli_result(new mysqli('localhost', 'root')); // hm!?!?!?
Warning: mysqli::mysqli() expects parameter 1 to be string, object
given in /home/felipe/public_html/bug.php on line 4






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



#45732 [Com]: odbc.defaultlrl = 0 != Passthru

2008-09-10 Thread blabounty at minnetronix dot com
 ID:   45732
 Comment by:   blabounty at minnetronix dot com
 Reported By:  nektarin at me dot com
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  5.2.6
 New Comment:

Testing this using an ODBC connection to MS SQL SERVER 2005, commenting
out the line causes text fields, when queried through an ODBC
connection, to cut off at 4096 characters.

They do indeed cut off at 0 when the setting is set to 0, however.

I'm using a Windows XP 32-bit Zend Core platform, but I've also tested
this on a non-Zend Apache server and the result is the same.


Previous Comments:


[2008-08-06 12:12:50] nektarin at me dot com

Description:

The information given in php.ini is wrong.

Setting "odbc.defaultlrl = 0" is not the same as Passthru (as described

in php.ini).
To use passthru you have to comment the line containing
odbc.defaultlrl.





Reproduce code:
---
odbc.defaultlrl = 0

Expected result:

odbc.defaultlrl = PASSTHRU

Actual result:
--
odbc.defaultlrl = 0 (0 bytes is received for every SQL query)





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



#46040 [Opn->Fbk]: pcre_internal.h parse error during compilation

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

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


Previous Comments:


[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
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_chartables.c:25:
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:976:
error: parse error before 'BOOL'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:976:
warning: no semicolon at end of struct or union
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
error: parse error before '}' token
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
warning: type defaults to 'int' in declaration of 'compile_data'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:980:
warning: data definition has no type or storage class
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1027:
error: parse error before 'BOOL'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1027:
warning: no semicolon at end of struct or union
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1028:
warning: type defaults to 'int' in declaration of 'notbol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1028:
warning: data definition has no type or storage class
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
error: parse error before 'noteol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
warning: type defaults to 'int' in declaration of 'noteol'
/home/bwiberg/rpm/BUILD/php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h:1029:
warning: data definition

#46034 [Opn->Fbk]: php cli -d include_path only accepts first parameter

2008-09-10 Thread jani
 ID:   46034
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at ryank dot net
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: WinXP
 PHP Version:  5.2.6
 New Comment:

You need to enclose all of it in quotes:

# php -d "include_path=some;path;here" ..


Previous Comments:


[2008-09-10 16:21:09] php at ryank dot net

Double quotes do not appear to help:

C:\>php -r "print ini_get('include_path');" 
-d include_path=".;:\test1;c:\test2"
.;c:\test1;c:\test2

C:\>php -r "print ini_get('include_path');" 
-d include_path="c:\test1;c:\test2"
c:\test1

Single quotes become part of the directive:

C:\>php -r "print ini_get('include_path');" -d
include_path='c:\test1;c:\test2'
'c:\test1



[2008-09-09 18:41:50] [EMAIL PROTECTED]

You may enclose the value with ' or " like in php.ini



[2008-09-09 18:14:17] php at ryank dot net

This apparently works fine though...

C:\>php -r "print ini_get('include_path');" -d include
_path=.;c:\test1;c:\test2

.;c:\test1;c:\test2



[2008-09-09 18:08:29] php at ryank dot net

Description:

When using the -d flag in php-cli on the include_path directive, only
the first parameter is assigned to include_path.

C:\>php -v

PHP 5.2.6 (cli) (built: May  2 2008 18:02:07)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

Reproduce code:
---
C:\>php -r "print ini_get('include_path');" -d include
_path=c:\test1.ini;c:\test2.ini

Expected result:

c:\test1.ini;c:\test2.ini

Actual result:
--
c:\test1.ini





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



#46039 [Opn->Asn]: ArrayObject iteration is slow

2008-09-10 Thread jani
 ID:   46039
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anthony at anthonybush dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Performance problem
 Operating System: Mac OS X 10.5.4
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  helly
 New Comment:

Marcus, give your feedback to this.


Previous Comments:


[2008-09-10 07:00:51] anthony at anthonybush dot com

Description:

ArrayObject iteration is slow.  I iterated over an ArrayObject (small 
and large) many times.  I expected iteration performance to be near
that 
of a regular array.  Instead, iteration on ArrayObject actually took
5.5 
to 6 times longer than using a regular array.  This caused my
real-world 
script to go from 8 seconds execution time to 47 seconds on average.

See also "bogus" bug 38528: http://bugs.php.net/bug.php?id=38528






Reproduce code:
---




Expected result:

ANY seconds.
ANY seconds.
ArrayObject took 1 times longer.






Actual result:
--
0.00055193901062 seconds.
0.00314903259277 seconds.
ArrayObject took 5.71 times longer.










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



#46046 [NEW]: Incorrect Code Styling When Mixing Languages (PHP Side And Text Editor Side)

2008-09-10 Thread vask at dmglobal dot net
From: vask at dmglobal dot net
Operating system: All
PHP version:  5.3.0alpha2
PHP Bug Type: Feature/Change Request
Bug description:  Incorrect Code Styling When Mixing Languages (PHP Side And 
Text Editor Side)

Description:

The ONLY way you can ensure that the correct code styling is done is if
there is some kind of "separator" between different languages mixed in the
same file.

The current implementation of PHP doesn't ALWAYS allow for a "separator"
when mixing different languages such as HTML, JS, PHP, etc...

With most things we are ok.. there are already separators that can be
recognized by a text editor...
ie) 


However, there are cases where a text editor will be unable to realize the
language change is present because a "separator" will NOT be present...
like if something is in quotations... Below is the easiest example I can
think of.

ie)file.html.php
Don\'t ' . $_GET['verb'] . ''; ?>
- incorrect html code styling (should NOT be a solid color). 
- requires \' or fiddling with the quotations.

ie)file.abc (THEORETICAL)
Don't ?> ?>
- correct html code styling.
- No need to escape or fiddle with the apostrophe in "Don't."

NOTE: Two separate syntaxes (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23658501.html#a22442342

Reproduce code:
---
Don\'t ' . $_GET['verb'] . '';

//--

// file.abc
// THEORETICAL EXAMPLE
// Correct html code styling.
// No need to escape or fiddle with the apostrophe in "Don't."

$variable = ?>Don't ?> ?>


Expected result:

// Text editor displays correct code styling when mixing different
languages together.

// This feature request is about creating a "separator" in PHP so that the
correct code styling will ALWAYS be possible in a text editor when mixing
different client side languages in the same file.

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



#46046 [Opn->Bgs]: Incorrect Code Styling When Mixing Languages (PHP Side And Text Editor Side)

2008-09-10 Thread lbarnaud
 ID:   46046
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vask at dmglobal dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0alpha2
 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.

That's a bug of your editor, not PHP ;) 


Previous Comments:


[2008-09-10 20:53:05] vask at dmglobal dot net

Description:

The ONLY way you can ensure that the correct code styling is done is if
there is some kind of "separator" between different languages mixed in
the same file.

The current implementation of PHP doesn't ALWAYS allow for a
"separator" when mixing different languages such as HTML, JS, PHP,
etc...

With most things we are ok.. there are already separators that can be
recognized by a text editor...
ie) 


However, there are cases where a text editor will be unable to realize
the language change is present because a "separator" will NOT be
present... like if something is in quotations... Below is the easiest
example I can think of.

ie)file.html.php
Don\'t ' . $_GET['verb'] . ''; ?>
- incorrect html code styling (should NOT be a solid color). 
- requires \' or fiddling with the quotations.

ie)file.abc (THEORETICAL)
Don't ?>
?>
- correct html code styling.
- No need to escape or fiddle with the apostrophe in "Don't."

NOTE: Two separate syntaxes (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23658501.html#a22442342

Reproduce code:
---
Don\'t ' . $_GET['verb'] . '';

//--

// file.abc
// THEORETICAL EXAMPLE
// Correct html code styling.
// No need to escape or fiddle with the apostrophe in "Don't."

$variable = ?>Don't ?> ?>


Expected result:

// Text editor displays correct code styling when mixing different
languages together.

// This feature request is about creating a "separator" in PHP so that
the correct code styling will ALWAYS be possible in a text editor when
mixing different client side languages in the same file.

// ie)
// http://bugs.php.net/?id=46046&edit=1



#46047 [NEW]: SimpleXML converts empty nodes into object with nested array

2008-09-10 Thread dalef at yahoo-inc dot com
From: dalef at yahoo-inc dot com
Operating system: FreeBSD 4
PHP version:  5.2CVS-2008-09-10 (snap)
PHP Bug Type: SimpleXML related
Bug description:  SimpleXML converts empty nodes into object with nested array

Description:

When I run the following script I get strange results that are difficult
to test against, and when converted to json, a real pain to use on the
client-side.

',
LIBXML_NOCDATA);
print_r($xml);
$json = json_encode($xml);
echo "{$json}\n";
?>

Since bar is empty (Even though it has a CDATA tag that is removed) before
it gets to me ... I should get something like this
bar => ""
OR
at most ...
bar => SimpleXMLElemebt object ()

but ... what I don't expect is this:

SimpleXMLElement Object
(
[bar] => SimpleXMLElement Object
(
[0] => 
)
...

When this data is converted to json ... I get bar:{"0":""} which requires
me to do typeof and other types of tests on the client-side.

I mentioned this issue to our resident FE PHP expert here at Y! and they
said to file a bug.



Reproduce code:
---
Run this script on the command line:

',
LIBXML_NOCDATA);
print_r($xml);
$json = json_encode($xml);
echo "{$json}\n";
?>

Expected result:

SimpleXMLElement Object
(
[bar] => ""
)

OR 

SimpleXMLElement Object
(
[bar] => SimpleXMLElement Object
(
)
)

Actual result:
--
SimpleXMLElement Object
(
[bar] => SimpleXMLElement Object
(
[0] => ""
)
)

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



#46043 [Opn->Bgs]: file_get_contents() gives "stream does not support seeking" error with offset

2008-09-10 Thread iliaa
 ID:   46043
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Streams related
 Operating System: Linux, debian
 PHP Version:  5.2.6
 New Comment:

You cannot seek on non-local files.


Previous Comments:


[2008-09-10 14:55:42] [EMAIL PROTECTED]

Description:

file_get_contents() supports an offset. However, at certain times this
gives an "stream does not support seeking" at a certain offset. This
offset might differ with installations and the website a resource is
requested from.



Reproduce code:
---
file_get_contents("http://stock.ter.dk/taske.jpg";, null, null, 8000,
1000);

Expected result:

The content should be returned

Actual result:
--
Warning: file_get_contents(): stream does not support seeking in
Command line code on line 1

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in Command line code on line 1



The exact cutoff-point seem to differ. A script such as the following
gives different results at different servers.

http://stock.ter.dk/taske.jpg";, null,
null, $offset, $length)) {
  print "$offset, $length\n";
  $offset += $length;
}
?>

PHP 5.2.6-0.dotdeb.1 with Suhosin-Patch 0.9.6.2 (cli):

0, 500
500, 500
1000, 500
1500, 500
2000, 500
2500, 500
3000, 500
3500, 500
4000, 500
4500, 500
5000, 500
5500, 500
6000, 500
6500, 500
7000, 500
7500, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in /home/penguin/- on line 4

PHP 5.2.0 (cli) (built: Nov 26 2006 10:25:07):

0, 500
500, 500
1000, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 1500 in the
stream. in /home/penguin/- on line 4



The behaviour is the same whether php-cli or mod_php is used, as seen
at http://stock.ter.dk/filegetbug.php


(as a side note, file_get_contents() [or rather, the http stream] could
try to use a ranged request when an offset and range is present, with a
fallback to the current behaviour if the webserver returns the whole
file)






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



#46042 [Opn->Csd]: Mem. leaks when calling mb_convert_encoding using Reflection

2008-09-10 Thread iliaa
 ID:   46042
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5.3CVS-2008-09-10 (CVS)
 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-10 12:34:46] [EMAIL PROTECTED]

See also:

$x = new reflectionfunction('mb_detect_encoding');
$x->invokeArgs(array(1,2,3));
Warning: mb_detect_encoding(): Illegal argument in %s on line 4
[Wed Sep 10 09:33:38 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3241) :  Freeing
0x08BC5F14 (20 bytes), script=%s
[Wed Sep 10 09:33:38 2008]  Script:  '%s'
/home/felipe/dev/php5/main/spprintf.c(764) :  Freeing 0x08BC5F58 (79
bytes), script=%s

---

$x = new reflectionfunction('mb_substitute_character');
$x->invoke(array());
Warning: mb_substitute_character(): Unknown character. in %s on line 8
[Wed Sep 10 09:32:46 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(2035) :  Freeing
0x08BC5BCC (20 bytes), script=%s
=== Total 1 memory leaks detected ===




[2008-09-10 12:14:14] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
invokeArgs(array(1, 2, 3));

Expected result:

Warning: mb_convert_encoding(): Unknown encoding "2" in %s on line %d
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3120) :  Freeing
0x08BC5F94 (20 bytes), script=%s
[Wed Sep 10 09:11:05 2008]  Script:  '%s'
/home/felipe/dev/php5/main/spprintf.c(764) :  Freeing 0x08BC5FD8 (79
bytes), script=%s
=== Total 2 memory leaks detected ===







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



#45901 [NoF->Ver]: wddx_serialize_value crash with SimpleXMLElement object

2008-09-10 Thread felipe
 ID:   45901
 Updated by:   [EMAIL PROTECTED]
 Reported By:  aragon at phat dot za dot net
-Status:   No Feedback
+Status:   Verified
 Bug Type: WDDX related
 Operating System: FreeBSD 7.0-STABLE
-PHP Version:  5.2.6
+PHP Version:  5.2.6, 5.3CVS
 New Comment:

I can reproduce using 5.3CVS.


Previous Comments:


[2008-09-03 01:00: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".



[2008-08-26 22:33:47] [EMAIL PROTECTED]

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





[2008-08-24 04:54:12] aragon at phat dot za dot net

Description:

If wddx_serialize_value is called on a SimpleXMLElement object that has
at least one child, the PHP script enters an infinite loop consuming
full CPU and allocating memory until the memory size limit is reached,
after which the script dies.


Reproduce code:
---
');
$xml->addChild('test');
echo wddx_serialize_value($xml, 'Variables');
echo 'hello world';

?>


Expected result:

To see the WDDX output and 'hello world' :)

Actual result:
--
Potential DoS against web server and this log entry:

[Sun Aug 24 06:44:19 2008] [error] [client 127.0.0.1] PHP Fatal error: 
Allowed memory size of 134217728 bytes exhausted (tried to allocate
133955606 bytes) in /usr/home/aragon/dev/admin.infinite/test.php on line
5






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



#46043 [Bgs]: file_get_contents() gives "stream does not support seeking" error with offset

2008-09-10 Thread [EMAIL PROTECTED]
 ID:   46043
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Streams related
 Operating System: Linux, debian
 PHP Version:  5.2.6
 New Comment:

But it does work fine (and returning the correct data) with a lower
offset?

The provided code also shows that the error only occurs at some cutoff
point, meaning the stream supports seeking without any problems until
the limit.

I suppose this "it sometimes works" nature should be noted in the
documentation or at least disallow file_get_contents() from using offset
at all at a stream that does not support fseek().

Currently it is in a state where the feature could work one day and not
the next (I suppose if the content is found within the first chunk of
the request of a given limit) where it is not clear why the feature is
not working.

At least the text "stream does not support seeking" is confusing as
some kind of offset usage is possible to a certain limit.


Previous Comments:


[2008-09-10 23:11:36] [EMAIL PROTECTED]

You cannot seek on non-local files.



[2008-09-10 14:55:42] [EMAIL PROTECTED]

Description:

file_get_contents() supports an offset. However, at certain times this
gives an "stream does not support seeking" at a certain offset. This
offset might differ with installations and the website a resource is
requested from.



Reproduce code:
---
file_get_contents("http://stock.ter.dk/taske.jpg";, null, null, 8000,
1000);

Expected result:

The content should be returned

Actual result:
--
Warning: file_get_contents(): stream does not support seeking in
Command line code on line 1

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in Command line code on line 1



The exact cutoff-point seem to differ. A script such as the following
gives different results at different servers.

http://stock.ter.dk/taske.jpg";, null,
null, $offset, $length)) {
  print "$offset, $length\n";
  $offset += $length;
}
?>

PHP 5.2.6-0.dotdeb.1 with Suhosin-Patch 0.9.6.2 (cli):

0, 500
500, 500
1000, 500
1500, 500
2000, 500
2500, 500
3000, 500
3500, 500
4000, 500
4500, 500
5000, 500
5500, 500
6000, 500
6500, 500
7000, 500
7500, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 8000 in the
stream in /home/penguin/- on line 4

PHP 5.2.0 (cli) (built: Nov 26 2006 10:25:07):

0, 500
500, 500
1000, 500

Warning: file_get_contents(): stream does not support seeking in
/home/penguin/- on line 4

Warning: file_get_contents(): Failed to seek to position 1500 in the
stream. in /home/penguin/- on line 4



The behaviour is the same whether php-cli or mod_php is used, as seen
at http://stock.ter.dk/filegetbug.php


(as a side note, file_get_contents() [or rather, the http stream] could
try to use a ranged request when an offset and range is present, with a
fallback to the current behaviour if the webserver returns the whole
file)






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



#46048 [NEW]: SimpleXML top-level @attributes not part of iterator

2008-09-10 Thread php at isnoop dot net
From: php at isnoop dot net
Operating system: Ubuntu 8.04 server
PHP version:  5.3.0alpha2
PHP Bug Type: SimpleXML related
Bug description:  SimpleXML top-level @attributes not part of iterator

Description:

The @attributes for the top-level element in a SimpleXMLElement object
aren't returned as part of any iteration over the object.

Reproduced in 5.3.0alpha1 as well.

Reproduce code:
---
$xml = '

value

';
$obj = simplexml_load_string($xml);
print_r(get_object_vars($obj));


Expected result:

Array
(   
[EMAIL PROTECTED] => Array
(   
[id] => 1
)
[key] => value
)



Actual result:
--
Array
(   
[key] => value
)



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



#46032 [Opn->Csd]: PharData::__construct() - wrong memory read

2008-09-10 Thread cellog
 ID:   46032
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: PHAR related
 Operating System: *
 PHP Version:  5.2CVS-2008-09-09 (CVS)
-Assigned To:  
+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.

thanks Felipe :)


Previous Comments:


[2008-09-10 17:04:13] [EMAIL PROTECTED]

See also:

__construct('`hf???0...')
#1 {main}
  thrown in %s on line %d






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