#47640 [Fbk->Opn]: Session does not close file in /tmp/

2009-03-16 Thread manuel dot schmitt at manitu dot de
 ID:   47640
 User updated by:  manuel dot schmitt at manitu dot de
 Reported By:  manuel dot schmitt at manitu dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

ARGH!

It is so simple!



Execute it for the first time and ensure, that it runs into any of the
php limits, e.g. maxmimum execution time.

Call the script a second time while not running into the limit. When
tracing the PHP process you will see an unlimited flock() syscall!


Previous Comments:


[2009-03-16 23:46:42] j...@php.net

You need to come up with a script / set of scripts which can be used 
to _reliably_ reproduce the issue.



[2009-03-16 16:29:03] manuel dot schmitt at manitu dot de

But how should I trace this anymore?

I can strace apache/php processes seeing that there is a PHP script
doing flock() on a file, the process never returns.

What should I do?



[2009-03-16 16:25:10] j...@php.net

I'm actually running also s9y installation in the high traffic 
server. Never had any hanging PHP processes. And many times scripts 
have run to limits due to database being too slow. Still, no hangups 
with sessions. As this is quite impossible to reproduce, please try 
and figure out what really causes it. I know it's hard but otherwise 
we can keep on guessing and that's pretty useless.



[2009-03-16 08:07:22] manuel dot schmitt at manitu dot de

E.g. any S9Y installation does reproduce this. I cannot post this here
because it has lots of files.

BUT as I told you I said what I suppose. I suppose that scripts running
into any php limit (e.g. execution time) do not properly close the
session files. It does NOT happen when scripts are correctly finished!



[2009-03-15 12:19:31] j...@php.net

Please provide script(s) that reliably can be used to reproduce this. 
I can not reproduce this anywhere (even high traffic sites using 
sessions). Just saying something happens does not make it true..



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

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



#47686 [NEW]: preg_quote is escaping '-' when it shouldn't

2009-03-16 Thread jesse dot collis at gmail dot com
From: jesse dot collis at gmail dot com
Operating system: OSX 10.5.6 / doesn't matter
PHP version:  5.3CVS-2009-03-17 (snap)
PHP Bug Type: PCRE related
Bug description:  preg_quote is escaping '-' when it shouldn't

Description:

In a simple test of preg_quote is showing the function is not behaving 
as it does in PHP 5.2.x. preg_quote is escaping '-' (minus) characters 
when it shouldn't.


Reproduce code:
---
Current Results
---
var_dump(preg_quote("[0-2]")); => string(8) "\[0\-2\]" 

var_dump(preg_quote("0-2")); => string(4) "0\-2" 

var_dump(preg_quote("a-z 0-9~%.:_\-")); => string(20) "a\-z
0\-9~%\.\:_\\\-"

Expected result:

the three lines printed above should come out the following way.

var_dump(preg_quote("[0-2]")); => string(7) "\[0-2\]" 

var_dump(preg_quote("0-2")); => string(3) "0-2" 

var_dump(preg_quote("a-z 0-9~%.:_\-")); => string(17) "a-z 0-9~%\.\:_\\-
"


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



#47359 [Asn->Csd]: XSS: incorrect mime type for bmp in getimagesize/image_type_to_mime_type()

2009-03-16 Thread scottmac
 ID:   47359
 Updated by:   scott...@php.net
 Reported By:  hsudhof at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: GetImageSize related
 Operating System: *
 PHP Version:  5.2.9RC1
 Assigned To:  scottmac
 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.

Will be in 5.3+


Previous Comments:


[2009-02-11 12:44:20] scott...@php.net

This looks like a bug in the IE mime type sniffing rather than a
specific XSS.

If I make the mime type image/bm or image/bmps or image/ms-bmp or any
of the half dozen that are listed they work correctly.

There is no official IANA mime type for bmp listed on the page so I'll
investigate this some more.



[2009-02-11 11:53:26] hsudhof at gmail dot com

Description:

For BMP images, image.c contains the mime type "image/bmp".
That mime type does not exist; the proper mime for bmp images is
"image/x-ms-bmp".


http://www.iana.org/assignments/media-types/image/

This is a problem, as this opens a XSS vulnerability for users with IE
< 8.


The reproduction code shows XSS, when the page is viewed with IE
versions earlier than IE8 Beta2.

Reproduce code:
---
http://bugs.php.net/?id=47359&edit=1



#46331 [Asn->Csd]: Fileinfo does not look for /usr/share/magic{.*} and coredumps

2009-03-16 Thread scottmac
 ID:   46331
 Updated by:   scott...@php.net
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
-Status:   Assigned
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: * (big-endian only)
 PHP Version:  5.3CVS-2008-11-11
 Assigned To:  scottmac
 New Comment:

The performance issue will be fixed when we do the loading in the MINIT

stage, until then there isn't any other real alternative.


Previous Comments:


[2008-10-20 23:37:42] scott...@php.net

I've fixed the segfault by copying the memory and letting it do the
byteswap there. This however wastes memory in the long run so I'm
leaving this assigned to me as a reminder to fix this memory wastage.

It only affects Big-Endian systems though.



[2008-10-20 16:13:25] scott...@php.net

For big-endian machines its trying to do byte swapping on the internal
database which is marked as const.

This happens on OSX too with PowerPC.



[2008-10-20 11:02:04] Bjorn dot Wiberg at its dot uu dot se

Sorry, same result, it seems that it comes across the C64 tape type and
then crashes (see below).

However -- the byteswap and segmentation faults remind me of
tony2...@php.net's comment regarding "a patch that fixes *sprintf()
compile issues /../ Though it still segfault both on Linux (in
regfree()) and AIX":

  http://bugs.php.net/bug.php?id=45740

Could it be that the patch was applied, but nothing was done regarding
the segmentation faults?

Best regards,
Björn


bwib...@musica-lp03:~$ gdb /apache/php/bin/php
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "powerpc-ibm-aix5.1.0.0"...s
(gdb) set args  -d
extension_dir=/apache/php/lib/php/extensions/debug-non-zts-20071006 -r
'$finfo=finfo_open();'
(gdb) run
Starting program: /apache/php/bin/php -d
extension_dir=/apache/php/lib/php/extensions/debug-non-zts-20071006 -r
'$finfo=finfo_open();'

Program received signal SIGSEGV, Segmentation fault.
0x107ca694 in bs1 (m=0x10ad4340) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:2106
2106   
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:
No such file or directory.
in
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c
(gdb) bt full
#0  0x107ca694 in bs1 (m=0x10ad4340) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:2106
No locals.
#1  0x107ca398 in byteswap (magic=0x10ad4340, nmagic=8476) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:2036
i = 0
#2  0x107c9f10 in apprentice_map (ms=0x200d23fc, magicp=0x2ff21d74,
nmagicp=0x2ff21d78, fn=0x0) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:1928
ptr = (uint32_t *) 0x10ad4280
version = 5
needsbyteswap = 1
dbname = 0x0
mm = (void *) 0x10ad4280
ret = 3
stream = (php_stream *) 0x2ff21cb8
st = {sb = {st_dev = 1, st_ino = 13, st_mode = 804396216,
st_nlink = 12274, st_flag = 7496, st_uid = 804396224, st_gid =
804396320, st_rdev = 48, st_size = 537732188, st_atime = ,
st_atime_n = 0, 
st_mtime = 537732192, st_mtime_n = 0, st_ctime = 528, st_ctime_n =
804396296, st_blksize = 512, st_blocks = 0, st_vfstype = 24, st_vfs = 0,
st_type = 12, st_gen = 13, st_reserved = {537732220, 537732192, 0, 
  537732192, 537729208, 12, 5, 0, 804396320}}}
#3  0x107c4a18 in apprentice_1 (ms=0x200d23fc, fn=0x0, action=0,
mlist=0x200d18a4) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:253
magic = (struct magic *) 0x10ad4340
nmagic = 8476
ml = (struct mlist *) 0x0
rv = -1
mapped = 279784544
#4  0x107c4d1c in file_apprentice (ms=0x200d23fc, fn=0x0, action=0) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/apprentice.c:320
p = 0x0
mfn = 0x77 ""
file_err = 279783108
errs = -1
mlist = (struct mlist *) 0x200d18a4
#5  0x107c38f8 in magic_load (ms=0x200d23fc, magicfile=0x0) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/libmagic/magic.c:192
ml = (struct mlist *) 0x200d23fc
#6  0x107c1c80 in zif_finfo_open (ht=0, return_value=0x200d18e4,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/home/bwiberg/rpm/BUILD/php5.3-200810170630/ext/fileinfo/fileinfo.c:349
options = 0
file = 0x0
file_len = 0
fin

#47678 [Asn->Csd]: sqlite3 extension fails to load if sqlite is built without --enable-load-extens

2009-03-16 Thread scottmac
 ID:   47678
 Updated by:   scott...@php.net
 Reported By:  glen at delfi dot ee
-Status:   Assigned
+Status:   Closed
 Bug Type: SQLite related
 Operating System: PLD Linux
 PHP Version:  5.3CVS-2009-03-16 (snap)
 Assigned To:  scottmac
 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.

Patch is different from yours, when a feature isn't available the
standard practice in PHP is to remove it from that build rather than
have it error.

Also by using the same define as the bundled library we can allow it to
be disabled there too.


Previous Comments:


[2009-03-16 19:38:11] glen at delfi dot ee

yep, against system library (external as you said)

ps: there was small typo in patch, recheck the patch if you already 
downloaded it.



[2009-03-16 19:22:19] scott...@php.net

I assume you're doing this against an external library?

I'll need to look at a few other things that can be possibly omitted
from the standard build.



[2009-03-16 19:08:21] glen at delfi dot ee

here's my patch to handle the situation:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-sqlite3-loadext.patch

http://php.net/manual/en/sqlite3.loadextension.php



[2009-03-16 19:06:09] glen at delfi dot ee

Description:

$ php -m >/dev/null
PHP Warning:  PHP Startup: Unable to load dynamic 
library '/usr/lib/php/sqlite3.so' - /usr/lib/php/sqlite3.so: 
undefined symbol: sqlite3_load_extension in Unknown on line 0


Expected result:

should the whole method be disabled if system sqlite doesn't support 
it, or rather php method return false (failure?):

public bool SQLite3::loadExtension( string $shared_library)






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



#47644 [Ver->Csd]: json_decode() fails to decode large int inside an array

2009-03-16 Thread scottmac
 ID:   47644
 Updated by:   scott...@php.net
 Reported By:  asari at users dot sourceforge dot net
-Status:   Verified
+Status:   Closed
 Bug Type: JSON related
 Operating System: * (64bit)
 PHP Version:  5.*, 6CVS (2009-03-15)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-03-13 13:25:57] asari at users dot sourceforge dot net

Description:

In some cases, json_decode() fails to decode large integer (over
1) inside an array, e.g. "[10001]".

$ uname -a
Linux _HOSTNAME_.localdomain 2.6.18-53.1.21.el5 #1 SMP Tue May 20
09:35:07 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
LSB Version:   
:core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:CentOS release 5.2 (Final)
Release:   5.2
Codename:  Final

$ ./sapi/cli/php --version
PHP 5.3.0beta2-dev (cli) (built: Mar 13 2009 21:55:38)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

$ cat config.nice
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/tmp/php53' \
"$@"

Reproduce code:
---
$ for ((i=1; i<10006; i++)); do echo $i;
./sapi/cli/php -r 'var_dump(json_decode("['$i']"));'; echo; done

Expected result:

1
array(1) {
  [0]=>
  int(1)
}

10001
array(1) {
  [0]=>
  int(10001)
}

10002
array(1) {
  [0]=>
  int(10002)
}

10003
array(1) {
  [0]=>
  int(10003)
}

10004
array(1) {
  [0]=>
  int(10004)
}

10005
array(1) {
  [0]=>
  int(10005)
}



Actual result:
--
1
array(1) {
  [0]=>
  int(1)
}

10001
array(1) {
  [0]=>
  int(1)
}

10002
array(1) {
  [0]=>
  int(10002)
}

10003
array(1) {
  [0]=>
  int(10004)
}

10004
array(1) {
  [0]=>
  int(10004)
}

10005
array(1) {
  [0]=>
  int(10004)
}







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



#47685 [NEW]: array_key_reorder

2009-03-16 Thread rweidner at techport80 dot com
From: rweidner at techport80 dot com
Operating system: any
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  array_key_reorder

Description:

Arbitrary ordering of an array

Reproduce code:
---
---
>From manual page: function.array
---
function array_key_reorder($arrayToReorder, $keysOrder)
{
if (!is_array($keysOrder))
{
$keysOrder = array($keysOrder);
}

$retval = array();

for ($i = 0; $i < sizeof($keysOrder); $i++)
{
$key = $keysOrder[$i];
if (array_key_exists($key, $arrayToReorder))
{
$retval[$key] = $arrayToReorder[$key];
}
}

$keys = array_keys($arrayToReorder);
for ($i = 0; $i < sizeof($arrayToReorder); $i++)
{
$key = $keys[$i];
if (!in_array($key, $keysOrder))
{
$retval[$key] = $arrayToReorder[$key];
}
}

return $retval;
}


Expected result:

This function will take arrayToReorder and arrange it in the order
specified by keysOrder.

keysOrder can be a single key name which will be inserted as the first
element of the new array.  If keysOrder is an array, the function will
place all the keys in keyOrder (if they exist in the arrayToReorder) first
in the array.  Keys that exist in the arrayToReorder but not in the
keysOrder will be placed at the end of the array in thier relative original
order.


Actual result:
--
// The following code works as expected

$array = array("red"=>"one", "green"=>"two", "blue"=>"three",
"yellow"=>"four" );
echo "The array looks like this...";
echo "", print_r($array, 1), "";

echo "Placing Yellow On Top.";
$array = array_key_reorder($array, "yellow");
echo "", print_r($array, 1), "";

echo "Placing Blue On Top.";
$array = array_key_reorder($array, "blue");
echo "", print_r($array, 1), "";

echo "Puttin' it back the way it was.";
$array = array_key_reorder( $array, array("red", "green", "blue",
"yellow") );
echo "", print_r($array, 1), "";

$array = array("red", "green", "blue", "yellow");
echo "Working with numeric indexes";
echo "", print_r($array, 1), "";

echo "Placing Yellow On Top.";
$array = array_key_reorder( $array, 3);
echo "", print_r($array, 1), "";

echo "Placing Green On Top.";
$array = array_key_reorder( $array, 1);
echo "", print_r($array, 1), "";

echo "Puttin' it back the way it was.";
$array = array_key_reorder( $array, array(0,1,2,3));
echo "", print_r($array, 1), "";

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



#47683 [Opn->Asn]: mysqlng fails to compile with --enable-mysqlnd-threading

2009-03-16 Thread johannes
 ID:   47683
 Updated by:   johan...@php.net
 Reported By:  glen at delfi dot ee
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: PLD Linux
 PHP Version:  5.3CVS-2009-03-16 (snap)
-Assigned To:  
+Assigned To:  mysql
 New Comment:

--enable-mysqlnd-threading is a remainingf rom an experimental
implementation of background-prefetching, this has been replaced by
async query support, I'll check with Andrey tomorrow.


Previous Comments:


[2009-03-16 23:52:23] glen at delfi dot ee

Description:

/bin/sh /home/glen/rpm/pld/BUILD/php5.3-200903161730/libtool --silent
--preserve-dup-deps --mode=compile
/home/glen/rpm/pld/BUILD/php5.3-200903161730/meta_ccld  -Iext/mysqlnd/
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/
-DPHP_ATOM_INC -I/home/glen/rpm/pld/BUILD/php5.3-200903161730/include
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/main
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/ereg/regex
-I/usr/include/libxml2 -I/usr/include/openssl
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/date/lib
-I/usr/include/freetype2 -I/usr/include/imap
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/oniguruma
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/libmbfl
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell -I/usr/include/xmlrpc-epi
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/TSRM
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/Zend  -DDEBUG_FASTCGI
-DHAVE_STRNDUP -D_REENTRANT  -I/usr/include -O2 -march=i686 -gdwarf-2
-g2 -pthread -DZTS  -prefer-non-pic -c
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_block_alloc.c
-o 
ext/mysqlnd/mysqlnd_block_alloc.lo
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `mysqlnd_fetch_row_async_buffered':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: `i' undeclared (first use in this function)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: (Each undeclared identifier is reported only once
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: for each function it appears in.)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `mysqlnd_background_store_result_fetch_data':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1465:

error: `STORE_RESULT_PREALLOCATED_SET' undeclared (first use in this 
function)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `php_mysqlnd_res_background_store_result_pub':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1609:

error: `STORE_RESULT_PREALLOCATED_SET' undeclared (first use in this 
function)
make: *** [ext/mysqlnd/mysqlnd_result.lo] Error 1


Reproduce code:
---
./configure ... --with-mysqli=shared,mysqlnd
--enable-mysqlnd-threading
make

Expected result:

`i' undeclaration is easy to fix, however the missing constant is 
likely harder and needs understanding the code...






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



#47684 [NEW]: file_get_contents "Content-Length" problem

2009-03-16 Thread r-ser at yandex dot ru
From: r-ser at yandex dot ru
Operating system: Linux 2.6.26
PHP version:  5.2.9
PHP Bug Type: HTTP related
Bug description:  file_get_contents "Content-Length" problem

Description:

When use file_get_contents + stream_context_create to post file to web
server and the page in web server return redirect to another page
("location" field in answer), then file_get_contents requested redirected
page with POST header without "Content-Length:" field in request and server
response "HTTP/1.0 411 Length Required".
I think, it's two ways to fix problem
1) 'method' must be change to GET in requests to redirect pages.
2) Add 'Content-Length: 0' to next POST redirect requests

Reproduce code:
---
$argv[1] = "image.jpg";
$boundary = "AaB03x1234567890";
$type = mime_content_type($argv[1]);
$data = "--$boundary\r\nContent-Disposition: form-data;
name=\"fileupload\"; filename=\"".basename($argv[1])."\"
Content-Type: ".$type." \r\nContent-Transfer-Encoding:
binary\r\n\r\n".file_get_contents($argv[1])."\r\n--$boundary--";
$header = "Content-type: multipart/form-data, boundary=$boundary";
$context  = stream_context_create(array('http' => array('method'=>'POST',
'header'=> $header, 'content' => $data)));
$result = file_get_contents('http://load.imageshack.us', false,
$context);
echo $result;

Expected result:

failed to open stream: HTTP request failed! HTTP/1.0 411 Length Required

Actual result:
--
Normal redirected page

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



#47042 [Opn]: php cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache

2009-03-16 Thread jani
 ID:   47042
 Updated by:   j...@php.net
 Reported By:  sriram dot natarajan at sun dot com
 Status:   Open
 Bug Type: CGI related
 Operating System: linux , solaris
 PHP Version:  5.2.9
 New Comment:

See also bug #47625


Previous Comments:


[2009-03-13 00:10:22] sriram dot natarajan at sun dot com

hi
 this fix is not available with the latest php snapshot. my latest
patch needs to be looked into and considered fixing it for 5.3 as well
as 5.2.9

[sn123...@samp]'php5'>diff -u php-5.2.9/sapi/cgi/cgi_main.c.ORIG
php-5.2.9/sapi/cgi/cgi_main.c
--- php-5.2.9/sapi/cgi/cgi_main.c.ORIG  Sat Feb 28 00:44:54 2009
+++ php-5.2.9/sapi/cgi/cgi_main.c   Sat Feb 28 00:46:00 2009
@@ -961,7 +961,8 @@
}

if (env_path_translated != NULL &&
env_redirect_url != NULL &&
-   orig_script_filename != NULL &&
script_path_translated != NULL) {
+   env_path_translated !=
script_path_translated &&
+   strcmp(env_path_translated,
script_path_translated) != 0) {
/* 
   pretty much apache specific.  If we
have a redirect_url
   then our script_filename and
script_name point to the

thanks
sriram



[2009-03-10 10:43:09] j...@php.net

Please try using this CVS snapshot:

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

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





[2009-03-03 09:56:55] sriram dot natarajan at sun dot com

i have tested this patch with apache 2.0 and 2.2 configurations within
cgi and was able to get applications like joomla working fine.

can some one kindly look into the attached patch and provide your
feedback

thanks



[2009-02-28 09:18:55] sriram dot natarajan at sun dot com

Hi
 php cgi module assumes that if redirect_uri is set , the request must
be from apache and throws away the script_name value and assigns
path_translated value to script name. 
 
 this is because, in cgi environment, apache sets the SCRIPT_NAME to
the location of the php-cgi binary and keeping the PATH_INFO variable to
point to the requested php script. this is very unique only to apache. 

 this crude test condition for apache is affecting sun web server
executing in fastcgi mode where in it looses the script_name value and
ends up returning with 'no input file specified'. 

 this happens only for sun web server and not for lighttpd because
lighttpd does not set redirect_uri when requested for index.php. 

 based on this analysis , earlier, i provided a patch to address this
issue . however, i overlooked the obvious and ended up breaking apache
in cgi mode. 

 because of this, a separate bug : http://bugs.php.net/bug.php?id=47149
has been filed and my suggested patch was reverted.

my sincere apology on providing this obviously broken patch and wasting
some of your time.

 pl. find attached a below patch that should do the right thing.
what we want to do is 

a) compare whether the script path is different from path translated
since we know that apache by default sets the script name to point to
the location of cgi binary and not the requested uri

[sn123...@samp]'php5'>diff -u php-5.2.9/sapi/cgi/cgi_main.c.ORIG
php-5.2.9/sapi/cgi/cgi_main.c
--- php-5.2.9/sapi/cgi/cgi_main.c.ORIG  Sat Feb 28 00:44:54 2009
+++ php-5.2.9/sapi/cgi/cgi_main.c   Sat Feb 28 00:46:00 2009
@@ -961,7 +961,8 @@
}

if (env_path_translated != NULL &&
env_redirect_url != NULL &&
-   orig_script_filename != NULL &&
script_path_translated != NULL) {
+   env_path_translated !=
script_path_translated &&
+   strcmp(env_path_translated,
script_path_translated) != 0) {
/* 
   pretty much apache specific.  If we
have a redirect_url
   then our script_filename and
script_name point to the



[2009-01-11 11:13:02] d...@php.net

This bug has been fixed in CVS.

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





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

-- 
Edit this bug report at ht

#47625 [Opn->Bgs]: SCRIPT_NAME and PHP_SELF

2009-03-16 Thread jani
 ID:   47625
 Updated by:   j...@php.net
 Reported By:  mfernandes at infolink dot com dot br
-Status:   Open
+Status:   Bogus
 Bug Type: CGI related
 Operating System: Linux 32 bit
 PHP Version:  5.2.9
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #47042 for more info. 


Previous Comments:


[2009-03-11 16:18:13] mfernandes at infolink dot com dot br

Description:

Made the migration from PHP-5.2.8 for PHP-5.2.9 and my clients have had
difficulties in some of its applications, using variables as
superglobals SCRIPT_NAME and PHP_SELF.

My platform PHP runs as CGI, and the mapping of the path of the PHP CGI
mode is done via a ScriptAlias in Apache in order to "hide" the real
path of the users.

See my example of the PHP configuration to call the Apache:

-- 
ScriptAlias /13eghrtTYU89aD/ "/home/bin/lsd/php-5.2.9-1/bin/"
Action PHP3-script/13eghrtTYU89aD/php
-- 

After the migration from PHP-5.2.8 for PHP-5.2.9 the contents of
variables SCRIPT_NAME and PHP_SELF were modified in its output, as in
the example:

-- 
PHP-5.2.8: /info.php
PHP-5.2.9: /13eghrtTYU89aD/info.php
-- 

Through the php.ini directive "cgi.fix_pathinfo = Off", could
circumvent the problem, but this leads me other problems, such as
customers who make calls in the style "/index.php/user/index/search".

I believe that the changes made between versions 5.2.8 and
PHP-PHP-5.2.9 caused this behavior.

I would remember only that the return to the version of PHP 5.2.8, the
problem no longer occurs.

My best regards.

Reproduce code:
---



Expected result:

/info.php
/info.php

Actual result:
--
/13eghrtTYU89aD/php
/13eghrtTYU89aD/php





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



#47683 [NEW]: mysqlng fails to compile with --enable-mysqlnd-threading

2009-03-16 Thread glen at delfi dot ee
From: glen at delfi dot ee
Operating system: PLD Linux
PHP version:  5.2CVS-2009-03-16 (snap)
PHP Bug Type: Compile Failure
Bug description:  mysqlng fails to compile with --enable-mysqlnd-threading

Description:

/bin/sh /home/glen/rpm/pld/BUILD/php5.3-200903161730/libtool --silent
--preserve-dup-deps --mode=compile
/home/glen/rpm/pld/BUILD/php5.3-200903161730/meta_ccld  -Iext/mysqlnd/
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/ -DPHP_ATOM_INC
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/include
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/main
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/ereg/regex
-I/usr/include/libxml2 -I/usr/include/openssl
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/date/lib
-I/usr/include/freetype2 -I/usr/include/imap
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/oniguruma
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/libmbfl
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell -I/usr/include/xmlrpc-epi
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/TSRM
-I/home/glen/rpm/pld/BUILD/php5.3-200903161730/Zend  -DDEBUG_FASTCGI
-DHAVE_STRNDUP -D_REENTRANT  -I/usr/include -O2 -march=i686 -gdwarf-2 -g2
-pthread -DZTS  -prefer-non-pic -c
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_block_alloc.c
-o 
ext/mysqlnd/mysqlnd_block_alloc.lo
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `mysqlnd_fetch_row_async_buffered':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: `i' undeclared (first use in this function)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: (Each undeclared identifier is reported only once
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1396:

error: for each function it appears in.)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `mysqlnd_background_store_result_fetch_data':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1465:

error: `STORE_RESULT_PREALLOCATED_SET' undeclared (first use in this 
function)
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:

In function `php_mysqlnd_res_background_store_result_pub':
/home/glen/rpm/pld/BUILD/php5.3-200903161730/ext/mysqlnd/mysqlnd_result.c:1609:

error: `STORE_RESULT_PREALLOCATED_SET' undeclared (first use in this 
function)
make: *** [ext/mysqlnd/mysqlnd_result.lo] Error 1


Reproduce code:
---
./configure ... --with-mysqli=shared,mysqlnd --enable-mysqlnd-threading
make

Expected result:

`i' undeclaration is easy to fix, however the missing constant is 
likely harder and needs understanding the code...


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



#47640 [Opn->Fbk]: Session does not close file in /tmp/

2009-03-16 Thread jani
 ID:   47640
 Updated by:   j...@php.net
 Reported By:  manuel dot schmitt at manitu dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

You need to come up with a script / set of scripts which can be used 
to _reliably_ reproduce the issue.


Previous Comments:


[2009-03-16 16:29:03] manuel dot schmitt at manitu dot de

But how should I trace this anymore?

I can strace apache/php processes seeing that there is a PHP script
doing flock() on a file, the process never returns.

What should I do?



[2009-03-16 16:25:10] j...@php.net

I'm actually running also s9y installation in the high traffic 
server. Never had any hanging PHP processes. And many times scripts 
have run to limits due to database being too slow. Still, no hangups 
with sessions. As this is quite impossible to reproduce, please try 
and figure out what really causes it. I know it's hard but otherwise 
we can keep on guessing and that's pretty useless.



[2009-03-16 08:07:22] manuel dot schmitt at manitu dot de

E.g. any S9Y installation does reproduce this. I cannot post this here
because it has lots of files.

BUT as I told you I said what I suppose. I suppose that scripts running
into any php limit (e.g. execution time) do not properly close the
session files. It does NOT happen when scripts are correctly finished!



[2009-03-15 12:19:31] j...@php.net

Please provide script(s) that reliably can be used to reproduce this. 
I can not reproduce this anywhere (even high traffic sites using 
sessions). Just saying something happens does not make it true..



[2009-03-15 11:24:15] manuel dot schmitt at manitu dot de

The most simple script at all



can cause the problem, please take my notes I posted before into
attention.



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

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



#47681 [NEW]: System TMP dir ignored in file uploads

2009-03-16 Thread ulrich at cs dot auckland dot ac dot nz
From: ulrich at cs dot auckland dot ac dot nz
Operating system: Win XP Pro
PHP version:  5.2.9
PHP Bug Type: *Web Server problem
Bug description:  System TMP dir ignored in file uploads

Description:

File upload under Apache 2.2.8 and 2.2.11 produces an empty temporary file
name and an UPLOAD_ERR_NO_TMP_DIR error in $_FILES[]['error']. In
the case of the machine concerned, Apache and PHP run off the D: drive
whereas the temporary directories reside under C:.

Rebooting the entire system sometimes resolves the problem temporarily,
but it then reappears. This does not always work, however. Repeat "uploads"
occasionally cause the server to crash.

Setting the temporary directory explicitly using upload_tmp_dir provides a
workaround.

Default windows system tmp dir variables are set as:

TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP



Reproduce code:
---
 0) { 
echo "Response page";
echo "\$_ENV";
foreach ($_ENV as $name => $value) echo
$name."=".htmlentities($value)."";
echo "\$_FILES";
foreach ($_FILES["myFile"] as $fileProperty => $filePropertyValue)
{
echo $fileProperty."=".$filePropertyValue."";
}
  } else { 
  ?>
Form

  Please enter a file: 
  

  

Expected result:

$_ENV
...
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
...

$_FILES
name=figure1-e.pdf
type=application/pdf
tmp_name=C:\WINDOWS\Temp\php981.tmp
error=0
size=50452

Actual result:
--
$_ENV
...
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
...

$_FILES
name=figure1-e.pdf
type=
tmp_name=
error=6
size=0

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



#47623 [Fbk->Opn]: array_shift() with SESSION

2009-03-16 Thread Henry at huis-stijl dot nl
 ID:   47623
 User updated by:  Henry at huis-stijl dot nl
 Reported By:  Henry at huis-stijl dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Apache/2.0.52 (CentOS)
 PHP Version:  5.2.9
 New Comment:

Tried with and without the @ same output.


Previous Comments:


[2009-03-16 16:26:07] j...@php.net

If you remove those @'s, what does it output..?



[2009-03-11 14:07:22] Henry at huis-stijl dot nl

 array(1,2,3),
2 => array(2,3,4),
3 => array(3,4,5),
4 => array(4,5,6),
);

While(@$_SESSION['villas'] != array())
{
$row = array_shift(@$_SESSION['villas']);
print_r($row);
}// einde while

?>

on php 4 i get
Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 2 [1] => 3 [2] => 4
) Array ( [0] => 3 [1] => 4 [2] => 5 ) Array ( [0] => 4 [1] => 5 [2] =>
6 )

on phph 5.2.9 i get a loop that doesnt end
Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3
) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] =>
3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2]
=> 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2
[2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] =>
2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1]
=> 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 )



[2009-03-11 12:56:34] Henry at huis-stijl dot nl

Description:

Script was working perfectly on PHP 4 when updated to PHP5.2.9 I found
an error. I was filling a array in the session and looped it with
array_shift until the arry was empty. 
This loop kept giving me the first value but did not erased it from te
original arry.

Reproduce code:
---
$row = array_shift(@$_SESSION['villas']);

Expected result:

1. $row getting the first element from $_SESSION['villas']
2. $_SESSION['villas'] to get lost the first element.


Actual result:
--
1. $row getting the first element from $_SESSION['villas']
2. $_SESSION['villas'] did not lost the first element and was
unchanged


I cann bypass this failure by using:
$arr_temp = @$_SESSION['villas'];
$row = array_shift($arr_temp);
$_SESSION['villas'] = $arr_temp;
unset($arr_temp);







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



#33047 [Com]: glob() doesn't work inside directories with brackets [ ]

2009-03-16 Thread tommytompkins at redcart dot com
 ID:   33047
 Comment by:   tommytompkins at redcart dot com
 Reported By:  wiseman1024 at gmail dot com
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2000
 PHP Version:  4.3.9
 New Comment:

This actually is not a bug.  The glob() function is an extension of the
Unix glob function and square brackets have special meaning with that
function.

More information on the Unix glob() function can be found here:

http://unixhelp.ed.ac.uk/CGI/man-cgi?glob

Since brackets have special meaning with that function, you need to put
brackets around the brackets.  For example you could do this as a work
around:

/* First, replace all brackets with an escaped bracket */
$escapedBracketPath = str_replace('[', '\[', $path);
$escapedBracketPath = str_replace(']', '\]', $escapedBracketPath);
   
/* Next, replace all "escaped" brackets with brackets like so */
$escapedBracketPath = str_replace('\[', '[[]', $escapedBracketPath);
$escapedBracketPath = str_replace('\]', '[]]', $escapedBracketPath);
   
$normal_files = glob($escapedBracketPath . "*");
$hidden_files = glob($escapedBracketPath . "\.?*");


Previous Comments:


[2007-09-18 15:42:26] rele at gmx dot de

This bug has still not been fixed, I tested it with PHP 5.2.4 on WinXP
SP 2.

In addition the bug occurs when the glob pattern parameter contains a
directory path containing non-empty brackets.

And in contrary to the workaround mentioned in the manual, escaping
does not change anything.
http://www.php.net/manual/en/function.glob.php#76621


chdir('C:\\');
$dir = 'C:\a[test]';
$dir_escaped = 'C:\a\[test\]';
print_r(glob($dir . DIRECTORY_SEPARATOR . '*'));
print_r(glob($dir_escaped . DIRECTORY_SEPARATOR . '*'));



[2006-02-16 23:52:50] ian at res-alian dot com

Argh. I forgot to add sort($picfns) for good measure, since readdir()
returns entries in the order they appear on the hard drive while glob()
returns them sorted (unless using the GLOB_NOSORT flag). If the PHP
developers fix the glob() Win32 bug, I can stop ranting =)

--i;



[2006-02-16 23:19:14] ian at res-alian dot com

Here's my workaround code, using opendir() and readdir() (using code
from the readdir() page on this site):

if ($dirh = opendir("."))
{
  $picfns = 0;

  while (false !== ($file = readdir($dirh)))
  {
if (preg_match("/^_.*jpg$/", $file))
{
  $file = preg_replace("/^_/", "", $file);

  if ($picfns)
  {
array_push($picfns, $file);
  }
  else
  {
$picfns = array($file);
  }
}
  }

  closedir($dirh);
}

replaces this code:

$thumbfns = glob("_*.jpg");
$jpgfns = glob("*.jpg");
$picfns = array_diff($jpgfns, $thumbfns);

--i;



[2006-02-16 18:41:20] ian at res-alian dot com

I get the same problem with glob() using PHP 5.0.2 and 5.1.2 in Windows
2000 (my work computer, NTFS) and in Windows XP (notebook, 5.0.5, NTFS)
but not Linux (server, 5.0.2, ext3). Sorry I can't offer a solution
other than using Linux. I'm not sure if it has to do with the NTFS file
system.

It took me a while to figure out why some folders didn't work, and I
thought it was a permission thing. When I noticed the folder that worked
had no bracket, I tried adding brackets, and that made it not work.
(Also removing the brackets made ones with brackets suddenly work.) Then
I knew what to look for and found this bug entry with Google.

What's strange is that glob() has no problem returning a list with some
entries containing brackets, but not any entries at all when within a
folder with brackets.

The other strange thing is the opendir() and readdir() work fine in the
same situation under Windows. It's more inconvenient but serves as a
workaround.

--i;



[2005-05-25 01:00:04] 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".



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

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



#47673 [Com]: calling phpinfo() after tokenizer token_get_all() results in Segfault

2009-03-16 Thread crrodriguez at opensuse dot org
 ID:   47673
 Comment by:   crrodriguez at opensuse dot org
 Reported By:  serhii dot piddubchak at gmail dot com
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.9
 New Comment:

Works for me, uing shared tokenizer and 5_2.


Previous Comments:


[2009-03-16 13:18:37] j...@php.net

For the record: It does not crash for me..



[2009-03-16 13:14:30] j...@php.net

What if you compile the tokenizer as normal (static) extension when you
compile PHP _yourself_ from sources, does it work then?



[2009-03-16 12:23:37] serhii dot piddubchak at gmail dot com

I've found this bug:
http://bugs.php.net/bug.php?id=38449
It is exactly the same problem, but the latest comment was "Please
report FreeBSD bugs to FreeBSD peoples.". It doesn't look like a
solution since FreeBSD people won't fix this issue, It would be very
surprising if FreeBSD people must fix bugs in every piece of software
that is available for FreeBSD.
Moreover, previous bug was reported more then 2.5 years ago, PHP got a
5.2.8 version and FreeBSD got a 7.1 version. Looks for me that PHP
doesn't handle FreeBSD that well as Linux or Windows. If PHP compiles on
FreeBSD I expect it to work.



[2009-03-16 12:18:06] serhii dot piddubchak at gmail dot com

Description:

I'm getting a segmentation fault when trying to call phpinfo() after
token_get_all();
phpinfo() works fine if called before token_get_all();

Here is a short information about my system:
PHP Version 5.2.8
FreeBSD medved.hvosting.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan
22 09:27:15 UTC 2009 r...@free.ds:/usr/obj/usr/src/sys/ISPSYSTEM amd64

Build Date  Feb 11 2009 15:20:04

Configure Command   './configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=yes'
'--enable-reflection' '--program-prefix=' '--enable-fastcgi'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd7.1'

Server API  CGI/FastCGI

Also there is no extensions like eAccelerator or ZendOptimizer.
Also I tried it on another FreeBSD 6.1 system, PHP5.2.8 configured as
apache module, the bug wasn't reproducible. So, it looks like
CGI/FastCGI or 64bit arch issue. Thanks in advance for any help.

I can't install PHP5.2.9 because I don't own the server, it is a
hosting account but I think it is reproducible in 5.2.9 since I didn't
notice something relevant fixed in Changelog for 5.2.9

Reproduce code:
---


Expected result:

Expected result is to see full output from phpinfo()

Actual result:
--
The first summary table of phpinfo is printed, then process crashes
with core dump.

Here is a backtrace:
This GDB was configured as "amd64-marcel-freebsd"...(no debugging
symbols found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.

...

Reading symbols from /lib/libc.so.7...(no debugging symbols
found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/tokenizer.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/tokenizer.so

...

#0  0x00080121ee80 in ?? ()
[New Thread 0x8012b5180 (LWP 100392)]
(gdb) bt
#0  0x00080121ee80 in ?? ()
#1  0x005065e1 in zend_html_puts ()
#2  0x00494738 in php_print_info ()
#3  0x004948ae in zif_phpinfo ()
#4  0x005397d2 in zend_do_fcall_common_helper_SPEC ()
#5  0x0052ba87 in execute ()
#6  0x0050f177 in zend_execute_scripts ()
#7  0x004d2767 in php_execute_script ()
#8  0x00586773 in main ()





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



#47630 [Com]: Unknown error using fsockopen() when with php-cgi through php cli

2009-03-16 Thread metala at metala dot org
 ID:   47630
 Comment by:   metala at metala dot org
 Reported By:  metala at metala dot org
 Status:   Feedback
 Bug Type: Network related
 Operating System: Windows XP SP2
 PHP Version:  5.2.9
 New Comment:

It failed again.

As I wrote in the description "any network function fails".
What I did was:
$fp = fsockopen('google.com', 80, $errno, $errstr);
And the result was:
H:\test\php>php parent.php
X-Powered-By: PHP/5.2.9-1
Content-type: text/html


Warning:  fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: No such host is
known.  in 
H:\test\php\child.php on line 2

Warning:  fsockopen() [function.fsockopen]: unable to connect to google.com:80 (php_network_getaddresses:
getaddrinfo fa
iled: No such host is known. ) in H:\test\php\child.php on line
2<
br />
int(0)
string(69) "php_network_getaddresses: getaddrinfo failed: No such host
is known.
 "


When I run it in DOS:
>SET SCRIPT_FILENAME=child.php
>php-cgi

There appears to be no error.


Previous Comments:


[2009-03-16 20:37:06] metala at metala dot org

I disabled it before testing.

I have another Windows XP machine I can test on. Results coming soon.



[2009-03-16 19:53:11] johan...@php.net

Are you sure there is no firewall blocking?



[2009-03-12 13:01:43] metala at metala dot org

I tested it on another Windows XP machine and got the same result.

On the other hand with Debian GNU/Linux Squeeze I have no problems.



[2009-03-12 06:06:29] metala at metala dot org

Description:

The problem persists in 5.2.6, 5.2.9 and 5.2.9-1 in Windows only.
I have 2 script files, a parent.php and a child.php. The parent.php,
which is running in CLI, starts the child.php with php-cgi.exe.
fsockopen(), or any other network function fails.

Reproduce code:
---
parent.php
 dirname(__FILE__).'\\child.php',
);
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w"),
);
$procName = 'php-cgi';
$proc = proc_open($procName, $descriptorspec, $pipes, null, $env,
array('bypass_shell' => true));
$read = array($pipes[1]);
stream_select($read, $null = array(), $null = array(), 100);
echo fread($read[0], 1024);

child.php
php parent.php
X-Powered-By: PHP/5.2.9-1
Content-type: text/html


Warning:  fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:445 (Unknown error) in
H:\test\php\child.p
hp on line 2
int(0)
string(0) ""





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



#47630 [Com]: Unknown error using fsockopen() when with php-cgi through php cli

2009-03-16 Thread metala at metala dot org
 ID:   47630
 Comment by:   metala at metala dot org
 Reported By:  metala at metala dot org
 Status:   Feedback
 Bug Type: Network related
 Operating System: Windows XP SP2
 PHP Version:  5.2.9
 New Comment:

I disabled it before testing.

I have another Windows XP machine I can test on. Results coming soon.


Previous Comments:


[2009-03-16 19:53:11] johan...@php.net

Are you sure there is no firewall blocking?



[2009-03-12 13:01:43] metala at metala dot org

I tested it on another Windows XP machine and got the same result.

On the other hand with Debian GNU/Linux Squeeze I have no problems.



[2009-03-12 06:06:29] metala at metala dot org

Description:

The problem persists in 5.2.6, 5.2.9 and 5.2.9-1 in Windows only.
I have 2 script files, a parent.php and a child.php. The parent.php,
which is running in CLI, starts the child.php with php-cgi.exe.
fsockopen(), or any other network function fails.

Reproduce code:
---
parent.php
 dirname(__FILE__).'\\child.php',
);
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w"),
);
$procName = 'php-cgi';
$proc = proc_open($procName, $descriptorspec, $pipes, null, $env,
array('bypass_shell' => true));
$read = array($pipes[1]);
stream_select($read, $null = array(), $null = array(), 100);
echo fread($read[0], 1024);

child.php
php parent.php
X-Powered-By: PHP/5.2.9-1
Content-type: text/html


Warning:  fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:445 (Unknown error) in
H:\test\php\child.p
hp on line 2
int(0)
string(0) ""





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



#47680 [NEW]: is_readable hits the max execution time if a host no longer exists.

2009-03-16 Thread ax_the_hacker at yahoo dot com
From: ax_the_hacker at yahoo dot com
Operating system: SunOS
PHP version:  5.2.9
PHP Bug Type: Performance problem
Bug description:  is_readable hits the max execution time if a host no longer 
exists.

Description:

is_readable hits the max execution time if a host no longer exists.(max
time=60 seconds). WOuld be nice to add a timeout parameter.

Reproduce code:
---
$webdir1 = is_readable($dir."/public_html/index.html"); 


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



#47630 [Opn->Fbk]: Unknown error using fsockopen() when with php-cgi through php cli

2009-03-16 Thread johannes
 ID:   47630
 Updated by:   johan...@php.net
 Reported By:  metala at metala dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Network related
 Operating System: Windows XP SP2
 PHP Version:  5.2.9
 New Comment:

Are you sure there is no firewall blocking?


Previous Comments:


[2009-03-12 13:01:43] metala at metala dot org

I tested it on another Windows XP machine and got the same result.

On the other hand with Debian GNU/Linux Squeeze I have no problems.



[2009-03-12 06:06:29] metala at metala dot org

Description:

The problem persists in 5.2.6, 5.2.9 and 5.2.9-1 in Windows only.
I have 2 script files, a parent.php and a child.php. The parent.php,
which is running in CLI, starts the child.php with php-cgi.exe.
fsockopen(), or any other network function fails.

Reproduce code:
---
parent.php
 dirname(__FILE__).'\\child.php',
);
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w"),
);
$procName = 'php-cgi';
$proc = proc_open($procName, $descriptorspec, $pipes, null, $env,
array('bypass_shell' => true));
$read = array($pipes[1]);
stream_select($read, $null = array(), $null = array(), 100);
echo fread($read[0], 1024);

child.php
php parent.php
X-Powered-By: PHP/5.2.9-1
Content-type: text/html


Warning:  fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:445 (Unknown error) in
H:\test\php\child.p
hp on line 2
int(0)
string(0) ""





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



#47621 [Opn->Bgs]: Missing Apache modules

2009-03-16 Thread johannes
 ID:   47621
 Updated by:   johan...@php.net
 Reported By:  4090770 at wp dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: Windows Installer
 Operating System: Win XP
 PHP Version:  5.3.0beta1
 New Comment:

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

"nts" means "non-thread-safe" but Apache, on Windows, is a threaded
webserver so you need the thread save version of PHP.


Previous Comments:


[2009-03-11 11:26:33] 4090770 at wp dot pl

Description:

After installing php-5.3.0beta1-nts-Win32-VC6-x86.msi unable to use
with Apache2. No single php5apache*.dll in install destination folder.






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



#47441 [Bgs]: PHP segmentation fault on 'make test'

2009-03-16 Thread johannes
 ID:   47441
 Updated by:   johan...@php.net
 Reported By:  jpilling at fortvale dot com
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: zLinux - SLES 10 s390x 64bit
 PHP Version:  5.3.0beta1
 New Comment:

Zend Optimizer is supported by Zend, not php.net


Previous Comments:


[2009-02-23 00:16:11] jpilling at fortvale dot com

anyone??



[2009-02-21 17:14:51] jpilling at fortvale dot com

I dont understand.what I meant is that I want to install PHP with
the --disable-debug option, and then once its installed properly I can
add the Zend optimizer at a later date as an add on (to use the zend
optimizer PHP has to be installed using the --disable-debug option)

The backtrace i submitted was from PHP configured in the following
way:

./configure --with-apxs2=/home/apache2/bin/apxs
--with-mysql=/home/mysql
--prefix=/home/apache2/php --disable-debug

Are you saying I need to get a backtrace from PHP compiled as follows:

./configure --disable-all --disable-debug

Please advise.
regards



[2009-02-20 13:18:56] j...@php.net

Third strike. You're supposed to disable ALL 3rd party extensions.
Especially any zend extensions.



[2009-02-20 11:31:43] jpilling at fortvale dot com

PS: I need to compile with --disable-debug to use the Zend Optimizer.



[2009-02-20 10:26:57] jpilling at fortvale dot com

Ok, I understand how to get the backtrace now, but the segmentation
fault on "make test" will only occur if I --disable-debug, so how can I
get a backtrace if debugging is not enabled? If I use --enable-debug php
compiles OK.

I ran GDB anyway after my compile with --disable-debug, which is
probably useless, and i got:

(gdb) run /home/php-5.3.0beta1/run-tests.php
Starting program: /home/php-5.3.0beta1/sapi/cli/php
/home/php-5.3.0beta1/run-tests.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 2199031317472 (LWP 9045)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2199031317472 (LWP 9045)]
0x8027ea22 in ?? ()



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

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



#47678 [Asn]: sqlite3 extension fails to load if sqlite is built without --enable-load-extens

2009-03-16 Thread glen at delfi dot ee
 ID:   47678
 User updated by:  glen at delfi dot ee
 Reported By:  glen at delfi dot ee
 Status:   Assigned
 Bug Type: SQLite related
 Operating System: PLD Linux
 PHP Version:  5.3CVS-2009-03-16 (snap)
 Assigned To:  scottmac
 New Comment:

yep, against system library (external as you said)

ps: there was small typo in patch, recheck the patch if you already 
downloaded it.


Previous Comments:


[2009-03-16 19:22:19] scott...@php.net

I assume you're doing this against an external library?

I'll need to look at a few other things that can be possibly omitted
from the standard build.



[2009-03-16 19:08:21] glen at delfi dot ee

here's my patch to handle the situation:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-sqlite3-loadext.patch

http://php.net/manual/en/sqlite3.loadextension.php



[2009-03-16 19:06:09] glen at delfi dot ee

Description:

$ php -m >/dev/null
PHP Warning:  PHP Startup: Unable to load dynamic 
library '/usr/lib/php/sqlite3.so' - /usr/lib/php/sqlite3.so: 
undefined symbol: sqlite3_load_extension in Unknown on line 0


Expected result:

should the whole method be disabled if system sqlite doesn't support 
it, or rather php method return false (failure?):

public bool SQLite3::loadExtension( string $shared_library)






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



#47678 [Opn->Asn]: sqlite3 extension fails to load if sqlite is built without --enable-load-extens

2009-03-16 Thread scottmac
 ID:   47678
 Updated by:   scott...@php.net
 Reported By:  glen at delfi dot ee
-Status:   Open
+Status:   Assigned
 Bug Type: SQLite related
 Operating System: PLD Linux
 PHP Version:  5.3CVS-2009-03-16 (snap)
-Assigned To:  
+Assigned To:  scottmac
 New Comment:

I assume you're doing this against an external library?

I'll need to look at a few other things that can be possibly omitted
from the standard build.


Previous Comments:


[2009-03-16 19:08:21] glen at delfi dot ee

here's my patch to handle the situation:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-sqlite3-loadext.patch

http://php.net/manual/en/sqlite3.loadextension.php



[2009-03-16 19:06:09] glen at delfi dot ee

Description:

$ php -m >/dev/null
PHP Warning:  PHP Startup: Unable to load dynamic 
library '/usr/lib/php/sqlite3.so' - /usr/lib/php/sqlite3.so: 
undefined symbol: sqlite3_load_extension in Unknown on line 0


Expected result:

should the whole method be disabled if system sqlite doesn't support 
it, or rather php method return false (failure?):

public bool SQLite3::loadExtension( string $shared_library)






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



#42832 [NoF->Opn]: scandir() fails unless user has permissions in the parent directory

2009-03-16 Thread jmboyd at bluebottle dot com
 ID:   42832
 User updated by:  jmboyd at bluebottle dot com
 Reported By:  jmboyd at bluebottle dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Directory function related
-Operating System: win32 only - Windows 2000
+Operating System: win32 only - Windows 2000/XP
 PHP Version:  5.2CVS-2008-08-25
 Assigned To:  pajoye
 New Comment:

Just tested with the newest 5.2.9-1 win32 binaries under XP (no longer
have Win2k handy to test with) and the behavior is still the same.

My initial test shows the script running twice to help show when the
bug landed -- using php 5.2.1 there is no problem, but starting with
version 5.2.2 the bug appears.


Previous Comments:


[2009-03-10 01:00:00] php-bugs at lists dot php dot net

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



[2009-03-02 19:06:29] paj...@php.net

Tested on Win 2008 and Vista:

C:\tmp\test\l2>cd ..
Access is denied.

C:\tmp\test\l2>\tmp\php530ntsvc9\php.exe \tmp\php530ntsvc9\acl.php
.
..


C:\tmp\test\l2>C:\Users\pierre\Documents\test\php53nts\php.exe
\tmp\php530ntsvc9
\acl.php
.
..


I saw in your test that you called two times the script, the first run
works, is it a copy/paste error or does it actually work in the 1st
pass?



[2008-10-27 13:45:42] j...@php.net

Assigned to the windows port maintainer.



[2008-08-25 14:56:47] jmboyd at bluebottle dot com

Hey, I did provide feedback!  Lousy robot.

Just tried it again with the latest 5.3.0alpha2-dev build stamped Mon,
25 Aug 2008 10:05:33 -0400, same result.  I can post the output if
needed, but it's exactly the same as the 18 Aug 5:54pm UTC comment
above.



[2008-08-18 17:54:24] jmboyd at bluebottle dot com

Same result with the snapshot (from Mon, 18 Aug 2008 14:03:00 -0400):

C:\parentdir\subdir>\php53dev\php -r "foreach(scandir('.') as $f)
{echo($f); }"

Warning: scandir(.): failed to open dir: Bad file descriptor in Command
line code on line 1

Warning: scandir(): (errno 9): Bad file descriptor in Command line code
on line 1

Warning: Invalid argument supplied for foreach() in Command line code
on line 1



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

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



#47678 [Opn]: sqlite3 extension fails to load if sqlite is built without --enable-load-extens

2009-03-16 Thread glen at delfi dot ee
 ID:   47678
 User updated by:  glen at delfi dot ee
 Reported By:  glen at delfi dot ee
 Status:   Open
 Bug Type: SQLite related
 Operating System: PLD Linux
 PHP Version:  5.3CVS-2009-03-16 (snap)
 New Comment:

here's my patch to handle the situation:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-sqlite3-loadext.patch

http://php.net/manual/en/sqlite3.loadextension.php


Previous Comments:


[2009-03-16 19:06:09] glen at delfi dot ee

Description:

$ php -m >/dev/null
PHP Warning:  PHP Startup: Unable to load dynamic 
library '/usr/lib/php/sqlite3.so' - /usr/lib/php/sqlite3.so: 
undefined symbol: sqlite3_load_extension in Unknown on line 0


Expected result:

should the whole method be disabled if system sqlite doesn't support 
it, or rather php method return false (failure?):

public bool SQLite3::loadExtension( string $shared_library)






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



#47678 [NEW]: sqlite3 extension fails to load if sqlite is built without --enable-load-extens

2009-03-16 Thread glen at delfi dot ee
From: glen at delfi dot ee
Operating system: PLD Linux
PHP version:  5.3CVS-2009-03-16 (snap)
PHP Bug Type: SQLite related
Bug description:  sqlite3 extension fails to load if sqlite is built without 
--enable-load-extens

Description:

$ php -m >/dev/null
PHP Warning:  PHP Startup: Unable to load dynamic 
library '/usr/lib/php/sqlite3.so' - /usr/lib/php/sqlite3.so: 
undefined symbol: sqlite3_load_extension in Unknown on line 0


Expected result:

should the whole method be disabled if system sqlite doesn't support 
it, or rather php method return false (failure?):

public bool SQLite3::loadExtension( string $shared_library)


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



#47677 [NEW]: date returns EDT for Panama (always EST)

2009-03-16 Thread barry dot schatz at gmail dot com
From: barry dot schatz at gmail dot com
Operating system: Linux 2.6.27
PHP version:  5.2.9
PHP Bug Type: Date/time related
Bug description:  date returns EDT for Panama (always EST)

Description:

echo date(O)."\n";
echo date(T);
returns "-0400 EDT" while bash returns
xingu ~ # date
Mon Mar 16 12:44:40 EST 2009 and
xingu ~ # date -u
Mon Mar 16 17:45:56 UTC 2009
and system is set to
CLOCK="UTC"

TIMEZONE="America/Panama"



Reproduce code:
---
echo date(O);
echo date(T);

Expected result:

return "-0500 EST" (same as system output)
N.B.: countries in the tropics have no need for daylight savings 
time.

Actual result:
--
"-0400 EDT"

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



#47649 [Opn->Bgs]: copying ZendDebugger settings to SoapServer causes inconsistant server results

2009-03-16 Thread johannes
 ID:   47649
 Updated by:   johan...@php.net
 Reported By:  marques at displague dot com
-Status:   Open
+Status:   Bogus
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Please report Zend issues to Zend. I have no way of testing Zend
Debugger related issues.


Previous Comments:


[2009-03-16 17:04:38] marques at displague dot com

Err - that last comment should have said "ZendDebuggerCookie"



[2009-03-16 16:59:55] marques at displague dot com

http://www.zend.com/support/knowledgebase.php?kbid=222

The KB item at the above URL shows that this method of debugging should
be possible.  In their example they send the client's start_debug,
debug_port, debug_host, and debug_stop to the server instance as
cookies.

In the modern ZendDebugger used with the Eclipse/PDT, all but
debug_stop (original_url, debug_port, start_debug, debug_start_session,
debug_no_cache, debug_host, debug_session_id, send_sess_end) are sent on
the query string (not as cookies).  The only cookie sent is
"ZendDebugger".

In my example I copied all the client's request variables and the
ZendDebugger cookie to the server instance.

I believe this functionality has changed or broken since the time this
Zend Knowledge Base article was written.



[2009-03-13 16:04:48] marques at displague dot com

Another interesting point about this example is that the client context
specifies http header "Accept-Encoding:".  The soap client ignores that
and sends "Accept-Encoding: deflate, gzip".



[2009-03-13 15:50:46] marques at displague dot com

Description:

In an attempt to supply a SoapServer the same ZendDebugger REQUEST and
COOKIE variables used while debugging the client, the server responds
inconsistently.  Sometimes the server responds with a Content-size of 0
and other times a header isn't even returned.


Reproduce code:
---
http://pastebin.com/f2da44cb2

Expected result:

When the ZendDebugger cookie is omitted the soap service consistently
returns the expected value.  The same value should be returned when the
ZendDebugger cookie is present.

Additionally, debug and tracing options should be available to the
ZendDebugger session.

Response

Array
(
[name] => Me
)

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:47:08 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 638
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns2="http://xml.apache.org/xml-soap";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>nameMe


Actual result:
--
The SOAP service returns nothing (not even headers) or returns no
document body but does return headers that include "Content-length: 0"

Response

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:1:0||004|77742D65|1152;



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:45:00 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html



Here is the result on an occurrence with no headers:



SoapFault
Error Fetching http headers

#0 [internal f

#47649 [Com]: copying ZendDebugger settings to SoapServer causes inconsistant server results

2009-03-16 Thread marques at displague dot com
 ID:   47649
 Comment by:   marques at displague dot com
 Reported By:  marques at displague dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

Err - that last comment should have said "ZendDebuggerCookie"


Previous Comments:


[2009-03-16 16:59:55] marques at displague dot com

http://www.zend.com/support/knowledgebase.php?kbid=222

The KB item at the above URL shows that this method of debugging should
be possible.  In their example they send the client's start_debug,
debug_port, debug_host, and debug_stop to the server instance as
cookies.

In the modern ZendDebugger used with the Eclipse/PDT, all but
debug_stop (original_url, debug_port, start_debug, debug_start_session,
debug_no_cache, debug_host, debug_session_id, send_sess_end) are sent on
the query string (not as cookies).  The only cookie sent is
"ZendDebugger".

In my example I copied all the client's request variables and the
ZendDebugger cookie to the server instance.

I believe this functionality has changed or broken since the time this
Zend Knowledge Base article was written.



[2009-03-13 16:04:48] marques at displague dot com

Another interesting point about this example is that the client context
specifies http header "Accept-Encoding:".  The soap client ignores that
and sends "Accept-Encoding: deflate, gzip".



[2009-03-13 15:50:46] marques at displague dot com

Description:

In an attempt to supply a SoapServer the same ZendDebugger REQUEST and
COOKIE variables used while debugging the client, the server responds
inconsistently.  Sometimes the server responds with a Content-size of 0
and other times a header isn't even returned.


Reproduce code:
---
http://pastebin.com/f2da44cb2

Expected result:

When the ZendDebugger cookie is omitted the soap service consistently
returns the expected value.  The same value should be returned when the
ZendDebugger cookie is present.

Additionally, debug and tracing options should be available to the
ZendDebugger session.

Response

Array
(
[name] => Me
)

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:47:08 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 638
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns2="http://xml.apache.org/xml-soap";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>nameMe


Actual result:
--
The SOAP service returns nothing (not even headers) or returns no
document body but does return headers that include "Content-length: 0"

Response

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:1:0||004|77742D65|1152;



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:45:00 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html



Here is the result on an occurrence with no headers:



SoapFault
Error Fetching http headers

#0 [internal function]: SoapClient->__doRequest('__call('getAuthor',
Array)
#2 /srv/www/test/html/soapdebug.php(57): SoapClient->getAuthor()
#3 {main}

Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:1:0||004|77742D65|1154;



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http:/

#47649 [Com]: copying ZendDebugger settings to SoapServer causes inconsistant server results

2009-03-16 Thread marques at displague dot com
 ID:   47649
 Comment by:   marques at displague dot com
 Reported By:  marques at displague dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

http://www.zend.com/support/knowledgebase.php?kbid=222

The KB item at the above URL shows that this method of debugging should
be possible.  In their example they send the client's start_debug,
debug_port, debug_host, and debug_stop to the server instance as
cookies.

In the modern ZendDebugger used with the Eclipse/PDT, all but
debug_stop (original_url, debug_port, start_debug, debug_start_session,
debug_no_cache, debug_host, debug_session_id, send_sess_end) are sent on
the query string (not as cookies).  The only cookie sent is
"ZendDebugger".

In my example I copied all the client's request variables and the
ZendDebugger cookie to the server instance.

I believe this functionality has changed or broken since the time this
Zend Knowledge Base article was written.


Previous Comments:


[2009-03-13 16:04:48] marques at displague dot com

Another interesting point about this example is that the client context
specifies http header "Accept-Encoding:".  The soap client ignores that
and sends "Accept-Encoding: deflate, gzip".



[2009-03-13 15:50:46] marques at displague dot com

Description:

In an attempt to supply a SoapServer the same ZendDebugger REQUEST and
COOKIE variables used while debugging the client, the server responds
inconsistently.  Sometimes the server responds with a Content-size of 0
and other times a header isn't even returned.


Reproduce code:
---
http://pastebin.com/f2da44cb2

Expected result:

When the ZendDebugger cookie is omitted the soap service consistently
returns the expected value.  The same value should be returned when the
ZendDebugger cookie is present.

Additionally, debug and tracing options should be available to the
ZendDebugger session.

Response

Array
(
[name] => Me
)

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:47:08 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 638
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns2="http://xml.apache.org/xml-soap";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>nameMe


Actual result:
--
The SOAP service returns nothing (not even headers) or returns no
document body but does return headers that include "Content-length: 0"

Response

Soap Transaction
Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:1:0||004|77742D65|1152;



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>

Server

HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:45:00 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html



Here is the result on an occurrence with no headers:



SoapFault
Error Fetching http headers

#0 [internal function]: SoapClient->__doRequest('__call('getAuthor',
Array)
#2 /srv/www/test/html/soapdebug.php(57): SoapClient->getAuthor()
#3 {main}

Client

POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor";
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:1:0||004|77742D65|1154;



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://test-uri/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>


#41350 [Com]: Error in my_thread_global_end()

2009-03-16 Thread chris at crgs dot co dot uk
 ID:   41350
 Comment by:   chris at crgs dot co dot uk
 Reported By:  graham at directhostinguk dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  scottmac
 New Comment:

Just to confirm that this is fixed in the updated libmysql.dll recently
released as part of MySQL 5.0.77.

If you have MySQL 5.0.77 installed, just replace the copy of
libmysql.dll currently provided with PHP with the version from
'C:\Program Files\MySQL\MySQL Server 5.0\bin' (or equivalent folder) and
you should be good to go.

It would be great if the PHP team could update the copy of libmysql.dll
supplied in the next release of PHP to 5.0.77 or above.

Thanks to all those who have worked to get this fixed.


Previous Comments:


[2009-03-10 00:14:52] paul at orac dot clara dot co dot uk

Libmysql.dll from Mysql 5.0.77 seems to work fine and doesn't have the
problems detailed in bug #46842.
Libmysql.dll from Mysql 5.1.32 still doesn't work.

I don't know why the PHP folks have closed #46842 as Bogus when it
quite clearly is not.



[2009-03-03 00:12:17] chaz_meister_rock at yahoo dot com

Same error in PHP 5.2.9.



[2009-02-20 03:14:23] kram0815 at gmx dot net

have this bug too on my system

uname -a = 2.6.26-1-amd64 Debian Lenny
php -v = PHP 5.2.6-1+lenny2
mysql -V = Ver 14.12 Distrib 5.0.51a

msg in /var/log/apache2/error.log = Error in my_thread_global_end(): 41
threads didn't exit



[2009-02-12 01:40:30] dbmuller at gmail dot com

I had this problem on a Windows 2003 server running PHP 5.2.5 as CGI
with hsphere.  I would copy the 5.2.1 DLL in and the error would
persist.  The fix was to delete the old DLL, refresh the page to produce
a new error and then copy up the 5.2.1 libmysql.dll.



[2009-01-23 16:35:24] onehourlate at hotmail dot com

Unfortunately, libmysql.dll 5.1.30 seems crash. see #46842.

I don't know if this crash is necesserally php related, but it's still
useful to investigate because trying to ship a version of libmysql.dll
that finally solves this bug would be a good thing



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

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



#47640 [Fbk->Opn]: Session does not close file in /tmp/

2009-03-16 Thread manuel dot schmitt at manitu dot de
 ID:   47640
 User updated by:  manuel dot schmitt at manitu dot de
 Reported By:  manuel dot schmitt at manitu dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

But how should I trace this anymore?

I can strace apache/php processes seeing that there is a PHP script
doing flock() on a file, the process never returns.

What should I do?


Previous Comments:


[2009-03-16 16:25:10] j...@php.net

I'm actually running also s9y installation in the high traffic 
server. Never had any hanging PHP processes. And many times scripts 
have run to limits due to database being too slow. Still, no hangups 
with sessions. As this is quite impossible to reproduce, please try 
and figure out what really causes it. I know it's hard but otherwise 
we can keep on guessing and that's pretty useless.



[2009-03-16 08:07:22] manuel dot schmitt at manitu dot de

E.g. any S9Y installation does reproduce this. I cannot post this here
because it has lots of files.

BUT as I told you I said what I suppose. I suppose that scripts running
into any php limit (e.g. execution time) do not properly close the
session files. It does NOT happen when scripts are correctly finished!



[2009-03-15 12:19:31] j...@php.net

Please provide script(s) that reliably can be used to reproduce this. 
I can not reproduce this anywhere (even high traffic sites using 
sessions). Just saying something happens does not make it true..



[2009-03-15 11:24:15] manuel dot schmitt at manitu dot de

The most simple script at all



can cause the problem, please take my notes I posted before into
attention.



[2009-03-13 10:06:52] manuel dot schmitt at manitu dot de

Description:

PHP internal session handler does not correctly closes flock()s on
session files

Reproduce code:
---
(This bug seems the same issue as bug #32092)

The problem happens on various PHP applications, no matter what they do
exactly. Only one same thing: They are all using PHP sessions.

In these cases Apache/PHP-processes hanging forever (until killed). I
have strace'd the processed, they are hanging on flock()ing the session
file as

   flock(FILE_ID, LOCK_EX, )

where FILE_ID is a /tmp/sess_XXX-File (not on NFS, just local) [I have
traced this from /proc/PROCID/fd/FILE_ID which links to the session
file]

I suppose that there was an php process flock()ing the file, perhaps
running into max_execution_time, not unflocking the session file
correctly and other processed wanting to write session data.


Expected result:

PHP session handler should have some timeout and/or old file locks
should be hard-broken.

Actual result:
--
Forever-Hanging php processes.





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



#47623 [Opn->Fbk]: array_shift() with SESSION

2009-03-16 Thread jani
 ID:   47623
 Updated by:   j...@php.net
 Reported By:  Henry at huis-stijl dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Apache/2.0.52 (CentOS)
 PHP Version:  5.2.9
 New Comment:

If you remove those @'s, what does it output..?


Previous Comments:


[2009-03-11 14:07:22] Henry at huis-stijl dot nl

 array(1,2,3),
2 => array(2,3,4),
3 => array(3,4,5),
4 => array(4,5,6),
);

While(@$_SESSION['villas'] != array())
{
$row = array_shift(@$_SESSION['villas']);
print_r($row);
}// einde while

?>

on php 4 i get
Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 2 [1] => 3 [2] => 4
) Array ( [0] => 3 [1] => 4 [2] => 5 ) Array ( [0] => 4 [1] => 5 [2] =>
6 )

on phph 5.2.9 i get a loop that doesnt end
Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3
) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] =>
3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2]
=> 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] => 2
[2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1] =>
2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 ) Array ( [0] => 1 [1]
=> 2 [2] => 3 ) Array ( [0] => 1 [1] => 2 [2] => 3 )



[2009-03-11 12:56:34] Henry at huis-stijl dot nl

Description:

Script was working perfectly on PHP 4 when updated to PHP5.2.9 I found
an error. I was filling a array in the session and looped it with
array_shift until the arry was empty. 
This loop kept giving me the first value but did not erased it from te
original arry.

Reproduce code:
---
$row = array_shift(@$_SESSION['villas']);

Expected result:

1. $row getting the first element from $_SESSION['villas']
2. $_SESSION['villas'] to get lost the first element.


Actual result:
--
1. $row getting the first element from $_SESSION['villas']
2. $_SESSION['villas'] did not lost the first element and was
unchanged


I cann bypass this failure by using:
$arr_temp = @$_SESSION['villas'];
$row = array_shift($arr_temp);
$_SESSION['villas'] = $arr_temp;
unset($arr_temp);







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



#47675 [Fbk->Opn]: File descriptor leak

2009-03-16 Thread cs at ecn dot purdue dot edu
 ID:   47675
 User updated by:  cs at ecn dot purdue dot edu
 Reported By:  cs at ecn dot purdue dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Solaris 10
 PHP Version:  5.2.9
 New Comment:

I am using apache 2.2.11.


Previous Comments:


[2009-03-16 16:21:51] j...@php.net

Apache1 or Apache2 ?



[2009-03-16 14:07:47] cs at ecn dot purdue dot edu

Description:

mod_php contains a potential file descriptor leak on Solaris 10 when 
script executes "exit()".

Reproduce code:
---


The change in behavior is due to the addition of HAVE_BROKEN_GETCWD for
Solaris 10. In php_execute_script, a file descriptor is opened to hold
the current working directory, but is not closed in the case where php
code may not return to this function after executing a script. mod_php
isn't aware of the resource that was allocated and not freed.

Expected result:

Normally web server runs for days without resource trouble. In the 
case where a PHP script does an "exit(0)", the web server will run 
out of file descriptors and will need restarting.






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



#47640 [Opn->Fbk]: Session does not close file in /tmp/

2009-03-16 Thread jani
 ID:   47640
 Updated by:   j...@php.net
 Reported By:  manuel dot schmitt at manitu dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

I'm actually running also s9y installation in the high traffic 
server. Never had any hanging PHP processes. And many times scripts 
have run to limits due to database being too slow. Still, no hangups 
with sessions. As this is quite impossible to reproduce, please try 
and figure out what really causes it. I know it's hard but otherwise 
we can keep on guessing and that's pretty useless.


Previous Comments:


[2009-03-16 08:07:22] manuel dot schmitt at manitu dot de

E.g. any S9Y installation does reproduce this. I cannot post this here
because it has lots of files.

BUT as I told you I said what I suppose. I suppose that scripts running
into any php limit (e.g. execution time) do not properly close the
session files. It does NOT happen when scripts are correctly finished!



[2009-03-15 12:19:31] j...@php.net

Please provide script(s) that reliably can be used to reproduce this. 
I can not reproduce this anywhere (even high traffic sites using 
sessions). Just saying something happens does not make it true..



[2009-03-15 11:24:15] manuel dot schmitt at manitu dot de

The most simple script at all



can cause the problem, please take my notes I posted before into
attention.



[2009-03-13 10:06:52] manuel dot schmitt at manitu dot de

Description:

PHP internal session handler does not correctly closes flock()s on
session files

Reproduce code:
---
(This bug seems the same issue as bug #32092)

The problem happens on various PHP applications, no matter what they do
exactly. Only one same thing: They are all using PHP sessions.

In these cases Apache/PHP-processes hanging forever (until killed). I
have strace'd the processed, they are hanging on flock()ing the session
file as

   flock(FILE_ID, LOCK_EX, )

where FILE_ID is a /tmp/sess_XXX-File (not on NFS, just local) [I have
traced this from /proc/PROCID/fd/FILE_ID which links to the session
file]

I suppose that there was an php process flock()ing the file, perhaps
running into max_execution_time, not unflocking the session file
correctly and other processed wanting to write session data.


Expected result:

PHP session handler should have some timeout and/or old file locks
should be hard-broken.

Actual result:
--
Forever-Hanging php processes.





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



#47675 [Opn->Fbk]: File descriptor leak

2009-03-16 Thread jani
 ID:   47675
 Updated by:   j...@php.net
 Reported By:  cs at ecn dot purdue dot edu
-Status:   Open
+Status:   Feedback
-Bug Type: *Web Server problem
+Bug Type: Apache related
 Operating System: Solaris 10
 PHP Version:  5.2.9
 New Comment:

Apache1 or Apache2 ?


Previous Comments:


[2009-03-16 14:07:47] cs at ecn dot purdue dot edu

Description:

mod_php contains a potential file descriptor leak on Solaris 10 when 
script executes "exit()".

Reproduce code:
---


The change in behavior is due to the addition of HAVE_BROKEN_GETCWD for
Solaris 10. In php_execute_script, a file descriptor is opened to hold
the current working directory, but is not closed in the case where php
code may not return to this function after executing a script. mod_php
isn't aware of the resource that was allocated and not freed.

Expected result:

Normally web server runs for days without resource trouble. In the 
case where a PHP script does an "exit(0)", the web server will run 
out of file descriptors and will need restarting.






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



#47616 [Asn->Csd]: curl keeps crashing

2009-03-16 Thread felipe
 ID:   47616
 Updated by:   fel...@php.net
 Reported By:  phpbugs at rizzt dot kicks-ass dot org
-Status:   Assigned
+Status:   Closed
 Bug Type: cURL related
 Operating System: fedora 8,10
 PHP Version:  5.2.9
 Assigned To:  felipe
 New Comment:

This bug has been fixed in CVS.

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

Fixed in 5.2.10, 5.3 and HEAD.


Previous Comments:


[2009-03-16 15:00:01] phpbugs at rizzt dot kicks-ass dot org

i debugged it for you.

ext/curl/interface.c

around line 1555 you pass Z_STRVAL_PP(zvalue) to curl. in this case 
no type conversion is done and it passes 60 instead of a pointer to 
the string.

#if LIBCURL_VERSION_NUM >= 0x071101
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have 
to provide size before */
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, 
Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, 
Z_STRVAL_PP(zvalue));
#else



[2009-03-16 14:21:59] phpbugs at rizzt dot kicks-ass dot org

It seems to crash when I pass an integer to url_setopt($ch, 
CURLOPT_POSTFIELDS, $var); With a string it works fine.

I have compiled 5.2.8 with the exact same settings and it works. 

I can confirm these crashes with fedora 8,10 and suse 11.

/usr/lib64/libcurl.so.4.1.1

/usr/lib64/libcurl.so.4.1.0

/usr/lib64/libcurl.so.4.0.1

Maybe that helps a little bit more.



[2009-03-11 14:00:05] j...@php.net

Curl bugs are not PHP bug. Please report to curl people. (does not
crash for me..)



[2009-03-11 12:21:53] phpbugs at rizzt dot kicks-ass dot org

Here is the backtrace

'./configure'  '--with-openssl' '--with-mysql' '--with-gd' '--with-
freetype-dir=/usr' '--with-png-dir' '--with-jpeg-dir' '--with-curl' 
'--with-zlib' '--with-bz2' '--enable-pcntl' '--with-
apxs2=/usr/local/apache2/bin/apxs' '--enable-debug'

(gdb) frame 5
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
200 ((zend_internal_function *) 
EX(function_state).function)->handler(opline->extended_value, 
EX_T(opline->result.u.var).var.ptr, EX(function_state).function-
>common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, 
EX(object), return_value_used TSRMLS_CC);


#0  0x003093c841de in memcpy () from /lib64/libc.so.6
#1  0x0030a4621b0e in Curl_setopt () from /usr/lib64/libcurl.so.4
#2  0x0030a462a8f2 in curl_easy_setopt () from 
/usr/lib64/libcurl.so.4
#3  0x7736cdef in _php_curl_setopt (ch=0xc52ee0, 
option=10015,
zvalue=0xa60d68, return_value=0xc4dd18)
at /home/inst/php-5.2.9/ext/curl/interface.c:1554
#4  0x7736da95 in zif_curl_setopt (ht=,
return_value=0xc4dd18, return_value_ptr=,
this_ptr=, return_value_used=)
at /home/inst/php-5.2.9/ext/curl/interface.c:1668
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
#6  0x77590174 in execute (op_array=0x98bbe0)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#7  0x775a34ee in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fffbc50)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:234
#8  0x77590174 in execute (op_array=0xa6f950)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#9  0x7756cdcb in zend_execute_scripts (type=8,
retval=, file_count=3)
at /home/inst/php-5.2.9/Zend/zend.c:1134
#10 0x775289ea in php_execute_script 
(primary_file=0x7fffe0d0)
at /home/inst/php-5.2.9/main/main.c:2023
#11 0x775e1f9f in php_handler (r=0x989178)
at /home/inst/php-5.2.9/sapi/apache2handler/sapi_apache2.c:632
#12 0x0043d066 in ap_run_handler ()
#13 0x0043d902 in ap_invoke_handler ()
#14 0x0045e67f in ap_process_request ()
#15 0x0045b64f in ap_process_http_connection ()
#16 0x00446402 in ap_run_process_connection ()
#17 0x00446844 in ap_process_connection ()
#18 0x004822a4 in child_main ()
#19 0x0048238a in make_child ()
#20 0x0048292e in ap_mpm_run ()
#21 0x004243a6 in main ()



[2009-03-10 23:28:02] paj...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.ph

#47616 [Bgs->Asn]: curl keeps crashing

2009-03-16 Thread felipe
 ID:   47616
 Updated by:   fel...@php.net
 Reported By:  phpbugs at rizzt dot kicks-ass dot org
-Status:   Bogus
+Status:   Assigned
 Bug Type: cURL related
 Operating System: fedora 8,10
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  felipe


Previous Comments:


[2009-03-16 15:00:01] phpbugs at rizzt dot kicks-ass dot org

i debugged it for you.

ext/curl/interface.c

around line 1555 you pass Z_STRVAL_PP(zvalue) to curl. in this case 
no type conversion is done and it passes 60 instead of a pointer to 
the string.

#if LIBCURL_VERSION_NUM >= 0x071101
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have 
to provide size before */
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, 
Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, 
Z_STRVAL_PP(zvalue));
#else



[2009-03-16 14:21:59] phpbugs at rizzt dot kicks-ass dot org

It seems to crash when I pass an integer to url_setopt($ch, 
CURLOPT_POSTFIELDS, $var); With a string it works fine.

I have compiled 5.2.8 with the exact same settings and it works. 

I can confirm these crashes with fedora 8,10 and suse 11.

/usr/lib64/libcurl.so.4.1.1

/usr/lib64/libcurl.so.4.1.0

/usr/lib64/libcurl.so.4.0.1

Maybe that helps a little bit more.



[2009-03-11 14:00:05] j...@php.net

Curl bugs are not PHP bug. Please report to curl people. (does not
crash for me..)



[2009-03-11 12:21:53] phpbugs at rizzt dot kicks-ass dot org

Here is the backtrace

'./configure'  '--with-openssl' '--with-mysql' '--with-gd' '--with-
freetype-dir=/usr' '--with-png-dir' '--with-jpeg-dir' '--with-curl' 
'--with-zlib' '--with-bz2' '--enable-pcntl' '--with-
apxs2=/usr/local/apache2/bin/apxs' '--enable-debug'

(gdb) frame 5
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
200 ((zend_internal_function *) 
EX(function_state).function)->handler(opline->extended_value, 
EX_T(opline->result.u.var).var.ptr, EX(function_state).function-
>common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, 
EX(object), return_value_used TSRMLS_CC);


#0  0x003093c841de in memcpy () from /lib64/libc.so.6
#1  0x0030a4621b0e in Curl_setopt () from /usr/lib64/libcurl.so.4
#2  0x0030a462a8f2 in curl_easy_setopt () from 
/usr/lib64/libcurl.so.4
#3  0x7736cdef in _php_curl_setopt (ch=0xc52ee0, 
option=10015,
zvalue=0xa60d68, return_value=0xc4dd18)
at /home/inst/php-5.2.9/ext/curl/interface.c:1554
#4  0x7736da95 in zif_curl_setopt (ht=,
return_value=0xc4dd18, return_value_ptr=,
this_ptr=, return_value_used=)
at /home/inst/php-5.2.9/ext/curl/interface.c:1668
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
#6  0x77590174 in execute (op_array=0x98bbe0)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#7  0x775a34ee in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fffbc50)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:234
#8  0x77590174 in execute (op_array=0xa6f950)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#9  0x7756cdcb in zend_execute_scripts (type=8,
retval=, file_count=3)
at /home/inst/php-5.2.9/Zend/zend.c:1134
#10 0x775289ea in php_execute_script 
(primary_file=0x7fffe0d0)
at /home/inst/php-5.2.9/main/main.c:2023
#11 0x775e1f9f in php_handler (r=0x989178)
at /home/inst/php-5.2.9/sapi/apache2handler/sapi_apache2.c:632
#12 0x0043d066 in ap_run_handler ()
#13 0x0043d902 in ap_invoke_handler ()
#14 0x0045e67f in ap_process_request ()
#15 0x0045b64f in ap_process_http_connection ()
#16 0x00446402 in ap_run_process_connection ()
#17 0x00446844 in ap_process_connection ()
#18 0x004822a4 in child_main ()
#19 0x0048238a in make_child ()
#20 0x0048292e in ap_mpm_run ()
#21 0x004243a6 in main ()



[2009-03-10 23:28:02] paj...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




#47616 [Bgs]: curl keeps crashing

2009-03-16 Thread phpbugs at rizzt dot kicks-ass dot org
 ID:   47616
 User updated by:  phpbugs at rizzt dot kicks-ass dot org
 Reported By:  phpbugs at rizzt dot kicks-ass dot org
 Status:   Bogus
 Bug Type: cURL related
 Operating System: fedora 8,10
 PHP Version:  5.2.9
 New Comment:

i debugged it for you.

ext/curl/interface.c

around line 1555 you pass Z_STRVAL_PP(zvalue) to curl. in this case 
no type conversion is done and it passes 60 instead of a pointer to 
the string.

#if LIBCURL_VERSION_NUM >= 0x071101
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have 
to provide size before */
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, 
Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, 
Z_STRVAL_PP(zvalue));
#else


Previous Comments:


[2009-03-16 14:21:59] phpbugs at rizzt dot kicks-ass dot org

It seems to crash when I pass an integer to url_setopt($ch, 
CURLOPT_POSTFIELDS, $var); With a string it works fine.

I have compiled 5.2.8 with the exact same settings and it works. 

I can confirm these crashes with fedora 8,10 and suse 11.

/usr/lib64/libcurl.so.4.1.1

/usr/lib64/libcurl.so.4.1.0

/usr/lib64/libcurl.so.4.0.1

Maybe that helps a little bit more.



[2009-03-11 14:00:05] j...@php.net

Curl bugs are not PHP bug. Please report to curl people. (does not
crash for me..)



[2009-03-11 12:21:53] phpbugs at rizzt dot kicks-ass dot org

Here is the backtrace

'./configure'  '--with-openssl' '--with-mysql' '--with-gd' '--with-
freetype-dir=/usr' '--with-png-dir' '--with-jpeg-dir' '--with-curl' 
'--with-zlib' '--with-bz2' '--enable-pcntl' '--with-
apxs2=/usr/local/apache2/bin/apxs' '--enable-debug'

(gdb) frame 5
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
200 ((zend_internal_function *) 
EX(function_state).function)->handler(opline->extended_value, 
EX_T(opline->result.u.var).var.ptr, EX(function_state).function-
>common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, 
EX(object), return_value_used TSRMLS_CC);


#0  0x003093c841de in memcpy () from /lib64/libc.so.6
#1  0x0030a4621b0e in Curl_setopt () from /usr/lib64/libcurl.so.4
#2  0x0030a462a8f2 in curl_easy_setopt () from 
/usr/lib64/libcurl.so.4
#3  0x7736cdef in _php_curl_setopt (ch=0xc52ee0, 
option=10015,
zvalue=0xa60d68, return_value=0xc4dd18)
at /home/inst/php-5.2.9/ext/curl/interface.c:1554
#4  0x7736da95 in zif_curl_setopt (ht=,
return_value=0xc4dd18, return_value_ptr=,
this_ptr=, return_value_used=)
at /home/inst/php-5.2.9/ext/curl/interface.c:1668
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
#6  0x77590174 in execute (op_array=0x98bbe0)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#7  0x775a34ee in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fffbc50)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:234
#8  0x77590174 in execute (op_array=0xa6f950)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#9  0x7756cdcb in zend_execute_scripts (type=8,
retval=, file_count=3)
at /home/inst/php-5.2.9/Zend/zend.c:1134
#10 0x775289ea in php_execute_script 
(primary_file=0x7fffe0d0)
at /home/inst/php-5.2.9/main/main.c:2023
#11 0x775e1f9f in php_handler (r=0x989178)
at /home/inst/php-5.2.9/sapi/apache2handler/sapi_apache2.c:632
#12 0x0043d066 in ap_run_handler ()
#13 0x0043d902 in ap_invoke_handler ()
#14 0x0045e67f in ap_process_request ()
#15 0x0045b64f in ap_process_http_connection ()
#16 0x00446402 in ap_run_process_connection ()
#17 0x00446844 in ap_process_connection ()
#18 0x004822a4 in child_main ()
#19 0x0048238a in make_child ()
#20 0x0048292e in ap_mpm_run ()
#21 0x004243a6 in main ()



[2009-03-10 23:28:02] paj...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2009-03-10 21:42:01] phpbugs at rizzt dot kicks-ass dot org

Description:

After upgradin

#43828 [Asn]: broken transparency of imagearc in truecolorimages using blendingmode

2009-03-16 Thread christopher dot bertram at yahoo dot de
 ID:   43828
 User updated by:  christopher dot bertram at yahoo dot de
 Reported By:  christopher dot bertram at yahoo dot de
 Status:   Assigned
 Bug Type: GD related
 Operating System: Win Xp, Win Vista x64
-PHP Version:  5.2.5
+PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

The bug can be found in every PHP-Version, but I don't have enough time
to test a snapshot or run the script on our linux servers.

Once I found a patch for that problem, but it is very troublesome to
change the code everytime you compile php. Maybe it can be helpfull for
you.
http://chem.skku.ac.kr/~wkpark/linux/patch/php5.x-gd-bresenham4.patch


Previous Comments:


[2009-03-16 13:42:46] paj...@php.net

It is a real bug, with any version.



[2009-03-16 13:40:15] j...@php.net

Yes, in what version? Please, update the version field whenever you try
some snapshot / release / etc. so we don't have to ask for it all the
time.. 



[2009-03-14 00:28:44] christopher dot bertram at yahoo dot de

The problem still exists.



[2008-11-02 13:23:21] j...@php.net

Please try using this CVS snapshot:

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

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





[2008-01-12 23:08:14] christopher dot bertram at yahoo dot de

Description:

the imagearc and imagefilledarc functions don't seem to support images
using truecolor and alphablending.
In the following example I don't need alphablending, but I require it
to use other images as background.

Reproduce code:
---


Expected result:

Same result as using the paletteimage version.

Actual result:
--
Strange looking arcs and filled arcs.





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



#32278 [Com]: Remote linked server not accessibile

2009-03-16 Thread mcollard at hotmail dot com
 ID:   32278
 Comment by:   mcollard at hotmail dot com
 Reported By:  raulionescu at gmail dot com
 Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: WinXP Pro
 PHP Version:  5.0.4
 New Comment:

Seconded, this issue is ongoing and problematic.


Previous Comments:


[2009-02-19 12:56:46] aromal at gmail dot com

any update on this? 
somebody there to give us a reply?



[2008-07-02 16:35:05] steven_crombie at yahoo dot com

Additional comment to the post above...

To test that there was nothing amiss with the setup, code, or database
server, I changed the query to pull data from a database local to the
SQL Server (not linked database).  I got the expected result set.



[2008-07-01 21:04:27] steven_crombie at yahoo dot com

Web Server:
  php 5.2.5
  Windows 2003 Server Standard SP1
  IIS 6.0

SQL Server:
  SQL Server 2005
  Windows 2003 Server Standard SP2
  Management Studio 9.00.3042.00

I have not been able to get a result set when using php to query the MS
SQL Server when the query references a linked server.  

I have also tried putting the query in a database view and querying the
view instead of directly to the tables.  Still no results. 

I have also tried putting my query in a stored procedure and calling
the stored procedure.  Still no results returned.

All three methods (direct query, view, and stored procedure) produce
good results when using Management Studio or the sqlcmd utility.

A fix for this long-standing problem would be most appreciated.



[2008-06-09 20:07:08] cmoore at getzeroedin dot com

I'm experiencing the same error, Warning: mssql_query()
[function.mssql-query]: message: Heterogeneous queries require the
ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This
ensures consistent query semantics. Enable these options and then
reissue your query, when attempting to execute a linked MDX query to SQL
Server Analysis Services (an analytics cube).  Below is the query 

set ANSI_NULLS ON;
set ANSI_ARNINGS ON;

exec sp_addlinkedserver 
@server='linked_olap', 
@srvproduct='', 
@provider='MSOLAP.3', 
@datasrc='scout', 
@catalog='Adventure Works DW Standard Edition'
;


SELECT * 
FROM OpenQuery(linked_olap,'SELECT 
  {Measures.[Internet Order Count]} ON COLUMNS , 
  [Product].[Category].members ON ROWS
FROM [Adventure Works]') 
;

exec sp_dropserver 'linked_olap'
;


In the linked server procedure, 'scout' is my database server name, but
Adventure Works is the sample analysis server data warehouse (cube), so
you should be able to recreate this simply.

Are there any plans to support native MDX queries against a SQL Server
Analysis Server, or plans to resolve this issue?



[2008-04-30 16:41:06] webster_jack at hotmail dot com

Hi
Has this bug been fixed?



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

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



#47616 [Bgs]: curl keeps crashing

2009-03-16 Thread phpbugs at rizzt dot kicks-ass dot org
 ID:   47616
 User updated by:  phpbugs at rizzt dot kicks-ass dot org
 Reported By:  phpbugs at rizzt dot kicks-ass dot org
 Status:   Bogus
 Bug Type: cURL related
 Operating System: fedora 8,10
 PHP Version:  5.2.9
 New Comment:

It seems to crash when I pass an integer to url_setopt($ch, 
CURLOPT_POSTFIELDS, $var); With a string it works fine.

I have compiled 5.2.8 with the exact same settings and it works. 

I can confirm these crashes with fedora 8,10 and suse 11.

/usr/lib64/libcurl.so.4.1.1

/usr/lib64/libcurl.so.4.1.0

/usr/lib64/libcurl.so.4.0.1

Maybe that helps a little bit more.


Previous Comments:


[2009-03-11 14:00:05] j...@php.net

Curl bugs are not PHP bug. Please report to curl people. (does not
crash for me..)



[2009-03-11 12:21:53] phpbugs at rizzt dot kicks-ass dot org

Here is the backtrace

'./configure'  '--with-openssl' '--with-mysql' '--with-gd' '--with-
freetype-dir=/usr' '--with-png-dir' '--with-jpeg-dir' '--with-curl' 
'--with-zlib' '--with-bz2' '--enable-pcntl' '--with-
apxs2=/usr/local/apache2/bin/apxs' '--enable-debug'

(gdb) frame 5
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
200 ((zend_internal_function *) 
EX(function_state).function)->handler(opline->extended_value, 
EX_T(opline->result.u.var).var.ptr, EX(function_state).function-
>common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, 
EX(object), return_value_used TSRMLS_CC);


#0  0x003093c841de in memcpy () from /lib64/libc.so.6
#1  0x0030a4621b0e in Curl_setopt () from /usr/lib64/libcurl.so.4
#2  0x0030a462a8f2 in curl_easy_setopt () from 
/usr/lib64/libcurl.so.4
#3  0x7736cdef in _php_curl_setopt (ch=0xc52ee0, 
option=10015,
zvalue=0xa60d68, return_value=0xc4dd18)
at /home/inst/php-5.2.9/ext/curl/interface.c:1554
#4  0x7736da95 in zif_curl_setopt (ht=,
return_value=0xc4dd18, return_value_ptr=,
this_ptr=, return_value_used=)
at /home/inst/php-5.2.9/ext/curl/interface.c:1668
#5  0x775a3bdd in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fff0880)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:200
#6  0x77590174 in execute (op_array=0x98bbe0)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#7  0x775a34ee in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fffbc50)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:234
#8  0x77590174 in execute (op_array=0xa6f950)
at /home/inst/php-5.2.9/Zend/zend_vm_execute.h:92
#9  0x7756cdcb in zend_execute_scripts (type=8,
retval=, file_count=3)
at /home/inst/php-5.2.9/Zend/zend.c:1134
#10 0x775289ea in php_execute_script 
(primary_file=0x7fffe0d0)
at /home/inst/php-5.2.9/main/main.c:2023
#11 0x775e1f9f in php_handler (r=0x989178)
at /home/inst/php-5.2.9/sapi/apache2handler/sapi_apache2.c:632
#12 0x0043d066 in ap_run_handler ()
#13 0x0043d902 in ap_invoke_handler ()
#14 0x0045e67f in ap_process_request ()
#15 0x0045b64f in ap_process_http_connection ()
#16 0x00446402 in ap_run_process_connection ()
#17 0x00446844 in ap_process_connection ()
#18 0x004822a4 in child_main ()
#19 0x0048238a in make_child ()
#20 0x0048292e in ap_mpm_run ()
#21 0x004243a6 in main ()



[2009-03-10 23:28:02] paj...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2009-03-10 21:42:01] phpbugs at rizzt dot kicks-ass dot org

Description:

After upgrading to PHP 5.2.9, the code below does not run anymore.
It is not possible to reproduce the bug with a simple script.

This code terminates in 5.2.9 always, but runs in 5.2.8 without any 
problems.

I do not know if it happens using the same resource or only 
curl_setopt.

Reproduce code:
---
$ch = curl_init($url);
echo "ok";
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
echo "never shows";



Expected result:

ok
never shows

Actual result:
--
ok





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



#47675 [NEW]: File descriptor leak

2009-03-16 Thread cs at ecn dot purdue dot edu
From: cs at ecn dot purdue dot edu
Operating system: Solaris 10
PHP version:  5.2.9
PHP Bug Type: *Web Server problem
Bug description:  File descriptor leak

Description:

mod_php contains a potential file descriptor leak on Solaris 10 when 
script executes "exit()".

Reproduce code:
---


The change in behavior is due to the addition of HAVE_BROKEN_GETCWD for
Solaris 10. In php_execute_script, a file descriptor is opened to hold the
current working directory, but is not closed in the case where php code may
not return to this function after executing a script. mod_php isn't aware
of the resource that was allocated and not freed.

Expected result:

Normally web server runs for days without resource trouble. In the 
case where a PHP script does an "exit(0)", the web server will run 
out of file descriptors and will need restarting.


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



#44901 [Opn->Ver]: open_basedir as prefix complains on attempts to access non-existant files

2009-03-16 Thread jani
 ID:   44901
 Updated by:   j...@php.net
 Reported By:  jake at yahoo-inc dot com
-Status:   Open
+Status:   Verified
 Bug Type: Safe Mode/open_basedir
-Operating System: redhat e linux (2.6.9-42.ELsmp)
+Operating System: *
-PHP Version:  5.*
+PHP Version:  5.*, 6CVS (2009-03-16)


Previous Comments:


[2008-05-03 00:41:11] jake at yahoo-inc dot com

Description:

When using open_basedir as a prefix, attempting to access files or
directories which match the prefix but are not present on the filesystem
raise open_basedir restriction warnings.



Reproduce code:
---
// create files or directories on the file system "/foo1", "/foo2"
// add "/foo" (not "/foo/") to the open basedir restriction, then:

var_dump(file_exists('/foo1'));
var_dump(file_exists('/foo2'));
var_dump(file_exists('/foo3'));



Expected result:

this is the output returned:
bool(true)
bool(true)
bool(false)

which is expected, however, the "false" returned by the third call is
disingenuous... it is false because the call is being blocked by
open_basedir, and the following warning is triggered:

[Fri May  2 17:33:05 2008] [error] PHP Warning:  file_exists():
open_basedir restriction in effect. File(/foo3) is not within the
allowed path(s)







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



#43828 [Fbk->Asn]: broken transparency of imagearc in truecolorimages using blendingmode

2009-03-16 Thread pajoye
 ID:   43828
 Updated by:   paj...@php.net
 Reported By:  christopher dot bertram at yahoo dot de
-Status:   Feedback
+Status:   Assigned
 Bug Type: GD related
 Operating System: Win Xp, Win Vista x64
 PHP Version:  5.2.5
 Assigned To:  pajoye
 New Comment:

It is a real bug, with any version.


Previous Comments:


[2009-03-16 13:40:15] j...@php.net

Yes, in what version? Please, update the version field whenever you try
some snapshot / release / etc. so we don't have to ask for it all the
time.. 



[2009-03-14 00:28:44] christopher dot bertram at yahoo dot de

The problem still exists.



[2008-11-02 13:23:21] j...@php.net

Please try using this CVS snapshot:

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

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





[2008-01-12 23:08:14] christopher dot bertram at yahoo dot de

Description:

the imagearc and imagefilledarc functions don't seem to support images
using truecolor and alphablending.
In the following example I don't need alphablending, but I require it
to use other images as background.

Reproduce code:
---


Expected result:

Same result as using the paletteimage version.

Actual result:
--
Strange looking arcs and filled arcs.





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



#43828 [Opn->Fbk]: broken transparency of imagearc in truecolorimages using blendingmode

2009-03-16 Thread jani
 ID:   43828
 Updated by:   j...@php.net
 Reported By:  christopher dot bertram at yahoo dot de
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Win Xp, Win Vista x64
 PHP Version:  5.2.5
 Assigned To:  pajoye
 New Comment:

Yes, in what version? Please, update the version field whenever you try
some snapshot / release / etc. so we don't have to ask for it all the
time.. 


Previous Comments:


[2009-03-14 00:28:44] christopher dot bertram at yahoo dot de

The problem still exists.



[2008-11-02 13:23:21] j...@php.net

Please try using this CVS snapshot:

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

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





[2008-01-12 23:08:14] christopher dot bertram at yahoo dot de

Description:

the imagearc and imagefilledarc functions don't seem to support images
using truecolor and alphablending.
In the following example I don't need alphablending, but I require it
to use other images as background.

Reproduce code:
---


Expected result:

Same result as using the paletteimage version.

Actual result:
--
Strange looking arcs and filled arcs.





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



#47669 [Opn->Bgs]: iconv memory leak

2009-03-16 Thread jani
 ID:   47669
 Updated by:   j...@php.net
 Reported By:  vGhost2000 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: ICONV related
 Operating System: Linux 2.6.24-23-xen SMP x86_64
-PHP Version:  5.2.9
+PHP Version:  5.2.4
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




Previous Comments:


[2009-03-16 07:02:54] vGhost2000 at gmail dot com

Description:

When "Iconv" and "Multibyte String" library classes operate on
"SimpleXML" object a memory leak occures while processing "SimpleXML"
string objects.
If "SimpleXML" string object is converted into an "ordinal" string
before the control is being passed to routines from "Iconv" and
"Multibyte String" libraries the memory leak doesn't occur. 
--
System Linux 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64
Apache Version Apache/2.2.8 (Ubuntu)
PHP Version 5.2.4-2ubuntu5.5 with Suhosin-Patch
Server API Apache 2.0 Handler
Zend Engine v2.2.0

phpinfo():
http://79.170.152.11/phpinf.php

Reproduce code:
---
some string');

For($i = 0; $i < 1000; $i++)
{
$tmp = IConv('UTF-8', 'UTF-8//TRANSLIT', $sxml->el);
# v1
//$tmp = mb_StrToLower($sxml->el);  
# v2
//$tmp = IConv('UTF-8', 'UTF-8//TRANSLIT', (string)$sxml->el);  
# v3
//$tmp = mb_StrToLower((string)$sxml->el);  
# v4
UnSet($tmp);
If(!($i % 100))
{
Echo $i . ' - ' . Number_Format(Memory_Get_Usage()) . "\n";
}
}
?>

Expected result:

In example the first and the second variants demonstrate memory leak.
The third and the fourth variants show that some extra conversions help
to avoid the memory leak.

The results of the script execution.

v1:
0 - 103,352
100 - 185,816
200 - 268,232
300 - 350,632
400 - 433,032
500 - 515,432
600 - 646,984
700 - 729,384
800 - 811,800
900 - 894,200

v2:
0 - 103,080
100 - 185,584
200 - 268,016
300 - 350,416
400 - 432,816
500 - 515,216
600 - 646,800
700 - 729,200
800 - 811,600
900 - 894,000

v3:
0 - 103,400
100 - 103,456
200 - 103,456
300 - 103,456
400 - 103,456
500 - 103,456
600 - 103,456
700 - 103,456
800 - 103,456
900 - 103,456

v4:
0 - 103,128
100 - 103,184
200 - 103,184
300 - 103,184
400 - 103,184
500 - 103,184
600 - 103,184
700 - 103,184
800 - 103,184
900 - 103,184







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



#47672 [Opn->Bgs]: public attribute within class initial value issue

2009-03-16 Thread jani
 ID:   47672
 Updated by:   j...@php.net
 Reported By:  jimmyp2 at freemail dot gr
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: windows 2003 std edition sp2
 PHP Version:  5.2.9
 New Comment:

Expected, you don't get notice about it since you never use the class.
The constant is checked once you do '$foo = new TestClass;'.


Previous Comments:


[2009-03-16 12:14:14] jimmyp2 at freemail dot gr

Description:

Hello,

while testing this new release i noticed that declaring a public
attribute the way is shown in the "Reproduce code" section below no
error/exception is issued by the scripting engine's parser. Is this a
normal  behaviour ?

Web server used : Apache v. 2.2.11
PHP version : 5.2.9-1


Thank you.


Reproduce code:
---



Expected result:

a parser error issued.






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



#47673 [Fbk]: calling phpinfo() after tokenizer token_get_all() results in Segfault

2009-03-16 Thread jani
 ID:   47673
 Updated by:   j...@php.net
 Reported By:  serhii dot piddubchak at gmail dot com
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.9
 New Comment:

For the record: It does not crash for me..


Previous Comments:


[2009-03-16 13:14:30] j...@php.net

What if you compile the tokenizer as normal (static) extension when you
compile PHP _yourself_ from sources, does it work then?



[2009-03-16 12:23:37] serhii dot piddubchak at gmail dot com

I've found this bug:
http://bugs.php.net/bug.php?id=38449
It is exactly the same problem, but the latest comment was "Please
report FreeBSD bugs to FreeBSD peoples.". It doesn't look like a
solution since FreeBSD people won't fix this issue, It would be very
surprising if FreeBSD people must fix bugs in every piece of software
that is available for FreeBSD.
Moreover, previous bug was reported more then 2.5 years ago, PHP got a
5.2.8 version and FreeBSD got a 7.1 version. Looks for me that PHP
doesn't handle FreeBSD that well as Linux or Windows. If PHP compiles on
FreeBSD I expect it to work.



[2009-03-16 12:18:06] serhii dot piddubchak at gmail dot com

Description:

I'm getting a segmentation fault when trying to call phpinfo() after
token_get_all();
phpinfo() works fine if called before token_get_all();

Here is a short information about my system:
PHP Version 5.2.8
FreeBSD medved.hvosting.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan
22 09:27:15 UTC 2009 r...@free.ds:/usr/obj/usr/src/sys/ISPSYSTEM amd64

Build Date  Feb 11 2009 15:20:04

Configure Command   './configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=yes'
'--enable-reflection' '--program-prefix=' '--enable-fastcgi'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd7.1'

Server API  CGI/FastCGI

Also there is no extensions like eAccelerator or ZendOptimizer.
Also I tried it on another FreeBSD 6.1 system, PHP5.2.8 configured as
apache module, the bug wasn't reproducible. So, it looks like
CGI/FastCGI or 64bit arch issue. Thanks in advance for any help.

I can't install PHP5.2.9 because I don't own the server, it is a
hosting account but I think it is reproducible in 5.2.9 since I didn't
notice something relevant fixed in Changelog for 5.2.9

Reproduce code:
---


Expected result:

Expected result is to see full output from phpinfo()

Actual result:
--
The first summary table of phpinfo is printed, then process crashes
with core dump.

Here is a backtrace:
This GDB was configured as "amd64-marcel-freebsd"...(no debugging
symbols found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.

...

Reading symbols from /lib/libc.so.7...(no debugging symbols
found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/tokenizer.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/tokenizer.so

...

#0  0x00080121ee80 in ?? ()
[New Thread 0x8012b5180 (LWP 100392)]
(gdb) bt
#0  0x00080121ee80 in ?? ()
#1  0x005065e1 in zend_html_puts ()
#2  0x00494738 in php_print_info ()
#3  0x004948ae in zif_phpinfo ()
#4  0x005397d2 in zend_do_fcall_common_helper_SPEC ()
#5  0x0052ba87 in execute ()
#6  0x0050f177 in zend_execute_scripts ()
#7  0x004d2767 in php_execute_script ()
#8  0x00586773 in main ()





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



#47673 [Opn->Fbk]: calling phpinfo() after tokenizer token_get_all() results in Segfault

2009-03-16 Thread jani
 ID:   47673
 Updated by:   j...@php.net
 Reported By:  serhii dot piddubchak at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.9
 New Comment:

What if you compile the tokenizer as normal (static) extension when you
compile PHP _yourself_ from sources, does it work then?


Previous Comments:


[2009-03-16 12:23:37] serhii dot piddubchak at gmail dot com

I've found this bug:
http://bugs.php.net/bug.php?id=38449
It is exactly the same problem, but the latest comment was "Please
report FreeBSD bugs to FreeBSD peoples.". It doesn't look like a
solution since FreeBSD people won't fix this issue, It would be very
surprising if FreeBSD people must fix bugs in every piece of software
that is available for FreeBSD.
Moreover, previous bug was reported more then 2.5 years ago, PHP got a
5.2.8 version and FreeBSD got a 7.1 version. Looks for me that PHP
doesn't handle FreeBSD that well as Linux or Windows. If PHP compiles on
FreeBSD I expect it to work.



[2009-03-16 12:18:06] serhii dot piddubchak at gmail dot com

Description:

I'm getting a segmentation fault when trying to call phpinfo() after
token_get_all();
phpinfo() works fine if called before token_get_all();

Here is a short information about my system:
PHP Version 5.2.8
FreeBSD medved.hvosting.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan
22 09:27:15 UTC 2009 r...@free.ds:/usr/obj/usr/src/sys/ISPSYSTEM amd64

Build Date  Feb 11 2009 15:20:04

Configure Command   './configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=yes'
'--enable-reflection' '--program-prefix=' '--enable-fastcgi'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd7.1'

Server API  CGI/FastCGI

Also there is no extensions like eAccelerator or ZendOptimizer.
Also I tried it on another FreeBSD 6.1 system, PHP5.2.8 configured as
apache module, the bug wasn't reproducible. So, it looks like
CGI/FastCGI or 64bit arch issue. Thanks in advance for any help.

I can't install PHP5.2.9 because I don't own the server, it is a
hosting account but I think it is reproducible in 5.2.9 since I didn't
notice something relevant fixed in Changelog for 5.2.9

Reproduce code:
---


Expected result:

Expected result is to see full output from phpinfo()

Actual result:
--
The first summary table of phpinfo is printed, then process crashes
with core dump.

Here is a backtrace:
This GDB was configured as "amd64-marcel-freebsd"...(no debugging
symbols found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.

...

Reading symbols from /lib/libc.so.7...(no debugging symbols
found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/tokenizer.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/tokenizer.so

...

#0  0x00080121ee80 in ?? ()
[New Thread 0x8012b5180 (LWP 100392)]
(gdb) bt
#0  0x00080121ee80 in ?? ()
#1  0x005065e1 in zend_html_puts ()
#2  0x00494738 in php_print_info ()
#3  0x004948ae in zif_phpinfo ()
#4  0x005397d2 in zend_do_fcall_common_helper_SPEC ()
#5  0x0052ba87 in execute ()
#6  0x0050f177 in zend_execute_scripts ()
#7  0x004d2767 in php_execute_script ()
#8  0x00586773 in main ()





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



#47674 [Opn->Bgs]: curl_setopt segfault

2009-03-16 Thread jani
 ID:   47674
 Updated by:   j...@php.net
 Reported By:  phpbugs at rizzt dot kicks-ass dot org
-Status:   Open
+Status:   Bogus
 Bug Type: cURL related
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

Resubmitting same bug twice still does not make it PHP bug.
It still does not crash for me with that script of yours.


Previous Comments:


[2009-03-16 13:04:09] phpbugs at rizzt dot kicks-ass dot org

Description:

I was able to reproduce the crash described in http://bugs.php.net/?
id=47616

Reproduce code:
---




Expected result:

done

Actual result:
--
Segmentation fault









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



#47674 [NEW]: curl_setopt segfault

2009-03-16 Thread phpbugs at rizzt dot kicks-ass dot org
From: phpbugs at rizzt dot kicks-ass dot org
Operating system: linux
PHP version:  5.2.9
PHP Bug Type: Reproducible crash
Bug description:  curl_setopt segfault

Description:

I was able to reproduce the crash described in http://bugs.php.net/?
id=47616

Reproduce code:
---




Expected result:

done

Actual result:
--
Segmentation fault





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



#47671 [Opn->Asn]: Cloning of SplObjectStorage is undefined

2009-03-16 Thread colder
 ID:   47671
 Updated by:   col...@php.net
 Reported By:  robert at typo3 dot org
-Status:   Open
+Status:   Assigned
 Bug Type: SPL related
 Operating System: Mac OS 10.5.6
 PHP Version:  5.3.0beta1
-Assigned To:  
+Assigned To:  colder


Previous Comments:


[2009-03-16 11:42:11] robert at typo3 dot org

Description:

After cloning an instance of SplObjectStorage the number of objects 
which can be retrieved with count() is very high and foreach() causes a

segfault.

Reproduce code:
---
class Foo {}

$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);

echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
echo ' x ';
}

$storageB = clone $storageA;
echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
echo ' x ';
}


Expected result:

Count storage A: 2 x x Count storage B: 2 x x

Actual result:
--
Count storage A: 2 x x Count storage B: 1953394499





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



#47673 [Com]: calling phpinfo() after tokenizer token_get_all() results in Segfault

2009-03-16 Thread serhii dot piddubchak at gmail dot com
 ID:   47673
 Comment by:   serhii dot piddubchak at gmail dot com
 Reported By:  serhii dot piddubchak at gmail dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.9
 New Comment:

I've found this bug:
http://bugs.php.net/bug.php?id=38449
It is exactly the same problem, but the latest comment was "Please
report FreeBSD bugs to FreeBSD peoples.". It doesn't look like a
solution since FreeBSD people won't fix this issue, It would be very
surprising if FreeBSD people must fix bugs in every piece of software
that is available for FreeBSD.
Moreover, previous bug was reported more then 2.5 years ago, PHP got a
5.2.8 version and FreeBSD got a 7.1 version. Looks for me that PHP
doesn't handle FreeBSD that well as Linux or Windows. If PHP compiles on
FreeBSD I expect it to work.


Previous Comments:


[2009-03-16 12:18:06] serhii dot piddubchak at gmail dot com

Description:

I'm getting a segmentation fault when trying to call phpinfo() after
token_get_all();
phpinfo() works fine if called before token_get_all();

Here is a short information about my system:
PHP Version 5.2.8
FreeBSD medved.hvosting.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan
22 09:27:15 UTC 2009 r...@free.ds:/usr/obj/usr/src/sys/ISPSYSTEM amd64

Build Date  Feb 11 2009 15:20:04

Configure Command   './configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=yes'
'--enable-reflection' '--program-prefix=' '--enable-fastcgi'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd7.1'

Server API  CGI/FastCGI

Also there is no extensions like eAccelerator or ZendOptimizer.
Also I tried it on another FreeBSD 6.1 system, PHP5.2.8 configured as
apache module, the bug wasn't reproducible. So, it looks like
CGI/FastCGI or 64bit arch issue. Thanks in advance for any help.

I can't install PHP5.2.9 because I don't own the server, it is a
hosting account but I think it is reproducible in 5.2.9 since I didn't
notice something relevant fixed in Changelog for 5.2.9

Reproduce code:
---


Expected result:

Expected result is to see full output from phpinfo()

Actual result:
--
The first summary table of phpinfo is printed, then process crashes
with core dump.

Here is a backtrace:
This GDB was configured as "amd64-marcel-freebsd"...(no debugging
symbols found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.

...

Reading symbols from /lib/libc.so.7...(no debugging symbols
found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/tokenizer.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/tokenizer.so

...

#0  0x00080121ee80 in ?? ()
[New Thread 0x8012b5180 (LWP 100392)]
(gdb) bt
#0  0x00080121ee80 in ?? ()
#1  0x005065e1 in zend_html_puts ()
#2  0x00494738 in php_print_info ()
#3  0x004948ae in zif_phpinfo ()
#4  0x005397d2 in zend_do_fcall_common_helper_SPEC ()
#5  0x0052ba87 in execute ()
#6  0x0050f177 in zend_execute_scripts ()
#7  0x004d2767 in php_execute_script ()
#8  0x00586773 in main ()





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



#47673 [NEW]: calling phpinfo() after tokenizer token_get_all() results in Segfault

2009-03-16 Thread serhii dot piddubchak at gmail dot com
From: serhii dot piddubchak at gmail dot com
Operating system: FreeBSD 7.1
PHP version:  5.2.9
PHP Bug Type: Reproducible crash
Bug description:  calling phpinfo() after tokenizer token_get_all() results in 
Segfault

Description:

I'm getting a segmentation fault when trying to call phpinfo() after
token_get_all();
phpinfo() works fine if called before token_get_all();

Here is a short information about my system:
PHP Version 5.2.8
FreeBSD medved.hvosting.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 22
09:27:15 UTC 2009 r...@free.ds:/usr/obj/usr/src/sys/ISPSYSTEM amd64

Build Date  Feb 11 2009 15:20:04

Configure Command   './configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=yes'
'--enable-reflection' '--program-prefix=' '--enable-fastcgi'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd7.1'

Server API  CGI/FastCGI

Also there is no extensions like eAccelerator or ZendOptimizer.
Also I tried it on another FreeBSD 6.1 system, PHP5.2.8 configured as
apache module, the bug wasn't reproducible. So, it looks like CGI/FastCGI
or 64bit arch issue. Thanks in advance for any help.

I can't install PHP5.2.9 because I don't own the server, it is a hosting
account but I think it is reproducible in 5.2.9 since I didn't notice
something relevant fixed in Changelog for 5.2.9

Reproduce code:
---


Expected result:

Expected result is to see full output from phpinfo()

Actual result:
--
The first summary table of phpinfo is printed, then process crashes with
core dump.

Here is a backtrace:
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols
found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.

...

Reading symbols from /lib/libc.so.7...(no debugging symbols
found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/tokenizer.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/tokenizer.so

...

#0  0x00080121ee80 in ?? ()
[New Thread 0x8012b5180 (LWP 100392)]
(gdb) bt
#0  0x00080121ee80 in ?? ()
#1  0x005065e1 in zend_html_puts ()
#2  0x00494738 in php_print_info ()
#3  0x004948ae in zif_phpinfo ()
#4  0x005397d2 in zend_do_fcall_common_helper_SPEC ()
#5  0x0052ba87 in execute ()
#6  0x0050f177 in zend_execute_scripts ()
#7  0x004d2767 in php_execute_script ()
#8  0x00586773 in main ()

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



#47672 [NEW]: public attribute within class initial value issue

2009-03-16 Thread jimmyp2 at freemail dot gr
From: jimmyp2 at freemail dot gr
Operating system: windows 2003 std edition sp2
PHP version:  5.2.9
PHP Bug Type: Scripting Engine problem
Bug description:  public attribute within class initial value issue

Description:

Hello,

while testing this new release i noticed that declaring a public attribute
the way is shown in the "Reproduce code" section below no error/exception
is issued by the scripting engine's parser. Is this a
normal  behaviour ?

Web server used : Apache v. 2.2.11
PHP version : 5.2.9-1


Thank you.


Reproduce code:
---



Expected result:

a parser error issued.


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



#47671 [NEW]: Cloning of SplObjectStorage is undefined

2009-03-16 Thread robert at typo3 dot org
From: robert at typo3 dot org
Operating system: Mac OS 10.5.6
PHP version:  5.3.0beta1
PHP Bug Type: SPL related
Bug description:  Cloning of SplObjectStorage is undefined

Description:

After cloning an instance of SplObjectStorage the number of objects 
which can be retrieved with count() is very high and foreach() causes a 
segfault.

Reproduce code:
---
class Foo {}

$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);

echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
echo ' x ';
}

$storageB = clone $storageA;
echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
echo ' x ';
}


Expected result:

Count storage A: 2 x x Count storage B: 2 x x

Actual result:
--
Count storage A: 2 x x Count storage B: 1953394499

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



#47667 [Opn->Csd]: ZipArchive::OVERWRITE seems to have no effect

2009-03-16 Thread mkoppanen
 ID:   47667
 Updated by:   mkoppa...@php.net
 Reported By:  mkoppa...@php.net
-Status:   Open
+Status:   Closed
 Bug Type: Zip Related
 Operating System: Debian Linux
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-03-15 21:55:01] mkoppa...@php.net

Description:

ZipArchive::OVERWRITE flag has no effect. Even if the flag is passed to
ZipArchive::open method new files seem to be appended rather than
overwrite the existing files.

Reproduce code:
---
open($File, ZipArchive::CREATE);

if($res === true)
   {
  $zip->addFromString('foo.txt', 'foo bar foobar');
  $zip->close();

  echo "ok\n";
   }

else
   {
  echo "failed errno: ". $res ."\n\n";
   }

unset($zip);


$zip = new ZipArchive;
$res = $zip->open($File, ZipArchive::OVERWRITE);

if($res === true)
   {
  $zip->addFromString('bar.txt', 'foo bar foobar');
  $zip->close();

  echo "ok\n";
   }

else
   {
  echo "failed errno: ". $res ."\n\n";
   }

unset($zip);

Expected result:

Zip file containing bar.txt

Actual result:
--
Zip file containing foo.txt and bar.txt





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



#47664 [Asn->Csd]: get_class returns NULL instead of FALSE.

2009-03-16 Thread dmitry
 ID:   47664
 Updated by:   dmi...@php.net
 Reported By:  wiebe at wiebelt dot nl
-Status:   Assigned
+Status:   Closed
 Bug Type: Class/Object related
 Operating System: Ubuntu 8.10
 PHP Version:  5.3.0beta1
 Assigned To:  dmitry
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-03-15 18:10:28] paj...@php.net

hm, you are right. It should remain the same especially as it is
documented. Dmitry?



[2009-03-15 17:44:48] wiebe at wiebelt dot nl

The documentation says it should return false.

"Returns the name of the class of which object is an instance. Returns

FALSE if object is not an object."

It's very inconsistent if in PHP 5.2 it returns false and in 5.3 null.



[2009-03-15 15:22:38] paj...@php.net

invalid argument returns NULL, not false.



[2009-03-15 15:13:59] wiebe at wiebelt dot nl

Description:

get_class returns NULL when using it with a string instead of FALSE.

Reproduce code:
---
http://bugs.php.net/?id=47664&edit=1



#47640 [Fbk->Opn]: Session does not close file in /tmp/

2009-03-16 Thread manuel dot schmitt at manitu dot de
 ID:   47640
 User updated by:  manuel dot schmitt at manitu dot de
 Reported By:  manuel dot schmitt at manitu dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

E.g. any S9Y installation does reproduce this. I cannot post this here
because it has lots of files.

BUT as I told you I said what I suppose. I suppose that scripts running
into any php limit (e.g. execution time) do not properly close the
session files. It does NOT happen when scripts are correctly finished!


Previous Comments:


[2009-03-15 12:19:31] j...@php.net

Please provide script(s) that reliably can be used to reproduce this. 
I can not reproduce this anywhere (even high traffic sites using 
sessions). Just saying something happens does not make it true..



[2009-03-15 11:24:15] manuel dot schmitt at manitu dot de

The most simple script at all



can cause the problem, please take my notes I posted before into
attention.



[2009-03-13 10:06:52] manuel dot schmitt at manitu dot de

Description:

PHP internal session handler does not correctly closes flock()s on
session files

Reproduce code:
---
(This bug seems the same issue as bug #32092)

The problem happens on various PHP applications, no matter what they do
exactly. Only one same thing: They are all using PHP sessions.

In these cases Apache/PHP-processes hanging forever (until killed). I
have strace'd the processed, they are hanging on flock()ing the session
file as

   flock(FILE_ID, LOCK_EX, )

where FILE_ID is a /tmp/sess_XXX-File (not on NFS, just local) [I have
traced this from /proc/PROCID/fd/FILE_ID which links to the session
file]

I suppose that there was an php process flock()ing the file, perhaps
running into max_execution_time, not unflocking the session file
correctly and other processed wanting to write session data.


Expected result:

PHP session handler should have some timeout and/or old file locks
should be hard-broken.

Actual result:
--
Forever-Hanging php processes.





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



#47670 [NEW]: issue w/ zlib.output_compression + mysql.trace_mode + "result set not freed"

2009-03-16 Thread ch+php at 1111-internet dot com
From: ch+php at -internet dot com
Operating system: freebsd 7.0
PHP version:  5.2.9
PHP Bug Type: Zlib Related
Bug description:  issue w/ zlib.output_compression + mysql.trace_mode + "result 
set not freed"

Description:

Seeing some unexpected behavior when getting a mysql "result set not
freed" warning while using zlib.output_compression + mysql.trace_mode - the
warning is not displayed, and getting some intermittent reload behavior in
IE6 if the page also has a large amount of content

Reproduce code:
---


Expected result:

25 random ASCII characters followed by:

Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free
result sets which were requested using mysql_query() in Unknown on line 0


Actual result:
--
Firefox: 25 random ASCII characters, no warning
IE6: same, plus intermittent reload behavior


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



#47669 [NEW]: iconv memory leak

2009-03-16 Thread vGhost2000 at gmail dot com
From: vGhost2000 at gmail dot com
Operating system: Linux 2.6.24-23-xen SMP x86_64
PHP version:  5.2.9
PHP Bug Type: ICONV related
Bug description:  iconv memory leak

Description:

When "Iconv" and "Multibyte String" library classes operate on "SimpleXML"
object a memory leak occures while processing "SimpleXML" string objects.
If "SimpleXML" string object is converted into an "ordinal" string before
the control is being passed to routines from "Iconv" and "Multibyte String"
libraries the memory leak doesn't occur. 
--
System Linux 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64
Apache Version Apache/2.2.8 (Ubuntu)
PHP Version 5.2.4-2ubuntu5.5 with Suhosin-Patch
Server API Apache 2.0 Handler
Zend Engine v2.2.0

phpinfo():
http://79.170.152.11/phpinf.php

Reproduce code:
---
some string');

For($i = 0; $i < 1000; $i++)
{
$tmp = IConv('UTF-8', 'UTF-8//TRANSLIT', $sxml->el);
# v1
//$tmp = mb_StrToLower($sxml->el);  
# v2
//$tmp = IConv('UTF-8', 'UTF-8//TRANSLIT', (string)$sxml->el);  
# v3
//$tmp = mb_StrToLower((string)$sxml->el);  
# v4
UnSet($tmp);
If(!($i % 100))
{
Echo $i . ' - ' . Number_Format(Memory_Get_Usage()) . "\n";
}
}
?>

Expected result:

In example the first and the second variants demonstrate memory leak. The
third and the fourth variants show that some extra conversions help to
avoid the memory leak.

The results of the script execution.

v1:
0 - 103,352
100 - 185,816
200 - 268,232
300 - 350,632
400 - 433,032
500 - 515,432
600 - 646,984
700 - 729,384
800 - 811,800
900 - 894,200

v2:
0 - 103,080
100 - 185,584
200 - 268,016
300 - 350,416
400 - 432,816
500 - 515,216
600 - 646,800
700 - 729,200
800 - 811,600
900 - 894,000

v3:
0 - 103,400
100 - 103,456
200 - 103,456
300 - 103,456
400 - 103,456
500 - 103,456
600 - 103,456
700 - 103,456
800 - 103,456
900 - 103,456

v4:
0 - 103,128
100 - 103,184
200 - 103,184
300 - 103,184
400 - 103,184
500 - 103,184
600 - 103,184
700 - 103,184
800 - 103,184
900 - 103,184



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