#43073 [Asn-Csd]: TrueType bounding box is wrong for angle0

2009-05-06 Thread pajoye
 ID:   43073
 Updated by:   paj...@php.net
 Reported By:  lbayuk at pobox dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: GD related
 Operating System: Linux
 PHP Version:  5.2CVS-2008-11-02
-Assigned To:  pajoye
+Assigned To:  tabe
 New Comment:

Tabe applied it to HEAD and added tests upstream (libgd).


Previous Comments:


[2009-03-18 00:32:57] paj...@php.net

Thanks for your patch, applied to 5.3!

I will merge it to HEAD and add a test later this week, after 5.3.0RC1.



[2009-03-17 17:24:54] mmcnicklebugs at googlemail dot com

[PATCH]

For reference: pre-patch image of test-case [1]

The problem was due to using the wrong center of rotation when rotating
the bounding box. I've written a patch [2] to set the correct the
coordinates. This appears to have fixed the problem as seen in this
image [3].

In image [3] the bounding boxes don't seem to correspond to the actual
bounds of the text (the fitting is a bit loose). Do you think this is
another (separate) bug?

[1] http://whompbox.com/patches/php/gd/43073/ttf_bug.png
[2] http://whompbox.com/patches/php/gd/43073/gdft.patch
[3] http://whompbox.com/patches/php/gd/43073/ttf_fix.png

-- Martin McNickle



[2008-11-02 22:16:31] lbayuk at pobox dot com

I tried php5.2-200811022130 (PHP 5.2.7RC3-dev).
The problem is still there, and the image is identical to PHP-5.2.6.
(I was using 5.2.4 when I originally submitted this report, so I
changed the version in the report to 5.2.6).



[2008-11-02 13:07:53] 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/





[2007-10-23 00:18:33] lbayuk at pobox dot com

Description:

The bounding box returned from imagettfbbox() and imagettftext() is
incorrect for anything except horizontal text at 0 degrees. For all
other angles, the text is partially or completely outside the returned
bounding box. (Yes, somebody reported the same problem in #37730, but
that was marked no feedback and is not getting any attention. Could
someone please-please look at this issue?) The PHP script below
demonstrates. Using the bundled GD library, and any TrueType font.

Change $font to point to any TrueType font file you have.
Run via PHP CLI, sending out to filename.png and view, or access via
browser.

I wrote an equivalent C program with gd-2.0.35 (Slackware 12.0 Linux
distribution), and the bounding boxes are correct. So there is probably
something wrong in the GD library bundled with PHP.

Reproduce code:
---
?php
$font = '/usr/share/fonts/TTF/luximr.ttf'; # Full path to any TTF Font
$delta_t = 360.0 / 16; # Make 16 steps around
$g = imagecreate(800, 800);
$bgnd  = imagecolorallocate($g, 255, 255, 255);
$black = imagecolorallocate($g, 0, 0, 0);
$x = 100;
$y = 0;
$cos_t = cos(deg2rad($delta_t));
$sin_t = sin(deg2rad($delta_t));
for ($angle = 0.0; $angle  360.0; $angle += $delta_t) {
  $bbox = imagettftext($g, 24, $angle, 400+$x, 400+$y, $black, $font,
'ABCDEF');
  imagepolygon($g, $bbox, 4, $black);
  imagefilledellipse($g, $bbox[0], $bbox[1], 8, 8, $black);
  $temp = $cos_t * $x + $sin_t * $y;
  $y= $cos_t * $y - $sin_t * $x;
  $x= $temp;
}
header(Content-type: image/png);
imagepng($g);

Expected result:

In the image output: For each angle of text, the box should enclose the
text, with the dot to the lower left (relative to the text baseline) of
the first character in the string.


Actual result:
--
The bounding box for 0 degree text is correct. All the others are off
by different amounts. Worst is the text between 180 and 270 degrees,
where the text is completely outside the bounding box.






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



#47605 [Fbk-Opn]: CGI SAPI can not send HTTP 200 header

2009-05-06 Thread c dot c dot dean at durham dot ac dot uk
 ID:   47605
 User updated by:  c dot c dot dean at durham dot ac dot uk
 Reported By:  c dot c dot dean at durham dot ac dot uk
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-04-25)
 New Comment:

Yes, if you use Status: 200 OK, it does work, so I guess
that's a workaround, but it's not very intuitive for this
to behave differently to HTTP/1.0 200 OK.

Thanks,

Colin


Previous Comments:


[2009-05-05 18:45:03] lbarn...@php.net

Does it works with a Status: 200 OK header instead of HTTP/1.0 200
OK ?



[2009-04-27 09:52:56] c dot c dot dean at durham dot ac dot uk

With cgi.nph = 0, no status header is output unless you invoke
header(), and then only if your status code isn't 200.

With cgi.nph = 1, a status header is always output, defaulting to 200
if header() is not invoked.

What I'd like, and other people have requested, is a situation where a 
  status header is output if and only if you invoke header(), and
without any special case for 200.

In my view, this should be the default behaviour, but if you think that
breaks backward compatibility, could you instead implement it by
allowing cgi.nph = 2 to trigger it?

Thanks,

Colin



[2009-04-25 16:00:05] j...@php.net

What have you set cgi.nph to? Try disabling it first.

(See also bug #27026 as this fix changed the behaviour)





[2009-03-09 14:45:38] c dot c dot dean at durham dot ac dot uk

Description:

If you invoke header(HTTP/1.0 200 OK); from PHP in CGI mode, the
header is never output, because it's suppressed at line 379 in
sapi/cgi/cgi_main.c.  If you use any value other than 200, it is output
correctly.

This means for instance, that if you use PHP in CGI mode as an Apache
errordocument handler, you cannot send back a non-error 200 OK to the
user.

The following trivial change fixes this, but you might prefer a more
elegant solution.

--- php-5.2.9/sapi/cgi/cgi_main.c.orig   2009-01-19 18:17:59.0
+
+++ php-5.2.9/sapi/cgi/cgi_main.c   2009-03-09 14:04:11.0
+
@@ -376,7 +376,7 @@
return  SAPI_HEADER_SENT_SUCCESSFULLY;
}

-   if (CGIG(nph) || SG(sapi_headers).http_response_code != 200)
+   if (CGIG(nph) || SG(sapi_headers).http_response_code != 666)
{
int len;
zend_bool has_status = 0;
@@ -914,7 +914,7 @@
SG(request_info).request_uri = NULL;
SG(request_info).content_type = NULL;
SG(request_info).content_length = 0;
-   SG(sapi_headers).http_response_code = 200;
+   SG(sapi_headers).http_response_code = 666;

/* script_path_translated being set is a good indication that
   we are running in a cgi environment, since it is always


Reproduce code:
---
Use this as the Apache errordocument handler:

?php
  header(HTTP/1.0 200 OK);
  echo This is OK;
?


Expected result:

HTTP/1.0 200 OK in the header and This is OK in the body

Actual result:
--
HTTP/1.0 404 Not Found





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



#41670 [Com]: ReflectionProperty class in reflection api lacks getDefaultValue method

2009-05-06 Thread no2spam at chello dot nl
 ID:  41670
 Comment by:  no2spam at chello dot nl
 Reported By: killgec at gmail dot com
 Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: 5.2.3
 New Comment:

This would be very useful for me. Especially for code generation


Previous Comments:


[2007-06-12 11:45:45] killgec at gmail dot com

Description:

ReflectionProperty class in reflection api lacks getDefaultValue
method.

So there is no way to find out if a property in a class examined with
reflection API has a default value, and what this value is.






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



#48160 [NEW]: the arabic language does not appear in drop down list

2009-05-06 Thread aminay1986 at hotmail dot com
From: aminay1986 at hotmail dot com
Operating system: windows 7/xp/vista
PHP version:  5.2.9
PHP Bug Type: Dynamic loading
Bug description:  the arabic language does not appear in drop down list

Description:

the code is Ajax Country/Area Drop-down List Example but on oracle not on
mysql , the code must appear the area or on my code subcategory drop down
list in Arabic but it is appear as stars ,you make encode as windows 1256
and utf-8 and does not appear what the solution,if there is a solution for
populate drop down list from another on oracle send to me,thanks for
interest

Reproduce code:
---
 ?php

// This is a very simple data provider for the cascading dropdown
// example. A *real* data provider would most likely connect to
// a database, use xslt and implement some level of security.
Header(Content-type: text/xml);
// get query string params
//$filter = $_GET['filter'];
$filter  = 1;
$xml = '';
$iscountry = 1;
//   // build xml content for client JavaScript
$conn =
oci_connect(mohammadabed,0599397083,172.16.209.23:1521/XE) or
die(couldnot conncet to database);

$query = SELECT * from DOC_categories where ID_PERANT_DOC_CATEGORIES =
'$filter';

$stmt = oci_parse($conn ,$query);
oci_execute($stmt);
while ($row = oci_fetch_array ($stmt, OCI_BOTH))
{
if ($iscountry == 1)
{
$xml = $xml . 'continent name=' . $filter . '';
}
$xml  = $xml . 'country id=' . $iscountry . '' .   $row[1] .
'/country';
  // $xml= convert_uuencode($xml);
//echo the value is .$row[1];
$iscountry = $iscountry + 1;
}
$xml = $xml . '/continent';

if ($iscountry == 1)
{
$xml = $xml . 'continent name=none';
$xml = $xml . 'country id=0no element found/country';
$xml = $xml . '/continent';
}
// send xml to client
echo ($xml);

?



Expected result:

the second drop down list appear in Arabic as in database

Actual result:
--
the second drop down list appear in stars or asterisks not as in database

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



#48134 [Opn]: php crash after a few days (backtrace attached)

2009-05-06 Thread jimbobpalmer at gmail dot com
 ID:   48134
 User updated by:  jimbobpalmer at gmail dot com
 Reported By:  jimbobpalmer at gmail dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Gentoo
 PHP Version:  5.2.9
 New Comment:

Do you need any more information?


Previous Comments:


[2009-05-05 20:44:17] jimbobpalmer at gmail dot com

[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace backtrace for sig 11
(thread pid 9925)
[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace main() is at 8066050
/usr/lib/apache2/modules/mod_backtrace.so[0xb7b6ba9a]
/usr/sbin/apache2(ap_run_fatal_exception+0x3f)[0x80827ef]
/usr/sbin/apache2[0x8082be8]
[0xb7f81400]
/usr/lib/apache2/modules/libphp5.so(apply_config+0xa9)[0xb7670f6f]
/usr/lib/apache2/modules/libphp5.so[0xb767031e]
/usr/sbin/apache2(ap_run_handler+0x57)[0x807a127]
/usr/sbin/apache2(ap_invoke_handler+0x91)[0x807d4b1]
/usr/sbin/apache2(ap_process_request+0x196)[0x80887e6]
/usr/sbin/apache2[0x80857d8]
/usr/sbin/apache2(ap_run_process_connection+0x57)[0x80814b7]
/usr/sbin/apache2[0x808e6ac]
/usr/lib/libapr-1.so.0[0xb7d91e8e]
/lib/libpthread.so.0[0xb7d1e19b]
/lib/libc.so.6(clone+0x5e)[0xb7ca286e]
[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace end of backtrace

(gdb) bt
#0  0xb7f81424 in __kernel_vsyscall ()
#1  0xb7d2565b in read () from /lib/libpthread.so.0
#2  0x080906e4 in ap_mpm_pod_check ()
#3  0x0808ea35 in ?? ()
#4  0x098c39c8 in ?? ()
#5  0x0808ca30 in ?? ()
#6  0x0808ec50 in ?? ()
#7  0x09888498 in ?? ()
#8  0x09888408 in ?? ()
#9  0x in ?? ()



[2009-05-05 13:54:51] jimbobpalmer at gmail dot com

I've rebuilt php with the debug flag so that the next backtrace is more
useful.

Please can you change the status of this bug to open. Thanks.



[2009-05-05 13:33:19] jimbobpalmer at gmail dot com

backtrace from coredump:

#0  0xb7612052 in apply_config () from
/usr/lib/apache2/modules/libphp5.so
#1  0xb76114af in ?? () from /usr/lib/apache2/modules/libphp5.so
#2  0x08987108 in ?? ()
#3  0x0ad8b230 in ?? ()
#4  0xb76107c0 in ?? () from /usr/lib/apache2/modules/libphp5.so
#5  0x08063c00 in __ctype_toupper_...@plt ()
#6  0x0aa8b098 in ?? ()
#7  0x0aa8b060 in ?? ()
#8  0xa42b8188 in ?? ()
#9  0xb7d0dff4 in ?? () from /usr/lib/libapr-1.so.0
#10 0x08987108 in ?? ()
#11 0x0ad8b180 in ?? ()
#12 0x0ad8b198 in ?? ()
#13 0xb7cf7c1f in apr_table_setn () from /usr/lib/libapr-1.so.0
#14 0x0807a127 in ap_run_handler ()
#15 0x0807d4b1 in ap_invoke_handler ()
#16 0x080887e6 in ap_process_request ()
#17 0x080857d8 in ?? ()
#18 0x0aa89428 in ?? ()
#19 0x0004 in ?? ()
#20 0x0aa89428 in ?? ()
#21 0x in ?? ()

I can't supply the coredump due to policy reasons, but I can run more
commands if you need me to with gdb.



[2009-05-05 13:31:15] jimbobpalmer at gmail dot com

With 5.2.9:

[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace backtrace for sig 11
(thread pid 27627)
[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace main() is at
8066050
/usr/lib/apache2/modules/mod_backtrace.so[0xb7ae2a9a]
/usr/sbin/apache2(ap_run_fatal_exception+0x3f)[0x80827ef]
/usr/sbin/apache2[0x8082be8]
[0xb7ef8400]
/usr/lib/apache2/modules/libphp5.so[0xb76114af]
/usr/sbin/apache2(ap_run_handler+0x57)[0x807a127]
/usr/sbin/apache2(ap_invoke_handler+0x91)[0x807d4b1]
/usr/sbin/apache2(ap_process_request+0x196)[0x80887e6]
/usr/sbin/apache2[0x80857d8]
/usr/sbin/apache2(ap_run_process_connection+0x57)[0x80814b7]
/usr/sbin/apache2[0x808e6ac]
/usr/lib/libapr-1.so.0[0xb7d08e8e]
/lib/libpthread.so.0[0xb7c9519b]
/lib/libc.so.6(clone+0x5e)[0xb7c1986e]
[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace end of backtrace



[2009-05-03 12:33:59] j...@php.net

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.





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

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



#48134 [Opn-Fbk]: php crash after a few days (backtrace attached)

2009-05-06 Thread lbarnaud
 ID:   48134
 Updated by:   lbarn...@php.net
 Reported By:  jimbobpalmer at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Gentoo
 PHP Version:  5.2.9
 New Comment:

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.

A gdb backtrace would be helpful. Allow your apache user to generate
large enough core files, remove mod_backtrace, and wait for core files
to appear. Then load them in gdb and send a gdb backtrace.


Previous Comments:


[2009-05-06 09:18:03] jimbobpalmer at gmail dot com

Do you need any more information?



[2009-05-05 20:44:17] jimbobpalmer at gmail dot com

[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace backtrace for sig 11
(thread pid 9925)
[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace main() is at 8066050
/usr/lib/apache2/modules/mod_backtrace.so[0xb7b6ba9a]
/usr/sbin/apache2(ap_run_fatal_exception+0x3f)[0x80827ef]
/usr/sbin/apache2[0x8082be8]
[0xb7f81400]
/usr/lib/apache2/modules/libphp5.so(apply_config+0xa9)[0xb7670f6f]
/usr/lib/apache2/modules/libphp5.so[0xb767031e]
/usr/sbin/apache2(ap_run_handler+0x57)[0x807a127]
/usr/sbin/apache2(ap_invoke_handler+0x91)[0x807d4b1]
/usr/sbin/apache2(ap_process_request+0x196)[0x80887e6]
/usr/sbin/apache2[0x80857d8]
/usr/sbin/apache2(ap_run_process_connection+0x57)[0x80814b7]
/usr/sbin/apache2[0x808e6ac]
/usr/lib/libapr-1.so.0[0xb7d91e8e]
/lib/libpthread.so.0[0xb7d1e19b]
/lib/libc.so.6(clone+0x5e)[0xb7ca286e]
[Tue May  5 18:12:50 2009] pid 9925 mod_backtrace end of backtrace

(gdb) bt
#0  0xb7f81424 in __kernel_vsyscall ()
#1  0xb7d2565b in read () from /lib/libpthread.so.0
#2  0x080906e4 in ap_mpm_pod_check ()
#3  0x0808ea35 in ?? ()
#4  0x098c39c8 in ?? ()
#5  0x0808ca30 in ?? ()
#6  0x0808ec50 in ?? ()
#7  0x09888498 in ?? ()
#8  0x09888408 in ?? ()
#9  0x in ?? ()



[2009-05-05 13:54:51] jimbobpalmer at gmail dot com

I've rebuilt php with the debug flag so that the next backtrace is more
useful.

Please can you change the status of this bug to open. Thanks.



[2009-05-05 13:33:19] jimbobpalmer at gmail dot com

backtrace from coredump:

#0  0xb7612052 in apply_config () from
/usr/lib/apache2/modules/libphp5.so
#1  0xb76114af in ?? () from /usr/lib/apache2/modules/libphp5.so
#2  0x08987108 in ?? ()
#3  0x0ad8b230 in ?? ()
#4  0xb76107c0 in ?? () from /usr/lib/apache2/modules/libphp5.so
#5  0x08063c00 in __ctype_toupper_...@plt ()
#6  0x0aa8b098 in ?? ()
#7  0x0aa8b060 in ?? ()
#8  0xa42b8188 in ?? ()
#9  0xb7d0dff4 in ?? () from /usr/lib/libapr-1.so.0
#10 0x08987108 in ?? ()
#11 0x0ad8b180 in ?? ()
#12 0x0ad8b198 in ?? ()
#13 0xb7cf7c1f in apr_table_setn () from /usr/lib/libapr-1.so.0
#14 0x0807a127 in ap_run_handler ()
#15 0x0807d4b1 in ap_invoke_handler ()
#16 0x080887e6 in ap_process_request ()
#17 0x080857d8 in ?? ()
#18 0x0aa89428 in ?? ()
#19 0x0004 in ?? ()
#20 0x0aa89428 in ?? ()
#21 0x in ?? ()

I can't supply the coredump due to policy reasons, but I can run more
commands if you need me to with gdb.



[2009-05-05 13:31:15] jimbobpalmer at gmail dot com

With 5.2.9:

[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace backtrace for sig 11
(thread pid 27627)
[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace main() is at
8066050
/usr/lib/apache2/modules/mod_backtrace.so[0xb7ae2a9a]
/usr/sbin/apache2(ap_run_fatal_exception+0x3f)[0x80827ef]
/usr/sbin/apache2[0x8082be8]
[0xb7ef8400]
/usr/lib/apache2/modules/libphp5.so[0xb76114af]
/usr/sbin/apache2(ap_run_handler+0x57)[0x807a127]
/usr/sbin/apache2(ap_invoke_handler+0x91)[0x807d4b1]
/usr/sbin/apache2(ap_process_request+0x196)[0x80887e6]
/usr/sbin/apache2[0x80857d8]
/usr/sbin/apache2(ap_run_process_connection+0x57)[0x80814b7]
/usr/sbin/apache2[0x808e6ac]
/usr/lib/libapr-1.so.0[0xb7d08e8e]
/lib/libpthread.so.0[0xb7c9519b]
/lib/libc.so.6(clone+0x5e)[0xb7c1986e]
[Tue May  5 15:03:32 2009] pid 27627 mod_backtrace end of backtrace



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

-- 
Edit this bug report at 

#48158 [Opn]: Undefined class constant 'FETCH_KEY_PAIR'

2009-05-06 Thread felipe
 ID:   48158
 Updated by:   fel...@php.net
 Reported By:  d dot snytkine at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: RHEL 5
 PHP Version:  5.2.9
 New Comment:

I can't reproduce it. Please, check the PHP version again.


Previous Comments:


[2009-05-06 03:07:01] d dot snytkine at gmail dot com

Description:

Even though the documentation states that this constant is available as
of php 5.2.3, In PHP 5.2.9, attempts to use PDO::FETCH_KEY_PAIR result
in
PHP Fatal error:  Undefined class constant 'FETCH_KEY_PAIR' 








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



#48162 [NEW]: Support for standalone SOAP server

2009-05-06 Thread bostjan dot skufca at gmail dot com
From: bostjan dot skufca at gmail dot com
Operating system: Any
PHP version:  5.2.9
PHP Bug Type: SOAP related
Bug description:  Support for standalone SOAP server

Description:

I am trying to create a standalone SOAP server with PHP. So far the
results are close to NULL, because the SoapServer::handle() functions
throws an error complaining about headers being sent already.

It would be truly appreciated if support for STANDALONE SOAP service gets
implemented. All that needs to be done is to implement another handle*()
function, which, instead of using header() function (or PHP internal
equivalent) to send HTTP headers, returns every part of response as a
string.

Sample code:
(...here we create the listening socket etc...)
$clientSocket = socket_accept($listenSocket);
$soapRequest = socket_read($clientSocket, ...);
$soapResponse = SoapServer::handleToString($soapRequest);
socket_write($clientSocket, $soapResponse);
socket_close($clientSocket);



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



#48163 [NEW]: FILTER_CALLBACK generates strange results

2009-05-06 Thread redaction at nuxwin dot com
From: redaction at nuxwin dot com
Operating system: debian
PHP version:  5.2.9
PHP Bug Type: Filter related
Bug description:  FILTER_CALLBACK generates strange results

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result on
the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK, 'options'
= 'trim','flags'= FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)

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



#48163 [Opn]: FILTER_CALLBACK generates strange results

2009-05-06 Thread redaction at nuxwin dot com
 ID:   48163
 User updated by:  redaction at nuxwin dot com
 Reported By:  redaction at nuxwin dot com
 Status:   Open
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.9
 New Comment:

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre


Previous Comments:


[2009-05-06 11:48:36] redaction at nuxwin dot com

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result
on the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK,
'options' = 'trim','flags'=
FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)





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



#48158 [Com]: Undefined class constant 'FETCH_KEY_PAIR'

2009-05-06 Thread s dot snytkine at gmail dot com
 ID:   48158
 Comment by:   s dot snytkine at gmail dot com
 Reported By:  d dot snytkine at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: RHEL 5
 PHP Version:  5.2.9
 New Comment:

The is some info from my phpinfo:
php version 5.2.9

was build with these config options:
'--enable-pdo=shared' '--with-pdo-mysql=shared'
'--with-pdo-sqlite=shared' '--with-sqlite=shared' 

Further down in phpinfo:
PDO drivers mysql 

and then:
pdo_mysql
PDO Driver for MySQL, client library version5.0.45


Then in php.ini I have:
extension=rar.so
extension=memcache.so
extension=memcached.so
extension=pdo.so
extension=pdo_mysql.so
extension=mailparse.so
extension=uploadprogress.so


Previous Comments:


[2009-05-06 11:01:26] fel...@php.net

I can't reproduce it. Please, check the PHP version again.



[2009-05-06 03:07:01] d dot snytkine at gmail dot com

Description:

Even though the documentation states that this constant is available as
of php 5.2.3, In PHP 5.2.9, attempts to use PDO::FETCH_KEY_PAIR result
in
PHP Fatal error:  Undefined class constant 'FETCH_KEY_PAIR' 








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



#48164 [NEW]: Script stops during a while

2009-05-06 Thread uvealonso at gmail dot com
From: uvealonso at gmail dot com
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Performance problem
Bug description:  Script stops during a while

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it stops
10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end

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



#48158 [Com]: Undefined class constant 'FETCH_KEY_PAIR'

2009-05-06 Thread d dot snytkine at gmail dot com
 ID:   48158
 Comment by:   d dot snytkine at gmail dot com
 Reported By:  d dot snytkine at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: RHEL 5
 PHP Version:  5.2.9
 New Comment:

I have just rebuild my php this time making pdo and pdo_mysql static
instead of shared and if fixed the problem

I guess that there really must be a bug when pdo and pdo_mysql are
built as shared modules
because even some other constants were not available when pdo was a
shared module.

There 2 were not available also:
PDO::ATTR_DEFAULT_FETCH_MODE

PDO::FETCH_PROPS_LATE

even though there we supposed to be available since php 5.2.0 there
were not available on php 5.2.9 when pdo was built as shared module


Previous Comments:


[2009-05-06 12:49:31] s dot snytkine at gmail dot com

The is some info from my phpinfo:
php version 5.2.9

was build with these config options:
'--enable-pdo=shared' '--with-pdo-mysql=shared'
'--with-pdo-sqlite=shared' '--with-sqlite=shared' 

Further down in phpinfo:
PDO drivers mysql 

and then:
pdo_mysql
PDO Driver for MySQL, client library version5.0.45


Then in php.ini I have:
extension=rar.so
extension=memcache.so
extension=memcached.so
extension=pdo.so
extension=pdo_mysql.so
extension=mailparse.so
extension=uploadprogress.so



[2009-05-06 11:01:26] fel...@php.net

I can't reproduce it. Please, check the PHP version again.



[2009-05-06 03:07:01] d dot snytkine at gmail dot com

Description:

Even though the documentation states that this constant is available as
of php 5.2.3, In PHP 5.2.9, attempts to use PDO::FETCH_KEY_PAIR result
in
PHP Fatal error:  Undefined class constant 'FETCH_KEY_PAIR' 








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



#48160 [Opn-Bgs]: the arabic language does not appear in drop down list

2009-05-06 Thread jani
 ID:   48160
 Updated by:   j...@php.net
 Reported By:  aminay1986 at hotmail dot com
-Status:   Open
+Status:   Bogus
-Bug Type: Dynamic loading
+Bug Type: *General Issues
 Operating System: windows 7/xp/vista
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-05-06 08:48:11] aminay1986 at hotmail dot com

Description:

the code is Ajax Country/Area Drop-down List Example but on oracle not
on mysql , the code must appear the area or on my code subcategory drop
down list in Arabic but it is appear as stars ,you make encode as
windows 1256 and utf-8 and does not appear what the solution,if there is
a solution for populate drop down list from another on oracle send to
me,thanks for interest

Reproduce code:
---
 ?php

// This is a very simple data provider for the cascading dropdown
// example. A *real* data provider would most likely connect to
// a database, use xslt and implement some level of security.
Header(Content-type: text/xml);
// get query string params
//$filter = $_GET['filter'];
$filter  = 1;
$xml = '';
$iscountry = 1;
//   // build xml content for client JavaScript
$conn =
oci_connect(mohammadabed,0599397083,172.16.209.23:1521/XE) or
die(couldnot conncet to database);

$query = SELECT * from DOC_categories where ID_PERANT_DOC_CATEGORIES
= '$filter';

$stmt = oci_parse($conn ,$query);
oci_execute($stmt);
while ($row = oci_fetch_array ($stmt, OCI_BOTH))
{
if ($iscountry == 1)
{
$xml = $xml . 'continent name=' . $filter . '';
}
$xml  = $xml . 'country id=' . $iscountry . '' .   $row[1]
. '/country';
  // $xml= convert_uuencode($xml);
//echo the value is .$row[1];
$iscountry = $iscountry + 1;
}
$xml = $xml . '/continent';

if ($iscountry == 1)
{
$xml = $xml . 'continent name=none';
$xml = $xml . 'country id=0no element found/country';
$xml = $xml . '/continent';
}
// send xml to client
echo ($xml);

?



Expected result:

the second drop down list appear in Arabic as in database

Actual result:
--
the second drop down list appear in stars or asterisks not as in
database





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



#48164 [Opn-Fbk]: Script stops during a while

2009-05-06 Thread fa
 ID:   48164
 Updated by:   f...@php.net
 Reported By:  uvealonso at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


I really think we need even a rough description what func_modify()
does. From your description it could be a single complicated task or
something with thousands of iterations


Previous Comments:


[2009-05-06 13:01:00] uvealonso at gmail dot com

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it
stops 10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end





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



#48157 [Opn-Bgs]: Query doesnt appear until I refresh the page

2009-05-06 Thread jani
 ID:   48157
 Updated by:   j...@php.net
 Reported By:  milton at theblokgroup dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Fedora
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-05-05 21:01:20] milton at theblokgroup dot com

Description:

Hi, I have created a basic php script that queries a mysql database and
displays the information using a while loop.

Sometimes, when a user visits the website page, none of the queries
show up but once you refresh the page, they appear.

I have modified max_connections in my.cnf, that is not the problem.  I
have also tried recoding it, that didn't help.  Any suggestions would be
great!

Reproduce code:
---
?php
$sqlrecc = mysql_query(SELECT * FROM events WHERE active = '1' AND
home = '1' ORDER BY first_date ASC LIMIT 5);
while($rowrecc = mysql_fetch_assoc($sqlrecc))
{
echo pa
href=\viewevent.php?id=.$rowrecc['id'].\.ucwords($rowrecc['event_name']).
raquo;/abr /;
echo
ucwords($rowrecc['event_date']).br/.ucwords($rowrecc['location'])./p;
}
?

Expected result:

The data should always appear.

Actual result:
--
The link to the actual page is: http://www.latinograduate.com/index.php





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



#48163 [Opn-Fbk]: FILTER_CALLBACK generates strange results

2009-05-06 Thread jani
 ID:   48163
 Updated by:   j...@php.net
 Reported By:  redaction at nuxwin dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.9
 New Comment:

Please try using this CVS snapshot:

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

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

Works fine for me..


Previous Comments:


[2009-05-06 11:50:29] redaction at nuxwin dot com

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre



[2009-05-06 11:48:36] redaction at nuxwin dot com

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result
on the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK,
'options' = 'trim','flags'=
FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)





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



#48163 [Fbk]: FILTER_CALLBACK generates strange results

2009-05-06 Thread fa
 ID:   48163
 Updated by:   f...@php.net
 Reported By:  redaction at nuxwin dot com
 Status:   Feedback
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.9
 New Comment:

works fine for me with 5.2.9 release and CLI


Previous Comments:


[2009-05-06 13:40:06] 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/

Works fine for me..



[2009-05-06 11:50:29] redaction at nuxwin dot com

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre



[2009-05-06 11:48:36] redaction at nuxwin dot com

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result
on the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK,
'options' = 'trim','flags'=
FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)





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



#48163 [Com]: FILTER_CALLBACK generates strange results

2009-05-06 Thread redaction at nuxwin dot com
 ID:   48163
 Comment by:   redaction at nuxwin dot com
 Reported By:  redaction at nuxwin dot com
 Status:   Feedback
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.9
 New Comment:

Hi;

sorry, my version is PHP Version 5.2.0. I go to try with later.

If you want, you can close it.


Previous Comments:


[2009-05-06 13:42:48] f...@php.net

works fine for me with 5.2.9 release and CLI



[2009-05-06 13:40:06] 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/

Works fine for me..



[2009-05-06 11:50:29] redaction at nuxwin dot com

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre



[2009-05-06 11:48:36] redaction at nuxwin dot com

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result
on the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK,
'options' = 'trim','flags'=
FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)





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



#48163 [Fbk-Opn]: FILTER_CALLBACK generates strange results

2009-05-06 Thread redaction at nuxwin dot com
 ID:   48163
 User updated by:  redaction at nuxwin dot com
 Reported By:  redaction at nuxwin dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filter related
 Operating System: debian
-PHP Version:  5.2.9
+PHP Version:  5.2.0
 New Comment:

changed version


Previous Comments:


[2009-05-06 13:48:17] redaction at nuxwin dot com

Hi;

sorry, my version is PHP Version 5.2.0. I go to try with later.

If you want, you can close it.



[2009-05-06 13:42:48] f...@php.net

works fine for me with 5.2.9 release and CLI



[2009-05-06 13:40:06] 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/

Works fine for me..



[2009-05-06 11:50:29] redaction at nuxwin dot com

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre



[2009-05-06 11:48:36] redaction at nuxwin dot com

Description:

HI all,

When I apply a one trim callback via filter, I get an erroneous result
on the display.

Sorry , i'm french...

Reproduce code:
---
$_SERVER['REMOTE_ADDR'] = '80.10.20.30  ';

$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' = $remote_addr_list),
array('remote_addr_list' = array('filter' = FILTER_CALLBACK,
'options' = 'trim','flags'=
FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));

I has this result :

echo 'pre';
print_r($remote_addr_list);
echo '/pre';


Expected result:

Array
(
[0] = 80.10.20.30
)

Actual result:
--
Array
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)





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



#48163 [Opn-Csd]: FILTER_CALLBACK generates strange results

2009-05-06 Thread redaction at nuxwin dot com
 ID:   48163
 User updated by:  redaction at nuxwin dot com
 Reported By:  redaction at nuxwin dot com
-Status:   Open
+Status:   Closed
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.0
 New Comment:

ok, close it !


Previous Comments:


[2009-05-06 13:52:02] redaction at nuxwin dot com

changed version



[2009-05-06 13:48:17] redaction at nuxwin dot com

Hi;

sorry, my version is PHP Version 5.2.0. I go to try with later.

If you want, you can close it.



[2009-05-06 13:42:48] f...@php.net

works fine for me with 5.2.9 release and CLI



[2009-05-06 13:40:06] 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/

Works fine for me..



[2009-05-06 11:50:29] redaction at nuxwin dot com

excuse, :

Actual result:
preArray
(
[0] =
#65533;#65533;#65533;)#65533;#65533;#65533;#65533;#65533;#65533;
)
/pre



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

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



#48156 [Opn-Csd]: Allow LTP 1.7 when compiling with --enable-gcov

2009-05-06 Thread iliaa
 ID:   48156
 Updated by:   il...@php.net
 Reported By:  shahar dot e at zend dot com
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.5
 PHP Version:  5.3.0RC1
 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-05-05 20:28:56] shahar dot e at zend dot com

Description:

When compiling with --enable-gcov the configure script is looking for
LTP but only LTP 1.5 or 1.6 are accepted. 

I have manually modified configure.in to allow my currently installed
LTP 1.7 and it worked flawlessly - I think 1.7 should be allowed as
well. 

I modified ltp_version_list in line 731 to include 1.7 as well (I would
supply a patch but is a one line change, 4 byte addition).








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



#48163 [Csd-Bgs]: FILTER_CALLBACK generates strange results

2009-05-06 Thread scottmac
 ID:   48163
 Updated by:   scott...@php.net
 Reported By:  redaction at nuxwin dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Filter related
 Operating System: debian
 PHP Version:  5.2.0


Previous Comments:


[2009-05-06 13:53:04] redaction at nuxwin dot com

ok, close it !



[2009-05-06 13:52:02] redaction at nuxwin dot com

changed version



[2009-05-06 13:48:17] redaction at nuxwin dot com

Hi;

sorry, my version is PHP Version 5.2.0. I go to try with later.

If you want, you can close it.



[2009-05-06 13:42:48] f...@php.net

works fine for me with 5.2.9 release and CLI



[2009-05-06 13:40:06] 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/

Works fine for me..



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

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



#44872 [Com]: canary mismatch on efree() - heap overflow detected

2009-05-06 Thread j dot vd dot broek at home dot nl
 ID:   44872
 Comment by:   j dot vd dot broek at home dot nl
 Reported By:  mattr at shoplet dot com
 Status:   No Feedback
 Bug Type: MySQLi related
 Operating System: FreeBSD 6.2
 PHP Version:  5.2.5
 New Comment:

This solution I saw on another website might help fixing it in a next
build of PHP or at least show people with the same problem a way out of
it:
http://chrisblunt.com/blog/2009/05/01/php-fixing-mismatched-canaries-how-to-remove-suhosin-from-debianubuntu-packages/


Previous Comments:


[2009-05-03 13:48:10] ewilded at gmail dot com

Same situation on PHP 5.2.9 with Suhosin-Patch 0.9.7 (cli) (built: May 
2 2009 14:51:38), OS: Slackware 12, i'm connecting to Oracle DB on
remote machine using PDO, script gets killed while trying to execute
simple SELECT statement without any params (same code works fine with
MySQL).



[2009-04-21 14:39:12] fr33z at inmail dot cz

I have the same issue with PHP Version 5.2.9-pl2-gentoo
'./configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu'
'--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info'
'--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64'
'--with-pcre-regex=/usr' '--enable-maintainer-zts' '--disable-cli'
'--with-apxs2=/usr/sbin/apxs2'
'--with-config-file-path=/etc/php/apache2-php5'
'--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active'
'--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar'
'--with-curl' '--with-curlwrappers' '--disable-dbase' '--enable-exif'
'--without-fbsql' '--without-fdftk' '--enable-ftp' '--with-gettext'
'--without-gmp' '--disable-ipv6' '--disable-json' '--without-kerberos'
'--enable-mbstring' '--with-mcrypt' '--with-mhash' '--without-msql'
'--without-mssql' '--with-ncurses' '--with-openssl'
'--with-openssl-dir=/usr' '--disable-pcntl' '--without-pgsql'
'--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp'
'--disable-soap' '--enable-sockets' '--without-sybase'
'--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem'
'--disable-sysvshm' '--without-tidy' '--disable-wddx' '--without-xmlrpc'
'--with-xsl' '--enable-zip' '--with-zlib' '--disable-debug'
'--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile'
'--with-gdbm' '--without-qdbm' '--with-freetype-dir=/usr'
'--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr'
'--with-png-dir=/usr' '--without-xpm-dir' '--with-gd'
'--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--without-mysqli' '--without-pdo-dblib' '--with-pdo-mysql=/usr'
'--without-pdo-odbc' '--without-pdo-pgsql' '--without-pdo-sqlite'
'--with-readline' '--without-libedit' '--without-mm' '--without-sqlite'
'--with-pic'



[2009-03-22 19:38:40] mr dot jony at gmail dot com

i have this same problem in a fresh install of ubuntu 8.04 lts

and i dont have the suhosin patch

please help



[2009-03-11 09:17:40] dballance at roydshall dot org

I have the same error when running certain queries with mssql_query().
There seems to be no way to predict which queries will run and which
fail - although if a query fails it always fails and if it runs then it
alway runs. The more complex the query, the more likely to fail.

I am running PHP Version 5.2.4-2ubuntu5.5 with Suhosin Patch 0.9.6.2. 
Example code that trips the switch:

$dbhandle = mssql_connect($myServer, $myUser, $myPass);
$selected = mssql_select_db($myDB, $dbhandle);

$query = SELECT * FROM sims.curr_group INNER JOIN
sims.curr_class_period ON sims.curr_group.base_group_id =
sims.curr_class_period.base_group_id INNER JOIN sims.sims_person ON
sims.sims_person.person_id = sims.curr_class_period.person_id
WHERE (sims.curr_group.short_name = '9b/It1');

$result = mssql_query($query);

while($row = mssql_fetch_array($result)) {
   print_r($row);
}

//close the connection
mssql_close($dbhandle);



[2008-10-10 09:50:38] krister dot karlstrom at arcada dot fi

I'm experiencing the same bug using PHP 5.2.4-2ubuntu5.3 with
Suhosin-Patch 0.9.6.2 (cli) on a Ubuntu Hardy 8.0.4 server.

The following simplified example shows the problem, the last echo row
is not executed because of mssql_free_result() fails:

?php

$link = mssql_connect('.xx', 'xxx', '');

if(is_resource($link))
{
if(mssql_select_db('kursbok', $link))
{
$result = mssql_query('select * from Utbildningsprogram order by
up_nr');

if(is_resource($result))
{
$obj = mssql_fetch_object($result);
echo $obj-up_nr.\n;


#48147 [Opn-Bgs]: iconv with //IGNORE cuts the string

2009-05-06 Thread jani
 ID:   48147
 Updated by:   j...@php.net
 Reported By:  kulakov74 at yandex dot ru
-Status:   Open
+Status:   Bogus
 Bug Type: ICONV related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

It just means you're using glibc iconv implementation which does not 
have the IGNORE parameter implemented.


Previous Comments:


[2009-05-06 05:13:10] kulakov74 at yandex dot ru

Here goes the script. I'm not sure about the limit on external
resources - I have the file to convert, so it is downloaded. 

?php

error_reporting(E_ALL); 

$Body1=file_get_contents(http://www.oppcharts.com/iconv.html;);

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);

?



[2009-05-04 14:52:10] kulakov74 at yandex dot ru

Description:

iconv() without //IGNORE as known cuts the string at the first illegal
character, but with //IGNORE it should not. Still, I get a truncated
text, but not at the point where the character is. Sorry the actual PHP
version is 5.2.6, but I cannot upgrade it. Just to let you know. Can you
test that with the last version? Please download the file from
http://www.oppcharts.com/iconv.html

Reproduce code:
---
$Body1=... //read the file

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);



Expected result:

15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
15321 - I can get this if I use //TRANSLIT or when I run the test on my
home Windows PHP 4


Actual result:
--
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
8157 - THIS IS THE PROBLEM





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



#48130 [Opn-Fbk]: RegexIterator / RecursiveIteratorIterator fails on nested arrays

2009-05-06 Thread jani
 ID:   48130
 Updated by:   j...@php.net
 Reported By:  richard dot piatkowski at meap dot de
-Status:   Open
+Status:   Feedback
 Bug Type: SPL related
 Operating System: Windows XP
 PHP Version:  5.2.9
 New Comment:

What exactly is the expected and what is actual output? 
Also, reproduce scripts should be as short as possible, start with
?php 
and end with ?


Previous Comments:


[2009-05-02 12:30:33] richard dot piatkowski at meap dot de

Description:

It is impossible to iterate through the children of a tree structure
with a RecursiveRegexIterator combined with a
RecursiveIteratorIterator.

It only works when using the regex /A/, /r/ or /y/, because this
characters are in the word Array.

See line 74 of ext/spl/internal/regexiterator.inc:

$subject = ($this-flags  self::USE_KEY) ? $this-key :
$this-current;

When iterating over an array of arrays (e.g. array[3] in the above
example) $subject gets the value of $this-current. In the case of
an arraym this value will be Array.

This explains, why in the above example the regex /y/ works, while
/v/ is not. /y/ finds a match in Array.

The methode accept() of the RegexIterator-Object should first check,
whether an array has children, when working on nested arrays. If a
nested array is found, there is no sense in matching the regex against
Array.

Possible workaround could be adding the following lines above line 74
in ext/spl/internal/regexiterator.inc:

if (is_array($subject) == true) {
   return true;
}

Reproduce code:
---
$array = array();
$array[0] = 'one';
$array[1] = 'two';
$array[2] = 'three';
$array[3] = array('four', 'five', 'xxx', 'yyy');
$array[4] = 'six';
$array[5] = 'seven';

// Correct output: 
// yyy - 
$recArrayIt = new RecursiveArrayIterator($array);
$recRegexIt = new RecursiveRegexIterator($recArrayIt, '/y/');
$recItIt= new RecursiveIteratorIterator($recRegexIt);

foreach($recItIt as $element) {
echo $element.' - ';
}

// Wrong output: seven - 
// Should be   : five - seven -

$recArrayIt = new RecursiveArrayIterator($array);
$recRegexIt = new RecursiveRegexIterator($recArrayIt, '/v/');
$recItIt= new RecursiveIteratorIterator($recRegexIt);

foreach($recItIt as $element) {
echo $element.' - ';
}






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



#48166 [NEW]: RecursiveIteratorIterator does not persist state parent in getChildren()

2009-05-06 Thread ralph at smashlabs dot com
From: ralph at smashlabs dot com
Operating system: *nix, osx, win32
PHP version:  5.2.9
PHP Bug Type: SPL related
Bug description:  RecursiveIteratorIterator does not persist state parent in 
getChildren()

Description:

Currently, its difficult to extend RecursiveFilterIterator() with
additional __construct() arguments (for configuring its behavior).  The
reason its difficult is b/c when getChildren() is called, a new instance of
the RFI is created (only way you'd know this is if you look into the source
of RFI).

Workaround currently is this (But is not generic enough to all use
cases):

replace getChildren():

function getChildren()
{
if (empty($this-ref)) {
$this-ref = new ReflectionClass($this);
}
return
$this-ref-newInstance($this-getInnerIterator()-getChildren(),
$this-_otherArgs);
}

Reproduce code:
---
$rArray = array('a' = array('ab', 'ac', 'ad' = array('ada', 'adc')), 'b'
= array('bb', 'bc'));

$ri = new RecursiveArrayIterator($rArray);
$filter = new MyRFI($ri, 'argument');
$iterator = new RecursiveIteratorIterator($filter);

foreach ($iterator as $key = $item) {
echo $key . ' - ' . $item . PHP_EOL;
}

class MyRFI extends RecursiveFilterIterator
{
protected $_otherArg = null;

public function __construct($iterator, $otherArg = null)
{
$this-_otherArg = $otherArg;
parent::__construct($iterator);
}

public function accept()
{
echo ($this-_otherArg) ? 'Arg Present' : 'Arg NOT Present';
echo PHP_EOL;
return true;
}
}

Expected result:

Arg Present
Arg Present
0 - ab
Arg Present
1 - ac
Arg Present
Arg Present
0 - ada
Arg Present
1 - adc
Arg Present
Arg Present
0 - bb
Arg Present
1 - bc 

Actual result:
--
Arg Present
Arg NOT Present
0 - ab
Arg NOT Present
1 - ac
Arg NOT Present
Arg NOT Present
0 - ada
Arg NOT Present
1 - adc
Arg Present
Arg NOT Present
0 - bb
Arg NOT Present
1 - bc


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



#48167 [NEW]: undefined function checkdnsrr()

2009-05-06 Thread frew dot robert at gmail dot com
From: frew dot robert at gmail dot com
Operating system: Linux
PHP version:  5.3.0RC1
PHP Bug Type: *Network Functions
Bug description:  undefined function checkdnsrr()

Description:

When using function checkdnsrr(), I get a Fatal error: Call to undefined
function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()

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



#48166 [Opn-Asn]: RecursiveIteratorIterator does not persist state parent in getChildren()

2009-05-06 Thread colder
 ID:   48166
 Updated by:   col...@php.net
 Reported By:  ralph at smashlabs dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SPL related
 Operating System: *nix, osx, win32
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  colder


Previous Comments:


[2009-05-06 15:58:40] ralph at smashlabs dot com

Description:

Currently, its difficult to extend RecursiveFilterIterator() with
additional __construct() arguments (for configuring its behavior).  The
reason its difficult is b/c when getChildren() is called, a new instance
of the RFI is created (only way you'd know this is if you look into the
source of RFI).

Workaround currently is this (But is not generic enough to all use
cases):

replace getChildren():

function getChildren()
{
if (empty($this-ref)) {
$this-ref = new ReflectionClass($this);
}
return
$this-ref-newInstance($this-getInnerIterator()-getChildren(),
$this-_otherArgs);
}

Reproduce code:
---
$rArray = array('a' = array('ab', 'ac', 'ad' = array('ada', 'adc')),
'b' = array('bb', 'bc'));

$ri = new RecursiveArrayIterator($rArray);
$filter = new MyRFI($ri, 'argument');
$iterator = new RecursiveIteratorIterator($filter);

foreach ($iterator as $key = $item) {
echo $key . ' - ' . $item . PHP_EOL;
}

class MyRFI extends RecursiveFilterIterator
{
protected $_otherArg = null;

public function __construct($iterator, $otherArg = null)
{
$this-_otherArg = $otherArg;
parent::__construct($iterator);
}

public function accept()
{
echo ($this-_otherArg) ? 'Arg Present' : 'Arg NOT Present';
echo PHP_EOL;
return true;
}
}

Expected result:

Arg Present
Arg Present
0 - ab
Arg Present
1 - ac
Arg Present
Arg Present
0 - ada
Arg Present
1 - adc
Arg Present
Arg Present
0 - bb
Arg Present
1 - bc 

Actual result:
--
Arg Present
Arg NOT Present
0 - ab
Arg NOT Present
1 - ac
Arg NOT Present
Arg NOT Present
0 - ada
Arg NOT Present
1 - adc
Arg Present
Arg NOT Present
0 - bb
Arg NOT Present
1 - bc






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



#48167 [Opn-Fbk]: undefined function checkdnsrr()

2009-05-06 Thread scottmac
 ID:   48167
 Updated by:   scott...@php.net
 Reported By:  frew dot robert at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.3.0RC1
 New Comment:

This function is only available if the configure script can find bind
on your system.

If you look at your config.log you'll probably find that its missing.


Previous Comments:


[2009-05-06 16:32:48] frew dot robert at gmail dot com

Description:

When using function checkdnsrr(), I get a Fatal error: Call to
undefined function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()





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



#48169 [NEW]: Vbulletin 3.82 load error

2009-05-06 Thread j dot erskine at tx dot rr dot com
From: j dot erskine at tx dot rr dot com
Operating system: Windows server 2008
PHP version:  5.2CVS-2009-05-06 (snap)
PHP Bug Type: Unknown/Other Function
Bug description:  Vbulletin 3.82 load error

Description:

PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 49
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 101
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 105
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 113
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 124
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 128
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 136
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 205
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 383
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\class_core.php on line 2529



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



#48169 [Opn-Bgs]: Vbulletin 3.82 load error

2009-05-06 Thread pajoye
 ID:   48169
 Updated by:   paj...@php.net
 Reported By:  j dot erskine at tx dot rr dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Windows server 2008
 PHP Version:  5.2CVS-2009-05-06 (snap)
 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




Previous Comments:


[2009-05-06 17:23:03] j dot erskine at tx dot rr dot com

Description:

PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 49
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 101
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 105
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 113
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 124
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 128
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 136
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 205
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\init.php on line 383
PHP Deprecated:  Assigning the return value of new by reference is
deprecated in D:\Websites\ToE\Forum\includes\class_core.php on line
2529







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



#48091 [Bgs]: strtotime(+1 wed,time()); doesn't work

2009-05-06 Thread mwu at oxid8 dot com
 ID:   48091
 User updated by:  mwu at oxid8 dot com
 Reported By:  mwu at oxid8 dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: CentOS release 5.2 (Final)
 PHP Version:  5.2.9
 New Comment:

Is this bug going to be addressed? This is a BUG or regression.  The 
behavior is different between 5.2.6 and 5.2.9


Previous Comments:


[2009-04-27 20:55:20] mwu at oxid8 dot com

The output as you see here is not as expected..

When I do this in php 5.2.6, I get this:
Wed, 29 Apr 2009 00:00:00 -0500
Wed, 06 May 2009 00:00:00 -0500
Wed, 13 May 2009 00:00:00 -0500


In php 5.2.9 I get this:
Wed, 29 Apr 2009 00:00:00 +0300
Wed, 29 Apr 2009 00:00:00 +0300
Wed, 29 Apr 2009 00:00:00 +0300



[2009-04-27 20:27:14] j...@php.net

Try fixing your script first. This works:

?php
function test($sInterval,$iNextDate) {
$iNextDate = strtotime($sInterval,$iNextDate);
echo date(r, $iNextDate), \n;
$iNextDate = strtotime($sInterval,$iNextDate);
echo date(r, $iNextDate), \n;
$iNextDate = strtotime($sInterval,$iNextDate);
echo date(r, $iNextDate), \n;
}

$iNextDate = time();
test(+1 Wed,$iNextDate);
test(+1 day,$iNextDate);
test(+1 week,$iNextDate);
?

And output is as expected:
Wed, 29 Apr 2009 00:00:00 +0300
Wed, 29 Apr 2009 00:00:00 +0300
Wed, 29 Apr 2009 00:00:00 +0300
Tue, 28 Apr 2009 23:26:44 +0300
Wed, 29 Apr 2009 23:26:44 +0300
Thu, 30 Apr 2009 23:26:44 +0300
Mon, 04 May 2009 23:26:44 +0300
Mon, 11 May 2009 23:26:44 +0300
Mon, 18 May 2009 23:26:44 +0300





[2009-04-27 20:06:38] mwu at oxid8 dot com

Description:

This worked prior to php 5.2.9  (at least its working in 5.2.6)

strtotime(+1 Wed,time())  would yield a timestamp that is 1 Wednesday

from the current time. So if the current date is Monday April 27,2009 
3pm, then the resulting function would return May 6, 2009 3pm.  in
5.2.9 
executing this function returns the same timestamp.

Reproduce code:
---
function test($sInterval,$iNextDate) {
echo strtotime(\$sInterval\,$iNextDate);br/;
echo $iNextDate = strtotime($sInterval,$iNextDate) . br/;
echo $iNextDate = strtotime($sInterval,$iNextDate) . br/;
echo $iNextDate = strtotime($sInterval,$iNextDate) . br/;
echo br/;
}

$iNextDate = time(); 
test(+1 Wed,$iNextDate);
test(+1 day,$iNextDate);
test(+1 week,$iNextDate);



Actual result:
--
strtotime(+1 Wed,1240860865);
1240981200
1240981200
1240981200

strtotime(+1 day,1240860865);
1240947265
1241033665
1241120065

strtotime(+1 week,1240860865);
1241465665
1242070465
1242675265






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



#48170 [NEW]: Array key differentiates between unicode and binary strings

2009-05-06 Thread rodrigosouzadossantos at gmai dot com
From: rodrigosouzadossantos at gmai dot com
Operating system: Debian Lenny
PHP version:  6CVS-2009-05-06 (snap)
PHP Bug Type: *Unicode Issues
Bug description:  Array key differentiates between unicode and binary strings

Description:

I have a array that is populated with result query from a Postgres. The
keys of array are the field name and the value are the field value. Like
this:

Array
(
[app1] = app value
[app2] = some value
)

Reproduce code:
---
$result[ 'app1' ] = 'app value';
$result[ 'app2' ] = 'some value';

print_r( $result );

var_dump( $result[ 'app1' ] );

Expected result:

string(9) app value


Actual result:
--
NULL


The result of var_dump is correct when is puts a 'b' (binary) before
string, like:

var_dump( $result[ b'app1' ] );

Is it the expected behavior?

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



#48147 [Bgs]: iconv with //IGNORE cuts the string

2009-05-06 Thread kulakov74 at yandex dot ru
 ID:   48147
 User updated by:  kulakov74 at yandex dot ru
 Reported By:  kulakov74 at yandex dot ru
 Status:   Bogus
 Bug Type: ICONV related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

No. The fact the script displays the notice iconv(): Detected an
illegal character ... in both cases is not related to the fact whether
the option is implemented: this is controlled by error_reporting(E_ALL).
The option IGNORE only controls whether iconv will stop at the character
or not. 

Also, the length of the resulting string is different (greater) with
IGNORE, and while without it the string ends at exactly where the
illegal character is, with IGNORE it ends at a random point where no
such characters occur. 

Also, I did not mention - this is not the only file I converted, many
others were converted correctly with the option, and their length only
decreased a little. But there were 2 files which were truncated, 1 of
them (the smaller) is used for the test case. 

Can you run the test with the latest PHP releases? Actually this is why
I reported the bug. I tried it on other servers with PHP 4.3.3, 5.1.4,
5.1.6, 5.2.4 and 5.2.6 and yep! - I finally found one with 5.2.9 (built
Feb 27 2009) and it displayed the same results everywhere. 

I repeat, the TRANSLIT option works fine, while it does the same and
even more.


Previous Comments:


[2009-05-06 14:38:39] j...@php.net

It just means you're using glibc iconv implementation which does not 
have the IGNORE parameter implemented.



[2009-05-06 05:13:10] kulakov74 at yandex dot ru

Here goes the script. I'm not sure about the limit on external
resources - I have the file to convert, so it is downloaded. 

?php

error_reporting(E_ALL); 

$Body1=file_get_contents(http://www.oppcharts.com/iconv.html;);

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);

?



[2009-05-04 14:52:10] kulakov74 at yandex dot ru

Description:

iconv() without //IGNORE as known cuts the string at the first illegal
character, but with //IGNORE it should not. Still, I get a truncated
text, but not at the point where the character is. Sorry the actual PHP
version is 5.2.6, but I cannot upgrade it. Just to let you know. Can you
test that with the last version? Please download the file from
http://www.oppcharts.com/iconv.html

Reproduce code:
---
$Body1=... //read the file

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);



Expected result:

15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
15321 - I can get this if I use //TRANSLIT or when I run the test on my
home Windows PHP 4


Actual result:
--
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
8157 - THIS IS THE PROBLEM





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



#48147 [Bgs-Ver]: iconv with //IGNORE cuts the string

2009-05-06 Thread lbarnaud
 ID:   48147
 Updated by:   lbarn...@php.net
 Reported By:  kulakov74 at yandex dot ru
-Status:   Bogus
+Status:   Verified
 Bug Type: ICONV related
 Operating System: Linux
 PHP Version:  5.2.6


Previous Comments:


[2009-05-06 18:18:07] kulakov74 at yandex dot ru

No. The fact the script displays the notice iconv(): Detected an
illegal character ... in both cases is not related to the fact whether
the option is implemented: this is controlled by error_reporting(E_ALL).
The option IGNORE only controls whether iconv will stop at the character
or not. 

Also, the length of the resulting string is different (greater) with
IGNORE, and while without it the string ends at exactly where the
illegal character is, with IGNORE it ends at a random point where no
such characters occur. 

Also, I did not mention - this is not the only file I converted, many
others were converted correctly with the option, and their length only
decreased a little. But there were 2 files which were truncated, 1 of
them (the smaller) is used for the test case. 

Can you run the test with the latest PHP releases? Actually this is why
I reported the bug. I tried it on other servers with PHP 4.3.3, 5.1.4,
5.1.6, 5.2.4 and 5.2.6 and yep! - I finally found one with 5.2.9 (built
Feb 27 2009) and it displayed the same results everywhere. 

I repeat, the TRANSLIT option works fine, while it does the same and
even more.



[2009-05-06 14:38:39] j...@php.net

It just means you're using glibc iconv implementation which does not 
have the IGNORE parameter implemented.



[2009-05-06 05:13:10] kulakov74 at yandex dot ru

Here goes the script. I'm not sure about the limit on external
resources - I have the file to convert, so it is downloaded. 

?php

error_reporting(E_ALL); 

$Body1=file_get_contents(http://www.oppcharts.com/iconv.html;);

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);

?



[2009-05-04 14:52:10] kulakov74 at yandex dot ru

Description:

iconv() without //IGNORE as known cuts the string at the first illegal
character, but with //IGNORE it should not. Still, I get a truncated
text, but not at the point where the character is. Sorry the actual PHP
version is 5.2.6, but I cannot upgrade it. Just to let you know. Can you
test that with the last version? Please download the file from
http://www.oppcharts.com/iconv.html

Reproduce code:
---
$Body1=... //read the file

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);



Expected result:

15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
15321 - I can get this if I use //TRANSLIT or when I run the test on my
home Windows PHP 4


Actual result:
--
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
8157 - THIS IS THE PROBLEM





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



#48147 [Ver-Asn]: iconv with //IGNORE cuts the string

2009-05-06 Thread jani
 ID:   48147
 Updated by:   j...@php.net
 Reported By:  kulakov74 at yandex dot ru
-Status:   Verified
+Status:   Assigned
 Bug Type: ICONV related
 Operating System: Linux
-PHP Version:  5.2.6
+PHP Version:  5.*, 6CVS (2009-05-05)
-Assigned To:  
+Assigned To:  lbarnaud
 New Comment:

Arnaud: Please don't reopen bogus bugs without explanation. 


Previous Comments:


[2009-05-06 18:18:07] kulakov74 at yandex dot ru

No. The fact the script displays the notice iconv(): Detected an
illegal character ... in both cases is not related to the fact whether
the option is implemented: this is controlled by error_reporting(E_ALL).
The option IGNORE only controls whether iconv will stop at the character
or not. 

Also, the length of the resulting string is different (greater) with
IGNORE, and while without it the string ends at exactly where the
illegal character is, with IGNORE it ends at a random point where no
such characters occur. 

Also, I did not mention - this is not the only file I converted, many
others were converted correctly with the option, and their length only
decreased a little. But there were 2 files which were truncated, 1 of
them (the smaller) is used for the test case. 

Can you run the test with the latest PHP releases? Actually this is why
I reported the bug. I tried it on other servers with PHP 4.3.3, 5.1.4,
5.1.6, 5.2.4 and 5.2.6 and yep! - I finally found one with 5.2.9 (built
Feb 27 2009) and it displayed the same results everywhere. 

I repeat, the TRANSLIT option works fine, while it does the same and
even more.



[2009-05-06 14:38:39] j...@php.net

It just means you're using glibc iconv implementation which does not 
have the IGNORE parameter implemented.



[2009-05-06 05:13:10] kulakov74 at yandex dot ru

Here goes the script. I'm not sure about the limit on external
resources - I have the file to convert, so it is downloaded. 

?php

error_reporting(E_ALL); 

$Body1=file_get_contents(http://www.oppcharts.com/iconv.html;);

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);

?



[2009-05-04 14:52:10] kulakov74 at yandex dot ru

Description:

iconv() without //IGNORE as known cuts the string at the first illegal
character, but with //IGNORE it should not. Still, I get a truncated
text, but not at the point where the character is. Sorry the actual PHP
version is 5.2.6, but I cannot upgrade it. Just to let you know. Can you
test that with the last version? Please download the file from
http://www.oppcharts.com/iconv.html

Reproduce code:
---
$Body1=... //read the file

echo(strlen($Body1).\n);
$Body2=iconv('UTF-8', 'ISO-8859-1', $Body1);
echo(strlen($Body2).\n);

$Body2=iconv('UTF-8', 'ISO-8859-1//IGNORE', $Body1);
echo(strlen($Body2).\n);



Expected result:

15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
15321 - I can get this if I use //TRANSLIT or when I run the test on my
home Windows PHP 4


Actual result:
--
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
3588
---
15323
Notice: iconv(): Detected an illegal character in input string in
/home/doldon/html/tdnam/dev.php on line 18
8157 - THIS IS THE PROBLEM





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



#48171 [NEW]: Unserialize converts string to integer in case of numeric properties

2009-05-06 Thread csnyder at fcny dot org
From: csnyder at fcny dot org
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Scripting Engine problem
Bug description:  Unserialize converts string to integer in case of numeric 
properties

Description:

When unserializing a string like
O:8:stdClass:3:{s:5:22387;s:1:a;s:5:22386;s:1:a;s:5:22368;s:1:a;},
the resulting object will have integers as property names instead of
strings.

This may be regression of #43614, marked fixed in CVS but that was a year
ago.

Reproduce code:
---
?php

// an object with some numeric keys
$keys = array( 1, 2, 3 );
foreach( $keys AS $key ) {
  $obj-{$key} = 'a';
}

var_dump( $obj );
$s = serialize( $obj );
$u = unserialize( $s );
var_dump( $u );

?

Expected result:

object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}


Actual result:
--
object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}


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



#48153 [Ver-Fbk]: php segfault in pcre function match

2009-05-06 Thread jani
 ID:   48153
 Updated by:   j...@php.net
 Reported By:  raul dot gigea at directmedia dot de
-Status:   Verified
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-05 (snap)
 New Comment:

Please try using this CVS snapshot:

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

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

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'



Previous Comments:


[2009-05-05 18:36:26] f...@php.net

verified with FreeBSD 7.1-RELEASE-p4 and current snapshot:
Segmentation fault: 11 (core dumped)
Although I didn't examine the coredump in detail


HEAD works fine



[2009-05-05 16:22:03] raul dot gigea at directmedia dot de

Description:

Hi, i mananged to reproduce this bug on various clean FreeBSD systems 
with php version 5.2.9, than compiled todays cvs snapshot version and 
the bug is still reproducible. 

Memory limit was 128MB which should be more than enough for the code 
that produced the crash.

Stacksize was 64MB. ( ulimit -s )

5.2.6 works fine. Also, disabling mhash extension fixes the problem.

Reducing pcre.recursion_limit and pcre.backtrack_limit in php.ini also

fixes the problem, but creates a new one, because the preg_replace 
function doesn't produce the expected results any more. ( They have to

be reduced to about 50, so that the segfault doesn't occur ) 

Details follow.

Configure Line: ./configure --with-mhash
List of modules: 

List of Modules:
./sapi/cli/php -m
[PHP Modules]
ctype
date
dom
filter
hash
iconv
json
libxml
mhash
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]


Reproduce code:
---
$contents = 'd' . str_repeat('a', 1900) . 'b';
$contents = preg_replace('/d(a)+b/', '', $contents);


Expected result:

$contents should be empty.

Actual result:
--
segmentation fault (core dumped)  ./sapi/cli/php ~/test.php

-
Backtrace
-

... starts with 1400 times the same call to match ... ( stack overflow

)
#1400 0x0808e030 in match (eptr=0x28923db9 'a' repeats 200 times...,

ecode=0x28a1666d _, mstart=0x28923db8 d, 'a' repeats 199 
times..., offset_top=2, md=0xbfbfcc30, ims=0, eptrb=0x0, flags=0, 
rdepth=0) at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:720
#1401 0x0809b118 in php_pcre_exec (argument_re=0x28a16640, 
extra_data=0xbfbfcd80, subject=0x28923db8 d, 'a' repeats 199 
times..., length=1902, start_offset=0, options=0, offsets=0x2892253c,

offsetcount=6)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:4895
#1402 0x080a10e6 in php_pcre_replace_impl (pce=0x28a15d40, 
subject=0x28923db8 d, 'a' repeats 199 times..., subject_len=1902, 
replace_val=0x28921db4, is_callable_replace=0, result_len=0xbfbfcf04, 
limit=-1, replace_count=0x0) at /usr/home/raul/php-
snapshot/php5.2-200905051430/ext/pcre/php_pcre.c:1045
#1403 0x080a0e86 in php_pcre_replace (regex=0x28923d80 /d(a)+b/, 
regex_len=8, subject=0x28923db8 d, 'a' repeats 199 times..., 
subject_len=1902, replace_val=0x28921db4, is_callable_replace=0, 
result_len=0xbfbfcf04, limit=-1, replace_count=0x0) at 
/usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:955
---Type return to continue, or q return to quit---
#1404 0x080a1d66 in php_replace_in_subject (regex=0x28921e2c, 
replace=0x28921db4, subject=0x28917a60, result_len=0xbfbfcf04, limit=-
1, is_callable_replace=0 '\0', replace_count=0x0)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1272
#1405 0x080a2684 in preg_replace_impl (ht=3, return_value=0x28923378, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=0 '\0')
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1370
#1406 0x080a2735 in zif_preg_replace (ht=3, return_value=0x28923378, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1386
#1407 0x083373d0 in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfbfd128) at zend_vm_execute.h:200
#1408 0x0833cff9 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0xbfbfd128) at zend_vm_execute.h:1739
#1409 0x08336f22 in execute (op_array=0x28922580) at 
zend_vm_execute.h:92
#1410 0x08311592 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /usr/home/raul/php-snapshot/php5.2-
200905051430/Zend/zend.c:1134
#1411 0x082bd926 in php_execute_script 

#48171 [Opn-Bgs]: Unserialize converts string to integer in case of numeric properties

2009-05-06 Thread jani
 ID:   48171
 Updated by:   j...@php.net
 Reported By:  csnyder at fcny dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.9
 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




Previous Comments:


[2009-05-06 18:36:32] csnyder at fcny dot org

Description:

When unserializing a string like
O:8:stdClass:3:{s:5:22387;s:1:a;s:5:22386;s:1:a;s:5:22368;s:1:a;},
the resulting object will have integers as property names instead of
strings.

This may be regression of #43614, marked fixed in CVS but that was a
year ago.

Reproduce code:
---
?php

// an object with some numeric keys
$keys = array( 1, 2, 3 );
foreach( $keys AS $key ) {
  $obj-{$key} = 'a';
}

var_dump( $obj );
$s = serialize( $obj );
$u = unserialize( $s );
var_dump( $u );

?

Expected result:

object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}


Actual result:
--
object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}






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



#48171 [Bgs]: Unserialize converts string to integer in case of numeric properties

2009-05-06 Thread csnyder at fcny dot org
 ID:   48171
 User updated by:  csnyder at fcny dot org
 Reported By:  csnyder at fcny dot org
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Bogus really? If serialize handles numeric property names correctly,
why shouldn't unserialize?

Also, would be interested in actual citation in the manual as to why
this bug is bogus. Thanks.


Previous Comments:


[2009-05-06 18:39:06] j...@php.net

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





[2009-05-06 18:36:32] csnyder at fcny dot org

Description:

When unserializing a string like
O:8:stdClass:3:{s:5:22387;s:1:a;s:5:22386;s:1:a;s:5:22368;s:1:a;},
the resulting object will have integers as property names instead of
strings.

This may be regression of #43614, marked fixed in CVS but that was a
year ago.

Reproduce code:
---
?php

// an object with some numeric keys
$keys = array( 1, 2, 3 );
foreach( $keys AS $key ) {
  $obj-{$key} = 'a';
}

var_dump( $obj );
$s = serialize( $obj );
$u = unserialize( $s );
var_dump( $u );

?

Expected result:

object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}


Actual result:
--
object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}






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



#48171 [Bgs]: Unserialize converts string to integer in case of numeric properties

2009-05-06 Thread jani
 ID:   48171
 Updated by:   j...@php.net
 Reported By:  csnyder at fcny dot org
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

See bug #45959


Previous Comments:


[2009-05-06 18:43:19] csnyder at fcny dot org

Bogus really? If serialize handles numeric property names correctly,
why shouldn't unserialize?

Also, would be interested in actual citation in the manual as to why
this bug is bogus. Thanks.



[2009-05-06 18:39:06] j...@php.net

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





[2009-05-06 18:36:32] csnyder at fcny dot org

Description:

When unserializing a string like
O:8:stdClass:3:{s:5:22387;s:1:a;s:5:22386;s:1:a;s:5:22368;s:1:a;},
the resulting object will have integers as property names instead of
strings.

This may be regression of #43614, marked fixed in CVS but that was a
year ago.

Reproduce code:
---
?php

// an object with some numeric keys
$keys = array( 1, 2, 3 );
foreach( $keys AS $key ) {
  $obj-{$key} = 'a';
}

var_dump( $obj );
$s = serialize( $obj );
$u = unserialize( $s );
var_dump( $u );

?

Expected result:

object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}


Actual result:
--
object(stdClass)#1 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}
object(stdClass)#2 (3) {
  [1]=
  string(1) a
  [2]=
  string(1) a
  [3]=
  string(1) a
}






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



#48141 [Asn-Fbk]: memory leak in zend_execute.c and zend_operators.c

2009-05-06 Thread jani
 ID:   48141
 Updated by:   j...@php.net
 Reported By:  greg at chiaraquartet dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: ubuntu linux
 PHP Version:  5.3CVS-2009-05-04 (CVS)
 Assigned To:  dmitry
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2009-05-04 17:22:06] cel...@php.net

I'm using Ubuntu in a VMWare Fusion image in a MacBook Pro, in case
that is helpful



[2009-05-04 17:21:17] cel...@php.net

u...@ubuntu8041:~/workspace/php5$ cat config.nice
#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-debug' \
'--with-zlib' \
'--with-bz2=shared' \
'--enable-cgi' \
$@
u...@ubuntu8041:~/workspace/php5$ uname -a
Linux ubuntu8041 2.6.24-23-generic #1 SMP Wed Apr 1 21:47:28 UTC 2009
i686 GNU/Linux
u...@ubuntu8041:~/workspace/php5$ cat CVS/Tag
TPHP_5_3
u...@ubuntu8041:~/workspace/php5$ 






[2009-05-04 10:16:39] dmi...@php.net

I'm not able to reproduce it with CVS PHP_5_3.



[2009-05-04 08:03:17] tony2...@php.net

Dmitry, could you look into it?



[2009-05-04 04:24:12] greg at chiaraquartet dot net

Description:

When running a simple file that only instantiates objects using
autoload, there is a memory leak.

The leak appears to be caused by some combination of string
concatenation and exception throwing.  The line that causes the leak is
in Pyrus/src/Pyrus/Registry/Sqlite3.php in the constructor:

if ($path  $path != ':memory:') {
if (dirname($path) . DIRECTORY_SEPARATOR . '.pear2registry'
!= $path) {
$path = $path . DIRECTORY_SEPARATOR .
'.pear2registry';
}
}

The line $path = $path . DIRECTORY_SEPARATOR . '.pear2registry';

leaks the value /usr/local/lib/php/.pear2registry on my machine, and
the zval allocated for $path.

Reproduce code:
---
?php
// run from checkout of http://svn.pear.php.net/PEAR2/all
function __autoload($class)
{
if ($class == 'PEAR2_Exception') {
include __DIR__ . '/Exception/src/Exception.php';
return;
}
$class = str_replace('PEAR2_', '', $class);
$class = str_replace('_', '/', $class);
include __DIR__ . '/Pyrus/src/' . $class . '.php';
}
$a = PEAR2_Pyrus_Config::current();


Expected result:

no output

Actual result:
--
u...@ubuntu8041:~/workspace/all/Pyrus/tests/AtomicFileTransaction/rmrf$
php -n test.phpt
[Sun May  3 22:58:31 2009]  Script:  'test.phpt'
/home/user/workspace/php5/Zend/zend_execute.c(723) :  Freeing
0xB7B52AE4 (20 bytes), script=test.phpt
[Sun May  3 22:58:31 2009]  Script:  'test.phpt'
/home/user/workspace/php5/Zend/zend_operators.c(1231) :  Freeing
0x088CE1EC (34 bytes), script=test.phpt
=== Total 2 memory leaks detected ===






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



#46245 [Ana-Fbk]: is_writable() returns 'true' on read-only directories over NFS

2009-05-06 Thread jani
 ID:   46245
 Updated by:   j...@php.net
 Reported By:  gabe at mudbugmedia dot com
-Status:   Analyzed
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Gentoo Linux 2.6.22-hardened-r8
 PHP Version:  5.2.9
 New Comment:

Can you try this:

# CFLAGS=`getconf LFS_CFLAGS` ./config.nice
# make clean  make

This is from bug #45040 which I think this is kind of duplicate report

now. :)


Previous Comments:


[2009-03-23 13:47:22] gabe at mudbugmedia dot com

We are using UID mapping  on this share (maps all users to the 'nobody'

user), so it sounds like access(2) is definitely the root cause. If
it's 
not feasible to work around access(2) for NFS paths, perhaps this
should 
just be a documentation fix?



[2009-03-21 23:36:43] j...@php.net

Since is_writable() uses access(2) underneath, this might be the 
reason for the false positive:

access() may not work correctly on NFS file systems with UID mapping 
enabled, because UID mapping is done on the server and hidden from 
the client, which checks permissions.



[2009-02-23 14:49:31] gabe at mudbugmedia dot com

nightly build did not fix behavior.  However, I want to clarify that 
this behavior is only occurring with directories, and not regular
files.



[2008-10-06 19:54:46] gabe at mudbugmedia dot com

Description:

When using is_writable() on a read-only file mounted over NFS, it 
incorrectly returns true.  In our environment, the NFS server is
running 
MacOSX Server 10.5 mounted with the following fstab options:

10.10.10.10:/Volumes/Sack  /sack  nfs 
rw,rsize=32768,soft,intr,tcp,nosuid 0 1






Reproduce code:
---
gabe...@proto /tmp $ ls -ld /sack/test
dr-xr-xr-x 2 joshbug mudbug 68 Oct  6 14:45 /sack/test/
gabe...@proto /tmp $ ls -ld /tmp/test
dr-xr-xr-x 2 joshbug mudbug 4096 Oct  6 14:44 /tmp/test/
gabe...@proto /tmp $ cat is_writable_test.php 
?php
var_dump(
is_writable('/sack/test'), // /sack is the NFS mount
is_writable('/tmp/test')
);
gabe...@proto /tmp $ php -f is_writable_test.php 



Expected result:

bool(false)
bool(false)

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





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



#48062 [Ana]: file_exists() and clearstatcache() not working on network volume

2009-05-06 Thread jani
 ID:   48062
 Updated by:   j...@php.net
 Reported By:  dlafond at lenouvelliste dot qc dot ca
 Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: MacOSX Server 10.5.6
 PHP Version:  5.2.9
 New Comment:

Can you try this:

# CFLAGS=`getconf LFS_CFLAGS` ./config.nice
# make clean  make

This is from bug #45040 which I think this is kind of duplicate report

now. :)


Previous Comments:


[2009-04-28 13:41:02] dlafond at lenouvelliste dot qc dot ca

A workaround to get rid of this persistent stat cache when using 
file_exists is to combine the file_exists function with the function 
realpath().

$ttt=/Volumes/testdaniel/ttt.txt;
if(file_exists(realpath($ttt))){
   echo exists;
}else{
   echo not exists;
}



[2009-04-27 15:30:57] j...@php.net

Same issue as in bug #46245



[2009-04-23 15:39:27] dlafond at lenouvelliste dot qc dot ca

Description:

When files are saved on AFP or SMB mounted sharing, file_exists() and 
clearstatcache() function are not working as expected. No problem when

files are saved on local disk. On AFP or SMB volume, file_exists 
continue to return true when the file is deleted outside of PHP. 
clearstatcache() function seems to have no effect.

But, if the file is deleted with the unlink() function in php, 
file_exists return false.







Reproduce code:
---
?
header(Content-type: text/html);
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Cache-Control: no-store, no-cache,must-revalidate);
header(Cache-Control: post-check=0, pre-check=0,false);
header(Pragma: no-cache);


clearstatcache();

$ttt=/Volumes/testdaniel/ttt.txt;
#exec(touch .$ttt);
#...@unlink($ttt);

if(file_exists($ttt)){
   echo exists;
}else{
   echo not exists;
}
clearstatcache();

?

Expected result:

exists when file really exists
not exists when file doesn't exists

Actual result:
--
exists even after the file was deleted





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



#48062 [Ana-Fbk]: file_exists() and clearstatcache() not working on network volume

2009-05-06 Thread jani
 ID:   48062
 Updated by:   j...@php.net
 Reported By:  dlafond at lenouvelliste dot qc dot ca
-Status:   Analyzed
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: MacOSX Server 10.5.6
 PHP Version:  5.2.9


Previous Comments:


[2009-05-06 18:53:18] j...@php.net

Can you try this:

# CFLAGS=`getconf LFS_CFLAGS` ./config.nice
# make clean  make

This is from bug #45040 which I think this is kind of duplicate report

now. :)



[2009-04-28 13:41:02] dlafond at lenouvelliste dot qc dot ca

A workaround to get rid of this persistent stat cache when using 
file_exists is to combine the file_exists function with the function 
realpath().

$ttt=/Volumes/testdaniel/ttt.txt;
if(file_exists(realpath($ttt))){
   echo exists;
}else{
   echo not exists;
}



[2009-04-27 15:30:57] j...@php.net

Same issue as in bug #46245



[2009-04-23 15:39:27] dlafond at lenouvelliste dot qc dot ca

Description:

When files are saved on AFP or SMB mounted sharing, file_exists() and 
clearstatcache() function are not working as expected. No problem when

files are saved on local disk. On AFP or SMB volume, file_exists 
continue to return true when the file is deleted outside of PHP. 
clearstatcache() function seems to have no effect.

But, if the file is deleted with the unlink() function in php, 
file_exists return false.







Reproduce code:
---
?
header(Content-type: text/html);
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
header(Cache-Control: no-store, no-cache,must-revalidate);
header(Cache-Control: post-check=0, pre-check=0,false);
header(Pragma: no-cache);


clearstatcache();

$ttt=/Volumes/testdaniel/ttt.txt;
#exec(touch .$ttt);
#...@unlink($ttt);

if(file_exists($ttt)){
   echo exists;
}else{
   echo not exists;
}
clearstatcache();

?

Expected result:

exists when file really exists
not exists when file doesn't exists

Actual result:
--
exists even after the file was deleted





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



#45228 [Asn-Fbk]: unlink() rmdir() do not work well with URL (file://)

2009-05-06 Thread jani
 ID:   45228
 Updated by:   j...@php.net
 Reported By:  nanawel at eyeos dot org
-Status:   Assigned
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

Please try using this CVS snapshot:

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

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

This most likely duplicate of bug #45040


Previous Comments:


[2009-03-02 16:07:37] paj...@php.net

Some notes:

- mkdir()
works with   file://C:/my/pathunder Windows
expected.

FAILS with   file:///C:/my/path   under Windows
expected (/c:/my/path is not a valid path)

FAILS with   file://localhost/C:/my/path  under Windows
expected,localhost/C:/my/path is not a valid path (same for linux,
fails as well)

However, the touch() funciton seems to have issue with file://, maybe
other as well but I did not test them all yet.

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux




[2009-01-07 14:58:00] nanawel at eyeos dot org

Ok, to sum up:

- mkdir()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux

- unlink()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

I think I didn't forget anything, hope this helps.



[2009-01-07 14:35:41] paj...@php.net

as the report is about both rmdir and unlink, the issue is not windows
specific. Will take care of it.



[2009-01-07 14:27:53] nanawel at eyeos dot org

Except for the rmdir() function which fails on both Windows AND Linux
platforms, all the paths provided in the previous comments are explicite
Windows paths.
You cannot use C:\ or C:/ or file://C:/ or something else under
Linux.

That's why I've just changed the OS concerned by the issue
from: * (all)
to: Windows

Thanks for your time.



[2009-01-07 14:18:50] paj...@php.net

Confusing comments. 

Does unlink work on linux?
Does unlink work on Windows?
Does rmdir work on Windows?
Does rmdir work on Windows?



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

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



#43306 [Com]: File Download Problem.

2009-05-06 Thread fali68 at yahoo dot com
 ID:   43306
 Comment by:   fali68 at yahoo dot com
 Reported By:  d dot tas40 at chello dot nl
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

I have the same issue with PHP 4.449 and 4.1.2.0 mysql. and worked fine
with pervious version. can somone shed some light on this?
here is the code I'm using
mysql_select_db($database_tred, $conn);
$query = sprintf(SELECT * FROM Files WHERE Files.FileID = %s,
$TID_Recordset1);
$result = MYSQL_QUERY($query, $tred)or die(mysql_error());
$data = MYSQL_RESULT($result,0,filename); 
$type = MYSQL_RESULT($result,0,filetype);
$filesize =  MYSQL_RESULT($result,0,filesize);
$file = MYSQL_RESULT($result,0,bin_data);
if($result) {
header(Content-Tranfer-Encoding: binary);
header(Content-Disposition: attachment; filename= $data);
header(Content-length: $filesize);
header(Content-Description: PHP Generated Data);
print ($file);


Previous Comments:


[2009-04-03 04:30:10] marcell at equylybra dot com

Also having issues using the same script. I get no errors when
downloading files with sizes below 20Mb.

From 20Mb files are perfectly downloaded via FTP but are saved with a
corrupted file size (0Kb) when downloaded via PHP. Tryed the solution
proposed by webmaster at anpera dot net too but I had no success.

Tryed without Content-Lenght header with no effect. Also tryed with
different Content-Types (e.g.
'application/octet-stream','application/force-download','application/zip').

I am on PHP 5.2.8 with Apache 2.2.11 under Linux



[2008-12-24 18:31:39] jon at jonraivala dot com

Using strlen of the blob instead of filesize in the header works for
me.

Example - 

header(Content-Length: .strlen($blob_data));

Hope this helps someone.



[2008-10-23 09:54:32] arasan at mahiti dot org

I've used this code but the download rate is very slow compared to
ordinary download. whether there is any way to overcome this?



[2008-09-25 04:51:26] lbarn...@php.net

Please try without any Content-Length header, your HTTP server is
probably using a chunked transfert encoding. Also try with a
Content-Type like 'application/octet-stream'.

Also check the character_set_* variables in your MySQL connection, the
server may try to convert the query or the results if some variables do
not match (blobs are binary but queries and results are not).



[2008-09-25 02:54:18] alphajet1024 at hotmail dot com

I have the very same problem, but my host server is PHP Version 4.3.11
with Linux OS, i use the following code snippest to recieve the file
from form and upload it to a BLOB field in SQL, the code works fine with
all file extensions, except rar and zip files, they mostly are
corrupted.

upload.php
?php
if(isset($_POST['upload'])  $_FILES['userfile']['size']  0)
{
$fileName = $_FILES['userfile']['name'];
$tmpName  = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];

$fp  = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);

if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}

include('conf.php');
// open database connection
$connection = mysql_connect($host, $user, $pass) 
or die ('Unable to connect!');
// select database
mysql_select_db($db) 
or die ('Unable to select database!');

$query = INSERT INTO upload (name, size, type, content ) .
VALUES ('$fileName', '$fileSize', '$fileType', '$content');

mysql_query($query) or die('Error, query failed ' . mysql_error());
? 



download.php
?php
if(isset($_GET['id'])) 
{
// if id is set then get the file with the id from database
include('conf.php');
// open database connection
$connection = mysql_connect($host, $user, $pass) 
or die ('Unable to connect!');
// select database
mysql_select_db($db) 
or die ('Unable to select database!');
$id= $_GET['id'];
$query = SELECT name, type, size, content  .
 FROM upload WHERE id = '$id';

$result = mysql_query($query) or die('Error, query failed');
list($name, $type, $size, $content) = mysql_fetch_array($result);
header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);
}
php echo $content; 
?



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

-- 
Edit this bug report at 

#48172 [NEW]: configure: error: GD build test failed.

2009-05-06 Thread frew dot robert at gmail dot com
From: frew dot robert at gmail dot com
Operating system: Linux
PHP version:  5.3.0RC1
PHP Bug Type: Compile Failure
Bug description:  configure: error: GD build test failed.

Description:

Compile fails with GD enabled.

checking for GD support... yes
checking for the location of libjpeg... /usr
checking for the location of libpng... /usr
checking for the location of libXpm... /usr
checking for FreeType 2... /usr
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FT_New_Face in -lfreetype... yes
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

Error free compiling.

Actual result:
--
config.log
--

configure:34852: checking for GD support
configure:34900: checking for the location of libjpeg
configure:34928: checking for the location of libpng
configure:34983: checking for the location of libXpm
configure:35009: checking for FreeType 2
configure:35035: checking for T1lib support
configure:35061: checking whether to enable truetype string function in
GD
configure:35087: checking whether to enable JIS-mapped Japanese font
support in GD
configure:35141: checking for fabsf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c -lcurl
-lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl
-lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:35153: warning: conflicting types for built-in function 'fabsf'
configure:35141: checking for floorf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c -lcurl
-lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl
-lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:35153: warning: conflicting types for built-in function
'floorf'
configure:35341: checking for jpeg_read_header in -ljpeg
configure:35360: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c -ljpeg
 -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto
-lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz
15
configure:35642: checking for png_write_image in -lpng
configure:35661: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lz conftest.c
-lpng  -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl
-lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl
-lcrypto -ldl -lz 15
configure:36041: checking for XpmFreeXpmImage in -lXpm
configure:36060: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lX11 conftest.c
-lXpm  -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl
-lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl
-lcrypto -ldl -lz 15
configure:36435: checking for FT_New_Face in -lfreetype
configure:36454: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lfreetype  -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl 
-lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz
-lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:42874: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c   
-lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl 
-lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz
-lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure: failed program was:
#line 42863 configure
#include confdefs.h

char foobar () {}
char foobar();
int main() {
  foobar();
  return 0;
}

-- 
Edit bug report at http://bugs.php.net/?id=48172edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48172r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48172r=trysnapshot53
Try a CVS snapshot (PHP 6.0):

#45228 [Fbk-WFx]: unlink() rmdir() do not work well with URL (file://)

2009-05-06 Thread pajoye
 ID:   45228
 Updated by:   paj...@php.net
 Reported By:  nanawel at eyeos dot org
-Status:   Feedback
+Status:   Wont fix
 Bug Type: Filesystem function related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

It is actually by design. I discussed with Rasmus and forgot to close
it.


Previous Comments:


[2009-05-06 18:55: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/

This most likely duplicate of bug #45040



[2009-03-02 16:07:37] paj...@php.net

Some notes:

- mkdir()
works with   file://C:/my/pathunder Windows
expected.

FAILS with   file:///C:/my/path   under Windows
expected (/c:/my/path is not a valid path)

FAILS with   file://localhost/C:/my/path  under Windows
expected,localhost/C:/my/path is not a valid path (same for linux,
fails as well)

However, the touch() funciton seems to have issue with file://, maybe
other as well but I did not test them all yet.

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux




[2009-01-07 14:58:00] nanawel at eyeos dot org

Ok, to sum up:

- mkdir()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux

- unlink()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

I think I didn't forget anything, hope this helps.



[2009-01-07 14:35:41] paj...@php.net

as the report is about both rmdir and unlink, the issue is not windows
specific. Will take care of it.



[2009-01-07 14:27:53] nanawel at eyeos dot org

Except for the rmdir() function which fails on both Windows AND Linux
platforms, all the paths provided in the previous comments are explicite
Windows paths.
You cannot use C:\ or C:/ or file://C:/ or something else under
Linux.

That's why I've just changed the OS concerned by the issue
from: * (all)
to: Windows

Thanks for your time.



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

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



#48167 [Fbk]: undefined function checkdnsrr()

2009-05-06 Thread fa
 ID:   48167
 Updated by:   f...@php.net
 Reported By:  frew dot robert at gmail dot com
 Status:   Feedback
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.3.0RC1
 New Comment:

That's not mentioned in the documentation, shouldn't this be converted
to a documentation bug then?


Previous Comments:


[2009-05-06 16:41:58] scott...@php.net

This function is only available if the configure script can find bind
on your system.

If you look at your config.log you'll probably find that its missing.



[2009-05-06 16:32:48] frew dot robert at gmail dot com

Description:

When using function checkdnsrr(), I get a Fatal error: Call to
undefined function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()





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



#48167 [Fbk-Tbd]: undefined function checkdnsrr()

2009-05-06 Thread pajoye
 ID:   48167
 Updated by:   paj...@php.net
 Reported By:  frew dot robert at gmail dot com
-Status:   Feedback
+Status:   To be documented
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.3.0RC1
 New Comment:

Yes, set it as to be documented.

Please not that as in 5.3, it is always available on windows.


Previous Comments:


[2009-05-06 19:30:46] f...@php.net

That's not mentioned in the documentation, shouldn't this be converted
to a documentation bug then?



[2009-05-06 16:41:58] scott...@php.net

This function is only available if the configure script can find bind
on your system.

If you look at your config.log you'll probably find that its missing.



[2009-05-06 16:32:48] frew dot robert at gmail dot com

Description:

When using function checkdnsrr(), I get a Fatal error: Call to
undefined function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()





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



#48164 [Com]: Script stops during a while

2009-05-06 Thread uvealonso at gmail dot com
 ID:   48164
 Comment by:   uvealonso at gmail dot com
 Reported By:  uvealonso at gmail dot com
 Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Ok, I give you this 2 codes:


First:
/
$tiempo1=microtime(true);
print START AT: .$tiempo1.br;

//DO IT 15 SECONDS
while((microtime(true)-$tiempo1)15){
//PRINT EVERY STEP
print STEP: .(microtime(true)-$tiempo1).br;
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tiempo1);



Second:
//
$tm1=microtime(true);
print START AT: .$tm1.br;
$t=0;

//DO IT 15 SECONDS
while((microtime(true)-$tm1)15){

//PRINT STEPS OF 0.1 SECS
if ((microtime(true)-$tm1)-$t0.1){
print STEP: .(microtime(true)-$tm).br;
$t=microtime(true)-$tm1;
}
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tm1);




The 2 scripts must stop inmediately after 15 secs.
The first works fine, but 2º stops after 10 seconds...

You cant test it here:
First example:
http://www.4mula1.es/libraries/pruebas/timeout-test-1.php
Second example:
http://www.4mula1.es/libraries/pruebas/timeout-test-2.php



PS: They have exactly the same code that I have wrote in this comment.


Previous Comments:


[2009-05-06 13:36:47] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


I really think we need even a rough description what func_modify()
does. From your description it could be a single complicated task or
something with thousands of iterations



[2009-05-06 13:01:00] uvealonso at gmail dot com

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it
stops 10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end





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



#48170 [Opn-Fbk]: Array key differentiates between unicode and binary strings

2009-05-06 Thread fa
 ID:   48170
 Updated by:   f...@php.net
 Reported By:  rodrigosouzadossantos at gmai dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *Unicode Issues
 Operating System: Debian Lenny
 PHP Version:  6CVS-2009-05-06 (snap)
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


Works for me with CVS HEAD on Debian lenny.
Are you sure the input from Postgres is not to blame?

Code:
-
$result[ 'app1' ] = 'app value';
$result[ 'app2' ] = 'some value';

print_r( $result );

var_dump( $result[ 'app1' ] );
var_dump( $result[ b'app1' ] );

Result:
---
Array
(
[app1] = app value
[app2] = some value
)
unicode(9) app value
NULL
 


Previous Comments:


[2009-05-06 18:00:14] rodrigosouzadossantos at gmai dot com

Description:

I have a array that is populated with result query from a Postgres. The
keys of array are the field name and the value are the field value. Like
this:

Array
(
[app1] = app value
[app2] = some value
)

Reproduce code:
---
$result[ 'app1' ] = 'app value';
$result[ 'app2' ] = 'some value';

print_r( $result );

var_dump( $result[ 'app1' ] );

Expected result:

string(9) app value


Actual result:
--
NULL


The result of var_dump is correct when is puts a 'b' (binary) before
string, like:

var_dump( $result[ b'app1' ] );

Is it the expected behavior?





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



#48164 [Fbk]: Script stops during a while

2009-05-06 Thread fa
 ID:   48164
 Updated by:   f...@php.net
 Reported By:  uvealonso at gmail dot com
 Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Can't reproduce with 5.2.9 CLI, could you provide some more details
about distribution, sapi, etc?
Or maybe test them on CLI?

(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164-2.php  FOO2

real0m15.011s
user0m0.120s
sys 0m14.893s
(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164.php  FOO

real0m15.020s
user0m0.160s
sys 0m14.749s

== FOO ==
START AT: 1241598435.2784
== FOO2 ==
START AT: 1241598254.2014

== FOO ==
END AT: 15.04053116
== FOO2 ==
END AT: 15.02145767


Previous Comments:


[2009-05-06 19:49:40] uvealonso at gmail dot com

Ok, I give you this 2 codes:


First:
/
$tiempo1=microtime(true);
print START AT: .$tiempo1.br;

//DO IT 15 SECONDS
while((microtime(true)-$tiempo1)15){
//PRINT EVERY STEP
print STEP: .(microtime(true)-$tiempo1).br;
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tiempo1);



Second:
//
$tm1=microtime(true);
print START AT: .$tm1.br;
$t=0;

//DO IT 15 SECONDS
while((microtime(true)-$tm1)15){

//PRINT STEPS OF 0.1 SECS
if ((microtime(true)-$tm1)-$t0.1){
print STEP: .(microtime(true)-$tm).br;
$t=microtime(true)-$tm1;
}
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tm1);




The 2 scripts must stop inmediately after 15 secs.
The first works fine, but 2º stops after 10 seconds...

You cant test it here:
First example:
http://www.4mula1.es/libraries/pruebas/timeout-test-1.php
Second example:
http://www.4mula1.es/libraries/pruebas/timeout-test-2.php



PS: They have exactly the same code that I have wrote in this comment.



[2009-05-06 13:36:47] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


I really think we need even a rough description what func_modify()
does. From your description it could be a single complicated task or
something with thousands of iterations



[2009-05-06 13:01:00] uvealonso at gmail dot com

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it
stops 10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end





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



#48172 [Opn-Fbk]: configure: error: GD build test failed.

2009-05-06 Thread jani
 ID:   48172
 Updated by:   j...@php.net
 Reported By:  frew dot robert at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Linux
 PHP Version:  5.3.0RC1
 New Comment:

What was the full configure line you used?


Previous Comments:


[2009-05-06 19:11:23] frew dot robert at gmail dot com

Description:

Compile fails with GD enabled.

checking for GD support... yes
checking for the location of libjpeg... /usr
checking for the location of libpng... /usr
checking for the location of libXpm... /usr
checking for FreeType 2... /usr
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FT_New_Face in -lfreetype... yes
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

Error free compiling.

Actual result:
--
config.log
--

configure:34852: checking for GD support
configure:34900: checking for the location of libjpeg
configure:34928: checking for the location of libpng
configure:34983: checking for the location of libXpm
configure:35009: checking for FreeType 2
configure:35035: checking for T1lib support
configure:35061: checking whether to enable truetype string function in
GD
configure:35087: checking whether to enable JIS-mapped Japanese font
support in GD
configure:35141: checking for fabsf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto
-lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz
15
configure:35153: warning: conflicting types for built-in function
'fabsf'
configure:35141: checking for floorf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto
-lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz
15
configure:35153: warning: conflicting types for built-in function
'floorf'
configure:35341: checking for jpeg_read_header in -ljpeg
configure:35360: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-ljpeg  -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5
-lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl
-lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto
-ldl -lz 15
configure:35642: checking for png_write_image in -lpng
configure:35661: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lz conftest.c
-lpng  -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl
-lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm
-lssl -lcrypto -ldl -lz 15
configure:36041: checking for XpmFreeXpmImage in -lXpm
configure:36060: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lX11
conftest.c -lXpm  -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl 
-lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz
-lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:36435: checking for FT_New_Face in -lfreetype
configure:36454: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lfreetype  -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl
-lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl
-lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl
-lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:42874: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c   
-lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl
 -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz
-lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure: failed program was:
#line 42863 configure
#include confdefs.h

char foobar () {}
char foobar();
int main() {
  foobar();
  return 0;
}



#48164 [Fbk-Opn]: Script stops during a while

2009-05-06 Thread uvealonso at gmail dot com
 ID:   48164
 User updated by:  uvealonso at gmail dot com
 Reported By:  uvealonso at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

I can't change the PHP version because the hosting.

Get all the php info here:
http://www.4mula1.es/libraries/pruebas/phpinfo.php


Previous Comments:


[2009-05-06 20:01:57] f...@php.net

Can't reproduce with 5.2.9 CLI, could you provide some more details
about distribution, sapi, etc?
Or maybe test them on CLI?

(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164-2.php  FOO2

real0m15.011s
user0m0.120s
sys 0m14.893s
(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164.php  FOO

real0m15.020s
user0m0.160s
sys 0m14.749s

== FOO ==
START AT: 1241598435.2784
== FOO2 ==
START AT: 1241598254.2014

== FOO ==
END AT: 15.04053116
== FOO2 ==
END AT: 15.02145767



[2009-05-06 19:49:40] uvealonso at gmail dot com

Ok, I give you this 2 codes:


First:
/
$tiempo1=microtime(true);
print START AT: .$tiempo1.br;

//DO IT 15 SECONDS
while((microtime(true)-$tiempo1)15){
//PRINT EVERY STEP
print STEP: .(microtime(true)-$tiempo1).br;
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tiempo1);



Second:
//
$tm1=microtime(true);
print START AT: .$tm1.br;
$t=0;

//DO IT 15 SECONDS
while((microtime(true)-$tm1)15){

//PRINT STEPS OF 0.1 SECS
if ((microtime(true)-$tm1)-$t0.1){
print STEP: .(microtime(true)-$tm).br;
$t=microtime(true)-$tm1;
}
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tm1);




The 2 scripts must stop inmediately after 15 secs.
The first works fine, but 2º stops after 10 seconds...

You cant test it here:
First example:
http://www.4mula1.es/libraries/pruebas/timeout-test-1.php
Second example:
http://www.4mula1.es/libraries/pruebas/timeout-test-2.php



PS: They have exactly the same code that I have wrote in this comment.



[2009-05-06 13:36:47] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


I really think we need even a rough description what func_modify()
does. From your description it could be a single complicated task or
something with thousands of iterations



[2009-05-06 13:01:00] uvealonso at gmail dot com

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it
stops 10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end





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



#45228 [WFx]: unlink() rmdir() do not work well with URL (file://)

2009-05-06 Thread nanawel at eyeos dot org
 ID:   45228
 User updated by:  nanawel at eyeos dot org
 Reported By:  nanawel at eyeos dot org
 Status:   Wont fix
 Bug Type: Filesystem function related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

What do you mean by design?
Is it designed to fail on such a case? Why??

Why mixing functions that work with fully qualified URL for local files
(like fopen) and some which don't??
Either all functions understand and work with URL, or none does.

At least, is the rmdir() case going to be fixed? (or is it already?)

Thanks in advance.


Previous Comments:


[2009-05-06 19:29:46] paj...@php.net

It is actually by design. I discussed with Rasmus and forgot to close
it.



[2009-05-06 18:55: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/

This most likely duplicate of bug #45040



[2009-03-02 16:07:37] paj...@php.net

Some notes:

- mkdir()
works with   file://C:/my/pathunder Windows
expected.

FAILS with   file:///C:/my/path   under Windows
expected (/c:/my/path is not a valid path)

FAILS with   file://localhost/C:/my/path  under Windows
expected,localhost/C:/my/path is not a valid path (same for linux,
fails as well)

However, the touch() funciton seems to have issue with file://, maybe
other as well but I did not test them all yet.

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux




[2009-01-07 14:58:00] nanawel at eyeos dot org

Ok, to sum up:

- mkdir()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux

- unlink()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

I think I didn't forget anything, hope this helps.



[2009-01-07 14:35:41] paj...@php.net

as the report is about both rmdir and unlink, the issue is not windows
specific. Will take care of it.



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

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



#45228 [WFx]: unlink() rmdir() do not work well with URL (file://)

2009-05-06 Thread pajoye
 ID:   45228
 Updated by:   paj...@php.net
 Reported By:  nanawel at eyeos dot org
 Status:   Wont fix
 Bug Type: Filesystem function related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

Only less than a handful protocols support the creation or deletion of
directories.


Previous Comments:


[2009-05-06 20:19:02] nanawel at eyeos dot org

What do you mean by design?
Is it designed to fail on such a case? Why??

Why mixing functions that work with fully qualified URL for local files
(like fopen) and some which don't??
Either all functions understand and work with URL, or none does.

At least, is the rmdir() case going to be fixed? (or is it already?)

Thanks in advance.



[2009-05-06 19:29:46] paj...@php.net

It is actually by design. I discussed with Rasmus and forgot to close
it.



[2009-05-06 18:55: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/

This most likely duplicate of bug #45040



[2009-03-02 16:07:37] paj...@php.net

Some notes:

- mkdir()
works with   file://C:/my/pathunder Windows
expected.

FAILS with   file:///C:/my/path   under Windows
expected (/c:/my/path is not a valid path)

FAILS with   file://localhost/C:/my/path  under Windows
expected,localhost/C:/my/path is not a valid path (same for linux,
fails as well)

However, the touch() funciton seems to have issue with file://, maybe
other as well but I did not test them all yet.

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux




[2009-01-07 14:58:00] nanawel at eyeos dot org

Ok, to sum up:

- mkdir()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

- rmdir()
FAILS with   ALL file:// schemes  under Windows and Linux

- unlink()
works with   file://C:/my/pathunder Windows
FAILS with   file:///C:/my/path   under Windows
FAILS with   file://localhost/C:/my/path  under Windows

I think I didn't forget anything, hope this helps.



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

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



#48172 [Com]: configure: error: GD build test failed.

2009-05-06 Thread frew dot robert at gmail dot com
 ID:   48172
 Comment by:   frew dot robert at gmail dot com
 Reported By:  frew dot robert at gmail dot com
 Status:   Feedback
 Bug Type: GD related
 Operating System: Linux
 PHP Version:  5.3.0RC1
 New Comment:

After process of elimination...  here is what I have found:

Using this configure:

./configure --with-libdir=lib64 --disable-rpath --with-pear
--with-curl=/usr/local/lib --with-gd

Gives me the GD build test failed error.

If I take out --disable-rpath.  It compiles fine.


Previous Comments:


[2009-05-06 20:03:03] j...@php.net

What was the full configure line you used?



[2009-05-06 19:11:23] frew dot robert at gmail dot com

Description:

Compile fails with GD enabled.

checking for GD support... yes
checking for the location of libjpeg... /usr
checking for the location of libpng... /usr
checking for the location of libXpm... /usr
checking for FreeType 2... /usr
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FT_New_Face in -lfreetype... yes
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

Error free compiling.

Actual result:
--
config.log
--

configure:34852: checking for GD support
configure:34900: checking for the location of libjpeg
configure:34928: checking for the location of libpng
configure:34983: checking for the location of libXpm
configure:35009: checking for FreeType 2
configure:35035: checking for T1lib support
configure:35061: checking whether to enable truetype string function in
GD
configure:35087: checking whether to enable JIS-mapped Japanese font
support in GD
configure:35141: checking for fabsf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto
-lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz
15
configure:35153: warning: conflicting types for built-in function
'fabsf'
configure:35141: checking for floorf
configure:35169: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto
-lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz
15
configure:35153: warning: conflicting types for built-in function
'floorf'
configure:35341: checking for jpeg_read_header in -ljpeg
configure:35360: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-ljpeg  -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5
-lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl
-lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto
-ldl -lz 15
configure:35642: checking for png_write_image in -lpng
configure:35661: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lz conftest.c
-lpng  -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl  -lxml2 -lz -lm
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl
-lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm
-lssl -lcrypto -ldl -lz 15
configure:36041: checking for XpmFreeXpmImage in -lXpm
configure:36060: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 -lX11
conftest.c -lXpm  -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl 
-lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz
-lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:36435: checking for FT_New_Face in -lfreetype
configure:36454: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c
-lfreetype  -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl
-lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl
-lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl
-lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz 15
configure:42874: gcc -o conftest -g -O2 -fvisibility=hidden  
-L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/lib64 conftest.c   
-lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lpcre -lm -ldl -lnsl
 -lxml2 -lz -lm 

#48164 [Opn-Fbk]: Script stops during a while

2009-05-06 Thread jani
 ID:   48164
 Updated by:   j...@php.net
 Reported By:  uvealonso at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

I can not reproduce this either and your test scripts are inherently 
flawed anyway. Please provice proper reproducing scripts which start 
with ?php and end with ? and don't have any notice/warning/fatal 
errors.


Previous Comments:


[2009-05-06 20:07:08] uvealonso at gmail dot com

I can't change the PHP version because the hosting.

Get all the php info here:
http://www.4mula1.es/libraries/pruebas/phpinfo.php



[2009-05-06 20:01:57] f...@php.net

Can't reproduce with 5.2.9 CLI, could you provide some more details
about distribution, sapi, etc?
Or maybe test them on CLI?

(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164-2.php  FOO2

real0m15.011s
user0m0.120s
sys 0m14.893s
(f...@debian):(~/code/src) $ time ./php-5.2.9/sapi/cli/php
~/tmp/while_48164.php  FOO

real0m15.020s
user0m0.160s
sys 0m14.749s

== FOO ==
START AT: 1241598435.2784
== FOO2 ==
START AT: 1241598254.2014

== FOO ==
END AT: 15.04053116
== FOO2 ==
END AT: 15.02145767



[2009-05-06 19:49:40] uvealonso at gmail dot com

Ok, I give you this 2 codes:


First:
/
$tiempo1=microtime(true);
print START AT: .$tiempo1.br;

//DO IT 15 SECONDS
while((microtime(true)-$tiempo1)15){
//PRINT EVERY STEP
print STEP: .(microtime(true)-$tiempo1).br;
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tiempo1);



Second:
//
$tm1=microtime(true);
print START AT: .$tm1.br;
$t=0;

//DO IT 15 SECONDS
while((microtime(true)-$tm1)15){

//PRINT STEPS OF 0.1 SECS
if ((microtime(true)-$tm1)-$t0.1){
print STEP: .(microtime(true)-$tm).br;
$t=microtime(true)-$tm1;
}
}

//IT MUST END 15 SECS AFTER THE START
print brEND AT: .(microtime(true)-$tm1);




The 2 scripts must stop inmediately after 15 secs.
The first works fine, but 2º stops after 10 seconds...

You cant test it here:
First example:
http://www.4mula1.es/libraries/pruebas/timeout-test-1.php
Second example:
http://www.4mula1.es/libraries/pruebas/timeout-test-2.php



PS: They have exactly the same code that I have wrote in this comment.



[2009-05-06 13:36:47] f...@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


I really think we need even a rough description what func_modify()
does. From your description it could be a single complicated task or
something with thousands of iterations



[2009-05-06 13:01:00] uvealonso at gmail dot com

Description:

Sometimes, the script stops 10 secs after the start, and others, it
doesn't stop and complete the operations...

I have tested with the same data and parameters, and sometimes, it
stops 10 secs after the script starts.

max_execution_time is 50

Reproduce code:
---
print start;

while ($a){
func_modify($a); //Here is a function that modifies $a
}

print end;

Expected result:

start
end

Actual result:
--
sometimes:
start

or

start
end





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



#48153 [Fbk-Opn]: php segfault in pcre function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2.9
 New Comment:

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting


Previous Comments:


[2009-05-06 18:37:28] 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/

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'




[2009-05-05 18:36:26] f...@php.net

verified with FreeBSD 7.1-RELEASE-p4 and current snapshot:
Segmentation fault: 11 (core dumped)
Although I didn't examine the coredump in detail


HEAD works fine



[2009-05-05 16:22:03] raul dot gigea at directmedia dot de

Description:

Hi, i mananged to reproduce this bug on various clean FreeBSD systems 
with php version 5.2.9, than compiled todays cvs snapshot version and 
the bug is still reproducible. 

Memory limit was 128MB which should be more than enough for the code 
that produced the crash.

Stacksize was 64MB. ( ulimit -s )

5.2.6 works fine. Also, disabling mhash extension fixes the problem.

Reducing pcre.recursion_limit and pcre.backtrack_limit in php.ini also

fixes the problem, but creates a new one, because the preg_replace 
function doesn't produce the expected results any more. ( They have to

be reduced to about 50, so that the segfault doesn't occur ) 

Details follow.

Configure Line: ./configure --with-mhash
List of modules: 

List of Modules:
./sapi/cli/php -m
[PHP Modules]
ctype
date
dom
filter
hash
iconv
json
libxml
mhash
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]


Reproduce code:
---
$contents = 'd' . str_repeat('a', 1900) . 'b';
$contents = preg_replace('/d(a)+b/', '', $contents);


Expected result:

$contents should be empty.

Actual result:
--
segmentation fault (core dumped)  ./sapi/cli/php ~/test.php

-
Backtrace
-

... starts with 1400 times the same call to match ... ( stack overflow

)
#1400 0x0808e030 in match (eptr=0x28923db9 'a' repeats 200 times...,

ecode=0x28a1666d _, mstart=0x28923db8 d, 'a' repeats 199 
times..., offset_top=2, md=0xbfbfcc30, ims=0, eptrb=0x0, flags=0, 
rdepth=0) at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:720
#1401 0x0809b118 in php_pcre_exec (argument_re=0x28a16640, 
extra_data=0xbfbfcd80, subject=0x28923db8 d, 'a' repeats 199 
times..., length=1902, start_offset=0, options=0, offsets=0x2892253c,

offsetcount=6)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:4895
#1402 0x080a10e6 in php_pcre_replace_impl (pce=0x28a15d40, 
subject=0x28923db8 d, 'a' repeats 199 times..., subject_len=1902, 
replace_val=0x28921db4, is_callable_replace=0, result_len=0xbfbfcf04, 
limit=-1, replace_count=0x0) at /usr/home/raul/php-
snapshot/php5.2-200905051430/ext/pcre/php_pcre.c:1045
#1403 0x080a0e86 in php_pcre_replace (regex=0x28923d80 /d(a)+b/, 
regex_len=8, subject=0x28923db8 d, 'a' repeats 199 times..., 
subject_len=1902, replace_val=0x28921db4, is_callable_replace=0, 
result_len=0xbfbfcf04, limit=-1, replace_count=0x0) at 
/usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:955
---Type return to continue, or q return to quit---
#1404 0x080a1d66 in php_replace_in_subject (regex=0x28921e2c, 
replace=0x28921db4, subject=0x28917a60, result_len=0xbfbfcf04, limit=-
1, is_callable_replace=0 '\0', replace_count=0x0)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1272
#1405 0x080a2684 in preg_replace_impl (ht=3, return_value=0x28923378, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=0 '\0')
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1370
#1406 0x080a2735 in zif_preg_replace (ht=3, return_value=0x28923378, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/usr/home/raul/php-snapshot/php5.2-

#47507 [Opn-Fbk]: PHP Notice: iconv(): Wrong charset

2009-05-06 Thread jani
 ID:   47507
 Updated by:   j...@php.net
 Reported By:  aboh24 at gmx dot de
-Status:   Open
+Status:   Feedback
 Bug Type: ICONV related
 Operating System: Solaris 10 / 64-bit
 PHP Version:  5.2.9
 New Comment:

I missed this earlier, you're using wrong configure options.
Just change the --with-iconv-dir=$PX to --with-iconv=$PX and try again.

Note: Do this with clean build dir.

Also, do not paste more test result outputs here, they're no value for

us. Just telling which tests fail is more useful. 



Previous Comments:


[2009-02-26 10:29:13] aboh24 at gmx dot de

This could maybe useful:

user# /usr/lib/iconv/UTF-8%ISO8859-1*
/usr/lib/iconv/UTF-8%ISO8859-11.so


it is mentioned in the truss output of the test php program:

access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
open(/usr/lib/iconv/alias, O_RDONLY)  = 3
fstat64(3, 0xFFBFEE60)  = 0
mmap(0x, 6311, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A
close(3)= 0
munmap(0xFF3A, 6311)= 0
access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13write(2, 
P H P   N o t i c e :  .., 151)  = 151

write(2, \n, 1)



[2009-02-26 08:59:45] aboh24 at gmx dot de

truss ./test.php
...
access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%8859-1.bt, R_OK)
Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%8859-1.so, R_OK)  = 0
stat(/usr/lib/iconv/UTF-8%8859-1.so, 0xFFBFE8A0) = 0
resolvepath(/usr/lib/iconv/UTF-8%8859-1.so,
/usr/lib/iconv/UTF-8%8859-1.so, 1023) = 30
open(/usr/lib/iconv/UTF-8%8859-1.so, O_RDONLY) = 4
...


Althoug the php was build with a local libiconv and explicit setting of
the prefix-path and LD_LIBRARY_PATH and --with-iconv-dir, etc. the
system want to load the iconv from  /usr/lib/iconv which do not
exists... :-(



[2009-02-26 07:52:46] aboh24 at gmx dot de

I rebuilt the codes with -m32 (this is default and means 32-bit
binaries) and it is the same problem.



[2009-02-26 07:12:49] aboh24 at gmx dot de

Description:

The iconv-function is not working correct on my Solaris 10 / 64-bit.
libiconv and php-5-2-8 (and others) were compiled with CFLAGS=-m64 and
CXXFLAGS=-m64 to enable 64-bit binaries.


./configure --prefix=$PX  \
--with-config-file-path=$PX/etc \
--with-apxs2=$PX/apache2/bin/apxs \
--with-iconv-dir=$PX \
--with-libxml-dir=$PX \
--with-zlib=$PX \
--with-zlib-dir=$PX \
--enable-mbstring \
--without-pear

php.ini changes:
extension=bitset.so




Reproduce code:
---
#!/home/si/suchopac/rt/bin/php -q
?php
print_r ( iconv_get_encoding());
print_r(get_loaded_extensions ());
print_r(get_defined_constants(true));

printf( %s \n,ICONV_IMPL);
printf( %s \n,ICONV_VERSION);

echo iconv('UTF-8', 'ASCII//TRANSLIT', test);
echo iconv('ASCII', 'UTF-8//TRANSLIT', test);

echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', test);
echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', test);

echo iconv('UTF-8', 'ISO-8859-1', test); // WORKING !
echo iconv('ISO-8859-1', 'UTF-8', test); // WORKING !


?


Expected result:

A verison implementaion and version number and six times test 

Actual result:
--
Only get 2 test string and 4 tests fails. 


Array
(
[input_encoding] = ISO-8859-1
[output_encoding] = ISO-8859-1
[internal_encoding] = ISO-8859-1
)
Array
(
[0] = xmlwriter
...
[16] = mbstring
[17] = json

[18] = iconv

[19] = hash
[20] = filter
[21] = date
[22] = ctype
[23] = zlib
[24] = bitset
)
Array
(
...
[iconv] = Array
(
[ICONV_IMPL] = unknown
[ICONV_VERSION] = unknown
[ICONV_MIME_DECODE_STRICT] = 1
[ICONV_MIME_DECODE_CONTINUE_ON_ERROR] = 2
)
...
)

 unknown 
 unknown 
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ASCII//TRANSLIT' is not allowed in /test.php on line 10
PHP Notice:  iconv(): Wrong charset, conversion from `ASCII' to
`UTF-8//TRANSLIT' is not allowed in /test.php on line 11
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13
PHP Notice:  iconv(): Wrong charset, conversion from 

#48153 [Opn-Fbk]: preg_replace() crashes in function match

2009-05-06 Thread jani
 ID:   48153
 Updated by:   j...@php.net
 Reported By:  raul dot gigea at directmedia dot de
-Status:   Open
+Status:   Feedback
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..


Previous Comments:


[2009-05-06 20:44:58] raul dot gigea at directmedia dot de

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting



[2009-05-06 18:37:28] 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/

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'




[2009-05-05 18:36:26] f...@php.net

verified with FreeBSD 7.1-RELEASE-p4 and current snapshot:
Segmentation fault: 11 (core dumped)
Although I didn't examine the coredump in detail


HEAD works fine



[2009-05-05 16:22:03] raul dot gigea at directmedia dot de

Description:

Hi, i mananged to reproduce this bug on various clean FreeBSD systems 
with php version 5.2.9, than compiled todays cvs snapshot version and 
the bug is still reproducible. 

Memory limit was 128MB which should be more than enough for the code 
that produced the crash.

Stacksize was 64MB. ( ulimit -s )

5.2.6 works fine. Also, disabling mhash extension fixes the problem.

Reducing pcre.recursion_limit and pcre.backtrack_limit in php.ini also

fixes the problem, but creates a new one, because the preg_replace 
function doesn't produce the expected results any more. ( They have to

be reduced to about 50, so that the segfault doesn't occur ) 

Details follow.

Configure Line: ./configure --with-mhash
List of modules: 

List of Modules:
./sapi/cli/php -m
[PHP Modules]
ctype
date
dom
filter
hash
iconv
json
libxml
mhash
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]


Reproduce code:
---
$contents = 'd' . str_repeat('a', 1900) . 'b';
$contents = preg_replace('/d(a)+b/', '', $contents);


Expected result:

$contents should be empty.

Actual result:
--
segmentation fault (core dumped)  ./sapi/cli/php ~/test.php

-
Backtrace
-

... starts with 1400 times the same call to match ... ( stack overflow

)
#1400 0x0808e030 in match (eptr=0x28923db9 'a' repeats 200 times...,

ecode=0x28a1666d _, mstart=0x28923db8 d, 'a' repeats 199 
times..., offset_top=2, md=0xbfbfcc30, ims=0, eptrb=0x0, flags=0, 
rdepth=0) at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:720
#1401 0x0809b118 in php_pcre_exec (argument_re=0x28a16640, 
extra_data=0xbfbfcd80, subject=0x28923db8 d, 'a' repeats 199 
times..., length=1902, start_offset=0, options=0, offsets=0x2892253c,

offsetcount=6)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:4895
#1402 0x080a10e6 in php_pcre_replace_impl (pce=0x28a15d40, 
subject=0x28923db8 d, 'a' repeats 199 times..., subject_len=1902, 
replace_val=0x28921db4, is_callable_replace=0, result_len=0xbfbfcf04, 
limit=-1, replace_count=0x0) at /usr/home/raul/php-
snapshot/php5.2-200905051430/ext/pcre/php_pcre.c:1045
#1403 0x080a0e86 in php_pcre_replace (regex=0x28923d80 /d(a)+b/, 
regex_len=8, subject=0x28923db8 d, 'a' repeats 199 times..., 
subject_len=1902, replace_val=0x28921db4, is_callable_replace=0, 
result_len=0xbfbfcf04, limit=-1, replace_count=0x0) at 
/usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:955
---Type return to continue, or q return to quit---
#1404 0x080a1d66 in php_replace_in_subject (regex=0x28921e2c, 
replace=0x28921db4, subject=0x28917a60, result_len=0xbfbfcf04, limit=-
1, is_callable_replace=0 '\0', replace_count=0x0)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/php_pcre.c:1272
#1405 0x080a2684 in preg_replace_impl (ht=3, return_value=0x28923378, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=0 '\0')
at /usr/home/raul/php-snapshot/php5.2-

#47740 [Asn-Bgs]: http_build_cookie() always returns false

2009-05-06 Thread jani
 ID:   47740
 Updated by:   j...@php.net
 Reported By:  jonathan dot aquino at gmail dot com
-Status:   Assigned
+Status:   Bogus
 Bug Type: HTTP related
 Operating System: Unix
 PHP Version:  5.2CVS-2009-03-21 (snap)
 Assigned To:  mike
 New Comment:

PECL bugs are supposed to be reported elsewhere, not in PHP core bugs.
http://pecl.php.net/bugs/ is good place to begin with..


Previous Comments:


[2009-03-21 04:31:35] ka...@php.net

The prototype for http_build_cookie() says that it accepts an array
only and the description below it says an array/object. The following:
C:\php\src\Release_TSphp -r $c =
http_parse_cookie('RMID=2dab5fc9296749c2f28ec0b7; expires=Saturday,
20-Mar-2010 01:34:06 GMT; path=/;domain=.nytimes.com');
var_dump(http_build_cookie($c));

gives:
Warning: http_build_cookie() expects parameter 1 to be array, object
given in Command line code on line 1
bool(false)

however casting it to an array before passing it to http_build_cookie,
like:
http_build_cookie((array) $c);


makes it work, assigned to Mike so he can clarrify its an error with
pecl/http or a documentation issue.



[2009-03-21 04:14:27] jonathan dot aquino at gmail dot com

Description:

http_build_cookie returns false. PHP 5.2.6.

Reproduce code:
---
$cookie = http_parse_cookie('RMID=2dab5fc9296749c2f28ec0b7;
expires=Saturday, 20-Mar-2010 01:34:06 GMT; path=/;
domain=.nytimes.com'); 
var_dump(http_build_cookie($cookie)); 

Expected result:

RMID=2dab5fc9296749c2f28ec0b7

Actual result:
--
FALSE





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



#47742 [Opn-Fbk]: mb_strtoupper() and mb_strtolower() failure cases

2009-05-06 Thread jani
 ID:   47742
 Updated by:   j...@php.net
 Reported By:  fsb at thefsb dot org
-Status:   Open
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: os x
 PHP Version:  5.2.9
 New Comment:

This script:
?php
$s = '#935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;';
echo orig: $s\n;
$s = mb_strtoupper($s);
echo mb_strtoupper: $s\n;
$s = mb_convert_case($s, MB_CASE_UPPER, UTF-8);
echo mb_convert_case (upper): $s\n;
$s = mb_strtolower($s);
echo mb_strtolower: $s\n;
$s = mb_convert_case($s, MB_CASE_LOWER, UTF-8);
echo mb_convert_case (lower): $s\n;
?

Outputs:

orig: #935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_strtoupper: #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921;
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_convert_case (upper): #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921; 
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_strtolower: #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_convert_case (lower): #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953; 
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;

And this is quite correct..


Previous Comments:


[2009-05-05 11:37:26] fsb at thefsb dot org

in both test scripts i provided yesterday, the character set is unicode

and the encoding is utf-8.

in the short test script that i provided 4 May 7:02pm UTC, there is
only 
one short Hangul test string and no Greek, as you said.

in the longer test script i provided at 4 May 5:00pm UTC, several 
alphabets are used including Greek, Cyrillic, Hebrew, Arabic, Thai, 
Kanji, ...

in case it makes life easier for you, i put the longer test script on a

web server: http://tomworster.net/test.php.gz  it's only 1kbyte.



[2009-05-05 02:02:39] j...@php.net

One last question: What is the charset you used? I don't see any greek

chars anywhere.. ;)



[2009-05-04 19:02:43] fsb at thefsb dot org

?php
  $s = '이며 세계';
  print(phpversion() . \n);
  print(1: $s\n);
  print('2: '. ($s = mb_strtoupper($s)) . \n);
  print('3'. ($s = mb_convert_case($s, MB_CASE_UPPER, UTF-8)) . 
\n);
  print('4: '. ($s = mb_strtolower($s)) . \n);
  print('5: '. ($s = mb_convert_case($s, MB_CASE_LOWER, UTF-8)) . 
\n);
?

 ./php -f test2.php 
5.2.10-dev
1: 이며 세계
2: ̝?˩? ̄?ʳ?
3̝˩ ̄ʳ
4: ?? ??
5:  

expected output:
1: 이며 세계
2: 이며 세계
3: 이며 세계
4: 이며 세계
5: 이며 세계



[2009-05-04 18:46:54] j...@php.net

Please provide a bit shorter example script. Or does the bug only
appear 
with such long strings..?



[2009-03-21 17:42:53] fsb at thefsb dot org

Description:

In some alphabets including greek, mb_strtoupper and mb_strtolower fail

on strings that mb_convert_case handles ok.

Reproduce code:
---
?php
$strs = array(
'החמאס: רוצים להשלים את עסקת שליט
במהירות האפשרית',
'ايران لا ترى تغييرا في الموقف
الأمريكي',
'独・米で死傷者を出した銃の乱射事件',
'國會預算處公布驚人的赤字數據後',
'이며 세계 경제 회복에 걸림돌이 되고 있다',
'В дагестанском лесном массиве 
южнее
села Какашура',
'นายประสิทธิ์ 
รุ่งสะอาด
ปลัดเทศบาล
รักษาการแทนนายกเทศมนตรี
ต.ท่าทองใหม่',
'ભારતીય ટીમનો સુવર્ણ 
યુગ :
કિવીઝમાં પણ કમાલ',


#47742 [Fbk]: mb_strtoupper() and mb_strtolower() failure cases

2009-05-06 Thread jani
 ID:   47742
 Updated by:   j...@php.net
 Reported By:  fsb at thefsb dot org
 Status:   Feedback
 Bug Type: mbstring related
 Operating System: os x
 PHP Version:  5.2.9
 New Comment:

Ignore the previous, this bad bug system messed up the input. :)
Here's the actual stuff: http://pecl.php.net/~jani/bug47742.out


Previous Comments:


[2009-05-06 21:07:33] j...@php.net

This script:
?php
$s = '#935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;';
echo orig: $s\n;
$s = mb_strtoupper($s);
echo mb_strtoupper: $s\n;
$s = mb_convert_case($s, MB_CASE_UPPER, UTF-8);
echo mb_convert_case (upper): $s\n;
$s = mb_strtolower($s);
echo mb_strtolower: $s\n;
$s = mb_convert_case($s, MB_CASE_LOWER, UTF-8);
echo mb_convert_case (lower): $s\n;
?

Outputs:

orig: #935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_strtoupper: #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921;
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_convert_case (upper): #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921; 
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_strtolower: #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_convert_case (lower): #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953; 
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;

And this is quite correct..



[2009-05-05 11:37:26] fsb at thefsb dot org

in both test scripts i provided yesterday, the character set is unicode

and the encoding is utf-8.

in the short test script that i provided 4 May 7:02pm UTC, there is
only 
one short Hangul test string and no Greek, as you said.

in the longer test script i provided at 4 May 5:00pm UTC, several 
alphabets are used including Greek, Cyrillic, Hebrew, Arabic, Thai, 
Kanji, ...

in case it makes life easier for you, i put the longer test script on a

web server: http://tomworster.net/test.php.gz  it's only 1kbyte.



[2009-05-05 02:02:39] j...@php.net

One last question: What is the charset you used? I don't see any greek

chars anywhere.. ;)



[2009-05-04 19:02:43] fsb at thefsb dot org

?php
  $s = '이며 세계';
  print(phpversion() . \n);
  print(1: $s\n);
  print('2: '. ($s = mb_strtoupper($s)) . \n);
  print('3'. ($s = mb_convert_case($s, MB_CASE_UPPER, UTF-8)) . 
\n);
  print('4: '. ($s = mb_strtolower($s)) . \n);
  print('5: '. ($s = mb_convert_case($s, MB_CASE_LOWER, UTF-8)) . 
\n);
?

 ./php -f test2.php 
5.2.10-dev
1: 이며 세계
2: ̝?˩? ̄?ʳ?
3̝˩ ̄ʳ
4: ?? ??
5:  

expected output:
1: 이며 세계
2: 이며 세계
3: 이며 세계
4: 이며 세계
5: 이며 세계



[2009-05-04 18:46:54] j...@php.net

Please provide a bit shorter example script. Or does the bug only
appear 
with such long strings..?



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

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



#48153 [Fbk-Opn]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 Assigned To:  fb-req-jani
 New Comment:

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit


Previous Comments:


[2009-05-06 20:53:44] j...@php.net

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..



[2009-05-06 20:44:58] raul dot gigea at directmedia dot de

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting



[2009-05-06 18:37:28] 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/

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'




[2009-05-05 18:36:26] f...@php.net

verified with FreeBSD 7.1-RELEASE-p4 and current snapshot:
Segmentation fault: 11 (core dumped)
Although I didn't examine the coredump in detail


HEAD works fine



[2009-05-05 16:22:03] raul dot gigea at directmedia dot de

Description:

Hi, i mananged to reproduce this bug on various clean FreeBSD systems 
with php version 5.2.9, than compiled todays cvs snapshot version and 
the bug is still reproducible. 

Memory limit was 128MB which should be more than enough for the code 
that produced the crash.

Stacksize was 64MB. ( ulimit -s )

5.2.6 works fine. Also, disabling mhash extension fixes the problem.

Reducing pcre.recursion_limit and pcre.backtrack_limit in php.ini also

fixes the problem, but creates a new one, because the preg_replace 
function doesn't produce the expected results any more. ( They have to

be reduced to about 50, so that the segfault doesn't occur ) 

Details follow.

Configure Line: ./configure --with-mhash
List of modules: 

List of Modules:
./sapi/cli/php -m
[PHP Modules]
ctype
date
dom
filter
hash
iconv
json
libxml
mhash
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]


Reproduce code:
---
$contents = 'd' . str_repeat('a', 1900) . 'b';
$contents = preg_replace('/d(a)+b/', '', $contents);


Expected result:

$contents should be empty.

Actual result:
--
segmentation fault (core dumped)  ./sapi/cli/php ~/test.php

-
Backtrace
-

... starts with 1400 times the same call to match ... ( stack overflow

)
#1400 0x0808e030 in match (eptr=0x28923db9 'a' repeats 200 times...,

ecode=0x28a1666d _, mstart=0x28923db8 d, 'a' repeats 199 
times..., offset_top=2, md=0xbfbfcc30, ims=0, eptrb=0x0, flags=0, 
rdepth=0) at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:720
#1401 0x0809b118 in php_pcre_exec (argument_re=0x28a16640, 
extra_data=0xbfbfcd80, subject=0x28923db8 d, 'a' repeats 199 
times..., length=1902, start_offset=0, options=0, offsets=0x2892253c,

offsetcount=6)
at /usr/home/raul/php-snapshot/php5.2-
200905051430/ext/pcre/pcrelib/pcre_exec.c:4895
#1402 0x080a10e6 in php_pcre_replace_impl (pce=0x28a15d40, 
subject=0x28923db8 d, 'a' repeats 199 times..., subject_len=1902, 
replace_val=0x28921db4, is_callable_replace=0, result_len=0xbfbfcf04, 
limit=-1, replace_count=0x0) at /usr/home/raul/php-
snapshot/php5.2-200905051430/ext/pcre/php_pcre.c:1045
#1403 0x080a0e86 in php_pcre_replace (regex=0x28923d80 /d(a)+b/, 
regex_len=8, subject=0x28923db8 d, 'a' repeats 

#48167 [Com]: undefined function checkdnsrr()

2009-05-06 Thread frew dot robert at gmail dot com
 ID:   48167
 Comment by:   frew dot robert at gmail dot com
 Reported By:  frew dot robert at gmail dot com
 Status:   To be documented
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.3.0RC1
 Assigned To:  fa
 New Comment:

Recompiled PHP and the problem went away.


Previous Comments:


[2009-05-06 19:34:39] paj...@php.net

Yes, set it as to be documented.

Please not that as in 5.3, it is always available on windows.



[2009-05-06 19:30:46] f...@php.net

That's not mentioned in the documentation, shouldn't this be converted
to a documentation bug then?



[2009-05-06 16:41:58] scott...@php.net

This function is only available if the configure script can find bind
on your system.

If you look at your config.log you'll probably find that its missing.



[2009-05-06 16:32:48] frew dot robert at gmail dot com

Description:

When using function checkdnsrr(), I get a Fatal error: Call to
undefined function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()





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



#48153 [Opn-Bgs]: preg_replace() crashes in function match

2009-05-06 Thread jani
 ID:   48153
 Updated by:   j...@php.net
 Reported By:  raul dot gigea at directmedia dot de
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 Assigned To:  fb-req-jani
 New Comment:

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.


Previous Comments:


[2009-05-06 21:11:12] raul dot gigea at directmedia dot de

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit



[2009-05-06 20:53:44] j...@php.net

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..



[2009-05-06 20:44:58] raul dot gigea at directmedia dot de

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting



[2009-05-06 18:37:28] 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/

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'




[2009-05-05 18:36:26] f...@php.net

verified with FreeBSD 7.1-RELEASE-p4 and current snapshot:
Segmentation fault: 11 (core dumped)
Although I didn't examine the coredump in detail


HEAD works fine



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

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



#46679 [Opn-Ver]: WSDL Error SOAP-ERROR unresolved element 'ref'

2009-05-06 Thread jani
 ID:   46679
 Updated by:   j...@php.net
 Reported By:  internet at cardiff dot fr
-Status:   Open
+Status:   Verified
 Bug Type: SOAP related
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-05)


Previous Comments:


[2008-11-27 08:57:54] internet at cardiff dot fr

Description:

When parsing a validated WSDL Structure (WSDL is government issued)
php throws  : 
Error: WSDL Error Details: SOAP-ERROR: Parsing Schema: unresolved
element 'ref'

Error is declared solved in 5.2.5 but is not...

Reproduce code:
---
 try
 {
$client = new
SoapClient('http://www.nycotix.net/test/wsdl/ImmatTestService/ImmatTestSe
rvice.wsdl', 
array(trace = true, exceptions = true, 'soap_version' =
SOAP_1_2));
}

Expected result:

No errors thrown



[2008-11-26 09:23:59] internet at cardiff dot fr

Description:

When parsing a validated WSDL Structure (WSDL is government issued)
php throws  : 
Error: WSDL Error Details: SOAP-ERROR: Parsing Schema: unresolved
element 'ref'

Error is declared solved in 5.2.5 but is not...

Reproduce code:
---
 try
 {
$client = new
SoapClient('http://www.cardiff.fr/test/wsdl/TestImmatService/TestImmatService.wsdl',

array(trace = true, exceptions = true, 'soap_version' =
SOAP_1_2));
}

Expected result:

No errors thrown






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



#48151 [Opn-Fbk]: Joining key returns as blank when key is used in OUT LEFT JOIN

2009-05-06 Thread jani
 ID:   48151
 Updated by:   j...@php.net
 Reported By:  mail at danhofnann dot com
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2009-05-05 07:26:45] mail at danhofnann dot com

Description:

If you do an OUTER LEFT JOIN and set PDO FetchALL to PDO::FETCH_ASSOC,
any primary keys you used in the OUTER LEFT JOIN will be set to a blank
if there are no records returned in the JOIN.
If we are joining using a field called product_id from a product
table to an image table using an outer left join, and no records exist
for that product_id in the image table, the product id comes back as
blank in the resulting array

Reproduce code:
---
//query the product table and join to the image table and return any
images, if we have any, for each product. Assume the image table
contains no records

$sql = SELECT * FROM product, image
LEFT OUTER JOIN image ON (product.product_id = image.product_id);

$array = $stmt-fetchAll(PDO::FETCH_ASSOC);

print_r($array);
?




Expected result:

Array
(
[0] = Array
(
[product_id] = 16
[notes] = this product...
[brand] = Best Yet
...

Actual result:
--
Array
(
[0] = Array
(
[product_id] = 
[notes] = this product...
[brand] = Best Yet
...





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



#48122 [Opn-Fbk]: odbc_cursor() returns empty name

2009-05-06 Thread jani
 ID:   48122
 Updated by:   j...@php.net
 Reported By:  theodoreb at goshen dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Gentoo Linux
 PHP Version:  5.2.9
 New Comment:

Try this:

?php
error_reporting(E_ALL);
$conn = odbc_connect(mssql, login, passwd,SQL_CUR_USE_ODBC);
var_dump($conn, odbc_errormsg($conn));
$query = SELECT * FROM tablename;
$cur = odbc_exec($conn,$query);
var_dump(odbc_errormsg($conn));
echo odbc_cursor($cur);
var_dump(odbc_errormsg($conn));
?



Previous Comments:


[2009-04-30 16:08:45] theodoreb at goshen dot edu

Description:

odbc_cursor() returns empty string when the connection is created using
odbc_connect() with SQL_CUR_USE_ODBC as the fourth parameter.

Using unixODBC-2.2.12 and freetds-0.82-r2 to connect to Microsoft SQL
Server 2008.

Reproduce code:
---
$conn = odbc_connect(mssql, login, passwd,SQL_CUR_USE_ODBC);
$query = SELECT *
FROM tablename;
$cur = odbc_exec($conn,$query);
echo odbc_cursor($cur);


Expected result:

cursor name of $cur, something like SQL_CURa70b90

Actual result:
--
empty string ''





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



#47944 [Opn-Fbk]: summary

2009-05-06 Thread jani
 ID:   47944
 Updated by:   j...@php.net
 Reported By:  bies22 at poczta dot onet dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: windows
 PHP Version:  5.2.9
 New Comment:

Need proper summary and proper reproduce script. Neither compute right

now..


Previous Comments:


[2009-04-10 08:27:00] bies22 at poczta dot onet dot pl

Description:

When I execute SQL with function mssql_query, after 3 execute is error.
The same SQL command executed with function odbc_do is correct.

Reproduce code:
---
$sql = INSERT INTO cdn.EL_SS_ZSElemTmp VALUES (7,48,'PCW Okno Zendow
Kolor
x1',1.000,535.93,535.93,'A','ZLC/9/02700-TEST','ZLC/9/02700-TEST','3392/2009','14');
$rst_mssql = mssql_query($sql,$conn);

Actual result:
--
Warning: mssql_query() [function.mssql-query]: message: Incorrect
syntax near ''. (severity 15)

Warning: mssql_query() [function.mssql-query]: message: Unclosed
quotation mark after the character string ')'. (severity 15)

Warning: mssql_query() [function.mssql-query]: Query failed





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



#47924 [Opn-Fbk]: Exchange 2007: UpdateItem: Fatal error: SOAP-ERROR: Encoding: object hasn't 'Pat

2009-05-06 Thread jani
 ID:   47924
 Updated by:   j...@php.net
-Summary:  Exchange 2007: UpdateItem: Fatal error: SOAP-ERROR:
   Encoding: object hasn't 'Pa
 Reported By:  philipp at kolmann dot at
-Status:   Open
+Status:   Feedback
 Bug Type: SOAP related
 Operating System: Linux, Debian Sid
 PHP Version:  5.2.9
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2009-04-08 10:55:11] philipp at kolmann dot at

Description:

I am using PHP and SOAP to talk to a Exchange 2007 server. Adding items
works without a Problem. Now I wanted to update an Item:

The Request looks quite promising, but seems to fail some XML
validation.

Regarding to the MS Docs
(http://msdn.microsoft.com/en-us/library/aa581022.aspx) The Path element
is an abstract element that is substituted by FieldURI. This seems not
to happen.

If needed I can add the wsdl-files.

Thanks
Philipp

Reproduce code:
---
$UpdateItem-MessageDisposition =SaveOnly;
$UpdateItem-ConflictResolution=AutoResolve;
$UpdateItem-ItemChanges-ItemChange-ItemId-Id = $item-ItemId-Id;
$UpdateItem-ItemChanges-ItemChange-ItemId-ChangeKey =
$item-ItemId-ChangeKey;
$UpdateItem-ItemChanges-ItemChange-Updates-SetItemField-FieldURI-FieldURI
= item:Sensitivity;
$UpdateItem-ItemChanges-ItemChange-Updates-SetItemField-Message-Sensitivity
= Normal;

$res = $client-UpdateItem($UpdateItem);

Expected result:

Request beeing properly sent to Exchange Server.

Actual result:
--
stdClass Object
(
[MessageDisposition] = SaveOnly
[ConflictResolution] = AutoResolve
[ItemChanges] = stdClass Object
(
[ItemChange] = stdClass Object
(
[ItemId] = stdClass Object
(
[Id] =
AAAeAHBrb2xtYW5uQGthbGVuZGVyLnR1d2llbi5hYy5hdABGAACkwH79RYBrRLOe5dwPwABJBwCWSqnpWEwlT7Z+LCzPQIE9AYXBAABeyHGqwz04TojssSJ14nFUADMmYzOVAAA=
[ChangeKey] =
DwAAABYAAABeyHGqwz04TojssSJ14nFUADMmZDks
)

[Updates] = stdClass Object
(
[SetItemField] = stdClass Object
(
[FieldURI] = stdClass Object
(
[FieldURI] =
item:Sensitivity
)

[Message] = stdClass Object
(
[Sensitivity] = Normal
)

)

)

)

)

)

Fatal error: SOAP-ERROR: Encoding: object hasn't 'Path' property in
addtermin.php on line 87





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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.


Previous Comments:


[2009-05-06 21:20:01] j...@php.net

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.



[2009-05-06 21:11:12] raul dot gigea at directmedia dot de

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit



[2009-05-06 20:53:44] j...@php.net

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..



[2009-05-06 20:44:58] raul dot gigea at directmedia dot de

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting



[2009-05-06 18:37:28] 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/

I can not reproduce this with linux and latest PHP_5_2 snapshot using 
this configure line:

'/usr/src/php-5.2CVS/configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'




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

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



#48122 [Fbk-Opn]: odbc_cursor() returns empty name

2009-05-06 Thread theodoreb at goshen dot edu
 ID:   48122
 User updated by:  theodoreb at goshen dot edu
 Reported By:  theodoreb at goshen dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Gentoo Linux
 PHP Version:  5.2.9
 New Comment:

Thanks for responding. 

I tried your code as follow:

error_reporting(E_ALL);
$conn = odbc_connect(mssql, login, passwd,SQL_CUR_USE_ODBC);
var_dump($conn, odbc_errormsg($conn));
$query = SELECT * FROM tablename;
$cur = odbc_exec($conn,$query);
var_dump(odbc_errormsg($conn));
echo odbc_cursor($cur);
var_dump(odbc_errormsg($conn));

Here is the result:
resource(16) of type (odbc link) string(0)  string(0)  string(0) 


Previous Comments:


[2009-05-06 21:37:31] j...@php.net

Try this:

?php
error_reporting(E_ALL);
$conn = odbc_connect(mssql, login, passwd,SQL_CUR_USE_ODBC);
var_dump($conn, odbc_errormsg($conn));
$query = SELECT * FROM tablename;
$cur = odbc_exec($conn,$query);
var_dump(odbc_errormsg($conn));
echo odbc_cursor($cur);
var_dump(odbc_errormsg($conn));
?




[2009-04-30 16:08:45] theodoreb at goshen dot edu

Description:

odbc_cursor() returns empty string when the connection is created using
odbc_connect() with SQL_CUR_USE_ODBC as the fourth parameter.

Using unixODBC-2.2.12 and freetds-0.82-r2 to connect to Microsoft SQL
Server 2008.

Reproduce code:
---
$conn = odbc_connect(mssql, login, passwd,SQL_CUR_USE_ODBC);
$query = SELECT *
FROM tablename;
$cur = odbc_exec($conn,$query);
echo odbc_cursor($cur);


Expected result:

cursor name of $cur, something like SQL_CURa70b90

Actual result:
--
empty string ''





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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

By the way, the mhash lib version is 0.9.9.


Previous Comments:


[2009-05-06 22:09:55] raul dot gigea at directmedia dot de

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.



[2009-05-06 21:20:01] j...@php.net

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.



[2009-05-06 21:11:12] raul dot gigea at directmedia dot de

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit



[2009-05-06 20:53:44] j...@php.net

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..



[2009-05-06 20:44:58] raul dot gigea at directmedia dot de

Ok, i tried using the CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
Which by the way was only 1 day newer than the one I tried.

I used your configure line:

'configure' \
'--disable-all' \
'--enable-debug' \
'--disable-reflection' \
'--disable-cgi' \
'--with-curl' \
'--with-curlwrappers' \
'--with-pcre-regex' \
'--with-mhash'

And its still segfaulting



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

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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread scottmac
 ID:   48153
 Updated by:   scott...@php.net
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

The mhash library is gone in 5.3 and replaced with a wrapper around the
hash library.

Can you try a 5.3 snapshot and see if you get the issue?

I should say I can't reproduce this on 5.2 on OSX with the same
configure like Jani used.


Previous Comments:


[2009-05-06 22:18:19] raul dot gigea at directmedia dot de

By the way, the mhash lib version is 0.9.9.



[2009-05-06 22:09:55] raul dot gigea at directmedia dot de

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.



[2009-05-06 21:20:01] j...@php.net

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.



[2009-05-06 21:11:12] raul dot gigea at directmedia dot de

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit



[2009-05-06 20:53:44] j...@php.net

You need to increase the stack size. I tried with 'ulimit -s 1024' and

that does not crash..



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

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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

Just tried it: with the 5.3 snapshot it works.

Compiling 5.2 on OSX right now


Previous Comments:


[2009-05-06 22:30:22] scott...@php.net

The mhash library is gone in 5.3 and replaced with a wrapper around the
hash library.

Can you try a 5.3 snapshot and see if you get the issue?

I should say I can't reproduce this on 5.2 on OSX with the same
configure like Jani used.



[2009-05-06 22:18:19] raul dot gigea at directmedia dot de

By the way, the mhash lib version is 0.9.9.



[2009-05-06 22:09:55] raul dot gigea at directmedia dot de

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.



[2009-05-06 21:20:01] j...@php.net

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.



[2009-05-06 21:11:12] raul dot gigea at directmedia dot de

I already wrote that my stacksize was 64 MB. ulimit -s 1024 would 
reduce it to only 1 MB. 64MB is the upper limit without recompiling 
the kernel. And i don't think that this specific regex should eat up 
64 MB of stack size ...

Anyway, here's the result:

% ulimit -s 1024   
% ulimit -s
1024
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65535
% ulimit -s
65535
% ./sapi/cli/php ~/test.php
zsh: segmentation fault (core dumped)  ./sapi/cli/php ~/test.php
% ulimit -s 65537
ulimit: value exceeds hard limit



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

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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

Ok, tried it on osx. It doesn't crash with 1900 'a''s, but it crashes 
with 2900. 

Try this code on OSX with 5.2CVS, it crashes on my macbook. With latest

libmhash from macports as of today ( 0.9.9.9_0 ) :

$contents = 'sud' . str_repeat('a', 2900) . 'bccess';
$contents = preg_replace('/d(a)+b/', '', $contents);
echo $contents;


Previous Comments:


[2009-05-06 22:54:53] raul dot gigea at directmedia dot de

Just tried it: with the 5.3 snapshot it works.

Compiling 5.2 on OSX right now



[2009-05-06 22:30:22] scott...@php.net

The mhash library is gone in 5.3 and replaced with a wrapper around the
hash library.

Can you try a 5.3 snapshot and see if you get the issue?

I should say I can't reproduce this on 5.2 on OSX with the same
configure like Jani used.



[2009-05-06 22:18:19] raul dot gigea at directmedia dot de

By the way, the mhash lib version is 0.9.9.



[2009-05-06 22:09:55] raul dot gigea at directmedia dot de

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.



[2009-05-06 21:20:01] j...@php.net

You either have to increase the stack size or tune pcre.recursion_limit

and pcre.backtrack_limit properly.



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

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



#48153 [Bgs]: preg_replace() crashes in function match

2009-05-06 Thread raul dot gigea at directmedia dot de
 ID:   48153
 User updated by:  raul dot gigea at directmedia dot de
 Reported By:  raul dot gigea at directmedia dot de
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: FreeBSD 7.1-RELEASE-p4
 PHP Version:  5.2CVS-2009-05-06 (snap)
 New Comment:

by the way, with more than 3 a's it segfaults with 5.3 too.

$contents = 'sud' . str_repeat('a', 3) . 'bccess';
$contents = preg_replace('/d(a)+b/', '', $contents);
echo $contents


Previous Comments:


[2009-05-06 23:23:36] raul dot gigea at directmedia dot de

Ok, tried it on osx. It doesn't crash with 1900 'a''s, but it crashes 
with 2900. 

Try this code on OSX with 5.2CVS, it crashes on my macbook. With latest

libmhash from macports as of today ( 0.9.9.9_0 ) :

$contents = 'sud' . str_repeat('a', 2900) . 'bccess';
$contents = preg_replace('/d(a)+b/', '', $contents);
echo $contents;



[2009-05-06 22:54:53] raul dot gigea at directmedia dot de

Just tried it: with the 5.3 snapshot it works.

Compiling 5.2 on OSX right now



[2009-05-06 22:30:22] scott...@php.net

The mhash library is gone in 5.3 and replaced with a wrapper around the
hash library.

Can you try a 5.3 snapshot and see if you get the issue?

I should say I can't reproduce this on 5.2 on OSX with the same
configure like Jani used.



[2009-05-06 22:18:19] raul dot gigea at directmedia dot de

By the way, the mhash lib version is 0.9.9.



[2009-05-06 22:09:55] raul dot gigea at directmedia dot de

I already described this in my original bug report, but I'll try to be

more explicit:
As I described before, if I tune pcre.recursion_limit and 
pcre.backtrack_limit, than I get no segfault, but neither do I get the

correct output. As an example, this code:

  $contents = 'sud' . str_repeat('a', 1900) . 'bccess';
  $contents = preg_replace('/d(a)+b/', '', $contents);
  echo $contents

Segfaults if recursion_limit/backtrack_limit is too high. Prints 
success if everything went well, and prints nothing if 
recursion_limit is too low.

I can only get it to print nothing tuning those two parameters. ( over
backtrack_limit 2458 it crashes, below 2457 it doesn't print anything 
). So it's a workaround the segfault, but you get another problem - 
you don't get the wanted result.

I suspect the problem could be in the mhash library, and the way php 
uses it, because it prints 'success' if I disable the mhash extension.



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

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



#48173 [NEW]: file_exists fails to find in include_path when using __autoload

2009-05-06 Thread kevinpeno at gmail dot com
From: kevinpeno at gmail dot com
Operating system: Windows Server 2008
PHP version:  5.2.9
PHP Bug Type: Filesystem function related
Bug description:  file_exists fails to find in include_path when using 
__autoload

Description:

Using file_exists fails to find valid files within include_path when using
an __autoload. Removing file_exists() the required file is found and
loaded.

Safe mode is not enabled.

Reproduce code:
---
?php
function __autoload( $classname )
{
$file = str_replace( '_', DIRECTORY_SEPARATOR, $classname ).'.php';

if( file_exists( $file ) )
{
require( $file );
return true;
}
else
{
return FALSE;
}
}
# Sets include path to the current directory just for easy testing.
set_include_path( realpath( dirname(__FILE__)
).DIRECTORY_SEPARATOR.PATH_SEPARATOR.get_include_path() );

$test = new Prefix_ClassName();
?

Expected result:

File included class initialized.

Actual result:
--
Fatal error: Class 'Prefix_ClassName' not found.

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



#48173 [Opn]: file_exists fails to find in include_path when using __autoload

2009-05-06 Thread kevinpeno at gmail dot com
 ID:   48173
 User updated by:  kevinpeno at gmail dot com
 Reported By:  kevinpeno at gmail dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows Server 2008
 PHP Version:  5.2.9
 New Comment:

I'm using windows build 5.2.9-2 NTS. This option was not selectable.


Previous Comments:


[2009-05-06 23:54:36] kevinpeno at gmail dot com

Description:

Using file_exists fails to find valid files within include_path when
using an __autoload. Removing file_exists() the required file is found
and loaded.

Safe mode is not enabled.

Reproduce code:
---
?php
function __autoload( $classname )
{
$file = str_replace( '_', DIRECTORY_SEPARATOR, $classname ).'.php';

if( file_exists( $file ) )
{
require( $file );
return true;
}
else
{
return FALSE;
}
}
# Sets include path to the current directory just for easy testing.
set_include_path( realpath( dirname(__FILE__)
).DIRECTORY_SEPARATOR.PATH_SEPARATOR.get_include_path() );

$test = new Prefix_ClassName();
?

Expected result:

File included class initialized.

Actual result:
--
Fatal error: Class 'Prefix_ClassName' not found.





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



#48166 [Asn-WFx]: RecursiveIteratorIterator does not persist state parent in getChildren()

2009-05-06 Thread colder
 ID:   48166
 Updated by:   col...@php.net
 Reported By:  ralph at smashlabs dot com
-Status:   Assigned
+Status:   Wont fix
 Bug Type: SPL related
 Operating System: *
 PHP Version:  5.2.9
 Assigned To:  colder
 New Comment:

Sorry for the false hope, it is indeed how it's supposed to work and
not a bug. Since the new iterator is instanciated directly inside
getChildren, you can't magically have new arguments to your constructor
and have them filled appropriately.

But you can basically implement all features you want by simply
overriding getChildren. 

Clone + setiterator could also work, but changing that would introduce
BC breaks, and I'm not sure it would make more sense than what we have
now.


Previous Comments:


[2009-05-06 15:58:40] ralph at smashlabs dot com

Description:

Currently, its difficult to extend RecursiveFilterIterator() with
additional __construct() arguments (for configuring its behavior).  The
reason its difficult is b/c when getChildren() is called, a new instance
of the RFI is created (only way you'd know this is if you look into the
source of RFI).

Workaround currently is this (But is not generic enough to all use
cases):

replace getChildren():

function getChildren()
{
if (empty($this-ref)) {
$this-ref = new ReflectionClass($this);
}
return
$this-ref-newInstance($this-getInnerIterator()-getChildren(),
$this-_otherArgs);
}

Reproduce code:
---
$rArray = array('a' = array('ab', 'ac', 'ad' = array('ada', 'adc')),
'b' = array('bb', 'bc'));

$ri = new RecursiveArrayIterator($rArray);
$filter = new MyRFI($ri, 'argument');
$iterator = new RecursiveIteratorIterator($filter);

foreach ($iterator as $key = $item) {
echo $key . ' - ' . $item . PHP_EOL;
}

class MyRFI extends RecursiveFilterIterator
{
protected $_otherArg = null;

public function __construct($iterator, $otherArg = null)
{
$this-_otherArg = $otherArg;
parent::__construct($iterator);
}

public function accept()
{
echo ($this-_otherArg) ? 'Arg Present' : 'Arg NOT Present';
echo PHP_EOL;
return true;
}
}

Expected result:

Arg Present
Arg Present
0 - ab
Arg Present
1 - ac
Arg Present
Arg Present
0 - ada
Arg Present
1 - adc
Arg Present
Arg Present
0 - bb
Arg Present
1 - bc 

Actual result:
--
Arg Present
Arg NOT Present
0 - ab
Arg NOT Present
1 - ac
Arg NOT Present
Arg NOT Present
0 - ada
Arg NOT Present
1 - adc
Arg Present
Arg NOT Present
0 - bb
Arg NOT Present
1 - bc






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



#15215 [Com]: Wrong path for php.ini under Windows XP (Home and Professional)

2009-05-06 Thread arturo_b at hotmail dot com
 ID:   15215
 Comment by:   arturo_b at hotmail dot com
 Reported By:  php at totti dot de
 Status:   No Feedback
 Bug Type: *Configuration Issues
 Operating System: Windows NT 5.1 (XP)
 PHP Version:  4.1.1
 New Comment:

When i ran phpinfo, its gave me a wrong address c:/php5 value in
extension_dir and none value in Configuration File (php.ini) Path, so it
never loaded the extensions and connected to mysql; finally i tried
adding a new variable named PHPRC with value C:/PHP in system
environment variable, so windows should read the php.ini inside C:/PHP
and it did work

Make sure you pay attention to this FAQ
from the Manual installation instructions:
http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc


Previous Comments:


[2006-10-09 18:33:06] registered at morphatic dot com

I had the same problem.  It turned out that I had improperly defined
the PHPRC environment variable.  Make sure you pay attention to this FAQ
from the Manual installation instructions:
http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc



[2006-09-08 04:07:14] joebeazelman at hotmail dot com

Ditto. I am running XP with IIS 5.  I removed all traces of php.ini
from my system and only left a copy in the root folder of my php 4
installation and phpinfo still said it found the php.ini file in my
windows directory.



[2006-05-03 15:24:11] t dot johnson at intercall dot ie

I have incountered the same issue with php 5.1.2 and iis 6 on all 3 of
our servers. The phpinfo() reports c:\windows as the location of php.ini
on all installations which were manually configured. the error occurs on
clean systems with nothin but OS, IIS and pho installed. Does anyone
have any further info on this problem?



[2002-02-28 00:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-01-27 15:11:58] san...@php.net

Do you mean the PHP installer?
Anyway, Christoph is right, it doesn't look at the version string but
it just tries your Windows-directory. 
phpinfo() reports where it has found php.ini. Look at that path. It
should really work if you place it in c:\windows.



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

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



#48052 [Bgs]: SPLStack::setIteratorMode() throw exception on keep/delete flag

2009-05-06 Thread ralph at smashlabs dot com
 ID:   48052
 User updated by:  ralph at smashlabs dot com
 Reported By:  ralph at smashlabs dot com
 Status:   Bogus
 Bug Type: SPL related
 Operating System: *
 PHP Version:  5.3, 6CVS (2009-04-25)
 Assigned To:  colder
 New Comment:

Thats fine, and that works.

I guess this needs to be documented inside of setIteratorMode(), I
would have never guessed that flags are replaced, my initial assumption
would be that they are OR'd with the existing flags.

Thanks for clearing this up.
-ralph


Previous Comments:


[2009-05-02 13:29:36] col...@php.net

The reason is that setIteratorMode replaces the iterator flags
entirely, so you need to specify the order of iteration as well if you
want to change the KEEP/DELETE.


Since you use a stack, simply use:
SplDoublyLinkedList:: IT_MODE_DELETE |
SplDoublyLinkedList::IT_MODE_LIFO





[2009-04-22 16:50:24] ralph at smashlabs dot com

Description:

Attempting to change the IteratorMode throws an exception.

The is probably due to the code that changes the LIFO/FIFO ordering
that is also settable via the inherited method of
SplDoublyLinkedList::setIteratorMode().



Reproduce code:
---
?php

$s = new SPLStack(); 
$s-setIteratorMode(SplDoublyLinkedList::IT_MODE_DELETE);

Expected result:

Do not throw exception on the following use cases:

-setIteratorMode(SplDoublyLinkedList::IT_MODE_DELETE)
-setIteratorMode(SplDoublyLinkedList::IT_MODE_KEEP)

Actual result:
--
PHP Fatal error:  Uncaught exception 'RuntimeException' with message
'Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen' in
path/to/test-splstack.php:4
Stack trace:
#0 path/to/test-splstack.php(4):
SplDoublyLinkedList-setIteratorMode(1)
#1 {main}
  thrown in path/to/test-splstack.php on line 4





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



#48165 [NEW]: SoapClient and external import in WSDL make ns1, ns2, ns3 alias

2009-05-06 Thread apaella at gmail dot com
From: apaella at gmail dot com
Operating system: all
PHP version:  5.2.9
PHP Bug Type: Unknown/Other Function
Bug description:  SoapClient and external import in WSDL make ns1, ns2, ns3 
alias

Description:

1) When a wsdl import external xsd, bad ns1:defaultnamespace,  Envelope
namespace bindings iscreated. Is there a way to drop it off?

2) Impossible to add custom namespace bindings to the root element


See
http://cert.webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_CancelLLSRQ.wsdl
for a sample WSDL

Reproduce code:
---
?php
$objClient = new SoapClient(

http://cert.webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_CancelLLSRQ.wsdl;
,array('trace'   = 1
,'exceptions'   = 0
, 'encoding'= 'utf-8'
)
);
$objClient-__setLocation(https://cert.webservices.sabre.com/tsts;);

$xml =
'OTA_CancelRQ /';

$soapvar = new SoapVar($xml, XSD_ANYXML);
$objResponse = $objClient-__soapCall(OTA_CancelRQ, array($soapvar));
var_dump($objClient-__getLastRequest());


Expected result:

SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:eb=http://www.ebxml.org/namespaces/messageHeader; 
xmlns:xlink=http://www.w3.org/1999/xlink; 
xmlns:xsd=http://www.w3.org/1999/XMLSchema;

Actual result:
--
SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;  
xmlns:ns1=http://webservices.sabre.com/sabreXML/2003/07;

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



#48174 [NEW]: Memory tracking

2009-05-06 Thread jandosul at gmail dot com
From: jandosul at gmail dot com
Operating system: Windows XP
PHP version:  5.3.0RC1
PHP Bug Type: Feature/Change Request
Bug description:  Memory tracking

Description:

1. There is missing one option to get size of uvariable/u.

2. Add context parameter to get_defined_vars cuz i cant get all defined
variables in class context or add get_defined_objects?

Thanx


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