#44805 [Opn]: rename() function is not portable to Windows

2008-04-22 Thread rasmus at mindplay dot dk
 ID:   44805
 User updated by:  rasmus at mindplay dot dk
 Reported By:  rasmus at mindplay dot dk
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: WindowsXP/DebianLinux
 PHP Version:  5.2.5
 New Comment:

File rename with overwrite code for Windows here:

http://rikkus.info/rename-with-overwrite-on-windows.html


Previous Comments:


[2008-04-23 06:53:09] rasmus at mindplay dot dk

Description:

The behavior of rename() is inconsistent between Linux and Windows.

On Linux, the rename() function is atomic - you can rename() one file
over an existing file, and the replacement is atomic.

On Windows, you cannot rename over an existing file.

Reproduce code:
---


Expected result:

reading file 2: this is file 1


Actual result:
--
On Linux: (CORRECT)

reading file 2: this is file 1

On Windows: (INCORRECT)

Warning: rename(file1.txt,file2.txt) [function.rename]: File exists in
C:\Web3\test\rename\test.php on line 6
reading file 2: this is file 2






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



#44805 [NEW]: rename() function is not portable to Windows

2008-04-22 Thread rasmus at mindplay dot dk
From: rasmus at mindplay dot dk
Operating system: WindowsXP/DebianLinux
PHP version:  5.2.5
PHP Bug Type: Filesystem function related
Bug description:  rename() function is not portable to Windows

Description:

The behavior of rename() is inconsistent between Linux and Windows.

On Linux, the rename() function is atomic - you can rename() one file over
an existing file, and the replacement is atomic.

On Windows, you cannot rename over an existing file.

Reproduce code:
---


Expected result:

reading file 2: this is file 1


Actual result:
--
On Linux: (CORRECT)

reading file 2: this is file 1

On Windows: (INCORRECT)

Warning: rename(file1.txt,file2.txt) [function.rename]: File exists in
C:\Web3\test\rename\test.php on line 6
reading file 2: this is file 2


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



#44797 [Opn->Fbk]: php_curl.dll crash. Offset: 00018ed8. ModName: php_curl.dll ModVer: 5.2.5.5.

2008-04-22 Thread felipe
 ID:   44797
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmitrij at stepanov dot lv
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Windows XP
 PHP Version:  5.2.5
 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 ,
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:


[2008-04-22 10:23:02] dmitrij at stepanov dot lv

Description:

My configuration: Windows XP, PHP 5.2.5. cURL extension periodically is
crashing at offset 00018ed8. I use both curl_* and curl_multi_*. Also,
cURL extension has memory leaks. After about 30 minutes of intensive use
of cURL functions, i get memory usage over 1G.

Reproduce code:
---
i create 12 handles with curl_init(), configure them, create one
curl_multi_init() handle, pass all 12 handles to multi handle with
curl_multi_add_handle() and call curl_multi_exec(). after successful
execution of requests, i curl_multi_remove_handle() all handles from
multi handle, close them with curl_close(), and close multi handle with
curl_multi_close(). After repeating this sequence 100 - 200 times, i get
lotsa memory leaks and even crash.

Expected result:

No memory leaks. No crash.

Actual result:
--
Memory leaks, crash at offset 00018ed8





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



#44804 [NEW]: setrawcookie doesn't set an empty value but sets 'deleted' instead

2008-04-22 Thread oliver at netconcepts dot com
From: oliver at netconcepts dot com
Operating system: Linux Red Hat Enterprise
PHP version:  5.2.5
PHP Bug Type: *Network Functions
Bug description:  setrawcookie doesn't set an empty value but sets 'deleted' 
instead

Description:

the setrawcookie function doesn't set an empty value but sets the value
'deleted' instead.

An empty value is perfectly fine in a cookie, there is no need to modify
that value in any way.


This bug is the same for PHP 4.3.1, and it was never solved?
http://bugs.php.net/bug.php?id=33526&edit=2

Reproduce code:
---
setrawcookie('testcookie', '');



Expected result:

(Firefox Live HTTP Headers output)

Set-Cookie: testcookie=



Actual result:
--
(Firefox Live HTTP Headers output)

Set-Cookie: testcookie=deleted

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



#44803 [Bgs]: round()

2008-04-22 Thread oguzhanozbay at yahoo dot com
 ID:   44803
 User updated by:  oguzhanozbay at yahoo dot com
 Reported By:  oguzhanozbay at yahoo dot com
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: ýss isapi & apache 2.2
 PHP Version:  5.2.5
 New Comment:

; The number of significant digits displayed in floating point
numbers.
precision=  14

This my php.ini precision config.

I make it 30 (and resart server) but nothing changed.

same server, same config ->

echo 6000*(10.5);

output 6.3E+8

echo 6*10;

output 60

How can "6000*(10.5)" need much precision than "6*10"?


Previous Comments:


[2008-04-23 00:47:34] [EMAIL PROTECTED]

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is, read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.





[2008-04-22 23:41:06] oguzhanozbay at yahoo dot com

Description:

How can it be!

Reproduce code:
---
echo round(6000*10.5);

output 6.3E+8 !!!

echo round(6000*(10.5));

output 6.3E+8 !!!

echo round(6000*(10.5),2);

output 6.3E+8 !!!

echo round(7000*(10.5));

output 7.35E+8 !!!

echo round(7000*(11.5),2);

output 80500 => true






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



#44801 [Opn->Fbk]: Invalid escaping for passthru() in CLI

2008-04-22 Thread felipe
 ID:   44801
 Updated by:   [EMAIL PROTECTED]
 Reported By:  twm at twmacinta dot com
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Red Hat Enterprise Linux ES 3
 PHP Version:  5.2.5
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

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

This looks has been fixed. Works fine for me using 5.2.6-RC4.


Previous Comments:


[2008-04-22 19:16:55] twm at twmacinta dot com

Description:

When I run a PHP script which uses passthru() to execute a command with
characters that need escaping, the escaping is incorrect when the script
is run from the command line, but it is fine when the script is run from
within Apache.  This was causing the script
"ext/standard/tests/file/bug22414.phpt" to fail when I attempted to run
"make test" after building PHP 5.2.5 on RHEL3.  I have created a
simplified script for this report to demonstrate the problem, though I
will note that I can also reproduce it reliably with "bug22414.phpt".

I should mention that I also tried my test script from the command line
in Mac OS X 10.5 running PHP 5.2.5 and Ubuntu 7.10 running PHP 5.2.3 and
it worked correctly in both cases.  So, my suspicion is that there is an
older library on RHEL3 which is causing the parsing the be incorrect. 
It passes all the requirements checks made by './configure', though.

I ran the test code below using the '-n' option to PHP so as to
eliminate my "php.ini" as the problem.


Reproduce code:
---
header("Content-Type: text/plain");
$textEscaped = escapeshellarg("Tim's Test");
print("Before: {$textEscaped}\n");
print("After: ");
passthru("/bin/echo {$textEscaped}");


Expected result:

Before: 'Tim'\''s Test'
After: Tim's Test


Actual result:
--
Before: 'Tim'\''s Test'
After: Tim\s Test'






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



#44803 [Opn->Bgs]: round()

2008-04-22 Thread felipe
 ID:   44803
 Updated by:   [EMAIL PROTECTED]
 Reported By:  oguzhanozbay at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: ýss isapi & apache 2.2
 PHP Version:  5.2.5
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is, read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.




Previous Comments:


[2008-04-22 23:41:06] oguzhanozbay at yahoo dot com

Description:

How can it be!

Reproduce code:
---
echo round(6000*10.5);

output 6.3E+8 !!!

echo round(6000*(10.5));

output 6.3E+8 !!!

echo round(6000*(10.5),2);

output 6.3E+8 !!!

echo round(7000*(10.5));

output 7.35E+8 !!!

echo round(7000*(11.5),2);

output 80500 => true






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



#44803 [NEW]: round()

2008-04-22 Thread oguzhanozbay at yahoo dot com
From: oguzhanozbay at yahoo dot com
Operating system: ýss isapi & apache 2.2
PHP version:  5.2.5
PHP Bug Type: Unknown/Other Function
Bug description:  round()

Description:

How can it be!

Reproduce code:
---
echo round(6000*10.5);

output 6.3E+8 !!!

echo round(6000*(10.5));

output 6.3E+8 !!!

echo round(6000*(10.5),2);

output 6.3E+8 !!!

echo round(7000*(10.5));

output 7.35E+8 !!!

echo round(7000*(11.5),2);

output 80500 => true


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



#44798 [Opn]: Memory leak assigning value to attribute

2008-04-22 Thread aldo at armiento dot com
 ID:   44798
 User updated by:  aldo at armiento dot com
 Reported By:  aldo at armiento dot com
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: Linux 2.6.18-686
 PHP Version:  5.2.5
 New Comment:

Yeah, this "bug" (and other changes to simplexml.c) is fixed in PHP 5.3

and PHP 6 but not in PHP 5.2 series (for example in php-5.2.6RC5).

By the way this problem produces a "memory leak".


Previous Comments:


[2008-04-22 23:23:30] crrodriguez at suse dot de

The "leak" ( which is not really a memory leak) is already fixed in
PHP_5_3.



[2008-04-22 22:25:06] aldo at armiento dot com

This patch to php-5.2.5 sources in ext/simplexml/simplexml.c solve the

problem.

The problem is also present in php5.2-200804222030 snap

--- simplexml.c.orig2007-07-31 17:40:49.0 +0200
+++ simplexml.c 2008-04-23 00:16:00.276147006 +0200
@@ -702,11 +702,13 @@
convert_to_string(member);
name = Z_STRVAL_P(member);
node = sxe_get_element_by_name(sxe, node, &name, &type 
TSRMLS_CC);
-   if (!node) {
-   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
-   type = SXE_ITER_NONE;
-   name = NULL;
+   if (node) {
+   return NULL;
}
+   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
+   type = SXE_ITER_NONE;
+   name = NULL;
+
MAKE_STD_ZVAL(return_value);
_node_as_zval(sxe, node, return_value, type, name, sxe-
>iter.nsprefix, sxe->iter.isprefix TSRMLS_CC);



[2008-04-22 11:29:07] aldo at armiento dot com

Description:

Assigning any value to a SimpleXML attribute produces a memory leak.

Reproduce code:
---
');
while(true) {
$xml->test['attribute'] = 'value';
}

echo $xml->asXML();

?>

Expected result:




Actual result:
--
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to

allocate 40 bytes) in /tmp/test_simplexml.php on line 5





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



#44798 [Com]: Memory leak assigning value to attribute

2008-04-22 Thread crrodriguez at suse dot de
 ID:   44798
 Comment by:   crrodriguez at suse dot de
 Reported By:  aldo at armiento dot com
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: Linux 2.6.18-686
 PHP Version:  5.2.5
 New Comment:

The "leak" ( which is not really a memory leak) is already fixed in
PHP_5_3.


Previous Comments:


[2008-04-22 22:25:06] aldo at armiento dot com

This patch to php-5.2.5 sources in ext/simplexml/simplexml.c solve the

problem.

The problem is also present in php5.2-200804222030 snap

--- simplexml.c.orig2007-07-31 17:40:49.0 +0200
+++ simplexml.c 2008-04-23 00:16:00.276147006 +0200
@@ -702,11 +702,13 @@
convert_to_string(member);
name = Z_STRVAL_P(member);
node = sxe_get_element_by_name(sxe, node, &name, &type 
TSRMLS_CC);
-   if (!node) {
-   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
-   type = SXE_ITER_NONE;
-   name = NULL;
+   if (node) {
+   return NULL;
}
+   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
+   type = SXE_ITER_NONE;
+   name = NULL;
+
MAKE_STD_ZVAL(return_value);
_node_as_zval(sxe, node, return_value, type, name, sxe-
>iter.nsprefix, sxe->iter.isprefix TSRMLS_CC);



[2008-04-22 11:29:07] aldo at armiento dot com

Description:

Assigning any value to a SimpleXML attribute produces a memory leak.

Reproduce code:
---
');
while(true) {
$xml->test['attribute'] = 'value';
}

echo $xml->asXML();

?>

Expected result:




Actual result:
--
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to

allocate 40 bytes) in /tmp/test_simplexml.php on line 5





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



#33526 [Com]: setting cookie value to '' results in cookie value of 'deleted'

2008-04-22 Thread oliver at netconcepts dot com
 ID:   33526
 Comment by:   oliver at netconcepts dot com
 Reported By:  aaron at istockphoto dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: Slackware 9.1.0
 PHP Version:  4.3.10
 New Comment:

This is not working in PHP 5.2.5

setrawcookie("Cookiename", "");

results in:

Set-Cookie: Cookiename=deleted; expires=Mon, 23-Apr-2007 22:47:55 GMT


Previous Comments:


[2005-07-08 01:00:05] php-bugs at lists dot php dot net

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



[2005-06-30 18:30:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2005-06-30 18:26:27] aaron at istockphoto dot com

Description:

This is related to the issue that was reported in Bug 
#25629 "session cookie being set to deleted when 
deleting a session" for version 4.3.1. I was not sure if 
I should try to re-open the old bug or submit a new one. 
My apologies.

The problem is not with the session code, but is a side 
affect of the behavior of setcookie().

Following the example provided in the manual entries for 
session_destroy() and setcookie(), the value of the 
session cookie is not set to '' (empty string) as 
expected, but is set to 'deleted' instead. This 
shouldn't be an issue, except that if the client 
computers date is incorrectly set in the distant past 
(not uncommon) then the cookie will not be removed from 
the browser and will be used passed in the next request 
as "deleted".

Within 24 hours of adding the the 
"setcookie('PHPSESSID', '', time() - 172800, '/', 
'.foo.bar')" line to our logout procedure we discovered 
that perhaps 40 visitors had shared the same session 
data. A a major security issue to be sure. We hacked our 
session handler object to not accept 'deleted' as a 
session ID.

Either PHP should be updated to set the value of the 
cookie to an empty string as the setcookie() command 
insinuates it will be, or the manual entries for 
session_destroy(), setcookie(), and 
session_set_save_handler() should be updated to explain 
the current behavior.

Thank you :)


Headers sent in request response to illustrate actual 
values of cookies:

HTTP/1.1 302 Found
Date: Thu, 30 Jun 2005 15:30:12 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.10 mod_ssl/2.8.22 
OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, 
post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=deleted; expires=Wed, 30-Jun
-04 15:30:11 GMT; path=/; domain=.foo.bar
Set-Cookie: somecookie=deleted; expires=Wed, 30-Jun
-04 15:41:00 GMT; path=/; domain=.foo.bar
location: /index.php
Transfer-Encoding: chunked
Content-Type: text/html


Reproduce code:
---
Source code:

session_start();

setcookie('PHPSESSID', '', time() - 172800, '/', '.foo.bar');
setcookie('somecookie', '', time() - 172800, '/', '.foo.bar');

$_SESSION = array();
session_destroy();

header('location: /index.php');


Expected result:

The value of PHPSESSID cookie (or any other cooke) would 
be set to '' (empty string)


Actual result:
--
The value of PHPSESSID cookie (or any other cooke) is 
set to 'deleted' resulting in many users sharing the 
same session ID.





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



#44658 [Bgs]: References to references triggers unwanted further references

2008-04-22 Thread mo at nevali dot net
 ID:   44658
 User updated by:  mo at nevali dot net
 Reported By:  mo at nevali dot net
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: FreeBSD 6
 PHP Version:  5.2.5
 New Comment:

Okay, let me rephrase, because I'm obviously not being clear about 
something or other.

Line 12 of the testcase is the following:

$this->stuff =& $this->thing['stuff'];

If this line is commented out, the output changes (to my “expected 
result”). If this line is uncommented, the output is as per your 
“expected result”.

Foo::$stuff is not referenced anywhere (beyond its initial 
declaration) except for this line.

Your statement “references are not pointers” to me, as an experienced 
C programmer, suggests that under no circumstances, except for the 
assignment of object instances, should the following result in $b 
being a reference to $a:

$b = $a;

In the testcase (tested on PHP 5.2.5 with debugging enabled, and PHP 
5.1.6 with debugging enabled, both command-line and Apache 2 Handler 
SAPIs), line 24 behaves as though it were written:

$this->thing2 =& $foo->thing;

…if, and only if, line 12 is uncommented. Otherwise, it behaves as it 
is written:

$this->thing2 = $foo->thing;

There is NO documented reason why this behaviour should occur.

Now, if you _still_ think this is bogus, I'd really appreciate an 
explanation, with appropriate references to the documentation, as to 
why it's bogus, because if it is I'm evidently a simpleton who can't 
read and I'm now becoming slightly frustrated by both this issue and 
the unhelpfully terse responses to it.


Previous Comments:


[2008-04-21 06:23:59] [EMAIL PROTECTED]

FYI: I did run your (bogus) testcase.



[2008-04-11 08:40:49] mo at nevali dot net

If this bug has been marked as bogus, does it mean it's going to get 
summarily ignored from here on in?

It would be nice if somebody could actually try _running_ the test-case

instead of dismissing it out of hand; aspects of the behaviour are 
clearly incorrect (notably the inconsistency), even if it's the case 
that my summary of it is wrong.



[2008-04-07 12:37:27] mo at nevali dot net

My apologies, in my previous follow-up, I meant to write “$foo->stuff”

where I wrote “$foo->thing2”. In my testcase, there's no such property

as $foo->thing2!



[2008-04-07 12:36:07] mo at nevali dot net

So, how do you explain the difference in behaviour when the (should-
be-inert) line in Foo::__construct() is removed?

Also, while I'm perfectly well aware that references are not pointers,

even calling (for example): $this->thing = array_merge($foo->thing, 
array()); in Bar::__construct() causes $bar->thing to become a 
reference.

If this report _is_ bogus, then:

a) Creating a deep reference (i.e., $this->thing2 =& $this-
>thing['stuff']: in Foo::__construct()) should have no bearing on 
anything; $foo->thing2 is not used beyond that initial assignment.

b) How is one supposed to duplicate the contents of an array given a 
reference to it? Last I heard, the use of “clone” was only supported 
for objects.

Whilst this report may be, on the face of it, bogus, there is a bug 
here in either case.



[2008-04-07 12:11:46] [EMAIL PROTECTED]

This is the expected and correct output:

Created foo, foo->thing['stuff'] = 1234
Creating Bar, foo->thing['stuff'] = 1234
Created bar, bar->thing2['stuff'] = ABC
Created bar, foo->thing['stuff'] = ABC

Hint: References are not pointers.



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

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



#44798 [Opn]: Memory leak assigning value to attribute

2008-04-22 Thread aldo at armiento dot com
 ID:   44798
 User updated by:  aldo at armiento dot com
 Reported By:  aldo at armiento dot com
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: Linux 2.6.18-686
 PHP Version:  5.2.5
 New Comment:

This patch to php-5.2.5 sources in ext/simplexml/simplexml.c solve the

problem.

The problem is also present in php5.2-200804222030 snap

--- simplexml.c.orig2007-07-31 17:40:49.0 +0200
+++ simplexml.c 2008-04-23 00:16:00.276147006 +0200
@@ -702,11 +702,13 @@
convert_to_string(member);
name = Z_STRVAL_P(member);
node = sxe_get_element_by_name(sxe, node, &name, &type 
TSRMLS_CC);
-   if (!node) {
-   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
-   type = SXE_ITER_NONE;
-   name = NULL;
+   if (node) {
+   return NULL;
}
+   sxe_prop_dim_write(object, member, NULL, 1, 0, &node 
TSRMLS_CC);
+   type = SXE_ITER_NONE;
+   name = NULL;
+
MAKE_STD_ZVAL(return_value);
_node_as_zval(sxe, node, return_value, type, name, sxe-
>iter.nsprefix, sxe->iter.isprefix TSRMLS_CC);


Previous Comments:


[2008-04-22 11:29:07] aldo at armiento dot com

Description:

Assigning any value to a SimpleXML attribute produces a memory leak.

Reproduce code:
---
');
while(true) {
$xml->test['attribute'] = 'value';
}

echo $xml->asXML();

?>

Expected result:




Actual result:
--
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to

allocate 40 bytes) in /tmp/test_simplexml.php on line 5





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



#44800 [Csd->Bgs]: Returns empty value

2008-04-22 Thread scottmac
 ID:   44800
 Updated by:   [EMAIL PROTECTED]
 Reported By:  citricacid at tlen dot pl
-Status:   Closed
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Ubuntu 8.04 beta
 PHP Version:  5.2.5


Previous Comments:


[2008-04-22 18:54:18] citricacid at tlen dot pl

I was wrong. Sorry. Everything is fine. That value is invisible because
it contains hidden html tag. Stupid me.



[2008-04-22 18:43:45] citricacid at tlen dot pl

Description:

I try to preg_grep an array which contains some html strings. Each line
is an array element.
If the expression string matches searched string from the beginnig to
the end then everything is fine. If the expression string matches a
substring then an empty value is returned.

Reproduce code:
---
Array - $templateArray:
[9] 
[10]{ccms:textile}
[11]
[12]

Code:
$cml = preg_grep("/\{ccms:.+\}/", $templateArray)
echo "";
print_r($cml);
echo "";

Expected result:

Array
(
[10] => {ccms:textile}
[12] => 
)


Actual result:
--
Array
(
[10] => {ccms:textile}
[12] => 
)






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



#41778 [NoF->Opn]: Always get the SSL connection error

2008-04-22 Thread mail at tobias-wassermann dot de
 ID:   41778
 User updated by:  mail at tobias-wassermann dot de
 Reported By:  mail at tobias-wassermann dot de
-Status:   No Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows XP
-PHP Version:  5.2.3
+PHP Version:  5.2.5
 Assigned To:  andrey
 New Comment:

Hi,

reconstructed the case again - sorry for the delay - with the following
code:

ssl_set("C:/proj/test/test.crt", "C:/proj/test/ca.crt",
"C:/proj/test/ca2.crt", NULL, NULL); 
$conn->real_connect("www.iba-ag.com", "user", "pass", "db", 3306, NULL,
MYSQLI_CLIENT_SSL);

echo $conn->errno;
$res = $conn->query("SELECT * FROM catalog");
echo " - COUNT: {$res->num_rows}";
?>

The big BUT: Everytime I connect, I got a connection and the correct
count of the SELECT - it works if the ssl-files exists or not exists. So
it seems to be that never ever a ssl-connection will be established now
- whats the problem?

I tried this with a 5.2.3 PHP on Windows and a 5.2.5 PHP on Linux - in
both cases with enabled OpenSSL-support


Previous Comments:


[2008-01-31 01:00:01] php-bugs at lists dot php dot net

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



[2008-01-23 13:22:27] [EMAIL PROTECTED]

Could you please try to use the full path instead of just giving the
file name? Thanks.
I can't get that error message.



[2007-06-22 08:37:23] mail at tobias-wassermann dot de

Description:

If I want to connect via SSL to my MySQL-Server, mysqli_real_connect
always returns this error:

Warning: mysqli::real_connect() [function.mysqli-real-connect]:
(HY000/2026): SSL connection error in
C:\proj\wampp\htdocs\test\db\mysql_ssl.php on line 7

I use mysqli_init(), to init the mysqli-object and then use ssl_set()
to set the SSL-stuff and then real_connect().

A connect with the mysql-command-line client and the ssl-ca-option
works perfect - i get a ssl encrypted connection.

Reproduce code:
---
Start MySQL-Server with:

mysqld-nt.exe --ssl --ssl-ca=ca.crt --ssl-cert=server.crt
--ssl-key=server.pem 

[The key is not secured by any password or such things]

Use the MySQL-Client from another machine to connect via ssl:

mysql.exe -u test -h server --ssl-ca=ca.crt

Check if SSL works with command line client:

mysql> SHOW STATUS LIKE 'Ssl_cipher';
+---++
| Variable_name | Value  |
+---++
| Ssl_cipher| DHE-RSA-AES256-SHA |
+---++
1 row in set (0.02 sec)

It works. Now my PHP code:



ssl_set(NULL, NULL, "ca.crt", NULL, NULL); 
$conn->real_connect("server", "root", NULL, "iba", 3306, NULL,
MYSQLI_CLIENT_SSL);
?>




Expected result:

The real_connect()-call should connect via SSL to the MySQL-Server.

Actual result:
--
real_connect() doesn't connect, returns error message:

Warning: mysqli::real_connect() [function.mysqli-real-connect]:
(HY000/2026): SSL connection error in
C:\proj\wampp\htdocs\test\db\mysql_ssl.php on line 7

I know, HY000/2026 is a MySQL error - but the command line connect with
same user and same CA-Certificate works fine. I tested it also on other
machines.

The error occurs if the db-server is another machine as the webserver -
and also occurs if it's the same pc. The problem also exists if i
provide a client-certificate and key to the ssl_set()-function





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



#44801 [NEW]: Invalid escaping for passthru() in CLI

2008-04-22 Thread twm at twmacinta dot com
From: twm at twmacinta dot com
Operating system: Red Hat Enterprise Linux ES 3
PHP version:  5.2.5
PHP Bug Type: CGI related
Bug description:  Invalid escaping for passthru() in CLI

Description:

When I run a PHP script which uses passthru() to execute a command with
characters that need escaping, the escaping is incorrect when the script is
run from the command line, but it is fine when the script is run from
within Apache.  This was causing the script
"ext/standard/tests/file/bug22414.phpt" to fail when I attempted to run
"make test" after building PHP 5.2.5 on RHEL3.  I have created a simplified
script for this report to demonstrate the problem, though I will note that
I can also reproduce it reliably with "bug22414.phpt".

I should mention that I also tried my test script from the command line in
Mac OS X 10.5 running PHP 5.2.5 and Ubuntu 7.10 running PHP 5.2.3 and it
worked correctly in both cases.  So, my suspicion is that there is an older
library on RHEL3 which is causing the parsing the be incorrect.  It passes
all the requirements checks made by './configure', though.

I ran the test code below using the '-n' option to PHP so as to eliminate
my "php.ini" as the problem.


Reproduce code:
---
header("Content-Type: text/plain");
$textEscaped = escapeshellarg("Tim's Test");
print("Before: {$textEscaped}\n");
print("After: ");
passthru("/bin/echo {$textEscaped}");


Expected result:

Before: 'Tim'\''s Test'
After: Tim's Test


Actual result:
--
Before: 'Tim'\''s Test'
After: Tim\s Test'


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



#44800 [Opn->Csd]: Returns empty value

2008-04-22 Thread citricacid at tlen dot pl
 ID:   44800
 User updated by:  citricacid at tlen dot pl
 Reported By:  citricacid at tlen dot pl
-Status:   Open
+Status:   Closed
 Bug Type: PCRE related
 Operating System: Ubuntu 8.04 beta
 PHP Version:  5.2.5
 New Comment:

I was wrong. Sorry. Everything is fine. That value is invisible because
it contains hidden html tag. Stupid me.


Previous Comments:


[2008-04-22 18:43:45] citricacid at tlen dot pl

Description:

I try to preg_grep an array which contains some html strings. Each line
is an array element.
If the expression string matches searched string from the beginnig to
the end then everything is fine. If the expression string matches a
substring then an empty value is returned.

Reproduce code:
---
Array - $templateArray:
[9] 
[10]{ccms:textile}
[11]
[12]

Code:
$cml = preg_grep("/\{ccms:.+\}/", $templateArray)
echo "";
print_r($cml);
echo "";

Expected result:

Array
(
[10] => {ccms:textile}
[12] => 
)


Actual result:
--
Array
(
[10] => {ccms:textile}
[12] => 
)






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



#44800 [NEW]: Returns empty value

2008-04-22 Thread citricacid at tlen dot pl
From: citricacid at tlen dot pl
Operating system: Ubuntu 8.04 beta
PHP version:  5.2.5
PHP Bug Type: PCRE related
Bug description:  Returns empty value

Description:

I try to preg_grep an array which contains some html strings. Each line is
an array element.
If the expression string matches searched string from the beginnig to the
end then everything is fine. If the expression string matches a substring
then an empty value is returned.

Reproduce code:
---
Array - $templateArray:
[9] 
[10]{ccms:textile}
[11]
[12]

Code:
$cml = preg_grep("/\{ccms:.+\}/", $templateArray)
echo "";
print_r($cml);
echo "";

Expected result:

Array
(
[10] => {ccms:textile}
[12] => 
)


Actual result:
--
Array
(
[10] => {ccms:textile}
[12] => 
)


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



#44687 [Opn]: curl_multi_* crashes apache randomly

2008-04-22 Thread r_luca at tiscali dot it
 ID:   44687
 User updated by:  r_luca at tiscali dot it
 Reported By:  r_luca at tiscali dot it
 Status:   Open
 Bug Type: cURL related
 Operating System: windows vista
 PHP Version:  5.2.5
 New Comment:

I am still trying to get the  backtrace but when the process crashes 
debug diagnostics gives back a rule error. 

Is there a way to retrieve an updated version of the php_cul.dll file
(with a recent curl version)?


Previous Comments:


[2008-04-15 21:15:35] r_luca at tiscali dot it

I am already using the debug version, apache crashes (very randomly)
but no backtrace.



[2008-04-15 14:19:00] [EMAIL PROTECTED]

At http://snaps.php.net/ you can find the debug pack required to get
proper backtraces on windows. 




[2008-04-13 15:56:18] r_luca at tiscali dot it

is 100 total requests(rows on the excel table). Right now each call to
the curl multi is for groups of 5.



[2008-04-13 15:54:11] r_luca at tiscali dot it

Sure, here we go:

main actions class
http://pastebin.com/m76ba3a74
retrieve user actions and initialize check

check_process
http://pastebin.com/m328051ca
handles the rows groups cration and the check thru multi request

multi request
http://www.pastebin.org/28896
for each group($data) from the check process retrieve headers using
multi curl

excel handler
http://pastebin.com/m412c62a2



[2008-04-13 11:58:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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


If the snapshot doesn't work can you give me a full reproduce script,
the code you put on the pastebin doesn't show how you use it.

When you say 100 requests is that from the one request or is it
multiple requests?



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

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



#43348 [Asn]: Mail function returns true but no email sent

2008-04-22 Thread RQuadling at GMail dot com
 ID:   43348
 User updated by:  RQuadling at GMail dot com
 Reported By:  RQuadling at GMail dot com
 Status:   Assigned
 Bug Type: Mail related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2007-11-20 (snap)
 Assigned To:  johannes
 New Comment:

Nuno, 

if (!sendmail_path || !*sendmail_path)

works for me on 5.3 CVS. Not tested HEAD as I've not got ICU yet.

Richard.


Previous Comments:


[2008-04-20 00:49:21] [EMAIL PROTECTED]

Nuno I posted about the underlying change that broke this to internals
last week.

It's potentially broken in more places that relied on INI_STR to turn
NULL as it now returns "".



[2008-04-19 23:59:46] [EMAIL PROTECTED]

a better fix is:
if (!sendmail_path || !*sendmail_path)

let me know if you want me to commit this.



[2008-04-17 14:45:55] RQuadling at GMail dot com

Hi.

I have finally managed to get php to compile for windows (yippee for
me).

So I can now try and get mail() working again.

The issue is that in  ext/standard/mail.c (/* $Id: mail.c,v
1.87.2.1.2.7.2.3 2007/12/31 07:17:15 sebastian Exp $ */), line 197,
the test of ...

if (!sendmail_path)

always evaluates to false when there is no sendmail_path which would
be the case on windows.

The next line differentiates between processing for windows/netware
and everything else.

If the test is

if(0 == strlen(sendmail_path))

then that would work.

The INI_STR call in Line 194 always returns a string if the directive
is known (doesn't need to be set, just has to exist as a directive).

So, I've attached a patch which I have compiled and tested on Windows.

This is in relation to bug http://bugs.php.net/bug.php?id=43348


Index: mail.c
===
RCS file: /repository/php-src/ext/standard/mail.c,v
retrieving revision 1.87.2.1.2.7.2.3
diff -u -u -r1.87.2.1.2.7.2.3 mail.c
--- mail.c  31 Dec 2007 07:17:15 -  1.87.2.1.2.7.2.3
+++ mail.c  17 Apr 2008 14:40:33 -
@@ -194,7 +194,7 @@
   char *sendmail_path = INI_STR("sendmail_path");
   char *sendmail_cmd = NULL;

-   if (!sendmail_path) {
+   if (0 == strlen(sendmail_path)) {
 #if (defined PHP_WIN32 || defined NETWARE)
   /* handle old style win smtp sending */
   if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg,
headers,
subject, to, message, NULL, NULL, NULL TSRMLS_CC) == FAILURE) {



[2007-12-04 16:50:44] RQuadling at GMail dot com

Just to iterate, the mail function for windows in the CVS is broken for
CLI, CGI and ISAPI.



[2007-12-04 15:54:42] pipaff at comptrio dot com

Update: Switched back to CGI and mail works again... lost the ability
to 'except users' from safe_mode in Apache config
(php_admin_value/flag), but mail works.

This is on a Linux box CentOS4... 2.6.9 kernel



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

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



#31050 [Com]: SOAP class will not parse WSDL file located on a secure HTTPS connection

2008-04-22 Thread pejusdas at gmail dot com
 ID:   31050
 Comment by:   pejusdas at gmail dot com
 Reported By:  dylanwoster at mac dot com
 Status:   No Feedback
 Bug Type: SOAP related
 Operating System: Mac OS X 10.3.6
 PHP Version:  5.0.2
 Assigned To:  dmitry
 New Comment:

I'm having the same problem with a linux box running php 5.2.5 and a
win xp box running the same version. Has anybody found the solution for
this problem yet? Thanks.


Pejus


Previous Comments:


[2008-04-02 01:03:16] jfarhat at kirkhamsystems dot com

I am also having the same problem in PHP 5.2.5. the procedure code at
the end of the message works for HTTP but fails with HTTPS with the
message:
SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://arcweb.esri.com/services/v2/Authentication.wsdl' 



Reproduce code:
---
$client = new SoapClient(
"https://arcweb.esri.com/services/v2/Authentication.wsdl"; );
echo( $client->getVersion( ) );



[2008-01-23 04:31:10] marcus dot uy at virtualthinking dot com

Hi,

Having similar problem on Windows XP Pro:

Apache 2.2.8
PHP 5.2.5
OpenSSL 0.9.8g

In my case the connectiion works once, then fails on the next
connection attempt.  I then have to restart apache because the
soapserver becomes completely unresponsive.



[2008-01-03 13:08:19] php at eflow dot dk

I have the problem too, on Gentoo Linux.

Apache 2.2.6
PHP 5.2.5
OpenSSL 0.9.8g

Configuration:
'./configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu'
'--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info'
'--sysconfdir=/etc' '--cache-file=./config.cache' '--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' '--disable-exif'
'--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp'
'--with-gettext' '--without-gmp' '--disable-hash' '--disable-json'
'--without-kerberos' '--enable-mbstring' '--with-mcrypt'
'--without-mhash' '--without-msql' '--without-mssql' '--with-ncurses'
'--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl'
'--disable-pdo' '--without-pgsql' '--disable-posix' '--with-pspell'
'--without-recode' '--disable-shmop' '--without-snmp' '--enable-soap'
'--disable-sockets' '--without-sybase' '--without-sybase-ct'
'--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm'
'--without-tidy' '--disable-wddx' '--with-xmlrpc' '--with-xsl'
'--enable-zip' '--with-zlib' '--disable-debug' '--enable-dba'
'--without-cdb' '--with-db4' '--without-flatfile' '--with-gdbm'
'--without-inifile' '--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-ldap'
'--with-ldap-sasl' '--with-mysql=/usr'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--with-mysqli=/usr/bin/mysql_config' '--with-readline'
'--without-libedit' '--without-mm' '--with-sqlite=/usr'
'--enable-sqlite-utf8'



[2007-05-05 08:25:38] john at soundreal dot co dot uk

I'm getting the same problem Mac OS X 10.4.9 PHP 5.2.1

$SoapClient=new SoapClient('https://api.foo.com/fooService.wsdl'
,array("connection_timeout"=>5));


'./configure' '--prefix=/Library/PHP5' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--sysconfdir=/etc' '--with-zlib'
'--with-xml' '--with-zlib-dir=/usr' '--with-openssl' '--enable-exif'
'--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-sockets'
'--with-mysql=/usr/local/mysql'
'--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-apxs'
'--with-libjpeg' '--with-libtiff=/sw' '--with-libpng' '--with-gd'
'--with-gettext' '--enable-soap' '--with-curl'



[2007-04-19 02:47:58] kkallio at micorp dot com dot ve

Same problem on a modified Debian Sarge, PHP 5.2.0

'./configure' '--prefix=/usr' '--libexecdir=/usr/lib/php5.2.0/libexec'
'--datadir=/usr/share/php5.2.0' '--sysconfdir=/etc/php5.2.0'
'--includedir=/usr/include/php5.2.0'
'--with-config-file-path=/etc/php5.2.0' '--with-apxs2=/usr/bin/apxs2'
'--with-odbtp=/usr' '--with-kerberos' '--with-pcre-regex'
'--enable-versioning' '--enable-sigchild' '--enable-magic-quotes'
'--enable-mbstring' '--enable-session' '--enable-mbregex'
'--enable-msession' '--with-openssl' '--enable-pdo' '--with-pdo-mysql'
'--with-pdo-oci=instantclient,/usr/lib/oracle/10.2.0.2,10.1'
'--with-pdo-odbc=unixODBC,/usr' '--with-pdo-pgsql' '--with-pdo-firebird'
'--without-pdo-sqlite' '--enable-bcmath' '--with-bz2'
'--enable-calendar' '--enable-ctype' '--with-curl' '--with-curlwrappers'
'-

#44794 [WFx]: Inconsistent order of argument for strtr compared to str_replace

2008-04-22 Thread php dot net at mog dot se
 ID:  44794
 User updated by: php dot net at mog dot se
 Reported By: php dot net at mog dot se
 Status:  Wont fix
 Bug Type:Strings related
 PHP Version: 5.2.5
 New Comment:

iliaa, yes, i already stated that in my description. That's why i
suggested adding a new function which is not inconsistent, and then the
old function would be kept for backwards compatibility only.

Does the PHP team not care about API consistency or why was the bug
closed with so little discussion?

If an acceptable solution can be agreed upon i would be happy to write
a patch myself.

Regards,
Morgan


Previous Comments:


[2008-04-22 12:40:06] [EMAIL PROTECTED]

Any changes here will introduce massive BC breaks.



[2008-04-21 17:56:32] php dot net at mog dot se

Description:

The similar but different string replacement functions str_replace
strtr() have an inconsistent order of arguments, in strtr() $subject is
the first argument and in str_replace it is the last.

strtr($subject, $search, $replace)
str_replace($from, $to, $subject)

There is no logic in this behaviour so every time i use these functions
i have to look them up to find out which is which.

There is no backwards compatible way to fix this as all arguments can
be strings, so new API functions would be needed while keeping strtr and
str_replace as is.

The PHP API desparatley needs a naming convention and this IMO is one
of it's worst examples.

Expected result:

Without an obvious fix i can only offer my ideas on how to fix this:

#1
Adding a str_translate($from, $to, $subject) method would be possible,
assuming that this order is consistent with the rest of PHP's API

#2
A solution which is very logical & consistent would be if strings acted
like objects, then $subject->replace($from, $to) and
$subject->translate($from, $to) would be possible.

My guess would be that treating strings as objects would not be a clean
implementation, but perhaps an OO version of string is possible in SPL.






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



#41350 [Com]: Error in my_thread_global_end()

2008-04-22 Thread newcomer at hotmail dot com
 ID:   41350
 Comment by:   newcomer at hotmail dot com
 Reported By:  graham at directhostinguk dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 New Comment:

We just upgraded to PHP Version 5.2.5. the "Error in
my_thread_global_end(): 1 threads didn't exit" appeared no matter the
application uses MySQL or not. Replaced the libmysql.dll from V.5.0.45,
the error disappear. But the application is running very slow. Switched
back to PHP version4. Everything back to normal.


Previous Comments:


[2008-04-16 04:12:17] tristen_e at yahoo dot com

This is still a problem:

$ php --version
PHP 5.2.5 (cli) (built: Nov  8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies



[2008-04-09 15:16:21] jdolecek at NetBSD dot org

Downgrading BOTH libmysql.dll AND php_mysql.dll to version bundled with
PHP 5.2.1 fixed the issue for me, too.



[2008-04-08 20:14:10] spambox at shad dot pp dot ru

Same bug just happened to me in this example:

C:\>echo "" |php
"MSD"
Error in my_thread_global_end(): 1 threads didn't exit

MySQL extension was enabled in php.ini, but I didn't use any of it's
functions in example. PHP is 5.2.5, no other mysql related dll's are
available on system.

I posted this just to confirm that bug exists on my system too.



[2008-03-28 22:23:40] stein at visibone dot com

Brilliant, Scottmac, I did have some crufty lurking libmysql.dll's. 
But I'm still getting the 5 second hang.  Using the 5.2.5 php_mysql.dll
and php_mysqli.dll's the hang happens with a dirt-simple hello-world. 
With 5.2.1 it happens if I mysql_connect().

Could it be having both mysql and mysqli enabled?  I'm using both for
unit testing.  

-- Bob Stein, VisiBone



[2008-03-26 20:56:53] lizwatson02452 at yahoo dot com

Following up briefly on my previous postchanging to an earlier
libmysql.dll appears to have fixed the problem for us, even though we
don't use MySQL.

Two difficulties with that:
 1) It was hard for me to believe that was the solution.
 2) It took some doing to persuade our hoster that changing the .dll
was not merely a fool's errand.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41350

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



#44794 [Opn->WFx]: Inconsistent order of argument for strtr compared to str_replace

2008-04-22 Thread iliaa
 ID:  44794
 Updated by:  [EMAIL PROTECTED]
 Reported By: php dot net at mog dot se
-Status:  Open
+Status:  Wont fix
 Bug Type:Strings related
 PHP Version: 5.2.5
 New Comment:

Any changes here will introduce massive BC breaks.


Previous Comments:


[2008-04-21 17:56:32] php dot net at mog dot se

Description:

The similar but different string replacement functions str_replace
strtr() have an inconsistent order of arguments, in strtr() $subject is
the first argument and in str_replace it is the last.

strtr($subject, $search, $replace)
str_replace($from, $to, $subject)

There is no logic in this behaviour so every time i use these functions
i have to look them up to find out which is which.

There is no backwards compatible way to fix this as all arguments can
be strings, so new API functions would be needed while keeping strtr and
str_replace as is.

The PHP API desparatley needs a naming convention and this IMO is one
of it's worst examples.

Expected result:

Without an obvious fix i can only offer my ideas on how to fix this:

#1
Adding a str_translate($from, $to, $subject) method would be possible,
assuming that this order is consistent with the rest of PHP's API

#2
A solution which is very logical & consistent would be if strings acted
like objects, then $subject->replace($from, $to) and
$subject->translate($from, $to) would be possible.

My guess would be that treating strings as objects would not be a clean
implementation, but perhaps an OO version of string is possible in SPL.






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



#44798 [NEW]: Memory leak assigning value to attribute

2008-04-22 Thread aldo at armiento dot com
From: aldo at armiento dot com
Operating system: Linux 2.6.18-686
PHP version:  5.2.5
PHP Bug Type: SimpleXML related
Bug description:  Memory leak assigning value to attribute

Description:

Assigning any value to a SimpleXML attribute produces a memory leak.

Reproduce code:
---
');
while(true) {
$xml->test['attribute'] = 'value';
}

echo $xml->asXML();

?>

Expected result:




Actual result:
--
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to 
allocate 40 bytes) in /tmp/test_simplexml.php on line 5

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



#44797 [NEW]: php_curl.dll crash. Offset: 00018ed8. ModName: php_curl.dll ModVer: 5.2.5.5.

2008-04-22 Thread dmitrij at stepanov dot lv
From: dmitrij at stepanov dot lv
Operating system: Windows XP
PHP version:  5.2.5
PHP Bug Type: cURL related
Bug description:  php_curl.dll crash. Offset: 00018ed8. ModName: php_curl.dll 
ModVer: 5.2.5.5.

Description:

My configuration: Windows XP, PHP 5.2.5. cURL extension periodically is
crashing at offset 00018ed8. I use both curl_* and curl_multi_*. Also, cURL
extension has memory leaks. After about 30 minutes of intensive use of cURL
functions, i get memory usage over 1G.

Reproduce code:
---
i create 12 handles with curl_init(), configure them, create one
curl_multi_init() handle, pass all 12 handles to multi handle with
curl_multi_add_handle() and call curl_multi_exec(). after successful
execution of requests, i curl_multi_remove_handle() all handles from multi
handle, close them with curl_close(), and close multi handle with
curl_multi_close(). After repeating this sequence 100 - 200 times, i get
lotsa memory leaks and even crash.

Expected result:

No memory leaks. No crash.

Actual result:
--
Memory leaks, crash at offset 00018ed8

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



#44645 [Com]: php5ts.dll Crash (x86_64 base machines)

2008-04-22 Thread whydream at 163 dot com
 ID:   44645
 Comment by:   whydream at 163 dot com
 Reported By:  gary dot wilson at coull dot biz
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 New Comment:

just connect to mysql, this error will occurs. code like this:



Previous Comments:


[2008-04-16 01:00:00] php-bugs at lists dot php dot net

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



[2008-04-08 11:00:01] [EMAIL PROTECTED]

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

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

Please avoid embedding huge scripts into the report.





[2008-04-05 09:11:03] gary dot wilson at coull dot biz

Description:

Failure case:
Making 8 (or more) concurrent requests to Apache/php requesting XML
causes php5ts.dll to throw an application error.

Event Type: Information
Event Source:   Application Error
Event Category: (100)
Event ID:   1004
Date:   02/04/2008
Time:   17:47:03
User:   N/A
Computer:   COULL-WEB01
Description:
Reporting queued error: faulting application Apache.exe, version
2.0.55.0, faulting module php5ts.dll, version 5.1.6.6, fault address
0x926a.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 41 70 61   ure  Apa
0018: 63 68 65 2e 65 78 65 20   che.exe 
0020: 32 2e 30 2e 35 35 2e 30   2.0.55.0
0028: 20 69 6e 20 70 68 70 35in php5
0030: 74 73 2e 64 6c 6c 20 35   ts.dll 5
0038: 2e 31 2e 36 2e 36 20 61   .1.6.6 a
0040: 74 20 6f 66 66 73 65 74   t offset
0048: 20 30 30 30 30 39 32 36926
0050: 61a   

#

Event Type: Information
Event Source:   Application Error
Event Category: (100)
Event ID:   1004
Date:   05/04/2008
Time:   09:21:48
User:   N/A
Computer:   MEDIAPROC02
Description:
Reporting queued error: faulting application httpd.exe, version
2.2.8.0, faulting module php5ts.dll, version 5.2.5.5, fault address
0xacb9.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 68 74 74   ure  htt
0018: 70 64 2e 65 78 65 20 32   pd.exe 2
0020: 2e 32 2e 38 2e 30 20 69   .2.8.0 i
0028: 6e 20 70 68 70 35 74 73   n php5ts
0030: 2e 64 6c 6c 20 35 2e 32   .dll 5.2
0038: 2e 35 2e 35 20 61 74 20   .5.5 at 
0040: 6f 66 66 73 65 74 20 30   offset 0
0048: 30 30 30 61 63 62 39  000acb9 


Hardware Manufacture: Dell, HP
Machine base: 64 bit
Operating System: Windows Server 2003 SP2 (32 bit)
Apache versions: 2.0.55, 2.0.59, 2.2.4, 2.2.8
php Versions: 5.1.6, 5.2.5, 5.3.dev

Description:
This problem was reproducible every time with a combination all the
above components.  This was reproduced on 3 separate servers, 2 Dell and
1 HP.

The failure case CANNOT be reproduced on a machine with the same OS,
Apache/php versions/config and code base that is running on a 32 bit
base machine this was verified on 5 servers.

In our failure case we are generating XML output on every request.  It
would seem like this is a issue when running 32 bit Win OS on 64 bit
base machine.  Unfortunately, I am unable to test this on 64 bit Windows
2003, however, I did retrograde a 64 bit OS a few months ago due to a
very similar problem (not certain if it was exactly the same).




Reproduce code:
---
Not a developer.  I will try and get our development team to create
some code to reproduce, but they are very busy, so it may take some
time.






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