#49520 [Bgs]: Case sensitivity in setlocale()

2009-09-11 Thread jchochola at demsys dot cz
 ID:   49520
 User updated by:  jchochola at demsys dot cz
 Reported By:  jchochola at demsys dot cz
 Status:   Bogus
 Bug Type: Strings related
 Operating System: Debian 4.0
 PHP Version:  5.2.10
 New Comment:

...which is pitty, and as PHP is not an integral part of the hosting
OS, it should (or at least could) implement a unifying (platform
dependent) layer above the C-lib's setlocale().

I hoped it's clear I really did read the setlocale()'s doc from the
text of the original post. I consulted the ISO it mentioned
and...following it was a kind of failure to me. My fault, I've to learn
English better.

Maybe it's time to fork&reclassify (and reopen) this BR to docs issue
and feature request...?

Thx for your Re: anyway.

Have a nice day,
H.


Previous Comments:


[2009-09-10 13:12:09] j...@php.net

Locales are OS issue, not PHP issue. We don't have control over what OS
might or might not support. Read more at http://php.net/setlocale

"Different systems have different naming schemes for locales."



[2009-09-10 10:43:11] jchochola at demsys dot cz

Description:

setlocale( LC_ALL, 'Czech' ) does not work in my ISP's environment; one
has to use lowercase 'czech' instead. The ISO639 (mentioned in
setolcale() docs) lists country names with capitalized first letters,
ie. setlocale() should accept 'Czech' or not to mention ISO639 at all.

'Czech' locale is OK under XAMPP used for local debugging.

I can't imagine why such functions should use case-sensitive string
params.


Reproduce code:
---
//---
//From manual page: function.setlocale
//---
function e( $s ) {
  eval( '$r = '.$s.';' );
  echo $s, ' returns ', $r ? 'true (\''.$r.'\')' : 'false', "\n";
}
e( "setlocale( LC_ALL, 'Czech' )" );
e( "setlocale( LC_ALL, 'czech' )" );


Expected result:

setlocale( LC_ALL, 'Czech' ) returns true ('Czech')
setlocale( LC_ALL, 'czech' ) returns true ('czech')


Actual result:
--
setlocale( LC_ALL, 'Czech' ) returns false
setlocale( LC_ALL, 'czech' ) returns true ('czech')







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



#48697 [Opn->Asn]: mb_internal_encoding() value gets reset in process

2009-09-11 Thread moriyoshi
 ID:   48697
 Updated by:   moriyo...@php.net
 Reported By:  glen at delfi dot ee
-Status:   Open
+Status:   Assigned
 Bug Type: mbstring related
 Operating System: PLD Linux
 PHP Version:  5.2.10
 Assigned To:  moriyoshi


Previous Comments:


[2009-07-09 07:21:49] ivan1986 at list dot ru



ISO-8859-1
UTF-8
ISO-8859-1

must by

ISO-8859-1
UTF-8
UTF-8



[2009-06-25 18:06:18] glen at delfi dot ee

Description:

setting mbstring internal encoding with mb_internal_encoding() 
function gets reset at some point with 5.2.10, and mb_strtolower() 
etc that are called without implicit charset will fail. (calling 
mb_strtolower() with 2 arguments will succeed.

in other speak, such code fails:
echo mb_internal_encoding(); -> prints ISO-8859-1
mb_internal_encoding('UTF-8');
echo mb_internal_encoding(); -> prints UTF-8
... /// some code ///
echo mb_internal_encoding(); -> prints ISO-8859-1

if i set the internal encoding via php.ini (ini_set() is fine too), 
then the problem does not occour. ie such code works ok:
echo mb_internal_encoding(); -> prints ISO-8859-1
ini_set("mbstring.internal_encoding", 'UTF-8');
echo mb_internal_encoding(); -> prints UTF-8
... /// that same code ///
echo mb_internal_encoding(); -> prints UTF-8


I have not yet able to create exact php code that is exact 
reproducer, but the same php code, input data to php script, it 
works with 5.2.9 and when reverting this commit:
http://www.mail-archive.com/php-cvs%40lists.php.net/msg40593.html

from brief looking i see that there is some inconsistency, that one 
code sets the internal encoding from php.ini and the 
mb_internal_encoding() function does not update php.ini setting.






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



#49354 [Opn->Asn]: mb_strcut() cutting wrong length when offset is within a multibyte character

2009-09-11 Thread moriyoshi
 ID:   49354
 Updated by:   moriyo...@php.net
 Reported By:  mk at zigamorph dot se
-Status:   Open
+Status:   Assigned
 Bug Type: mbstring related
 Operating System: Linux
 PHP Version:  5.2.10
-Assigned To:  
+Assigned To:  moriyoshi


Previous Comments:


[2009-08-25 07:33:02] mk at zigamorph dot se

Description:

When you use mb_strcut with an offset and this offset happens to fall
within a multibyte (utf-8) character mb_strcut moves the start point of
the string as to not break a multibyte character. As an undesirable side
effect it strips one or more bytes from the end of the cut string.

Reproduce code:
---
$crap = 'AåBäCöDü' /* in utf-8 */
echo mb_strcut($crap, 0, 100, 'UTF-8')."\n"; /* 'AåBäCöDü' as 100
is more than strlen */
echo mb_strcut($crap, 1, 100, 'UTF-8')."\n"; /* 'åBäCöDü' as 100 is
more than strlen and we're offset 1 byte */
echo mb_strcut($crap, 2, 100, 'UTF-8')."\n"; /* 'åBäCöD' */

Expected result:

$crap = 'AåBäCöDü' /* in utf-8 */
echo mb_strcut($crap, 0, 100, 'UTF-8')."\n"; /* 'AåBäCöDü' as 100
is more than strlen */
echo mb_strcut($crap, 1, 100, 'UTF-8')."\n"; /* 'åBäCöDü' as 100 is
more than strlen and we're offset 1 byte */
echo mb_strcut($crap, 2, 100, 'UTF-8')."\n"; /* either 'åBäCöDü' or
'BäCöDü' */






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



#49528 [NEW]: UTF-16 strings prefixed by BOMs wrondly converted

2009-09-11 Thread moriyo...@php.net
From: moriyo...@php.net
Operating system: N/A
PHP version:  5.3SVN-2009-09-11 (SVN)
PHP Bug Type: mbstring related
Bug description:  UTF-16 strings prefixed by BOMs wrondly converted

Description:

The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM)
gets converted to wrong Unicode codepoint. Moreover, the resulting string
contains the BOM itself while it is uncalled for.



Reproduce code:
---


Expected result:

string(8) "02010403"

Actual result:
--
string(12) "fe010403"

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



#49528 [Opn]: UTF-16 strings prefixed by BOMs wrondly converted

2009-09-11 Thread sjoerd
 ID:   49528
 Updated by:   sjo...@php.net
 Reported By:  moriyo...@php.net
 Status:   Open
 Bug Type: mbstring related
 Operating System: N/A
 PHP Version:  5.3SVN-2009-09-11 (SVN)
 New Comment:

It can be argued that the BOM character U+FEFF should never be
converted, as it is no real character.

I don't think it is the task of mb_convert_encoding to detect the byte
order and interpret the BOM.


Previous Comments:


[2009-09-11 07:45:05] moriyo...@php.net

Description:

The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM)
gets converted to wrong Unicode codepoint. Moreover, the resulting
string contains the BOM itself while it is uncalled for.



Reproduce code:
---


Expected result:

string(8) "02010403"

Actual result:
--
string(12) "fe010403"





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



#49528 [Opn->Asn]: UTF-16 strings prefixed by BOMs wrondly converted

2009-09-11 Thread jani
 ID:   49528
 Updated by:   j...@php.net
 Reported By:  moriyo...@php.net
-Status:   Open
+Status:   Assigned
 Bug Type: mbstring related
-Operating System: N/A
+Operating System: *
 PHP Version:  5.3SVN-2009-09-11 (SVN)
-Assigned To:  
+Assigned To:  moriyoshi
 New Comment:

Moriyoshi propably added this report as reminder for himself.


Previous Comments:


[2009-09-11 08:18:38] sjo...@php.net

It can be argued that the BOM character U+FEFF should never be
converted, as it is no real character.

I don't think it is the task of mb_convert_encoding to detect the byte
order and interpret the BOM.



[2009-09-11 07:45:05] moriyo...@php.net

Description:

The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM)
gets converted to wrong Unicode codepoint. Moreover, the resulting
string contains the BOM itself while it is uncalled for.



Reproduce code:
---


Expected result:

string(8) "02010403"

Actual result:
--
string(12) "fe010403"





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



#49529 [NEW]: imap_mail_compose changes passed parameters

2009-09-11 Thread hrynek at hrynek dot com
From: hrynek at hrynek dot com
Operating system: Linux
PHP version:  5.2.10
PHP Bug Type: IMAP related
Bug description:  imap_mail_compose changes passed parameters

Description:

imap_mail_compose() corrupts passed $envelope parameter, even passed 
indirectly - check $headers and $this->headers used in sample code.

All address headers (from, to, cc, bcc, reply_to etc.) are changed and 
variable can't be passed to imap_mail_compose() next time, beacause 
function produces notice and wrong mail headers:
From: a...@no HOST, unexpected_data_after_addr...@.syntax-error.

Any modification (uncomment line in sample) to variable 
prevents changes to $this->headers, but $headers is still being 
modified.

Reproduce code:
---
class test {
protected $headers = array("from" => "Asdf Qwer
");
protected $body = array(array(
"type" => TYPETEXT,
"subtype" => "plain",
"contents.data" => "test message",
));
protected function getHeaders() {
return $this->headers;
}
public function compose() {
$headers = $this->getHeaders();
//$headers["from"] .= ""; // uncomment to fix
var_dump($this->headers["from"]);
imap_mail_compose($headers, $this->body);
var_dump($this->headers["from"]);
}
}
$test = new test();
$test->compose();

Expected result:

string(29) "Asdf Qwer "
string(29) "Asdf Qwer "

Actual result:
--
string(29) "Asdf Qwer "
string(29) "Asdf Qwer"

One space is replaced by 0x00.

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



#49530 [NEW]: SOAP header only results in function call when document/literal

2009-09-11 Thread sjoerd-php at linuxonly dot nl
From: sjoerd-php at linuxonly dot nl
Operating system: 
PHP version:  5.3.0
PHP Bug Type: SOAP related
Bug description:  SOAP header only results in function call when 
document/literal

Description:

When a SOAP header is sent to a webservice which uses SoapServer, a method
with the same name as the header is called. However, this only happens when
the webservice is document/literal, not when it is rpc/encoded.

Reproduce code:
---
http://pastebin.com/f7b1434d9
} else {
$wsdl = 'rpcencoded.wsdl'; // http://pastebin.com/fe989844
}

$handler = new SoapHandler();
$server = new SoapServer($wsdl);
$server->setObject($handler);
$server->handle();
?>

Expected result:

With both WSDLs, that the HeaderAuthenticate method is called. That is,
the X-Debug header contains "header was called" when the HeaderAuthenticate
header was sent.

Actual result:
--
The HeaderAuthenticate method is only called with document/literal WSDL.

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



#49531 [NEW]: CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE cannot be set"

2009-09-11 Thread gilad at parann dot net
From: gilad at parann dot net
Operating system: any (was seen on Win32 XP)
PHP version:  5.2.10
PHP Bug Type: cURL related
Bug description:  CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE 
cannot be set"

Description:

Set up PHP 5.2.10 with a basedir.

Calling 

curl_setopt ($ch, CURLOPT_INFILESIZE, $len) ;

will sometimes cause PHP to generate a warning

CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is
set

depending on the exact value of $len !!!

Looking at the source code of _php_curl_setopt (from
"...ext/curl/interface.c") I think I see why. The code starts with a big
switch statement and NO break...

So the CURLOPT_INFILESIZE option gets processed by the IF statement that
checks if "(Z_LVAL_PP(zvalue) & CURLPROTO_FILE)" !!

Sometimes the $len value will happen to have the same bits set as 
CURLPROTO_FILE and boom - you get the error.

Anyway if you avoid setting INFILESIZE things do work - only sometimes
that is not so convenient...

Reproduce code:
---
from _php_curl_setopt in "...ext/curl/interface.c":

 switch (option) {
case CURLOPT_INFILESIZE: 
/*   many many more options with NO break! */
case CURLOPT_REDIR_PROTOCOLS:
case CURLOPT_PROTOCOLS:
convert_to_long_ex(zvalue);
if (((PG(open_basedir) && *PG(open_basedir)) || 
PG(safe_mode)) &&
(Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "CURLPROTO_FILE cannot be
activated when in safe_mode or an open_basedir is set");
RETVAL_FALSE;
return 1;
}
error = curl_easy_setopt(ch->cp, option, 
Z_LVAL_PP(zvalue));
break;


Expected result:

I expect the call to curl_setopt with CURLOPT_INFILESIZE to work

Actual result:
--
A warning is generated

CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is
set


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



#48866 [Com]: ldap.conf TLS_REQCERT directive fails for ldaps

2009-09-11 Thread phpuser at mailinator dot com
 ID:   48866
 Comment by:   phpuser at mailinator dot com
 Reported By:  dev at lechat dot org
 Status:   Assigned
 Bug Type: LDAP related
 Operating System: win32 only - windows server 2003
 PHP Version:  5.3.0
 Assigned To:  pajoye
 New Comment:

Upon further investigation, I found that my install was looking for the
ldap.conf file in the root of the D drive.  I'm guessing that is because
I move my inetpub directory off of the system drive in all my installs. 
Upon placing the ldap.conf file there, giving read permissions to the
IIS_IUSRS group, and a reboot, it began working. This is on a Server
2008 R2 box with PHP 5.3.0 NTS VC9.


Previous Comments:


[2009-09-10 19:17:52] phpuser at mailinator dot com

Same issue with Windows Server 2008 R2 and PHP 5.3.0 and 5.3.1 RC1. 
Neither Placing the ldap.conf file in the normal directory nor C:\ and
restarting the OS fixed the problem.  I now have the file located in
both directories and it still refuses to work.



[2009-09-02 11:17:18] dev at lechat dot org

I have now tested with 5.2.10 and It works succesfully as with
5.2.9-1.

I retry with 5.3.0, to test jbd at anl dot gov advice about restart
windows and not only apache, but I got the same problem. 
'TLS_REQCERT never' defined in c:\ldap.conf is not applied. I can still
observe that this file is open and read with a filemonitor at the first
ldaps request.

Hope this will be effectively fixed in next ldap lib version.

Thank you for your help.



[2009-08-31 15:26:40] jbd at anl dot gov

I have found that moving ldap.conf to c:\ldap.conf and restarting the
Windows machine (not just Apache) resolved the error for me with PHP 5.3
using LDAPS.



[2009-08-07 12:01:54] paj...@php.net

Has to be fixed in the ldap libs.



[2009-08-07 08:04:47] dev at lechat dot org

Hi,
I didn't try 5.2.10.
I will make a try in one week
when i Will be back from holidays (-;
At this point I'll give you a feedback
if the problem occurs or not with 5.2.10.



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

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



#49529 [Opn->Fbk]: imap_mail_compose changes passed parameters

2009-09-11 Thread jani
 ID:   49529
 Updated by:   j...@php.net
 Reported By:  hrynek at hrynek dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IMAP related
 Operating System: Linux
 PHP Version:  5.2.10
 New Comment:

Please try using this snapshot:

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

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

I can not reproduce this using your example script.


Previous Comments:


[2009-09-11 11:24:12] hrynek at hrynek dot com

Description:

imap_mail_compose() corrupts passed $envelope parameter, even passed 
indirectly - check $headers and $this->headers used in sample code.

All address headers (from, to, cc, bcc, reply_to etc.) are changed and

variable can't be passed to imap_mail_compose() next time, beacause 
function produces notice and wrong mail headers:
From: a...@no HOST, unexpected_data_after_addr...@.syntax-error.

Any modification (uncomment line in sample) to variable 
prevents changes to $this->headers, but $headers is still being 
modified.

Reproduce code:
---
class test {
protected $headers = array("from" => "Asdf Qwer
");
protected $body = array(array(
"type" => TYPETEXT,
"subtype" => "plain",
"contents.data" => "test message",
));
protected function getHeaders() {
return $this->headers;
}
public function compose() {
$headers = $this->getHeaders();
//$headers["from"] .= ""; // uncomment to fix
var_dump($this->headers["from"]);
imap_mail_compose($headers, $this->body);
var_dump($this->headers["from"]);
}
}
$test = new test();
$test->compose();

Expected result:

string(29) "Asdf Qwer "
string(29) "Asdf Qwer "

Actual result:
--
string(29) "Asdf Qwer "
string(29) "Asdf Qwer"

One space is replaced by 0x00.





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



#49527 [Opn->Fbk]: curl: sslv3 alert handshake failure

2009-09-11 Thread jani
 ID:   49527
 Updated by:   j...@php.net
 Reported By:  lr at pcorp dot us
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Windows
 PHP Version:  5.2.10
 New Comment:

What is the curl version in the 5.2.6 vs. 5.2.10? (and openssl), check
from phpinfo().


Previous Comments:


[2009-09-11 04:46:06] lr at pcorp dot us

Description:

We recently upgraded our windows php from 5.2.6 to 5.2.10 (using
binaries provided on php website) and since then one of our apps that
uses a CURL SSL connection has stopped working.  

Curl throws an error
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure 

Reproduce code:
---
The code we had in prior versions of PHP that worked fine were
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch,CURLOPT_SSLVERSION,3);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $somehttpsurlhere);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);


$t = curl_exec($ch);
if (curl_errno($ch)){
print curl_error($ch);
}

Expected result:

Before this used to work and $t would have content of ssl page.

Unfortunately can't devulge the exact ssl sites since they are private
client ones.  2 that we have tried don't work.

One uses an SSL cert issues by Comodo EV SGC CA

The other uses one issued by Thawte Premium Server CA (is a wildcard
one).

Both certs register as fine in IE and Firefox.



Actual result:
--
Now gives 
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake
failure 

This might be just a change in how to deal with SSL connections, but
couldn't find any documentation about curl or PHP website that was
helpful in this regard.





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



#49532 [NEW]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread matroy at investpsp dot ca
From: matroy at investpsp dot ca
Operating system: Windows 2003 SP2
PHP version:  5.2.10
PHP Bug Type: *General Issues
Bug description:  php5ts.dll access violation exception  
php5ts!_zend_mm_free_int

Description:

PHP crashes after running a script in command line for a while. The script
is executing the same code in a loop and crashes randomly with a windows
event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module php5ts.dll,
version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9
php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68
022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336 00223b68 
   0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8 00223b68 
   05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68
05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68
05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68
08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68
05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68
05a4a5c4
php5ts!execute+1c5 0232aa48 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68
05a5e6a4
php5ts!execute+1c5 0232d518 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fa80 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fa80 00223b68
01a15514
php5ts!execute+1c5 0232d690 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fb28 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fb28 00223b68
00c0fc2c
php5ts!execute+1c5 01a0fa58 00223b68 
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fbd0 00223b01
1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fbd0 00223b68
00223b68
php5ts!execute+1c5 01a0bd10 00223b68 
php5ts!zend_execute_scripts+107 0008 00223b68    

php5ts!php_execute_script+20d 00c0fec8 00223b68 
php!main+bca 0003 00223af8 00222a38
php!ma

#49267 [Com]: Linking fails for iconv: "Undefined symbols: _libiconv"

2009-09-11 Thread jason at dajaney dot com
 ID:   49267
 Comment by:   jason at dajaney dot com
 Reported By:  s dot rost at ewerk dot com
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Mac OSX 10.6 Snow Leopard
 PHP Version:  5.3, 6 (2009-08-18)
 Assigned To:  scottmac
 New Comment:

I am also experiencing this same issue on my new mac, running 10.6.

Keep this alive with any updates. 

Undefined symbols:
  "_libiconv_open", referenced from:
  _do_convert in gdkanji.o
  "_libiconv", referenced from:
  _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
  _do_convert in gdkanji.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

The above was trying my last ditch effort to have --without-iconv in
the ./configure statement. 

Jason


Previous Comments:


[2009-09-09 20:34:20] rickdunn at chez dot com

For what it's worth, this is probably the same iconv issue that has 
already popped up in bug #43189 and bug #48195.



[2009-09-09 13:30:41] aoyagi dot kouhei at gmail dot com

SnowLeopard
PHP-5.3.1RC1

ext/iconv/iconv.c

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif

to 

#ifdef HAVE_LIBICONV
#define iconv iconv
#endif

./configure --prefix=/opt/php-5.3.1RC1 --enable-zip
--with-apxs2=/opt/httpd/bin/apxs --with-bz2 --enable-calendar
--with-curl --with-gd --enable-gd-native-ttf --enable-gd-jis-conv 
--enable-mbstring --with-pdo-pgsql=/opt/postgresql
--with-pgsql=/opt/postgresql --enable-soap --enable-sockets
--with-jpeg-dir=/opt/jpeg --with-png-dir=/opt/libpng
--with-freetype-dir=/opt/freetype --with-zlib
--with-libxml-dir=/opt/libxml2 --with-xsl=/opt/libxslt
--with-readline=/opt/readline --with-gettext=/opt/gettext
--with-iconv-dir=/opt/libiconv

make

Undefined symbols:
  "_libiconv_open", referenced from:
  _do_convert in gdkanji.o
  "_libiconv", referenced from:
  _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
  _do_convert in gdkanji.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1



[2009-09-09 13:29:03] alexandre dot morgaut at 4d dot fr

the tip of notfornoone worked for me 
but I still have a problem with buildconf :

sh-3.2# ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf version 2.61 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
   Running vcsclean for you.
   To avoid this, install autoconf-2.13.
Can't figure out your VCS, not cleaning.

I didn't change autoconf, so I imagine snow leopard did..



[2009-09-08 00:45:55] notfornoone at gmail dot com

The instructions in the first comment worked for me, here is what I did
to successfully install php-5.3.1RC1 on Snow Leopard. This also worked
for php-5.2.11RC1 on Snow Leopard.

1.
I changed ext/iconv/iconv.c as per the first comment on this bug.

On line 185 change

#ifdef HAVE_LIBICONV
#define iconv libiconv
#endif

to 

#ifdef HAVE_LIBICONV
#define iconv iconv
#endif


2.
Run configure
./configure --prefix=/usr/local/php/5.3.1RC1
--with-apxs2=/usr/sbin/apxs


I found that after changing the iconv.c file I did not need to add
-lsresolv to EXTRA_LIBS



[2009-09-06 03:47:43] me at sleepycode dot com

I have the same issue as well with Snow Leopard and any version of PHP
I try.
I have built my own libiconv and this made little difference.

My configure line:

./configure --prefix=/home/software/php/v5 \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-apxs2=/home/software/apache/bin/apxs \
--enable-maintainer-zts \
--with-zlib-dir=/home/software/zlib \
--with-pgsql=/home/software/postgresql \
--enable-mbstring \
--with-gd \
--with-png-dir=/home/software/libpng \
--with-iconv=/home/software/iconv


The build error during make:

Undefined symbols:
  "_libiconv_open", referenced from:
  _do_convert in gdkanji.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_substr in iconv.o
  __php_iconv_substr in iconv.o
  __php_iconv_strpos in iconv.o
  __php_iconv_mime_encode in iconv.o
  __php_iconv_mime_encode in iconv.o
  __php_iconv_mime_decode in iconv.o
  __php_iconv_mime_decode in iconv.o
  _php_iconv_stream_filter_ctor in iconv.o
  "_libiconv", referenced from:
  _do_convert in gdkanji.o
  "_libiconv_close", referenced from:
  _do_convert in gdkanji.o
  _php_iconv_string in iconv.o
  __php_iconv_strlen in iconv.o
  __php_iconv_substr 

#49532 [Opn->Fbk]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread jani
 ID:   49532
 Updated by:   j...@php.net
 Reported By:  matroy at investpsp dot ca
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows 2003 SP2
-PHP Version:  5.2.10
+PHP Version:  5.2.6
 New Comment:

Please try using this snapshot:

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

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




Previous Comments:


[2009-09-11 14:14:33] matroy at investpsp dot ca

Description:

PHP crashes after running a script in command line for a while. The
script is executing the same code in a loop and crashes randomly with a
windows event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module
php5ts.dll, version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9   

php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68  
 
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68   
 022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336
00223b68 0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8
00223b68 05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 
   05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 
   05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 
   08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 
   05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68 
   05a4a5c4
php5ts!execute+1c5 0232aa48 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68 
   05a5e6a4
php5ts!execute+1c5 0232d518 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fa80 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fa80 00223b68 
   01a15514
php5ts!execute+1c5 0232d690 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fb28 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fb28 00223b68 
   00c0fc2c
php5ts!execute+1c5 01a0fa58 00223b68 
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fbd0 00223b01  
  1001c635
php5ts!ZEND_DO_

#49528 [Asn->Csd]: UTF-16 strings prefixed by BOMs wrondly converted

2009-09-11 Thread jani
 ID:   49528
 Updated by:   j...@php.net
 Reported By:  moriyo...@php.net
-Status:   Assigned
+Status:   Closed
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5.3SVN-2009-09-11 (SVN)
 Assigned To:  moriyoshi
 New Comment:

Fixed -> closed (?) (or did you leave this open just for fun?)


Previous Comments:


[2009-09-11 08:22:20] s...@php.net

Automatic comment from SVN on behalf of moriyoshi
Revision: http://svn.php.net/viewvc/?view=revision&revision=288260
Log: - Fix bug #49528 (UTF-16 strings prefixed by BOM wrongly
converted).



[2009-09-11 08:21:16] j...@php.net

Moriyoshi propably added this report as reminder for himself.



[2009-09-11 08:18:38] sjo...@php.net

It can be argued that the BOM character U+FEFF should never be
converted, as it is no real character.

I don't think it is the task of mb_convert_encoding to detect the byte
order and interpret the BOM.



[2009-09-11 07:45:05] moriyo...@php.net

Description:

The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM)
gets converted to wrong Unicode codepoint. Moreover, the resulting
string contains the BOM itself while it is uncalled for.



Reproduce code:
---


Expected result:

string(8) "02010403"

Actual result:
--
string(12) "fe010403"





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



#49532 [Fbk]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread pajoye
 ID:   49532
 Updated by:   paj...@php.net
 Reported By:  matroy at investpsp dot ca
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows 2003 SP2
 PHP Version:  5.2.6
 New Comment:

ISAPI is deprecated and not maintained anymore. Please try the same
script using the FastCGI interface instead (works with IIS5/6/7).


Previous Comments:


[2009-09-11 14:33:46] j...@php.net

Please try using this snapshot:

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

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





[2009-09-11 14:14:33] matroy at investpsp dot ca

Description:

PHP crashes after running a script in command line for a while. The
script is executing the same code in a loop and crashes randomly with a
windows event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module
php5ts.dll, version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9   

php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68  
 
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68   
 022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336
00223b68 0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8
00223b68 05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 
   05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 
   05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 
   08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 
   05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68 
   05a4a5c4
php5ts!execute+1c5 0232aa48 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68 
   05a5e6a4
php5ts!execute+1c5 0232d518 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fa80 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fa80 00223b68 
   01a15514
php5ts!execute+1c5 0232d690 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fb28 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fb

#49532 [Fbk->Opn]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread matroy at investpsp dot ca
 ID:   49532
 User updated by:  matroy at investpsp dot ca
 Reported By:  matroy at investpsp dot ca
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Windows 2003 SP2
 PHP Version:  5.2.6
 New Comment:

I'm not using it in a web server, it's as a command line using the
php.exe.

I've got the same proble with 5.2.6 and trying with 5.2.11RC3...


Previous Comments:


[2009-09-11 14:49:59] paj...@php.net

ISAPI is deprecated and not maintained anymore. Please try the same
script using the FastCGI interface instead (works with IIS5/6/7).



[2009-09-11 14:33:46] j...@php.net

Please try using this snapshot:

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

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





[2009-09-11 14:14:33] matroy at investpsp dot ca

Description:

PHP crashes after running a script in command line for a while. The
script is executing the same code in a loop and crashes randomly with a
windows event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module
php5ts.dll, version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9   

php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68  
 
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68   
 022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336
00223b68 0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8
00223b68 05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 
   05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 
   05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 
   08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 
   05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68 
   05a4a5c4
php5ts!execute+1c5 0232aa48 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68 
   05a5e6a4
php5ts!execute+1c5 0232d518 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fa80 00223b01  
  1001c635
p

#49532 [Opn->Fbk]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread jani
 ID:   49532
 Updated by:   j...@php.net
 Reported By:  matroy at investpsp dot ca
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
-Operating System: Windows 2003 SP2
+Operating System: win32 only - Windows 2003 SP2
 PHP Version:  5.2.6


Previous Comments:


[2009-09-11 14:52:24] matroy at investpsp dot ca

I'm not using it in a web server, it's as a command line using the
php.exe.

I've got the same proble with 5.2.6 and trying with 5.2.11RC3...



[2009-09-11 14:49:59] paj...@php.net

ISAPI is deprecated and not maintained anymore. Please try the same
script using the FastCGI interface instead (works with IIS5/6/7).



[2009-09-11 14:33:46] j...@php.net

Please try using this snapshot:

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

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





[2009-09-11 14:14:33] matroy at investpsp dot ca

Description:

PHP crashes after running a script in command line for a while. The
script is executing the same code in a loop and crashes randomly with a
windows event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module
php5ts.dll, version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9   

php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68  
 
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68   
 022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336
00223b68 0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8
00223b68 05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 
   05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 
   05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 
   08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 
   05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68 
   05a4a5c4
php5ts!execute+1c5 0232aa48 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68 
   05a5e6a4
php5t

#48886 [Com]: [PATCH] Add support for 64bits file handling on 32 bits architecture

2009-09-11 Thread boite dot pour dot spam at gmail dot com
 ID:   48886
 Comment by:   boite dot pour dot spam at gmail dot com
 Reported By:  mail dot pourri at laposte dot net
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3.0
 New Comment:

It's working. You should talk about this on the dev mailing list


Previous Comments:


[2009-07-11 13:39:03] mail dot pourri at laposte dot net

diff -aur php-5.3.0.orig/ext/phar/phar_internal.h
php-5.3.0/ext/phar/phar_internal.h
--- php-5.3.0.orig/ext/phar/phar_internal.h 2009-05-13
22:25:43.0 +0200
+++ php-5.3.0/ext/phar/phar_internal.h  2009-07-11 15:10:04.0
+0200
@@ -534,8 +534,15 @@
return FAILURE;
 }
 #else
-# define phar_stream_copy_to_stream(src, dest, maxlen,
len)_php_stream_copy_to_stream_ex((src), (dest), (maxlen), (len)
STREAMS_CC TSRMLS_CC)
-
+static inline size_t phar_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen, size_t *len)
+{
+   off_t _maxlen = maxlen == (size_t)PHP_STREAM_COPY_ALL ?
PHP_STREAM_COPY_ALL : maxlen, _len = 0;
+   size_t ret = php_stream_copy_to_stream_ex(src, dest, _maxlen,
&_len);
+   if (ret == SUCCESS) {
+   if (len) *len = (size_t)_len;
+   } else if (len) *len = 0;
+   return ret;
+}
 #endif
 
 #if PHP_VERSION_ID >= 6
diff -aur php-5.3.0.orig/ext/standard/file.c
php-5.3.0/ext/standard/file.c
--- php-5.3.0.orig/ext/standard/file.c  2009-06-22 13:37:30.0
+0200
+++ php-5.3.0/ext/standard/file.c   2009-07-11 15:23:32.0 +0200
@@ -594,7 +594,7 @@
char *filename;
int filename_len;
zval *data;
-   int numbytes = 0;
+   off_t numbytes = 0;
long flags = 0;
zval *zcontext = NULL;
php_stream_context *context = NULL;
@@ -642,7 +642,7 @@
 
switch (Z_TYPE_P(data)) {
case IS_RESOURCE: {
-   size_t len;
+   off_t len;
if (php_stream_copy_to_stream_ex(srcstream, stream,
PHP_STREAM_COPY_ALL, &len) != SUCCESS) {
numbytes = -1;
} else {
@@ -659,9 +659,9 @@
 
case IS_STRING:
if (Z_STRLEN_P(data)) {
-   numbytes = php_stream_write(stream, 
Z_STRVAL_P(data),
Z_STRLEN_P(data));
-   if (numbytes != Z_STRLEN_P(data)) {
-   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Only %d of %d bytes
written, possibly out of free disk space", numbytes, Z_STRLEN_P(data));
+   numbytes = (off_t)php_stream_write(stream, 
Z_STRVAL_P(data),
Z_STRLEN_P(data));
+   if (numbytes != (off_t)Z_STRLEN_P(data)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Only %d of %d bytes
written, possibly out of free disk space", (size_t)numbytes,
Z_STRLEN_P(data));
numbytes = -1;
}
}
@@ -680,13 +680,13 @@
convert_to_string(*tmp);
}
if (Z_STRLEN_PP(tmp)) {
-   numbytes += Z_STRLEN_PP(tmp);
+   numbytes += 
(off_t)Z_STRLEN_PP(tmp);
bytes_written = 
php_stream_write(stream, Z_STRVAL_PP(tmp),
Z_STRLEN_PP(tmp));
if (bytes_written < 0 || 
bytes_written != Z_STRLEN_PP(tmp)) {
if (bytes_written < 0) {

php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write
%d bytes to %s", Z_STRLEN_PP(tmp), filename);
} else {
-   
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d
bytes written, possibly out of free disk space", bytes_written,
Z_STRLEN_PP(tmp));
+   
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %d of %d
bytes written, possibly out of free disk space", (size_t)bytes_written,
Z_STRLEN_PP(tmp));
}
numbytes = -1;
break;
@@ -702,9 +702,9 @@
zval out;
 
if (zend_std_cast_object_tostring(data, &out, 
IS_STRING TSRMLS_CC)
== SUCCESS) {
-   numbytes = php_stream_write(stream, 
Z_STRVAL(out),
Z_STRLEN(out));
-

#49533 [NEW]: Can't load PHP files in junction directories

2009-09-11 Thread bougu at touchtunes dot com
From: bougu at touchtunes dot com
Operating system: Windows XP SP3
PHP version:  5.3SVN-2009-09-11 (snap)
PHP Bug Type: Directory function related
Bug description:  Can't load PHP files in junction directories

Description:

I'm reposting this, which is the same as #48778, as I don't think that 
issue is a duplicate of #48746.

If my Apache's DocumentRoot directory is a junction point, PHP fails to 
open the actual file I'm trying to load.

For example, if I use C:/my_junction as the DocumentRoot, and try to 
load index.php found in that directory, it fails and PHP spits the 
following (see actual result).

Using the CLI version, I made sure file_exists returned true:

c:\xampp\php\php.exe -r 
"var_dump(file_exists('c:\my_junction\index.php'));"
boolean(true)

Reproduce code:
---
- linkd c:\my_junction c:\some_other_dir
- Create index.php in c:\my_junction, containing anything
- Change apache config to use c:\my_junction as it's DocumentRoot
- Try to load http:///index.php

Note: linkd comes from the Windows 2000 Resource Kit:
"Links an NTFS directory to a target valid object name in Windows 2000."
I think there's other ways to create junction points; see #48746 for
examples.

Expected result:

Correctly load index.php

Actual result:
--
The following is logged in Apache's error_log, and appears in my 
browser:

Warning: Unknown: failed to open stream: No such file or directory in 
Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/my_junction/index.php' 
(include_path='.;C:\xampp\php\PEAR') in Unknown on line 0

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



#49532 [Fbk->Opn]: php5ts.dll access violation exception php5ts!_zend_mm_free_int

2009-09-11 Thread matroy at investpsp dot ca
 ID:   49532
 User updated by:  matroy at investpsp dot ca
 Reported By:  matroy at investpsp dot ca
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: win32 only - Windows 2003 SP2
-PHP Version:  5.2.6
+PHP Version:  5.2.11
 New Comment:

Same problem with 5.2.11

Tested with 5.2.11, 5.2.10, 5.2.6

I thought it was due to mssql ext. so I've switched to sqlsrv and still
go the crash.

loaded extension are:
php_curl.dll
php_mcrypt.dll
php_mysql.dll
php_sockets.dll
php_zip.dll
php_sqlsrv_ts.dll


Previous Comments:


[2009-09-11 14:52:24] matroy at investpsp dot ca

I'm not using it in a web server, it's as a command line using the
php.exe.

I've got the same proble with 5.2.6 and trying with 5.2.11RC3...



[2009-09-11 14:49:59] paj...@php.net

ISAPI is deprecated and not maintained anymore. Please try the same
script using the FastCGI interface instead (works with IIS5/6/7).



[2009-09-11 14:33:46] j...@php.net

Please try using this snapshot:

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

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





[2009-09-11 14:14:33] matroy at investpsp dot ca

Description:

PHP crashes after running a script in command line for a while. The
script is executing the same code in a loop and crashes randomly with a
windows event entry like this one: 

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   9/11/2009
Time:   9:41:31 AM
User:   N/A
Computer:   STSMTL02
Description:
Faulting application php.exe, version 5.2.6.6, faulting module
php5ts.dll, version 5.2.6.6, fault address 0xacca.

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 70 68 70   ure  php
0018: 2e 65 78 65 20 35 2e 32   .exe 5.2
0020: 2e 36 2e 36 20 69 6e 20   .6.6 in 
0028: 70 68 70 35 74 73 2e 64   php5ts.d
0030: 6c 6c 20 35 2e 32 2e 36   ll 5.2.6
0038: 2e 36 20 61 74 20 6f 66   .6 at of
0040: 66 73 65 74 20 30 30 30   fset 000
0048: 30 61 63 63 610acca   



Here is the crash analysis

---


Type of Analysis Performed   Crash Analysis 
Machine Name   STSMTL02 
Operating System   Windows Server 2003 Service Pack 2 
Number Of Processors   1 
Process ID   4880 
Process Image   c:\Soft\PHP5\php.exe 
System Up-Time   19 day(s) 12:24:24 
Process Up-Time   00:02:25 


Thread 0 - System ID 4228
Entry point   php!mainCRTStartup 
Create time   9/11/2009 9:44:50 AM 
Time spent in user mode   0 Days 0:0:1.312 
Time spent in kernel mode   0 Days 0:0:8.593 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_free_int+1fd 002250f0 0040 1009b3d9   

php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38
php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410
php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68  
 
php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68   
 022d9bd8
php5ts!zend_objects_store_del_ref_by_handle+140 0336
00223b68 0244ced8
php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68

php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68
php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8
00223b68 05d8e864
php5ts!execute+1c5 0234c088 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 
   05addb14
php5ts!execute+1c5 0234a1a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 
   05b8ec34
php5ts!execute+1c5 0234a0c8 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 
   08112234
php5ts!execute+1c5 023220a0 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 
   05bf6054
php5ts!execute+1c5 02320250 00223b68 00223b68
php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01  
  1001c635
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0

#49534 [NEW]: Incorrect dates returned with strtotime

2009-09-11 Thread re dot lewis at comcast dot net
From: re dot lewis at comcast dot net
Operating system: Linux
PHP version:  5.2.10
PHP Bug Type: Date/time related
Bug description:  Incorrect dates returned with strtotime

Description:

On Sept 11, 2009 I was calculating the date for each successive sunday and
used the code below, but after Nov 1, 2009, the day changes to Saturday. 
Is this a bug?  It appears to be related to daylight savings time.

Reproduce code:
---
";

}
?>

Expected result:

Return the date of each sunday starting 5 weeks from this coming sunday.

Actual result:
--
2009-10-18, Sun, 290
2009-10-25, Sun, 297
2009-11-01, Sun, 304
2009-11-07, Sat, 310
2009-11-14, Sat, 317
2009-11-21, Sat, 324
2009-11-28, Sat, 331
2009-12-05, Sat, 338
2009-12-12, Sat, 345
2009-12-19, Sat, 352


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



#49534 [Opn->Bgs]: Incorrect dates returned with strtotime

2009-09-11 Thread rasmus
 ID:   49534
 Updated by:   ras...@php.net
 Reported By:  re dot lewis at comcast dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.10
 New Comment:

Which would be why it isn't a bug.  Start with a timestamp around noon
to avoid DST issues like this.

You probably also want to use something like this instead:

$db = new DateTime('2008-12-31');
$de = new DateTime('2009-12-31');
$di = DateInterval::createFromDateString('Sunday next week');
$dp = new DatePeriod($db, $di, $de, DatePeriod::EXCLUDE_START_DATE);
foreach($dp as $dt) {
   echo $dt->format("F jS\n") . "\n";
}

This would give you the date of each Sunday in 2009, except the first
one (because of the EXCLUDE_START_DATE) option.



Previous Comments:


[2009-09-11 19:21:02] re dot lewis at comcast dot net

Description:

On Sept 11, 2009 I was calculating the date for each successive sunday
and used the code below, but after Nov 1, 2009, the day changes to
Saturday.  Is this a bug?  It appears to be related to daylight savings
time.

Reproduce code:
---
"; 
}
?>

Expected result:

Return the date of each sunday starting 5 weeks from this coming
sunday.

Actual result:
--
2009-10-18, Sun, 290
2009-10-25, Sun, 297
2009-11-01, Sun, 304
2009-11-07, Sat, 310
2009-11-14, Sat, 317
2009-11-21, Sat, 324
2009-11-28, Sat, 331
2009-12-05, Sat, 338
2009-12-12, Sat, 345
2009-12-19, Sat, 352






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



#49534 [Bgs]: Incorrect dates returned with strtotime

2009-09-11 Thread re dot lewis at comcast dot net
 ID:   49534
 User updated by:  re dot lewis at comcast dot net
 Reported By:  re dot lewis at comcast dot net
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.10
 New Comment:

Thanks for setting me straight.


Previous Comments:


[2009-09-11 19:27:24] ras...@php.net

Which would be why it isn't a bug.  Start with a timestamp around noon
to avoid DST issues like this.

You probably also want to use something like this instead:

$db = new DateTime('2008-12-31');
$de = new DateTime('2009-12-31');
$di = DateInterval::createFromDateString('Sunday next week');
$dp = new DatePeriod($db, $di, $de, DatePeriod::EXCLUDE_START_DATE);
foreach($dp as $dt) {
   echo $dt->format("F jS\n") . "\n";
}

This would give you the date of each Sunday in 2009, except the first
one (because of the EXCLUDE_START_DATE) option.




[2009-09-11 19:21:02] re dot lewis at comcast dot net

Description:

On Sept 11, 2009 I was calculating the date for each successive sunday
and used the code below, but after Nov 1, 2009, the day changes to
Saturday.  Is this a bug?  It appears to be related to daylight savings
time.

Reproduce code:
---
"; 
}
?>

Expected result:

Return the date of each sunday starting 5 weeks from this coming
sunday.

Actual result:
--
2009-10-18, Sun, 290
2009-10-25, Sun, 297
2009-11-01, Sun, 304
2009-11-07, Sat, 310
2009-11-14, Sat, 317
2009-11-21, Sat, 324
2009-11-28, Sat, 331
2009-12-05, Sat, 338
2009-12-12, Sat, 345
2009-12-19, Sat, 352






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



#49484 [Opn]: max_execution_timeout interrupts the error_handler causing a segfault

2009-09-11 Thread witekfl at gazeta dot pl
 ID:   49484
 User updated by:  witekfl at gazeta dot pl
 Reported By:  witekfl at gazeta dot pl
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Debian Linux
 PHP Version:  5.2.10
 New Comment:

php.ini:
display_errors = Off
max_execution_time = 1
disable_functions = sleep

t.php:

aa

The setup is following:
nginx + apache + mod_layout + mod_fcgid + php-cgi as fastcgi
php-cgi has suid bit set and runs as user www-data.
nginx and apache runs on different users to php-cgi.
max_execution_timeout is 2 seconds.
iptables rejects connections to google.com (to the outside) for
php-cgi.
php segfaults very often and Apache returns status 500.



[2009-09-06 14:19:25] witekfl at gazeta dot pl

I disabled fpm and still the same.



[2009-09-06 13:31:30] j...@php.net

Obvious question is: Does it happen without the 3rd party patch?



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

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



#49528 [Csd->Opn]: UTF-16 strings prefixed by BOMs wrondly converted

2009-09-11 Thread moriyoshi
 ID:   49528
 Updated by:   moriyo...@php.net
 Reported By:  moriyo...@php.net
-Status:   Closed
+Status:   Open
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5.3SVN-2009-09-11 (SVN)
 Assigned To:  moriyoshi
 New Comment:

I left this open because patch is not merged to 5.2 yet.



Previous Comments:


[2009-09-11 14:34:30] j...@php.net

Fixed -> closed (?) (or did you leave this open just for fun?)



[2009-09-11 08:22:20] s...@php.net

Automatic comment from SVN on behalf of moriyoshi
Revision: http://svn.php.net/viewvc/?view=revision&revision=288260
Log: - Fix bug #49528 (UTF-16 strings prefixed by BOM wrongly
converted).



[2009-09-11 08:21:16] j...@php.net

Moriyoshi propably added this report as reminder for himself.



[2009-09-11 08:18:38] sjo...@php.net

It can be argued that the BOM character U+FEFF should never be
converted, as it is no real character.

I don't think it is the task of mb_convert_encoding to detect the byte
order and interpret the BOM.



[2009-09-11 07:45:05] moriyo...@php.net

Description:

The first character of a UTF-16 string prefixed by "\xff\xfe" (LE BOM)
gets converted to wrong Unicode codepoint. Moreover, the resulting
string contains the BOM itself while it is uncalled for.



Reproduce code:
---


Expected result:

string(8) "02010403"

Actual result:
--
string(12) "fe010403"





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



#49536 [NEW]: mb_detect_encoding() returns incorrect results when strict_mode is turned on

2009-09-11 Thread moriyo...@php.net
From: moriyo...@php.net
Operating system: *
PHP version:  5.3SVN-2009-09-11 (SVN)
PHP Bug Type: mbstring related
Bug description:  mb_detect_encoding() returns incorrect results when 
strict_mode is turned on

Description:

mb_detect_encoding() produces wrong results from incomplete multibyte
sequences when strict_mode is turned on. (originally reported by
komura.db2r1e|at|gmail|dot|com)

Reproduce code:
---
// non-strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", false));
// strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", true));
// non-strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false));
// strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true));

Expected result:

string(4) "SJIS"
bool(false)
string(5) "UTF-8"
bool(false)


Actual result:
--
string(4) "SJIS"
string(4) "SJIS"
string(5) "UTF-8"
string(5) "UTF-8"


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



#49536 [Opn->Asn]: mb_detect_encoding() returns incorrect results when strict_mode is turned on

2009-09-11 Thread moriyoshi
 ID:   49536
 Updated by:   moriyo...@php.net
 Reported By:  moriyo...@php.net
-Status:   Open
+Status:   Assigned
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5.3SVN-2009-09-11 (SVN)
 Assigned To:  moriyoshi


Previous Comments:


[2009-09-11 21:26:18] s...@php.net

Automatic comment from SVN on behalf of moriyoshi
Revision: http://svn.php.net/viewvc/?view=revision&revision=288273
Log: - Fix bug #49536 (mb_detect_encoding() returns incorrect results
when strict_mode is turned on.)
  (patch by komura, thanks!)



[2009-09-11 21:23:16] moriyo...@php.net

Description:

mb_detect_encoding() produces wrong results from incomplete multibyte
sequences when strict_mode is turned on. (originally reported by
komura.db2r1e|at|gmail|dot|com)

Reproduce code:
---
// non-strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", false));
// strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", true));
// non-strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false));
// strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true));

Expected result:

string(4) "SJIS"
bool(false)
string(5) "UTF-8"
bool(false)


Actual result:
--
string(4) "SJIS"
string(4) "SJIS"
string(5) "UTF-8"
string(5) "UTF-8"






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



#35369 [Com]: Serialized objects referencing each other, memory exhaustion when unserializing

2009-09-11 Thread linlixiang123 at 126 dot com
 ID:   35369
 Comment by:   linlixiang123 at 126 dot com
 Reported By:  bugreports at insign dot ch
 Status:   No Feedback
 Bug Type: Class/Object related
 Operating System: Prolly irrelevant (Linux 2.6.4)
 PHP Version:  5CVS-2005-11-24 (CVS)
 New Comment:

A man is driving up a steep, narrow mountain road. http://www.chihaironline.com";>chi hair tools A woman is
driving down the same road. As they pass each other, the woman leans out
of the window and yells "PIG!!" http://www.chihaironline.com";>chi flat irons The man
immediately leans out of his window and replies, "WITCH!!"They each
continue on their way, and as the man rounds the next corner, http://www.chihaironline.com";>chi hair straighteners he
crashes into a pig in the middle of the road. If only men would listen.


Previous Comments:


[2005-12-02 01:00:03] 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-11-24 16:20:28] tony2...@php.net

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

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.





[2005-11-24 16:15:19] bugreports at insign dot ch

Description:

Objects, referencing each other, are serialized. The reference seems to
be represented as R:1 in the serialized data.

When unserializing the string, it seems (begin of guess) that the
reference is not interpreted correctly and countless objects are
instantiated instead (end of guess) - the script takes remarkably long
and ends with the allowed memory size exhausted.

The problem doesn't seem to occur when the unserialized data is simply
echoed instead of assigned to a variable, but obviously that's not so
useful. The problem still occurs when var_dumping the unserialized
data.

The problem exists on PHP 5.1.0RC6, but not on PHP 5.0.5.
Unfortunately, we cannot install the CVS version just for checking if
the problem still exists. We hope you're still willing to at least
quickly verify it.

Reproduce code:
---
class A {
  public $b;
}

class B {
  public $a;
}

$a = new A();
$b = new B();
$a->b = &$b;
$b->a = &$a;

$x = unserialize(serialize($a));

Expected result:

$x is a copy of $a, with $x->b being a copy of $b that holds a
reference to $x. print_r'd that would look like this:

A Object
(
[b] => B Object
(
[a] => A Object
 *RECURSION*
)

)

Actual result:
--
Memory exhaustion and sometimes a segmentation fault.





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