#45551 [NEW]: Wrong result when selecting from varchar field

2008-07-17 Thread brack at wjp dot de
From: brack at wjp dot de
Operating system: Windows Vista Business
PHP version:  5.2.6
PHP Bug Type: MSSQL related
Bug description:  Wrong result when selecting from varchar field

Description:

On SQL Server 2005 when I execute a SELECT query to retrieve the content
of a VARCHAR field with a specified length greater than 255 and less than
MAX, the resulting value is truncated at a length of 255 characters.

Reproduce code:
---
For testing purposes, I used a table created by the following SQL code:

CREATE TABLE [TESTTABLE](
[id] [int] NOT NULL,
[testvalue] [varchar](1000) NULL,
 CONSTRAINT [PK_TESTTABLE] PRIMARY KEY CLUSTERED 
(
[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

PHP test script code:

$conn = mssql_connect('localhost', 'testuser', 'testpassword');
mssql_select_db('testdb');
$string =
'
aaa';
echo strlen($string) . '';
mssql_query('INSERT INTO TESTTABLE (id, testvalue) VALUES (1, \'' .
$string . '\')');
$result = mssql_query('SELECT testvalue FROM TESTTABLE WHERE id=1');
echo(strlen(mssql_result($result, 0, testvalue')));

Expected result:

Expected output of the PHP test script:

396
396

Actual result:
--
Actual output of the PHP test script:

255
396

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



#45160 [Com]: PHP has encountered an Access Violation at 01B849C7

2008-07-17 Thread php at eklenet dot de
 ID:   45160
 Comment by:   php at eklenet dot de
 Reported By:  php at eklenet dot de
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows 2003 Server 32bit
 PHP Version:  5.2.6
 New Comment:

I have found a work around for my Problem. Often when i use a class
with a __tostring() function as string for a database-sql i got this
error.
so i simply make a 
$sql = "$sql "; 
before i use the sql as query. Now my script works fine, but its just a
work around.


Previous Comments:


[2008-07-18 02:44:03] tmstruthers at cox dot net

I am also receiving a similar "Access violation" message...(PHP has
encountered an Access Violation at 0116B74E) when trying to view a php
web page I've created.  I've got PHP 5.2.6 loaded.  My page is mostly
HTML with a PHP include for the header and a PGP include for a page
footer (which contains a date function to get the current year).  I'm
running on Windows XP Pro using IIS 5.1.  On average, I hit "refresh"
about 20 times and receive this error 19 of the 20 times.  The page only
loads correctly about 1 in 20 times.  This makes development extremely
difficult.  This appears to be a bug within PHP as the page does
eventually load (with no edits to the source) and then continues to fail
when the page is reloaded.  If you need me to do something to help
pinpoint the problem and assist, I'm willing to do so to get this
problem corrected.



[2008-07-11 16:19:46] [EMAIL PROTECTED]

But is that external script running on the same webserver as the one
you're accessing?



[2008-07-09 08:37:47] php at eklenet dot de

hello,
i dont think its a internal problem from PHP.
Becouse i need to get my script work, i have made a externel script to
fetch data from the database.
Here is sample code:
--
public function run($sql)
{
echo " A";
$this->CONNECTION['lastsql']= rawurlencode(base64_encode($sql));
if(substr(strtoupper($sql),0,6)=="INSERT" OR
substr(strtoupper($sql),0,6)=="UPDATE")
{
$type="get_field";
$sql = ($this->CONNECTION['lastsql']);
$url =
"http://192.168.224.4/bluesheet/sql.php?type=$type&sql=$sql";;
$data = file_get_contents($url);
}
echo " B";

}
--
so you see here is no database connection.
The Output of the Script is just:
PHP has encountered an Access Violation at 01B849C7 A B A B A B A
As you see it ends with A and not B so there musst be an internal PHP
Problem not related to the Database !



[2008-07-08 07:24:21] php at eklenet dot de

now i have tried odbtp.
what i get is 
PHP has encountered an Access Violation at 01B849C7
like with pdo



[2008-07-07 12:42:03] php at eklenet dot de

i have changed to odbc vom pdo_odbc and i got even a similar error:
PHP has encountered an Access Violation at 01CBFC71
mybe they use the same base code ?



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

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



#45160 [Com]: PHP has encountered an Access Violation at 01B849C7

2008-07-17 Thread tmstruthers at cox dot net
 ID:   45160
 Comment by:   tmstruthers at cox dot net
 Reported By:  php at eklenet dot de
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows 2003 Server 32bit
 PHP Version:  5.2.6
 New Comment:

I am also receiving a similar "Access violation" message...(PHP has
encountered an Access Violation at 0116B74E) when trying to view a php
web page I've created.  I've got PHP 5.2.6 loaded.  My page is mostly
HTML with a PHP include for the header and a PGP include for a page
footer (which contains a date function to get the current year).  I'm
running on Windows XP Pro using IIS 5.1.  On average, I hit "refresh"
about 20 times and receive this error 19 of the 20 times.  The page only
loads correctly about 1 in 20 times.  This makes development extremely
difficult.  This appears to be a bug within PHP as the page does
eventually load (with no edits to the source) and then continues to fail
when the page is reloaded.  If you need me to do something to help
pinpoint the problem and assist, I'm willing to do so to get this
problem corrected.


Previous Comments:


[2008-07-11 16:19:46] [EMAIL PROTECTED]

But is that external script running on the same webserver as the one
you're accessing?



[2008-07-09 08:37:47] php at eklenet dot de

hello,
i dont think its a internal problem from PHP.
Becouse i need to get my script work, i have made a externel script to
fetch data from the database.
Here is sample code:
--
public function run($sql)
{
echo " A";
$this->CONNECTION['lastsql']= rawurlencode(base64_encode($sql));
if(substr(strtoupper($sql),0,6)=="INSERT" OR
substr(strtoupper($sql),0,6)=="UPDATE")
{
$type="get_field";
$sql = ($this->CONNECTION['lastsql']);
$url =
"http://192.168.224.4/bluesheet/sql.php?type=$type&sql=$sql";;
$data = file_get_contents($url);
}
echo " B";

}
--
so you see here is no database connection.
The Output of the Script is just:
PHP has encountered an Access Violation at 01B849C7 A B A B A B A
As you see it ends with A and not B so there musst be an internal PHP
Problem not related to the Database !



[2008-07-08 07:24:21] php at eklenet dot de

now i have tried odbtp.
what i get is 
PHP has encountered an Access Violation at 01B849C7
like with pdo



[2008-07-07 12:42:03] php at eklenet dot de

i have changed to odbc vom pdo_odbc and i got even a similar error:
PHP has encountered an Access Violation at 01CBFC71
mybe they use the same base code ?



[2008-07-07 08:55:45] php at eklenet dot de

Have you now all informations to fix this Problem ?



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

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



#45550 [Opn]: BC break: strtotime parses 0000-00-00 00:00:00 as valid date in 5.2.6

2008-07-17 Thread jack+phpdotnet at smartertravelmedia dot com
 ID:   45550
 User updated by:  jack+phpdotnet at smartertravelmedia dot com
-Summary:  strtotime parses -00-00 00:00:00 as valid date
 Reported By:  jack+phpdotnet at smartertravelmedia dot com
 Status:   Open
 Bug Type: Date/time related
 Operating System: RHEL 4/5
 PHP Version:  5.2.6
 New Comment:

updated subject to note that this is a backward-compatibility break.


Previous Comments:


[2008-07-17 22:00:04] jack+phpdotnet at smartertravelmedia dot com

Description:

MySQL uses '-00-00 00:00:00' as a default value for non-null
datetime fields.  Until 5.2.6, strtotime correctly returned false (or -1
before 5.1) when passed this value - it's not a valid date/time.

5.2.6 returns '-62169966000' which is not useful.


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



#43151 [Opn->Fbk]: [peer_certificate_chain] => HTTP/1.1 200 OK

2008-07-17 Thread felipe
 ID:   43151
 Updated by:   [EMAIL PROTECTED]
 Reported By:  p dot vanbrouwershaven at networking4all dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: Linux  2.6.8-2-686 #1 Tue Au
 PHP Version:  5.2.4
 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




Previous Comments:


[2007-10-30 21:30:26] p dot vanbrouwershaven at networking4all dot com

Description:

peer_certificate_chain returns "HTTP/1.1 200 OK"



Reproduce code:
---
$opts = array(
'ssl' => array(
'capture_peer_cert' => true,
'peer_certificate' => true, 
'capture_peer_cert_chain' => true
)
);

$context = stream_context_create($opts);

$fp = fopen($url, 'rb', false, $context);
$meta = stream_get_meta_data($fp);
$options = stream_context_get_options($fp);
fclose($fp);

print_r($options);

Expected result:

[ssl] => Array
 (
 [capture_peer_cert] => 1
 [peer_certificate] => Resource id #28
 [capture_peer_cert_chain] => 1
 [peer_certificate_chain] => Resource id #**
 )

Actual result:
--
[ssl] => Array
 (
 [capture_peer_cert] => 1
 [peer_certificate] => Resource id #28
 [capture_peer_cert_chain] => 1
 [peer_certificate_chain] => HTTP/1.1 200 OK
 )





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



#43158 [Opn->Fbk]: [ssl_verify_result] => 0

2008-07-17 Thread felipe
 ID:   43158
 Updated by:   [EMAIL PROTECTED]
 Reported By:  p dot vanbrouwershaven at networking4all dot com
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Linux *** 2.6.8-2-686 #1 Tue Au
 PHP Version:  5.2.4
 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




Previous Comments:


[2007-10-31 11:35:19] p dot vanbrouwershaven at networking4all dot com

There was a space in my post just before http:// this is not the
problem but just an error in my post.

$url = ' https://verisign.com';

Array
(
[url] => https://verisign.com
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 3.5E-05
[connect_time] => 0.155727
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)



[2007-10-31 10:51:45] p dot vanbrouwershaven at networking4all dot com

Description:

I have some problems with the curl. On the console I get the right
response message but in PHP I see no difference between a valid and an
invalid SSL Certificate.

Curl command in PHP:

$url = ' https://verisign.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 10);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
$result = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);

print_r($info);

Curl command on console:

curl -I https://verisign.com

Console result:

curl -I https://verisign.com
curl: (51) SSL: certificate subject name 'www.verisign.com' does not
match target host name 'verisign.com' 

PHP Result:
[ssl_verify_result] => 0



Reproduce code:
---
$url = ' https://verisign.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 10);
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);

$result = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);

print_r($info);

Expected result:

Array
(
[url] =>  https://verisign.com
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 51
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Actual result:
--
Array
(
[url] =>  https://verisign.com
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)





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



#45539 [Opn->Bgs]: [function.file-get-contents]: failed to open stream: HTTP request failed!

2008-07-17 Thread jani
 ID:   45539
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sggoyal at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2008-07-17 06:51:29] sggoyal at gmail dot com

Description:

Warning:
file_get_contents(http://my_url/index.php?t=trans&o=1&s=2008-07-17%2000:00:00&e=2008-07-17%2023:59:59)
[function.file-get-contents]: failed to open stream: HTTP request
failed! in /file.php on line 393
Link to this page

When I select more data means when I select
s=2008-07-17%2000:00:00&e=2008-07-17%2010:59:59 it work properly

I also use urlencode() but error remains
i.e
$res =
file_get_contents(http://my_url/index.php?t=trans&o=1&s=2008-07-17%2000:00:00&e=2008-07-17%2023:59:59);
$res = urlencode($res);


Expected result:

No error 






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



#40677 [Sus->WFx]: PHP crash when calling Java

2008-07-17 Thread jani
 ID:   40677
 Updated by:   [EMAIL PROTECTED]
 Reported By:  poon dot fung at comcast dot net
-Status:   Suspended
+Status:   Wont fix
 Bug Type: Java related
 Operating System: windows xp
 PHP Version:  5.2.1
 Assigned To:  edink


Previous Comments:


[2007-03-06 16:03:45] peter_jones_jr at yahoo dot com

Hi,

the documentation which comes with PHP clearly states that ext/java
only works with some older versions of PHP4. I don't think ext/java is
mentioned in the PHP manual page, at least not on debian.

Calling Java classes in-process is not possible unless you use a PHP
implementation written in pure Java. For the Zend PHP engine you need an
external Java process. I think this is what you mean with "Java
application server".


Peter



[2007-03-05 17:26:38] poon dot fung at comcast dot net

I read in some discussions that PHP-Java Bridge is a replacement to PHP
Java integration method. However, PHP-Java Bridge documentation shows
only methods of calling from PHP to Java application server but not
calling Java classes in-process. I would like to be able to call Java
libraries from PHP.

If PHP Java integration were to be discontinued, manual page should be
updated. I spent quite a bit of time trying to figure out why the
integration did not work because there is no indication that it may not.



[2007-03-05 16:00:22] [EMAIL PROTECTED]

Short of deleting it from the CVS it is not possible atm.

Java extension is not maintained and probably does not work on any
platform.



[2007-03-05 09:49:56] [EMAIL PROTECTED]

Edin, I'd prefer the former.



[2007-03-02 21:16:38] valid at email dot address

This crash happens when you add the following to your php.ini

extension=php_java.dll

The php_java.dll from http://pecl4win.php.net/ext.php/php_java.dll and
the php_java.dll which is part of the official pecl for windows download
crash the php executable.

Either remove the php_java.dll from the official pecl4win download or
or fix this bug.



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

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



#43896 [Ctl]: htmlspecialchars returns empty string on invalid unicode sequence

2008-07-17 Thread moriyoshi
 ID:   43896
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arnaud dot lb at gmail dot com
 Status:   Critical
 Bug Type: Strings related
 Operating System: *
 PHP Version:  5.2CVS, 5.3CVS (2008-07-15)
 New Comment:

I even don't think this is a valid bug in the first place. You passed a

string that is encoded in ISO-8859-15 to htmlspecialchars() while 
specifying UTF-8 to force the string to be treated as "UTF-8". One 
should never depend on the past wrond behaviour with which invalid byte

sequences pass through. Besides, you can always work around it by
giving 
ISO-8859-15 to the third argument.






Previous Comments:


[2008-06-27 17:32:43] sillyxone at yaoo dot com

  is also affected in 5.2, for example:

$str = 'Hello' . chr(160) . 'there';
print(htmlentities($str, ENT_COMPAT, 'UTF-8'));

Instead of printing "Hello there", it prints nothing (empty string).
The same for htmlspecialchars().

Both functions work fine in 5.1



[2008-05-05 21:00:37] heurika at gmail dot com

Hi,
I've got the same Bug, posted on #43740.
Please fix it.

Thanks!



[2008-02-17 13:25:22] andreas dot ravnestad at gmail dot com

This seems to be breaking PEAR::Text_Wiki completely when using UTF-8:
http://pear.php.net/bugs/bug.php?id=13136



[2008-01-24 20:51:11] tallyce at gmail dot com

See also bugs 43294 and 43549 which seem to be the same thing.

This is really starting to bite now. Please can this be fixed, or
suggest how we can reliably process incoming user data in UTF8 given
this behaviour change!



[2008-01-24 12:29:58] arnaud dot lb at gmail dot com

I made a patch for this bug:

http://s3.amazonaws.com/arnaud.lb/php_htmlentities_utf.patch

The internal get_next_char() function returns a status of FAILURE 
when it encounters a invalid or incomplete sequence, which causes 
the htmlspecialchars and htmlentities functions to return an empty 
string.

This patch modify the behavior of these functions to skip invalid 
sequences, without discarding the whole string. This involves a very 
few changes and makes the behavior of theses functions more 
consistent with previous PHP versions.

It also adds a few tests to htmlentities-utf.phpt.



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

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



#43826 [Opn->Fbk]: CreateAttributeNS incorrectly attaching to document element

2008-07-17 Thread jani
 ID:   43826
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sb1304 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: DOM XML related
 Operating System: Windows/Linux
 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




Previous Comments:


[2008-01-12 01:18:09] sb1304 at hotmail dot com

Apologies, ignore the comp->setAttributeNS... This should be commented
out. Was used for comparison test.



[2008-01-12 01:14:07] sb1304 at hotmail dot com

Description:

Creating a Namespace attribute through CreateAttributeNS always
attaches the namespace declaration to the root/ducumentElement even when
the node is another one. Same issue whether there is a default Namespace
or not. Same on Windows/Linux. SetAttributeNS performs as expected.

Reproduce code:
---
createElementNS("urn:ietf:params:xml:ns:epp-1.0",'employee');
$doc->appendChild($root);
$name = $root->appendChild($doc->createElement("empname"));
$name->appendChild($doc->createTextNode("test"));
$addr = $root->appendChild($doc->createElement("empaddr"));
$addr->appendChild($doc->createTextNode("test123"));
$comp = $root->appendChild($doc->createElement("comp"));
$comp->appendChild($doc->createTextNode("TEST LTD"));

//Create a attribute with namespace
$attr = $doc->createAttributeNS('ns','surname:prefix');
//append the new attribute node into the employee element
$comp->appendChild($attr);

//$root->setAttributeNS('ns', 'surname:prefix', 'none');
$comp->setAttributeNS('ns', 'surname:prefix', 'none');
//save the DOMDocument into a file
$test = $doc->saveXML();
echo $test;
?>

Expected result:

 
 
  test 
  test123 
  TEST LTD 
 

Actual result:
--
 
 
  test 
  test123 
  TEST LTD 
 





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



#43896 [Opn->Ctl]: htmlspecialchars returns empty string on invalid unicode sequence

2008-07-17 Thread jani
 ID:   43896
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arnaud dot lb at gmail dot com
-Status:   Open
+Status:   Critical
 Bug Type: Strings related
 Operating System: *
-PHP Version:  5.2CVS, 5.3CVS (2008-03-25)
+PHP Version:  5.2CVS, 5.3CVS (2008-07-15)


Previous Comments:


[2008-06-27 17:32:43] sillyxone at yaoo dot com

  is also affected in 5.2, for example:

$str = 'Hello' . chr(160) . 'there';
print(htmlentities($str, ENT_COMPAT, 'UTF-8'));

Instead of printing "Hello there", it prints nothing (empty string).
The same for htmlspecialchars().

Both functions work fine in 5.1



[2008-05-05 21:00:37] heurika at gmail dot com

Hi,
I've got the same Bug, posted on #43740.
Please fix it.

Thanks!



[2008-02-17 13:25:22] andreas dot ravnestad at gmail dot com

This seems to be breaking PEAR::Text_Wiki completely when using UTF-8:
http://pear.php.net/bugs/bug.php?id=13136



[2008-01-24 20:51:11] tallyce at gmail dot com

See also bugs 43294 and 43549 which seem to be the same thing.

This is really starting to bite now. Please can this be fixed, or
suggest how we can reliably process incoming user data in UTF8 given
this behaviour change!



[2008-01-24 12:29:58] arnaud dot lb at gmail dot com

I made a patch for this bug:

http://s3.amazonaws.com/arnaud.lb/php_htmlentities_utf.patch

The internal get_next_char() function returns a status of FAILURE 
when it encounters a invalid or incomplete sequence, which causes 
the htmlspecialchars and htmlentities functions to return an empty 
string.

This patch modify the behavior of these functions to skip invalid 
sequences, without discarding the whole string. This involves a very 
few changes and makes the behavior of theses functions more 
consistent with previous PHP versions.

It also adds a few tests to htmlentities-utf.phpt.



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

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



#43908 [Opn->Bgs]: exec() swallows whitespace in output

2008-07-17 Thread jani
 ID:   43908
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Arne dot Heizmann at csr dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Program Execution
 Operating System: Windows 2000
 PHP Version:  5.2.5
 New Comment:

Expected behaviour and can not be changed. RTFM: http://php.net/exec


Previous Comments:


[2008-06-02 13:26:52] Arne dot Heizmann at csr dot com

Could we have this fix in the next version please? Just remove all the
code that removes the whitespace?



[2008-01-25 18:24:43] [EMAIL PROTECTED]

Because that is intentional, however, it affect results as your case,
when the string is consisting entirely of whitespace.

Well, anyway, maybe this isn't a good idea, it was only my idea.



[2008-01-25 17:59:46] Arne dot Heizmann at csr dot com

> The actual implementation strip trailing whitespaces, my patch also
do
> it, but when the string contains only whitespaces, it remove just \r
> and \n.

So why are you explicitly fixing only half of the bug and leaving the
other half in?



[2008-01-24 20:37:30] [EMAIL PROTECTED]

The actual implementation strip trailing whitespaces, my patch also do
it, but when the string contains only whitespaces, it remove just \r and
\n.



[2008-01-24 15:46:45] Arne dot Heizmann at csr dot com

In your patch it appears that you are still deliberately removing
whitespace. Why?



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

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



#44065 [Opn->Fbk]: fsockopen() throws warning and doesn't return error

2008-07-17 Thread jani
 ID:   44065
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joe at digg dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux devwww25 2.6.12-1-amd64-k8
 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

Seems to be fixed since I get this:

ERROR: php_network_getaddresses: getaddrinfo failed: Name or service
not known(#0)

Note: The code is 0 always when failure happens before connect() (also
mentioned in the friendly manual :)


Previous Comments:


[2008-02-07 01:12:40] [EMAIL PROTECTED]

Hello,

Got the same with 5.2.5 and 6 (32 bits machine)

[EMAIL PROTECTED] bugs]# /usr/local/php6/bin/php fsockopen.php

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:
Name or service not known in /root/bugs/fsockopen.php on line 6

Warning: fsockopen(): unable to connect to www.asdf98070978.org:80
(Unknown error) in /root/bugs/fsockopen.php on line 6
ERROR: (#4)




[2008-02-07 00:48:42] joe at digg dot com

Did you run the reproduce code? I can consistently reproduce no error
and warnings being thrown from many machines. What was the output when
you ran the code below? Though, depending on the machine, I sometimes
get an error code.



[2008-02-07 00:44:42] [EMAIL PROTECTED]

Hello,

I have not been able to reproduce it. Can please give us an extra
explanation about it? 






[2008-02-06 22:37:42] joe at digg dot com

Description:

When getaddrinfo fails fsockopen() fails to return an error string or
error code.

Reproduce code:
---



Expected result:

fsockopen() should return false and set an appropriate error code and
error message.

Actual result:
--
It spits out a warning and doesn't include any sort of error message or
string:

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:
Temporary failure in name resolution in
/home/jstump/repository/wildcat/branches/config/foo.php on line 5

Warning: fsockopen(): unable to connect to www.asdf98070978.org:80
(Unknown error) in
/home/jstump/repository/wildcat/branches/config/foo.php on line 5
ERROR: (#0)






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



#44139 [Opn->Fbk]: Fatal error with ReflectionFunction and ReflectionMethod using reference

2008-07-17 Thread jani
 ID:   44139
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andrea at 3site dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.2.6
 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




Previous Comments:


[2008-02-18 11:33:43] andrea at 3site dot it

As expected, this problem is present on ReflectionMethod too.

Basically, the summary of this bug is wrong and I guess that correct
could be the changed one.

I tested both problems in PHP 5.2.5 and 5.2.6-dev.

This example shows the problem using methods as well.

invoke($instance, &$arr, 1);
$ref->invokeArgs($instance, array(&$arr, 0));
var_dump($arr); // [0,1,2,3,4]

// FATAL ERROR
$ref->invoke($instance, $arr, 1);
$ref->invokeArgs($instance, array($arr, 0));
var_dump($arr);
exit;

?>

Thanks for solving this problem.
Kind Regards.



[2008-02-18 09:46:58] andrea at 3site dot it

Sorry, this is what I would like to be able to do:

invoke($arr, 1);
$ref->invokeArgs(array($arr, 1));
var_dump($arr);
exit;
?>

Without fatal errors, simply because if send by reference is
deprecated, ReflectionFunction (... and I didn't test ReflectionMethod
...) should be able to manage correctly variables by references.

This is another Fatal Error example:

invoke($arr, 1);
$ref->invokeArgs(array($arr, 1));
var_dump($arr);
exit;
?>

I hope these examples explain correctly where and what is the problem.
Kind Regards



[2008-02-18 09:42:17] andrea at 3site dot it

Felipe, I'm testing PHP Version 5.2.6-dev and I have the same problem.

invoke(&$arr, 1);
$ref->invokeArgs(array(&$arr, 1));
var_dump($arr);
exit;
?>

Warning: Call-time pass-by-reference has been deprecated; If you would
like to pass it by reference, modify the declaration of [runtime
function name](). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true in
your INI file in ...

I guess above warning should not exists. So, can you confirm that this
is a bug?
Cheers



[2008-02-17 23:41:00] [EMAIL PROTECTED]

$ref->invoke(&$arr, 1);
$ref->invokeArgs(array(&$arr, 0));
var_dump($arr); // correct and expected result

Doesn't show warning on 5.2.6 and 5.3. That was my message.



[2008-02-17 23:17:39] andrea at 3site dot it

Hi Felipe, I don't understand your messages.

I know that it generates a Fatal error as I know that send the array
forcing reference works as expected but it generates a warning.

As I wrote on php.net manual too, to solve this strange behaviour I
used a "non-sense" strategy (at least for me) ...

$arr = array(2, 3, 4);
$ref = new ReflectionFunction('array_unshift');
$ref->invokeArgs(array_merge(array(&$arr), array(1)));
$ref->invokeArgs(array_merge(array(&$arr), array(0)));
// $arr == [0,1,2,3,4]

I can't understand why one single value is accepted by reference inside
an array while more than one is not accepted.

Since PHP 5 should manage by itself references I think that
ReflectionFunction should do the same, without reference requirement but
working as expected.

Do you think am I wrong?
Kind Regards



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

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



#44377 [Opn->Fbk]: segfault on POST to an HTTPS resource requiring client certificate

2008-07-17 Thread jani
 ID:   44377
 Updated by:   [EMAIL PROTECTED]
 Reported By:  noah at cs dot caltech dot edu
-Status:   Open
+Status:   Feedback
-Bug Type: Reproducible crash
+Bug Type: Streams related
 Operating System: GNU/Linux
 PHP Version:  5.2.6RC1
 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




Previous Comments:


[2008-03-08 17:30:34] noah at cs dot caltech dot edu

Description:

I set up a web resource served via Apache 2.2.3.  When accessed via
SSL, clients of this resource must authenticate using a client-side SSL
certificate.  I created a PHP client script to connect to this server,
authenticate with an SSL certificate, and submit an HTTP POST request to
the web resource.  The PHP client script receives a segmentation fault
when it attempts to make this connection.

For the purpose of this bug report, I built PHP 5.2.6RC1 as follows:

./configure --prefix=$HOME/sw/nopath/php526 \
--with-config-file-path=$HOME/sw/nopath/php526/etc \
--enable-debug \
--with-jpeg-dir=/usr --with-png-dir=/usr \
--with-zlib-dir=/usr --with-freetype-dir=/usr \
--with-apxs2=/usr/bin/apxs2 --enable-fastcgi \
--with-layout=gnu \
--with-openssl --with-kerberos --with-zlib --with-bz2 --enable-calendar
\
--with-curl=shared \
--enable-dba --with-gdbm --with-db4 --with-inifile --with-flatfile \
--enable-dio --with-dom --with-dom-xslt --with-dom-libexslt
--enable-ftp \
--with-gd --enable-exif \
--with-gettext --with-gmp --with-iconv \
--with-java=/usr/lib/jvm/java-6-sun --with-ldap --enable-mbstring \
--with-mssql=/usr --with-mysql=/usr --with-ncurses \
--with-unixODBC=/usr --with-pgsql --with-readline --enable-shmop \
--with-snmp --enable-sockets \
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
--enable-wddx --with-xmlrpc \
--enable-xslt --with-xslt-sablot=$HOME/sw/sablotron --enable-yp \
--with-pdo-pgsql --enable-soap --with-xsl --enable-zip

(I know that some of those options are obsolete in PHP 5; I adapted my
PHP 4 configuration line rather hastily.)

I used no php.ini at all.

I also reproduced this problem in PHP 5.2.1 as supplied with Ubuntu
7.04.  On a CentOS 4.5 system with PHP 5.0.4, the runtime caught a
problem at a different level:

*** glibc detected *** malloc(): memory corruption: 0x08697798 ***
Aborted


Reproduce code:
---
### SERVER SIDE CODE: /secure/hello.php

$name = file_get_contents('php://input');
if ($name)
 echo "Hello, $name!  ";
print "You made it!\n";

### CLIENT SIDE CODE
$opts = array('http' =>
  
array('method' => 'POST',
'header' => 'Content-type: text/plain',
'content' => 'Noah'),
  'ssl' =>
  array('verify_peer' => true,
'allow_self_signed' => false,
'cafile' => 'cacert.pem',
'local_cert' => 'client.pem',
'passphrase' => 'secret'));

//array_shift($opts)
$response =
file_get_contents('https://10.10.200.250:2083/secure/hello.php', false,
  stream_context_create($opts));

print $response;

Expected result:

When I run this client code from the command line (php -f client.php),
I expect $response to contain "Hello, Noah!  You made it!".


Actual result:
--
Instead, PHP exits with a segmentation fault.

If I uncomment "array_shift($opts)", thereby switching the request to a
GET, I see the expected response "You made it!".  That is to say, the
mutual certificate authentication works by itself.  Likewise, if I
change "https://10.10.200.250:2083"; to "http://10.10.200.250:2080";,
thereby accessing the same resource without any SSL, I see the expected
response "Hello, Noah!  You made it!".  If I copy hello.php to an area
that does not require certificate authentication and then access it via
SSL, I also see the expected response "Hello, Noah!  You made it!". 
Thus, one needs all of POST, SSL, and mutual certificate authentication
to reproduce this problem.

In the failed case, the Apache log has this:
[Sat Mar 08 12:03:11 2008] [info] [client 10.10.200.250] Connection to
child 4 established (server 10.10.200.250:2083)
[Sat Mar 08 12:03:11 2008] [info] Seeding PRNG with 0 bytes of entropy
[Sat Mar 08 12:03:11 2008] [info] Initial (No.1) HTTPS request received
for child 4 (server 10.10.200.250:2083)
[Sat Mar 08 12:03:11 2008] [info] Requesting connection re-negotiation
[Sat Mar 08 12:03:11 2008] [info] Awaiting re-negotiation handshake
[Sat Mar 08 12:03:11 2008] [error] Re-negotiation handshake failed: Not
accepted by client!?

This is the backt

#44542 [Opn->Bgs]: __tostring does not work when using it for calling a function

2008-07-17 Thread jani
 ID:   44542
 Updated by:   [EMAIL PROTECTED]
 Reported By:  account at dds dot nl
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

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




Previous Comments:


[2008-04-01 21:38:21] [EMAIL PROTECTED]

This seems expected, as an object also isn't converted when passed on
array key. (i.e. $arr[$obj]) and any other cases.



[2008-03-30 16:02:55] php at xuefeng dot org

try this patch. 

Index: zend_vm_execute.h
===
RCS file: /repository/ZendEngine2/zend_vm_execute.h,v
retrieving revision 1.62.2.30.2.49.2.45
diff -u -r1.62.2.30.2.49.2.45 zend_vm_execute.h
--- zend_vm_execute.h   28 Mar 2008 14:34:59 -  1.62.2.30.2.49.2.45
+++ zend_vm_execute.h   30 Mar 2008 15:54:50 -
@@ -28885,6 +28885,7 @@
 {
zend_op *opline = EX(opline);
zval *function_name;
+   zval *name_is_object_method;
char *function_name_strval;
int function_name_strlen;
 
@@ -28893,6 +28894,13 @@
 
function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R
TSRMLS_CC);
 
+   if (Z_TYPE_P(function_name) == IS_OBJECT &&
Z_OBJ_HT_P(function_name)->get_method != NULL) {
+   ALLOC_INIT_ZVAL(name_is_object_method);
+   if (zend_std_cast_object_tostring(function_name,
name_is_object_method, IS_STRING TSRMLS_CC) == SUCCESS) {
+   function_name = name_is_object_method;
+   }
+   }
+
if (Z_TYPE_P(function_name)!=IS_STRING) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}



[2008-03-26 22:24:22] account at dds dot nl

Description:

When I try to use __tostring to call a function I get an error that
'the function name must be a string'. While calling a class member with
__tostring does work.

--Steven

Reproduce code:
---
$test."\n";
print $test->$function_name()."\n";
print $test->$test()."\n";
?>

Expected result:

-- PHP --
string
Class member named `string`.
This is a string from a function.
This is a string from a function.

Output completed (0 sec consumed)

Actual result:
--
-- PHP --
string
Class member named `string`.
This is a string from a function.

Fatal error: Method name must be a string in C:\projects\test.php on
line 18

Output completed (0 sec consumed)





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



#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread jani
 ID:   45066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

By the looks of the valgrind output, IMO, this is some bug in the mysql
lib. Try google for __lll_mutex_lock_wait and you get plenty of hits
pointing to discussion forums. Corrupted heap, -lpthread vs -pthread,
etc. among the possible problems..


Previous Comments:


[2008-07-17 08:55:48] dirk at bean-it dot nl

Yes, and I was wrong... :)

In my opinion, bug#42625 went the wrong way (specially the last few
comments), so it would be clearer to start a new bugreport...



[2008-07-17 08:50:57] [EMAIL PROTECTED]

Ooops, it was you :)



[2008-07-17 08:49:40] [EMAIL PROTECTED]

Dirk,
I decided to look with Google for something similar and Bug#42625
appeared. The same problem, the same distro (Debian), the same version
of MySQL (5.0.32). The reported said he updated to some higher version
and the problem disappeared. Could this be the cause?

Best,
Andrey



[2008-07-17 08:10:14] dirk at bean-it dot nl

Mailed the output!



[2008-07-17 07:37:39] [EMAIL PROTECTED]

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey



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

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



#44959 [Opn->Fbk]: & is not recognized correctly by url_rewriter

2008-07-17 Thread jani
 ID:   44959
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xuefer at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: gentoo
 PHP Version:  5.2.6
 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




Previous Comments:


[2008-05-10 08:04:57] xuefer at gmail dot com

Description:

&#; in href is not recognized correctly by url rewriter scanner

the original code was  and i encoded the first / to
trap some bot that don't recognize & and nofollow correctly so it is , nofollow is not required to reproduce
the bug

Reproduce code:
---


Expected result:



Actual result:
--






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



#45540 [Opn->Fbk]: stream_context_create creates bad http request

2008-07-17 Thread jani
 ID:   45540
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jdespatis at yahoo dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux Kubuntu
 PHP Version:  5.2.6
 New Comment:

Are you sure this isn't same issue as reported in bug #43222 ?
What was the configure line you used to configure PHP?
Is short_open_tag enabled? Check from phpinfo()!


Previous Comments:


[2008-07-17 07:14:41] jdespatis at yahoo dot fr

Oups, my script bug.php contains a function

To test it, one can use this simple script :
(no need to create a nothing.mp4 to use this example)

 "bigbluezen", "password" => "demo",
"title" => "ultimate video topmoumoute", "tags" => "test machin bidule",
"channel" => "poetic");

  print_r(publish("nothing.mp4", $params));
?>



[2008-07-17 07:10:23] jdespatis at yahoo dot fr

Description:

I'm coding a little script to upload a video on Youtube, thanks to
stream functions in php.

It takes 2 steps:
1/ first connect on google to retrieve token, no problem with php code
2/ upload video with a query in POST, and there stream_context_create
is giving a completely broken query.. From time to time, i can make it
work, but it's pure random

I have used a sniffer as wireshark to see the exact http query

Reproduce code:
---
Here is the piece of code that does all this stuff:
http://www.despatis.com/php/bug.phps

Expected result:

PHP CLIENT => YOUTUBE SERVER:
POST /feeds/api/users/bigbluezen/uploads HTTP/1.0
Host: uploads.gdata.youtube.com
Content-Length: 792
Content-Type: multipart/related;
boundary="---cefe168b3cb99683a0f9ebd6f9b2cca6"
Authorization: GoogleLogin
auth=AIwbFAQtr5MDW_ctllHioiYCpY6I_uF6A9zBcSbIQ8AceGbcYfqrmytEICM8p6VjjzygDd2HPL0YhTcVk2MPmtb9y93-9Fs3yiej8hBtLF60_N_a6aWDg9Mrbm18nP-2dTVvTA6h77eJZrOJICzgN3dZyPT4AN1ffQ
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: application/atom+xml; charset=UTF-8


http://www.w3.org/2005/Atom";
xmlns:media="http://search.yahoo.com/mrss/";
xmlns:yt="http://gdata.youtube.com/schemas/2007";>
  
title foo
description
foo
http://gdata.youtube.com/schemas/2007/categories.cat";>People
key1, key2
  


-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: video/gif
Content-Transfer-Encoding: binary

XXX
-cefe168b3cb99683a0f9ebd6f9b2cca6--

Actual result:
--
The actual result, found with a sniffer (wireshark for example) is:

PHP CLIENT => YOUTUBE SERVER:
POST
/feeds/api/users/bigbluezen/uploads/wFqcFtuB9MY?client=ytapi-SourceRH-LaCartoonerie-3lludu8g-0
HTTP/1.0
Host: gdata.youtube.com
Authorization: GoogleLogin
auth=AIwbFASurkAdrgigXGJeP24Ebc0dM7EierouUTZ7Nqm2pjSzo2aRtNXQgOo-_ebco_-w7CmpxcZqysZKS_UGCUSc-K6tD5NI84jIc7sf1Sq8cPtcbknOrvlqxF6PNBj-kLzeXEPnBwKoE4vJDuwE0ag7Aleyo-u3hw
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug:
c447e7c1c0b79e8dc97c76cdc16e9843.gifbScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

EOF

As you can see, the first query is completely messy !!

The funny thing is that: if i change '' to '' at line 64, the http query is good...

One could thing  in the xml and change another things (add
an echo somewhere, but this trick doesn't work all the time)

As the result is very random, i think file_get_contents doesn't get all
data from the string, leaving some \r\n, which mess the following http
query, maybe something like that...






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



#45430 [Ctl]: crypt () not thread-safe when crypt_r is not available!

2008-07-17 Thread pajoye
 ID:   45430
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at all-dynamics dot de
 Status:   Critical
 Bug Type: *Encryption and hash functions
 Operating System: Win32
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

Here is the patch (windows only):

http://pierre.libgd.org/patches/crypt_r_win32.patch.txt

Will be committed asap.


Previous Comments:


[2008-07-15 09:19:20] [EMAIL PROTECTED]

Taking the hand on it for the windows part. As part of the win32
improvement effort, I already wrote a patch to drop our win32's
md5_crypt implementation and add support for other algorithms (just like
crypt_r + DES).



[2008-07-15 02:28:46] [EMAIL PROTECTED]

See also:
http://blog.php-security.org/archives/82-Suhosin-0.9.20-and-crypt-Thread-Safety-Vulnerability.html



[2008-07-04 08:50:38] alex at all-dynamics dot de

Description:

crypt () seems not to be thread-safe when using a threaded webserver
(Windows, ISAPI). Maybe this has something to do with win32/md5crypt.c /
 md5_crypt: static char passwd[120] (static buffer which is returned to
the calling function).

Reproduce code:
---
Run this code with two or more simultaneous requests on a threaded
server:


set_time_limit (0);

$passwd1 = "testtesttest";
$passwd2 = "passwordpassword";

for ($i = 0; $i < 3000; $i++) {

  $crypted = crypt ($passwd1);
  if ($crypted != crypt ($passwd1, $crypted)) die ("no match");

  $crypted = crypt ($passwd2);
  if ($crypted != crypt ($passwd2, $crypted)) die ("no match");

}

echo "ok";


Expected result:

"ok" on all requests

Actual result:
--
one request may end with "no match", the other request will display
"ok"





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



#45550 [NEW]: strtotime parses 0000-00-00 00:00:00 as valid date

2008-07-17 Thread jack+phpdotnet at smartertravelmedia dot com
From: jack+phpdotnet at smartertravelmedia dot com
Operating system: RHEL 4/5
PHP version:  5.2.6
PHP Bug Type: Date/time related
Bug description:  strtotime parses -00-00 00:00:00 as valid date

Description:

MySQL uses '-00-00 00:00:00' as a default value for non-null datetime
fields.  Until 5.2.6, strtotime correctly returned false (or -1 before 5.1)
when passed this value - it's not a valid date/time.

5.2.6 returns '-62169966000' which is not useful.


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



#44320 [Bgs]: Sessions aren't restarting or renewing

2008-07-17 Thread tidus_david at hotmail dot com
 ID:   44320
 User updated by:  tidus_david at hotmail dot com
 Reported By:  tidus_david at hotmail dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

The problem was solved, it was with the encoding that Microsoft Web
Dessigner does over the php files, that was the cause of this bug, I
rebackup all my webpages and used Notepad for editing since it doesn't
alter the encryption used.


Previous Comments:


[2008-03-05 09:20:01] [EMAIL PROTECTED]

I'd check that config.php file for whitespace before http://dfun.servegame.com/minimanager so you can see what happens

Reproduce code:
---
//set user variables
session_regenerate_id();
$user_lvl = $_SESSION['user_lvl'];
$user_name = $_SESSION['uname'];
$user_id = $_SESSION['user_id'];
$realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) :
$_SESSION['realm_id'];


Expected result:

It should load the menus correctly and show a tooltip when you put the
mouse over the any menu, but it loads bad

Actual result:
--
session_regenerate_id() [function.session-regenerate-id]: Cannot
regenerate session id - headers already sent in
C:\server\htdocs\Minimanager\header.php on line 73






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



#45548 [Bgs]: Fetch_array not working on function Warning: mysql_fetch_array():suppli

2008-07-17 Thread felipe
 ID:   45548
 Updated by:   [EMAIL PROTECTED]
 Reported By:  deathmachine-pt- at hotmail dot com
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: windows xp
 PHP Version:  5.2.6
 New Comment:

Your code is wrong. Read about the parameter in:
http://docs.php.net/mysql-error


Previous Comments:


[2008-07-17 19:43:28] deathmachine-pt- at hotmail dot com

function idses(){
$email=$_SESSION["email"];
mysql_error($uti=mysql_query("SELECT id,email 
FROM player WHERE
email='$email'"));
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};



[2008-07-17 19:42:43] deathmachine-pt- at hotmail dot com

Warning: mysql_error(): supplied resource is not a valid MySQL-Link
resource in /home/eensino/public_html/pat/artur/Projecto/functions.php
on line 9



[2008-07-17 19:38:28] [EMAIL PROTECTED]

Use mysql_error() to know the error.



[2008-07-17 19:34:51] deathmachine-pt- at hotmail dot com

Description:

Im using dreamweaver 8 php

Im getting this same error on everytime i call a function with fetch
array i have try so much times to solve it and had no luck
 
i have the following function:
 
function connect(){
 mysql_connect("localhost","eensino_artur","deathmachine90");
 mysql_select_db("eensino_patartur");
};
 
function idses(){
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};
 
the connect function works but when i call the idses(); it gives me the
following warning
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in ...
 
if i do this :
 
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
 
as you see i use no function , it works 100%

if i do the select on phpmyadmin mysql  SELECT id,email FROM player
WHERE email='[EMAIL PROTECTED]';
it works and selects the id.
if i add to the function return $user; it doesnt work also
im using phpMyAdmin - 2.10.1 and MySQL client version: 5.0.51a.

Why does the fetch_array without function works on php and does not if
i call it as a function even creating the same function on the php page
im using it reproduces the same warning. What is the solution for this?


Reproduce code:
---


Expected result:

echo of the mysql selection id using a session email

Actual result:
--
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in 





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



#45548 [Bgs]: Fetch_array not working on function Warning: mysql_fetch_array():suppli

2008-07-17 Thread deathmachine-pt- at hotmail dot com
 ID:   45548
 User updated by:  deathmachine-pt- at hotmail dot com
 Reported By:  deathmachine-pt- at hotmail dot com
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: windows xp
 PHP Version:  5.2.6
 New Comment:

function idses(){
$email=$_SESSION["email"];
mysql_error($uti=mysql_query("SELECT id,email 
FROM player WHERE
email='$email'"));
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};


Previous Comments:


[2008-07-17 19:42:43] deathmachine-pt- at hotmail dot com

Warning: mysql_error(): supplied resource is not a valid MySQL-Link
resource in /home/eensino/public_html/pat/artur/Projecto/functions.php
on line 9



[2008-07-17 19:38:28] [EMAIL PROTECTED]

Use mysql_error() to know the error.



[2008-07-17 19:34:51] deathmachine-pt- at hotmail dot com

Description:

Im using dreamweaver 8 php

Im getting this same error on everytime i call a function with fetch
array i have try so much times to solve it and had no luck
 
i have the following function:
 
function connect(){
 mysql_connect("localhost","eensino_artur","deathmachine90");
 mysql_select_db("eensino_patartur");
};
 
function idses(){
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};
 
the connect function works but when i call the idses(); it gives me the
following warning
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in ...
 
if i do this :
 
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
 
as you see i use no function , it works 100%

if i do the select on phpmyadmin mysql  SELECT id,email FROM player
WHERE email='[EMAIL PROTECTED]';
it works and selects the id.
if i add to the function return $user; it doesnt work also
im using phpMyAdmin - 2.10.1 and MySQL client version: 5.0.51a.

Why does the fetch_array without function works on php and does not if
i call it as a function even creating the same function on the php page
im using it reproduces the same warning. What is the solution for this?


Reproduce code:
---


Expected result:

echo of the mysql selection id using a session email

Actual result:
--
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in 





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



#45548 [Bgs]: Fetch_array not working on function Warning: mysql_fetch_array():suppli

2008-07-17 Thread deathmachine-pt- at hotmail dot com
 ID:   45548
 User updated by:  deathmachine-pt- at hotmail dot com
 Reported By:  deathmachine-pt- at hotmail dot com
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: windows xp
 PHP Version:  5.2.6
 New Comment:

Warning: mysql_error(): supplied resource is not a valid MySQL-Link
resource in /home/eensino/public_html/pat/artur/Projecto/functions.php
on line 9


Previous Comments:


[2008-07-17 19:38:28] [EMAIL PROTECTED]

Use mysql_error() to know the error.



[2008-07-17 19:34:51] deathmachine-pt- at hotmail dot com

Description:

Im using dreamweaver 8 php

Im getting this same error on everytime i call a function with fetch
array i have try so much times to solve it and had no luck
 
i have the following function:
 
function connect(){
 mysql_connect("localhost","eensino_artur","deathmachine90");
 mysql_select_db("eensino_patartur");
};
 
function idses(){
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};
 
the connect function works but when i call the idses(); it gives me the
following warning
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in ...
 
if i do this :
 
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
 
as you see i use no function , it works 100%

if i do the select on phpmyadmin mysql  SELECT id,email FROM player
WHERE email='[EMAIL PROTECTED]';
it works and selects the id.
if i add to the function return $user; it doesnt work also
im using phpMyAdmin - 2.10.1 and MySQL client version: 5.0.51a.

Why does the fetch_array without function works on php and does not if
i call it as a function even creating the same function on the php page
im using it reproduces the same warning. What is the solution for this?


Reproduce code:
---


Expected result:

echo of the mysql selection id using a session email

Actual result:
--
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in 





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



#45548 [Opn->Bgs]: Fetch_array not working on function Warning: mysql_fetch_array():suppli

2008-07-17 Thread felipe
 ID:   45548
 Updated by:   [EMAIL PROTECTED]
 Reported By:  deathmachine-pt- at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: windows xp
 PHP Version:  5.2.6
 New Comment:

Use mysql_error() to know the error.


Previous Comments:


[2008-07-17 19:34:51] deathmachine-pt- at hotmail dot com

Description:

Im using dreamweaver 8 php

Im getting this same error on everytime i call a function with fetch
array i have try so much times to solve it and had no luck
 
i have the following function:
 
function connect(){
 mysql_connect("localhost","eensino_artur","deathmachine90");
 mysql_select_db("eensino_patartur");
};
 
function idses(){
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};
 
the connect function works but when i call the idses(); it gives me the
following warning
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in ...
 
if i do this :
 
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE
email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
 
as you see i use no function , it works 100%

if i do the select on phpmyadmin mysql  SELECT id,email FROM player
WHERE email='[EMAIL PROTECTED]';
it works and selects the id.
if i add to the function return $user; it doesnt work also
im using phpMyAdmin - 2.10.1 and MySQL client version: 5.0.51a.

Why does the fetch_array without function works on php and does not if
i call it as a function even creating the same function on the php page
im using it reproduces the same warning. What is the solution for this?


Reproduce code:
---


Expected result:

echo of the mysql selection id using a session email

Actual result:
--
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in 





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



#45548 [NEW]: Fetch_array not working on function Warning: mysql_fetch_array():suppli

2008-07-17 Thread deathmachine-pt- at hotmail dot com
From: deathmachine-pt- at hotmail dot com
Operating system: windows xp
PHP version:  5.2.6
PHP Bug Type: MySQL related
Bug description:  Fetch_array not working on function Warning: 
mysql_fetch_array():suppli

Description:

Im using dreamweaver 8 php

Im getting this same error on everytime i call a function with fetch array
i have try so much times to solve it and had no luck
 
i have the following function:
 
function connect(){
 mysql_connect("localhost","eensino_artur","deathmachine90");
 mysql_select_db("eensino_patartur");
};
 
function idses(){
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
};
 
the connect function works but when i call the idses(); it gives me the
following warning
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in ...
 
if i do this :
 
$email=$_SESSION["email"];
$uti=mysql_query("SELECT id,email FROM player WHERE email='$email'");
$linhauti=mysql_fetch_array($uti);
$user=$linhauti["id"];
 
as you see i use no function , it works 100%

if i do the select on phpmyadmin mysql  SELECT id,email FROM player WHERE
email='[EMAIL PROTECTED]';
it works and selects the id.
if i add to the function return $user; it doesnt work also
im using phpMyAdmin - 2.10.1 and MySQL client version: 5.0.51a.

Why does the fetch_array without function works on php and does not if i
call it as a function even creating the same function on the php page im
using it reproduces the same warning. What is the solution for this?


Reproduce code:
---


Expected result:

echo of the mysql selection id using a session email

Actual result:
--
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in 

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



#45546 [Fbk->Opn]: PCRE with utf8 kill apache childprocess

2008-07-17 Thread kaiser at macbureau dot de
 ID:   45546
 User updated by:  kaiser at macbureau dot de
 Reported By:  kaiser at macbureau dot de
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
 Operating System: FreeBSD 7
 PHP Version:  5.2.6
 New Comment:

Sorry, c&p error, thanks, looking forward to hear from you.

./test.php
Segmentation fault (core dumped)




#!/usr/local/bin/php



Previous Comments:


[2008-07-17 17:53:51] [EMAIL PROTECTED]

the pasted code is incomplete (doesn't even run). Please provide a
complete, but short, reproducible script.



[2008-07-17 16:31:50] kaiser at macbureau dot de

Description:

PCRE with utf8 (Typo3 Mailform) kills apache childprocess. With the 
following entry in apache errorlog on FreeBSD 7 with Apache 2.2.8:

[notice] child pid 6709 exit signal Illegal instruction (4)


Output of ulimit -a:

core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) 33554432
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 11095
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 524288
cpu time   (seconds, -t) unlimited
max user processes  (-u) 5547
virtual memory  (kbytes, -v) unlimite

Reproduce code:
---
#!/usr/local/bin/php







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



#45546 [Opn->Fbk]: PCRE with utf8 kill apache childprocess

2008-07-17 Thread nlopess
 ID:   45546
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kaiser at macbureau dot de
-Status:   Open
+Status:   Feedback
-Bug Type: Apache2 related
+Bug Type: PCRE related
 Operating System: FreeBSD 7
 PHP Version:  5.2.6
 New Comment:

the pasted code is incomplete (doesn't even run). Please provide a
complete, but short, reproducible script.


Previous Comments:


[2008-07-17 16:31:50] kaiser at macbureau dot de

Description:

PCRE with utf8 (Typo3 Mailform) kills apache childprocess. With the 
following entry in apache errorlog on FreeBSD 7 with Apache 2.2.8:

[notice] child pid 6709 exit signal Illegal instruction (4)


Output of ulimit -a:

core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) 33554432
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 11095
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 524288
cpu time   (seconds, -t) unlimited
max user processes  (-u) 5547
virtual memory  (kbytes, -v) unlimite

Reproduce code:
---
#!/usr/local/bin/php







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



#45545 [Opn->Asn]: DateInterval has a limitation of 4 chars for ISO durations

2008-07-17 Thread derick
 ID:   45545
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tj at systisoft dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3CVS-2008-07-17 (CVS)
-Assigned To:  
+Assigned To:  derick
 New Comment:

I don't think the limit is really needed - but then again, I also don't
think it matters much that you can't have periods of > 1000seconds.


Previous Comments:


[2008-07-17 16:24:50] tj at systisoft dot com

If you decide to keep the limit you should move that to documentation I
think :).



[2008-07-17 16:17:58] tj at systisoft dot com

Description:

If you want to create a DateInterval of 36000 seconds (10 hours) the
creation will fail because you have a limit of 4 chars in the format
accepted by the constructor.

Up to days you can do the "carry over" calculation for yourself (But
not for months or years), but if you get an offset in seconds from a
source you cannot control it would be nice if you could just do:

$date->add(new DateInterval('PT' . $seconds . 'S'));

Now you have to check if seconds exceeds the limit an if it exceeds the
limit you have to recalculate yourself. That is not nice from a user
point of view.

Reproduce code:
---
$d = new DateTime('2008-01-01 10:00:00 UTC');
$d->add(new DateInterval('PT36000S'));
echo $d->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T20:00:00+

Actual result:
--
PHP Fatal error:  Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2

Fatal error: Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2





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



#45546 [NEW]: PCRE with utf8 kill apache childprocess

2008-07-17 Thread kaiser at macbureau dot de
From: kaiser at macbureau dot de
Operating system: FreeBSD 7
PHP version:  5.2.6
PHP Bug Type: Apache2 related
Bug description:  PCRE with utf8 kill apache childprocess

Description:

PCRE with utf8 (Typo3 Mailform) kills apache childprocess. With the 
following entry in apache errorlog on FreeBSD 7 with Apache 2.2.8:

[notice] child pid 6709 exit signal Illegal instruction (4)


Output of ulimit -a:

core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) 33554432
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 11095
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 524288
cpu time   (seconds, -t) unlimited
max user processes  (-u) 5547
virtual memory  (kbytes, -v) unlimite

Reproduce code:
---
#!/usr/local/bin/php



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



#40811 [NoF->Fbk]: fgetcsv() strange behaviour

2008-07-17 Thread moriyoshi
 ID:   40811
 Updated by:   [EMAIL PROTECTED]
 Reported By:  websites at mtu-net dot ru
-Status:   No Feedback
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5.2.1
 New Comment:

Make sure cp1251 is a supported charmap in your system. You can check
it 
by feeding -a option to /usr/bin/locale .





Previous Comments:


[2008-07-17 15:53:50] nospam at earth dot net

setlocale doesn't help.
p.csv can be any csv file under cyrillic win-1251



[2008-07-17 15:37:38] nospam at earth dot net

code to reproduce the bug:

 $num fields in line $row: \n";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "\n";
}
}
fclose($handle);
?>



[2008-05-13 10:28:17] great_boba at yahoo dot com

Try to use setlocale



[2007-03-23 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".



[2007-03-15 13:01:54] [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.





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

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



#45545 [Com]: DateInterval has a limitation of 4 chars for ISO durations

2008-07-17 Thread tj at systisoft dot com
 ID:   45545
 Comment by:   tj at systisoft dot com
 Reported By:  tj at systisoft dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3CVS-2008-07-17 (CVS)
 New Comment:

If you decide to keep the limit you should move that to documentation I
think :).


Previous Comments:


[2008-07-17 16:17:58] tj at systisoft dot com

Description:

If you want to create a DateInterval of 36000 seconds (10 hours) the
creation will fail because you have a limit of 4 chars in the format
accepted by the constructor.

Up to days you can do the "carry over" calculation for yourself (But
not for months or years), but if you get an offset in seconds from a
source you cannot control it would be nice if you could just do:

$date->add(new DateInterval('PT' . $seconds . 'S'));

Now you have to check if seconds exceeds the limit an if it exceeds the
limit you have to recalculate yourself. That is not nice from a user
point of view.

Reproduce code:
---
$d = new DateTime('2008-01-01 10:00:00 UTC');
$d->add(new DateInterval('PT36000S'));
echo $d->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T20:00:00+

Actual result:
--
PHP Fatal error:  Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2

Fatal error: Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2





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



#45545 [NEW]: DateInterval has a limitation of 4 chars for ISO durations

2008-07-17 Thread tj at systisoft dot com
From: tj at systisoft dot com
Operating system: All
PHP version:  5.3CVS-2008-07-17 (CVS)
PHP Bug Type: Feature/Change Request
Bug description:  DateInterval has a limitation of 4 chars for ISO durations

Description:

If you want to create a DateInterval of 36000 seconds (10 hours) the
creation will fail because you have a limit of 4 chars in the format
accepted by the constructor.

Up to days you can do the "carry over" calculation for yourself (But not
for months or years), but if you get an offset in seconds from a source you
cannot control it would be nice if you could just do:

$date->add(new DateInterval('PT' . $seconds . 'S'));

Now you have to check if seconds exceeds the limit an if it exceeds the
limit you have to recalculate yourself. That is not nice from a user point
of view.

Reproduce code:
---
$d = new DateTime('2008-01-01 10:00:00 UTC');
$d->add(new DateInterval('PT36000S'));
echo $d->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T20:00:00+

Actual result:
--
PHP Fatal error:  Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2

Fatal error: Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (PT36000S)' in
/Users/tobias/test.php:2
Stack trace:
#0 /Users/tobias/test.php(2): DateInterval->__construct('PT36000S')
#1 {main}
  thrown in /Users/tobias/test.php on line 2

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



#45117 [Opn]: strval gives :.0E-7 for 1e-6

2008-07-17 Thread rudolphi at chemie dot uni-kl dot de
 ID:   45117
 User updated by:  rudolphi at chemie dot uni-kl dot de
 Reported By:  rudolphi at chemie dot uni-kl dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu 8.04 (32bit)
 PHP Version:  5.2.6
 New Comment:

On openSUSE 11, the problem cannot be reproduced either. Though,
changing everything to openSUSE is not an option for me, sorry
(usability is a nightmare). Isn't there any Ubuntu user out there who
can reproduce this?


Previous Comments:


[2008-07-17 15:02:31] rudolphi at chemie dot uni-kl dot de

The error can be reproduced on two different machines:
- my development machine (Core Duo 2300, 1GB) and
- the production machine (Core 2 Quad 9450, 2GB),
both running the 32bit version of Ubuntu 8.04 (including all updates,
but no "proposed","backports" stuff)

I cannot reproduce the error on 
- another testing machine (Core 2 Duo 6550, 2GB) running Ubuntu 7.10
64bit
- a Windows 2003 Server
- a Win XP Professional running Xampp

I will try with some *nix-live cds and post the results very soon.



[2008-07-16 19:18:24] [EMAIL PROTECTED]

Are you able to reproduce this on some other machine? Or some other
*nix / linux distro? Or does it only happen with on one single machine
and OS?



[2008-07-16 13:23:32] rudolphi at chemie dot uni-kl dot de

My GCC-Version is 4.2.3-1ubuntu6, libgcc1 is 4.2.3-2ubuntu7 and my
libc6 is 2.7-10ubuntu3 (the up-to-date-versions of Hardy Heron). Thanks
a lot for your efforts in this topic. I have just recompiled PHP 5.2.6
(and restarted apache) to reproduce the error with the very versions
mentioned above. The error is still there.



[2008-07-16 10:10:38] [EMAIL PROTECTED]

I tried with non-debug build too and still can't reproduce.
What GCC version do you use..? Glibc?



[2008-07-16 10:00:39] [EMAIL PROTECTED]

I can't reproduce in 32bit linux either:

$ uname -a
Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27
16:14:35 EDT 2008 i686 i686 i386 GNU/Linux
[EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php  -n -r '$float=1e-6;
var_dump($float, strval($float));'
float(1.0E-6)
string(6) "1.0E-6"




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

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



#40811 [Com]: fgetcsv() strange behaviour

2008-07-17 Thread nospam at earth dot net
 ID:   40811
 Comment by:   nospam at earth dot net
 Reported By:  websites at mtu-net dot ru
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5.2.1
 New Comment:

setlocale doesn't help.
p.csv can be any csv file under cyrillic win-1251


Previous Comments:


[2008-07-17 15:37:38] nospam at earth dot net

code to reproduce the bug:

 $num fields in line $row: \n";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "\n";
}
}
fclose($handle);
?>



[2008-05-13 10:28:17] great_boba at yahoo dot com

Try to use setlocale



[2007-03-23 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".



[2007-03-15 13:01:54] [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.





[2007-03-15 08:33:18] websites at mtu-net dot ru

Description:

When opening an .csv-file with fgetcsv() most part of cyrillic
(win-1251) characters disappears, and they are returned as an empty
string in returned list. Everything's OK with latin characters.

Reproduce code:
---
$fp=fopen("csv.csv","r");
while ($arr=fgetcsv($fp, 1000, ";"))
 {
  *here comes a bunch of outputs*

Expected result:

Expected: all strings neatly packed in a list =)

Actual result:
--
Result: almost all string fields in a list are empty





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



#44925 [Asn]: preg_grep and array index - follow up on #44191

2008-07-17 Thread nlopess
 ID:  44925
 Updated by:  [EMAIL PROTECTED]
 Reported By: admin at ifyouwantblood dot de
 Status:  Assigned
 Bug Type:PCRE related
 PHP Version: 5.2.6
 Assigned To: nlopess
 New Comment:

non, really. It's just that the code will become much bigger to do the
copying :)


Previous Comments:


[2008-07-13 16:18:18] [EMAIL PROTECTED]

Functions should never ever modify the input array unless designed to
do so. According to documentation, preg_grep() is not supposed to modify
the input array. So it's a bug, not BC. What exactly is the usage case
where it should modify input array?



[2008-07-06 18:46:13] [EMAIL PROTECTED]

I don't really know what to do with this..
While I agree it shouldn't modify the original array, changing the
behavior would break BC.. Any opinions about this?



[2008-05-06 16:00:03] admin at ifyouwantblood dot de

> PHP obviously should convert the values to string to be used in
> regex matching. Hence, i think that it should returns the string
> that was matched.

sure, internally it'll has to be converted, but i see no reason for a
change of the input array. thus preg_grep should work with a copy of the
input array...



[2008-05-06 13:07:09] [EMAIL PROTECTED]

Well, preg_grep() != in_array()...
PHP obviously should convert the values to string to be used in regex
matching. Hence, i think that it should returns the string that was
matched.

Anyway, i'll assign to the maintainer to solve this issue.

Thanks.



[2008-05-06 12:48:29] admin at ifyouwantblood dot de

>> this is a follow up on bug #44191. that was fixed, but everything
>> inside the array is now converted to a string. as i understand it,
>> the search array shouldn't change at all, so i think this is a
>> bug. please note that with objects without a __toString() method, >>
this of course leads to a fatal error.
>
> This is expected, the function is for matching strings.

sorry, but did you even take a look at the samples? preg_grep is a
SEARCH function, why should it change the INPUT array?



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

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



#44299 [Asn->Csd]: PCRE security issue

2008-07-17 Thread nlopess
 ID:   44299
 Updated by:   [EMAIL PROTECTED]
 Reported By:  test_junk at hotmail dot it
-Status:   Assigned
+Status:   Closed
 Bug Type: PCRE related
 Operating System: *
 PHP Version:  4.4.8
 Assigned To:  nlopess
 New Comment:

ok, I've upgraded it today.


Previous Comments:


[2008-07-17 01:00:06] [EMAIL PROTECTED]

Nuno, didn't you already upgrade PCRE in PHP_4_4 branch..? (for the
last release..)



[2008-03-04 19:35:42] test_junk at hotmail dot it

There are several script using eval() statement in an unsafe manner
(i.e. http://www.securityfocus.com/bid/14086), this makes the
vulnerability remotely exploitable and potentially dangerous.



[2008-03-03 10:50:03] [EMAIL PROTECTED]

Yes, that's true. This is only a problem if the program uses
user-supplied regexes.
I think that the most problematic thing was the pcre 7.0 BC break, that
was later fixed in 7.2 (we still bundle 7.0).
Anyway, Derick please reassign the bug report to me again if you want
me to upgrade pcre or close it otherwise. I can always upgrade PCRE
later if you decide to make a new release for some other reason.



[2008-03-03 08:17:02] [EMAIL PROTECTED]

>From what I can see from their ChangeLog:

1.  A character class containing a very large number of characters
with
codepoints greater than 255 (in UTF-8 mode, of course) caused a
buffer overflow.

Which is only an issue for the expression, and not "input" - so this
should only be an issue if you use user-supplied input. Otherwise it's
just a local-developer issue only. Which IMO doesn't warrant a new
release.



[2008-03-01 22:52:54] [EMAIL PROTECTED]

I can upgrade it in CVS, but I'm not sure there will be any further PHP
4 release. Derick can you comment on this?



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

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



#40811 [Com]: fgetcsv() strange behaviour

2008-07-17 Thread nospam at earth dot net
 ID:   40811
 Comment by:   nospam at earth dot net
 Reported By:  websites at mtu-net dot ru
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5.2.1
 New Comment:

code to reproduce the bug:

 $num fields in line $row: \n";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "\n";
}
}
fclose($handle);
?>


Previous Comments:


[2008-05-13 10:28:17] great_boba at yahoo dot com

Try to use setlocale



[2007-03-23 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".



[2007-03-15 13:01:54] [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.





[2007-03-15 08:33:18] websites at mtu-net dot ru

Description:

When opening an .csv-file with fgetcsv() most part of cyrillic
(win-1251) characters disappears, and they are returned as an empty
string in returned list. Everything's OK with latin characters.

Reproduce code:
---
$fp=fopen("csv.csv","r");
while ($arr=fgetcsv($fp, 1000, ";"))
 {
  *here comes a bunch of outputs*

Expected result:

Expected: all strings neatly packed in a list =)

Actual result:
--
Result: almost all string fields in a list are empty





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



#45117 [Fbk->Opn]: strval gives :.0E-7 for 1e-6

2008-07-17 Thread rudolphi at chemie dot uni-kl dot de
 ID:   45117
 User updated by:  rudolphi at chemie dot uni-kl dot de
 Reported By:  rudolphi at chemie dot uni-kl dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu 8.04 (32bit)
 PHP Version:  5.2.6
 New Comment:

The error can be reproduced on two different machines:
- my development machine (Core Duo 2300, 1GB) and
- the production machine (Core 2 Quad 9450, 2GB),
both running the 32bit version of Ubuntu 8.04 (including all updates,
but no "proposed","backports" stuff)

I cannot reproduce the error on 
- another testing machine (Core 2 Duo 6550, 2GB) running Ubuntu 7.10
64bit
- a Windows 2003 Server
- a Win XP Professional running Xampp

I will try with some *nix-live cds and post the results very soon.


Previous Comments:


[2008-07-16 19:18:24] [EMAIL PROTECTED]

Are you able to reproduce this on some other machine? Or some other
*nix / linux distro? Or does it only happen with on one single machine
and OS?



[2008-07-16 13:23:32] rudolphi at chemie dot uni-kl dot de

My GCC-Version is 4.2.3-1ubuntu6, libgcc1 is 4.2.3-2ubuntu7 and my
libc6 is 2.7-10ubuntu3 (the up-to-date-versions of Hardy Heron). Thanks
a lot for your efforts in this topic. I have just recompiled PHP 5.2.6
(and restarted apache) to reproduce the error with the very versions
mentioned above. The error is still there.



[2008-07-16 10:10:38] [EMAIL PROTECTED]

I tried with non-debug build too and still can't reproduce.
What GCC version do you use..? Glibc?



[2008-07-16 10:00:39] [EMAIL PROTECTED]

I can't reproduce in 32bit linux either:

$ uname -a
Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27
16:14:35 EDT 2008 i686 i686 i386 GNU/Linux
[EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php  -n -r '$float=1e-6;
var_dump($float, strval($float));'
float(1.0E-6)
string(6) "1.0E-6"




[2008-07-15 22:17:40] rudolphi at chemie dot uni-kl dot de

$ uname -a
Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008
i686 GNU/Linux
$ php -n -r '$float=1e-6; var_dump($float, strval($float));'
float(:.0E-7)
string(6) ":.0E-7"
$ php -v
PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies



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

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



#45543 [Opn->Asn]: DateTime::setTimezone can not set timezones without ID

2008-07-17 Thread derick
 ID:   45543
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tj at systisoft dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3CVS-2008-07-17 (CVS)
-Assigned To:  
+Assigned To:  derick


Previous Comments:


[2008-07-17 14:34:47] tj at systisoft dot com

Description:

If you set a time zone for a DateTime via DateTime::setTimeZone() and
that time zone has no ID you get an error message and the time zone will
not be set.

This can lead to problems if you have two DateTime objects from a
source you do not control and want to format the second DateTime object
in the same time zone as the first.

Reproduce code:
---
$d1 = new DateTime('2008-01-01 12:00:00 +02:00');
$d2 = new DateTime('2008-01-01 12:00:00 UTC');
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;
$d2->setTimeZone($d1->getTimeZone());
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
2008-01-01T12:00:00+0200
2008-01-01T14:00:00+0200

Actual result:
--
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
PHP Warning:  DateTime::setTimezone(): Can only do this for zones with
ID for now in /Users/tobias/test.php on line 5

Warning: DateTime::setTimezone(): Can only do this for zones with ID
for
now in /Users/tobias/test.php on line 5
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+



[2008-07-17 13:07:47] tj at systisoft dot com

Description:

if you set a time zone for a DateTime via DateTime::setTimeZone() and
that time zone has no ID you get an error message and the time zone will
not be set.

This can lead to Problems if you have two DateTime objects from a surce
you do not control and want to format the secont DateTime object in the
same time zone as the first.

Reproduce code:
---
$d1 = new DateTime('2008-01-01 12:00:00 +02:00');
$d2 = new DateTime('2008-01-01 12:00:00 UTC');
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;
$d2->setTimeZone($d1->getTimeZone());
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
2008-01-01T12:00:00+0200
2008-01-01T14:00:00+0200

Actual result:
--
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
PHP Warning:  DateTime::setTimezone(): Can only do this for zones with
ID for now in /Users/tobias/test.php on line 5

Warning: DateTime::setTimezone(): Can only do this for zones with ID
for now in /Users/tobias/test.php on line 5
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+





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



#45543 [Opn]: DateTime::setTimezone can not set timezones without ID

2008-07-17 Thread tj at systisoft dot com
 ID:   45543
 User updated by:  tj at systisoft dot com
-Summary:  DateTime::setTimezone kann not set timezones without
   ID
 Reported By:  tj at systisoft dot com
 Status:   Open
-Bug Type: Date/time related
+Bug Type: Feature/Change Request
-Operating System: Mac OS X
+Operating System: All
 PHP Version:  5.3CVS-2008-07-17 (CVS)
 New Comment:

Description:

If you set a time zone for a DateTime via DateTime::setTimeZone() and
that time zone has no ID you get an error message and the time zone will
not be set.

This can lead to problems if you have two DateTime objects from a
source you do not control and want to format the second DateTime object
in the same time zone as the first.

Reproduce code:
---
$d1 = new DateTime('2008-01-01 12:00:00 +02:00');
$d2 = new DateTime('2008-01-01 12:00:00 UTC');
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;
$d2->setTimeZone($d1->getTimeZone());
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
2008-01-01T12:00:00+0200
2008-01-01T14:00:00+0200

Actual result:
--
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
PHP Warning:  DateTime::setTimezone(): Can only do this for zones with
ID for now in /Users/tobias/test.php on line 5

Warning: DateTime::setTimezone(): Can only do this for zones with ID
for
now in /Users/tobias/test.php on line 5
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+


Previous Comments:


[2008-07-17 13:07:47] tj at systisoft dot com

Description:

if you set a time zone for a DateTime via DateTime::setTimeZone() and
that time zone has no ID you get an error message and the time zone will
not be set.

This can lead to Problems if you have two DateTime objects from a surce
you do not control and want to format the secont DateTime object in the
same time zone as the first.

Reproduce code:
---
$d1 = new DateTime('2008-01-01 12:00:00 +02:00');
$d2 = new DateTime('2008-01-01 12:00:00 UTC');
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;
$d2->setTimeZone($d1->getTimeZone());
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
2008-01-01T12:00:00+0200
2008-01-01T14:00:00+0200

Actual result:
--
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
PHP Warning:  DateTime::setTimezone(): Can only do this for zones with
ID for now in /Users/tobias/test.php on line 5

Warning: DateTime::setTimezone(): Can only do this for zones with ID
for now in /Users/tobias/test.php on line 5
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+





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



#45537 [Com]: localhost web page crashes if php5ts.dll (5.2.6.6) exist

2008-07-17 Thread roldan at introsplash dot com
 ID:   45537
 Comment by:   roldan at introsplash dot com
 Reported By:  roldan at introsplash dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.2.6
 New Comment:

I downloaded PHP 5.2.6 a second time and did a binary compare on the
latest release of PHP 5.2.6. The PHP version 5.2.6 I had did not match
in size. embedded in my installed version php5ts.dll file showed an
"RC5" difference.
I uninstalled my version and installed the one without the the "rc5".
That eliminated the issue.


Previous Comments:


[2008-07-17 07:05:01] [EMAIL PROTECTED]

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

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





[2008-07-17 06:36:43] roldan at introsplash dot com

Description:

localhost web page crashes if php5ts.dll (5.2.6.6) exist

Reproduce code:
---
PC: Dell XSP
System: Windows XP Media Center Edition version 2002 Service pack2

Using Apache 2.2.9
PHP 5.2.6

Running this simple code:


Causes the web program to crash:

Apache HTTP Server has encountered a problem..

szAppName : httpd.exe szAppVer : 2.2.9.0 szModName : php5ts.dll

szModVer : 5.2.6.6 offset : 0009c51d   

If I rename the php5ts.dll file after I start the Apache server the
server wont crash.

Actual result:
--



















http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8h" ORIGINAL_FILENAME="libeay32.dll"
INTERNAL_NAME="libeay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.8"
UPTO_BIN_PRODUCT_VERSION="0.9.8.8" LINK_DATE="06/10/2008 21:45:14"
UPTO_LINK_DATE="06/10/2008 21:45:14" VER_LANGUAGE="English (United
States) [0x409]" />




http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8h" ORIGINAL_FILENAME="ssleay32.dll"
INTERNAL_NAME="ssleay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.8"
UPTO_BIN_PRODUCT_VERSION="0.9.8.8" LINK_DATE="06/10/2008 21:46:08"
UPTO_LINK_DATE="06/10/2008 21:46:08" VER_LANGUAGE="English (United
States) [0x409]" />












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



#22666 [Com]: POST only passing a limited number of form variables

2008-07-17 Thread nospam at me dot com
 ID:   22666
 Comment by:   nospam at me dot com
 Reported By:  lbravo at nc dot rr dot com
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: WIndows 2000
 PHP Version:  4.3.0
 New Comment:

hello,

i have the same problem...
i used a local proxy to sniff the headers:

POST /index.php HTTP/1.0
Host: netload.in
Content-Length: 64
Content-type: application/x-www-form-urlencoded
Connection: keep-alive

HTTP/1.1 302 Found
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
Location: index.php?id=15
Content-type: text/html
Transfer-Encoding: chunked
Date: Thu, 17 Jul 2008 13:50:41 GMT
Server: lighttpd/1.5.0

POST /index.php HTTP/1.0
Host: netload.in
Connection: keep-alive

HTTP/1.1 411 Length Required
Content-Type: text/html
Content-Length: 357
Connection: close
Date: Thu, 17 Jul 2008 13:50:45 GMT
Server: lighttpd/1.5.0


In my humble opinion the 2nd request should be a GET request...

http://en.wikipedia.org/wiki/Post/Redirect/Get


Previous Comments:


[2007-11-03 19:22:07] xeenych at gmail dot com

I also encountered this bug
Os: Windows XP SP2
PHP: 5.2.4-win32

The problem is the following.

I create a stream context with some (>2) form variables and issue a
POST request to a redirecting page on a remote webserver using fopen()
or file_get_contents()

Using packet sniffer i discovered, that remote webserver responds HTTP
1.1 302 found and sends location = someotherpage.php

Then, file_get_contents() follows redirect and sends another POST
request for the page someotherpage.php, but this request appears to be
trashed with some form variables from the very first request.

In best case, when there are 2 or may be 3 form variables, remote
server sends error 411 - "length required"
In worst, it sends Bad request.



[2003-03-19 16:49:21] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-12 17:09:38] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.




[2003-03-12 15:55:18] lbravo at nc dot rr dot com

I encountered a problem when passing about 20+ variables in the context
of form variables.  The same problem occurs if using arrays in the
context of form variables.  Only a certain number are passed, generally
those that appear first before the submit are passed, the exact number
seems to vary some what.  I have created simple php scripts and tested
with the same results.  I am not sure if the actual naming makes a
difference or not, the results seem to vary depending on how you try to
set up the test. I am very puzzled, with this behavior.




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



#45543 [NEW]: DateTime::setTimezone kann not set timezones without ID

2008-07-17 Thread tj at systisoft dot com
From: tj at systisoft dot com
Operating system: Mac OS X
PHP version:  5.3CVS-2008-07-17 (CVS)
PHP Bug Type: Date/time related
Bug description:  DateTime::setTimezone kann not set timezones without ID

Description:

if you set a time zone for a DateTime via DateTime::setTimeZone() and that
time zone has no ID you get an error message and the time zone will not be
set.

This can lead to Problems if you have two DateTime objects from a surce
you do not control and want to format the secont DateTime object in the
same time zone as the first.

Reproduce code:
---
$d1 = new DateTime('2008-01-01 12:00:00 +02:00');
$d2 = new DateTime('2008-01-01 12:00:00 UTC');
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;
$d2->setTimeZone($d1->getTimeZone());
echo $d1->format(DATE_ISO8601), PHP_EOL;
echo $d2->format(DATE_ISO8601), PHP_EOL;

Expected result:

2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
2008-01-01T12:00:00+0200
2008-01-01T14:00:00+0200

Actual result:
--
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+
PHP Warning:  DateTime::setTimezone(): Can only do this for zones with ID
for now in /Users/tobias/test.php on line 5

Warning: DateTime::setTimezone(): Can only do this for zones with ID for
now in /Users/tobias/test.php on line 5
2008-01-01T12:00:00+0200
2008-01-01T12:00:00+

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



#42060 [Com]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)

2008-07-17 Thread ando at sys-net dot it
 ID:   42060
 Comment by:   ando at sys-net dot it
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   Assigned
 Bug Type: LDAP related
 Operating System: *
 PHP Version:  5.2.5
 Assigned To:  pajoye
 New Comment:

I didn't get any notification about this message, so I overlooked it; I
was pointed here by a user (like many others) interested in the
functionalities provided by the patch.  In the meanwhile, I noticed that
the code, after more than 2 years of inactivity, is now incompatible
with the patch.  Fixing it will require an amount of time that is
incompatible with my current schedule.  Feel free to fix it yourself. 
Cheers, p.


Previous Comments:


[2008-06-13 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-06-05 19:10:08] [EMAIL PROTECTED]

After a little discussions about windows with Howard, he pointed me to
this bug report. 

It is now the right time to apply such patch (or any other new
features) to ext/ldap as we are getting closer to the PHP 5.3 features
freeze.

Ando, do you have the time to work on it for php5.3?





[2008-05-06 19:43:04] liveoutloud2day at gmail dot com

This would be really helpful.  Of course you could do the same thing
with perl or python, and then interface to it with that, but that is
really a pain.  But I would think php could do anything python and maybe
perl could do  I have been following this patch for almost 3 years
now, would be really nice to get it committed as the added functions
just add to the functions use and don't change any of the existing code,
except adding an additional optional parameter.



[2008-04-17 10:59:03] [EMAIL PROTECTED]

I'm too busy at work right now, and since I don't use LDAP stuff for
anything anymore (or at least right now :), I'm not really keen on just
applying the patch. I hope someone else with more time could look into
this.



[2008-04-17 08:33:51] dan dot marsden at gmail dot com

..ignore that last comment - I can see in the php mailing lists that
Jani is in fact still around! - cool! - Jani? - any possibility you
might be able to re-look at this? - or at least tell us what you need to
allow it to be fixed?

thanks!

:-)

Dan



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

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



#45534 [Opn->Bgs]: Wrong date returned for function jewishtojd

2008-07-17 Thread georgew at rationalcomputing dot ca
 ID:   45534
 User updated by:  georgew at rationalcomputing dot ca
 Reported By:  georgew at rationalcomputing dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Windows Vista
 PHP Version:  5.2.6
 New Comment:

The issue was a misunderstanding of the 1st and 2nd days of RH.  Sorry
for the alert


Previous Comments:


[2008-07-16 21:36:27] georgew at rationalcomputing dot ca

Description:

The Jewish date for Yom Kippur and Rosh Hashanah are consistently 1 day
off.  I attempted to reproduce these days for the next 10 years and
converting them to Gregorian dates and below are my results.

Please note I am using 1,1,5769 to 1,1,5778 for Rosh Hashanah (the 2nd
day) and 1,10,5769 to 1,10,5778 for Yom Kippur as shown in the reproduce
code section below.

Also, I have done it for the other Jewish holidays and although I have
not thoroughly tested there it seems correct for those. 


Reproduce code:
---
function heb_greg($hebmon,$hebday,$hebyear)
{
return  jdtogregorian(jewishtojd($hebmon,$hebday,$hebyear));
}
echo (heb_greg(1,1,5769)),"" ;
echo (heb_greg(1,10,5769)),"" ;
echo (heb_greg(1,1,5770)),"" ;
echo (heb_greg(1,10,5770)),"" ;
echo (heb_greg(1,1,5771)),"" ;
echo (heb_greg(1,10,5771)),"" ;
echo (heb_greg(1,1,5772)),"" ;
echo (heb_greg(1,10,5772)),"" ;
echo (heb_greg(1,1,5773)),"" ;
echo (heb_greg(1,10,5773)),"" ;
echo (heb_greg(1,1,5774)),"" ;
echo (heb_greg(1,10,5774)),"" ;
echo (heb_greg(1,1,5775)),"" ;
echo (heb_greg(1,10,5775)),"" ;
echo (heb_greg(1,1,5776)),"" ;
echo (heb_greg(1,10,5776)),"" ;
echo (heb_greg(1,1,5777)),"" ;
echo (heb_greg(1,10,5777)),"" ;
echo (heb_greg(1,1,5778)),"" ;
echo (heb_greg(1,10,5778)),"" ;


Expected result:

The expected result is:
9/30/2008
10/8/2008
9/19/2009
9/27/2009
9/9/2010
9/17/2010
9/29/2011
10/7/2011
9/17/2012
9/25/2012
9/5/2013
9/13/2013
9/25/2014
10/3/2014
9/14/2015
9/22/2015
10/3/2016
10/11/2016
9/21/2017
9/29/2017



Actual result:
--
The actual result is
9/30/2008
10/9/2008
9/19/2009
9/28/2009
9/9/2010
9/18/2010
9/29/2011
10/8/2011
9/17/2012
9/26/2012
9/5/2013
9/14/2013
9/25/2014
10/4/2014
9/14/2015
9/23/2015
10/3/2016
10/12/2016
9/21/2017
9/30/2017







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



#44093 [Com]: ignore_user_abort() sometimes do not work !

2008-07-17 Thread marcus dot mueller at grintsch dot com
 ID:   44093
 Comment by:   marcus dot mueller at grintsch dot com
 Reported By:  max at tehnomir dot com dot ua
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Linux 2.6.20.2
 PHP Version:  5.2.5
 New Comment:

I can confirm this bug still being reproducible in PHP 5.2.6 on Linux
2.6.24 and above. Any news?


Previous Comments:


[2008-04-26 13:50:13] pcdinh at gmail dot com

This bug remains still. I can reproduce it on PHP 5.2.5 and latest PHP
5.3dev (Windows XP SP2)

Maximum execution time of 60 seconds exceeded in
D:\webroot\bugs\44093.php



[2008-04-02 01:00:02] 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-03-25 14:01:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2008-02-10 19:57:36] max at tehnomir dot com dot ua

Description:

Hello !

ignore_user_abort( false ) sometimes do not work !

In this example when I press STOP button in my browser script does not
stop. It runs till max_execution_time is reached.

Server: 1.3.39.


Reproduce code:
---
";
flush();

fwrite($fp, date('d.m.Y H:i:s')."\n");
sleep( 1 );
}

fclose( $fp );

?>

Expected result:

Script must stop execution.

Actual result:
--
Script runs till max_execution_time is reached.





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



#43896 [Com]: htmlspecialchars returns empty string on invalid unicode sequence

2008-07-17 Thread d dot herrlitz at klemm-hensen dot de
 ID:   43896
 Comment by:   d dot herrlitz at klemm-hensen dot de
 Reported By:  arnaud dot lb at gmail dot com
 Status:   Open
 Bug Type: Strings related
 Operating System: *
 PHP Version:  5.2CVS, 5.3CVS (2008-03-25)
 New Comment:

It is still unfixed in 5.2.6!


Previous Comments:


[2008-06-27 17:32:43] sillyxone at yaoo dot com

  is also affected in 5.2, for example:

$str = 'Hello' . chr(160) . 'there';
print(htmlentities($str, ENT_COMPAT, 'UTF-8'));

Instead of printing "Hello there", it prints nothing (empty string).
The same for htmlspecialchars().

Both functions work fine in 5.1



[2008-05-05 21:00:37] heurika at gmail dot com

Hi,
I've got the same Bug, posted on #43740.
Please fix it.

Thanks!



[2008-02-17 13:25:22] andreas dot ravnestad at gmail dot com

This seems to be breaking PEAR::Text_Wiki completely when using UTF-8:
http://pear.php.net/bugs/bug.php?id=13136



[2008-01-24 20:51:11] tallyce at gmail dot com

See also bugs 43294 and 43549 which seem to be the same thing.

This is really starting to bite now. Please can this be fixed, or
suggest how we can reliably process incoming user data in UTF8 given
this behaviour change!



[2008-01-24 12:29:58] arnaud dot lb at gmail dot com

I made a patch for this bug:

http://s3.amazonaws.com/arnaud.lb/php_htmlentities_utf.patch

The internal get_next_char() function returns a status of FAILURE 
when it encounters a invalid or incomplete sequence, which causes 
the htmlspecialchars and htmlentities functions to return an empty 
string.

This patch modify the behavior of these functions to skip invalid 
sequences, without discarding the whole string. This involves a very 
few changes and makes the behavior of theses functions more 
consistent with previous PHP versions.

It also adds a few tests to htmlentities-utf.phpt.



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

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



#45542 [NEW]: call_user_function_ex in seperate thread causes segfault

2008-07-17 Thread cnorthcote at underground dot co dot uk
From: cnorthcote at underground dot co dot uk
Operating system: Debian Linux
PHP version:  5.2.6
PHP Bug Type: Unknown/Other Function
Bug description:  call_user_function_ex in seperate thread causes segfault

Description:

I am developing an in-house extension which executes
call_user_function_ex() within a seperate thread from the main PHP
executable.

When this function is called, there is a segmentation in free().

I am also able to reproduce this on Debian stable (Etch) as well.

PHP was configured with --enable-debug --enable-maintainer-zts.

Reproduce code:
---
See http://pastebin.com/m2ddefa48

Expected result:

The thread should be run (it is), and "Hello World!" printed to the
screen.

Actual result:
--
Thread starts, then:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213146192 (LWP 9615)]
0xb7cf2abe in free () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7cf2abe in free () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7cf49ef in malloc () from /lib/tls/i686/cmov/libc.so.6
#2  0x082c6b7a in allocate_new_resource (thread_resources_ptr=0x84a105c,
thread_id=3081821104)
at /home/ugr/php-5.2.6/TSRM/TSRM.c:275
#3  0x082c6e02 in ts_resource_ex (id=0, th_id=0x0) at
/home/ugr/php-5.2.6/TSRM/TSRM.c:361
#4  0x0830cb39 in _emalloc (size=8, __zend_filename=0x8473abc
"/home/ugr/php-5.2.6/Zend/zend_operators.h",
__zend_lineno=296, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/ugr/php-5.2.6/Zend/zend_alloc.c:2277
#5  0x08321fbd in zend_str_tolower_dup (source=0x859edd8 "test_userfunc",
length=7)
at /home/ugr/php-5.2.6/Zend/zend_operators.h:296
#6  0x08320ef1 in zend_call_function (fci=0xb7b0d3e4, fci_cache=0x0,
tsrm_ls=0x84a1050)
at /home/ugr/php-5.2.6/Zend/zend_execute_API.c:848
#7  0x08320075 in call_user_function_ex (function_table=0x84a2438,
object_pp=0x0, function_name=0x859ebc0,
retval_ptr_ptr=0xb7b0d448, param_count=0, params=0x0, no_separation=0,
symbol_table=0x0, tsrm_ls=0x84a1050)
at /home/ugr/php-5.2.6/Zend/zend_execute_API.c:640
#8  0xb7f781a0 in userfunc_execute (args=0x859edc8) at
/home/ugr/php_ugmt/ugmt.c:160
#9  0xb7dc4240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb7d5849e in clone () from /lib/tls/i686/cmov/libc.so.6

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



#43452 [Asn]: strtotime returns wrong date when requested day is same as first day of the mon

2008-07-17 Thread derick
 ID:   43452
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sean dot thorne at gmail dot com
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: Mac OS X 10.4.11
 PHP Version:  5.2CVS-2007-11-29 (CVS)
 Assigned To:  derick
 New Comment:

Yeah, and I've done some work on that -- but it's not ready yet.


Previous Comments:


[2008-07-17 10:29:15] m dot ford at leedsmet dot ac dot uk

Then there's a doc problem, because currently http://php.net/strtotime
describes its first argument as "The string to parse, according to the
GNU » Date Input Formats syntax", with a link to the GNU documentation. 
If strtotime() does not, in fact, implement the entirety of what's
described there, exactly as described, then what's actually implemented
should be incorporated into the PHP manual and that link removed.



[2008-07-15 17:23:37] [EMAIL PROTECTED]

Assigning this to myself, but be aware that we do not necessarily
implement this GNU date stuff -- we've never done this either. I'll
check it though.



[2008-07-15 17:19:38] m dot ford at leedsmet dot ac dot uk

Derick, please take another look at this.

I've examined it in some depth, and tend to agree there's a bug here. 
However, if you read the GNU Date Input Formats syntax, linked from
http://php.net/manual/function.strtotime.php, very closely, you find it
says:

"a day of the week will forward the date (only if necessary) to reach
that day of the week in the future"

... and ...

"a number may precede a day of the week item to move forward
supplementary weeks."

The crucial word here is "supplementary". Taken together, these
specifications suggest that, somewhat counter-intuitively:

   Monday month year

should represent the first Monday of the month, no matter what date it
falls on, and

   1 Monday month year

should be the Monday *after* that (i.e. the 2nd Monday!!), and so on.
Other wording in the GNU Date "Day of week items" section would tend to
confirm this interpretation.

I therefore submit that the bug actually manifests when the first
occurrence of the requested weekday falls on any date *other* than the
first of the month! :(

However you interpret it, it's nonetheless clear that the relationship
of "1 weekday" to "weekday" should be fixed -- either according to the
GNU specification to occur 1 week later, or more intuitively to mean the
same thing. It's definitely NOT right that "1 Monday" (for example)
means something different from "Monday" *only* when "Monday" is the 1st
of the month...!!



[2008-06-17 17:21:57] soapergem at gmail dot com

I also confirmed this. This is pretty serious, too! There are an
infinite number of examples in which you can reproduce it; here are a
few:


  //  expect 06-15-2008, get 06-22-2008
  $date = strtotime('3 Sunday June 2008');
  echo date('m-d-Y', $date);
  
  //  expect 07-08-2008, get 07-15-2008
  $date = strtotime('2 Tuesday July 2008');
  echo date('m-d-Y', $date);
  
  //  expect 08-22-2008, get 08-29-2008
  $date = strtotime('4 Friday August 2008');
  echo date('m-d-Y', $date);
  
  //  expect 09-29-2008, get 10-06-2008
  $date = strtotime('5 Monday September 2008');
  echo date('m-d-Y', $date);
  
  //  expect 10-01-2008, get 10-08-2008
  $date = strtotime('1 Wednesday October 2008');
  echo date('m-d-Y', $date);


Developers please take note: THIS IS A SERIOUS BUG! (and it's been
around for a long time)



[2008-04-02 14:06:23] billyt at claritytech dot com

We also wrote our own function that handles it. Although, it's purely
by random chance that we discovered the problem. It's not something we
would specifically have tested for.  I wonder how many other people are
using it in production with no idea that it's a problem.



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

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



#43452 [Com]: strtotime returns wrong date when requested day is same as first day of the mon

2008-07-17 Thread m dot ford at leedsmet dot ac dot uk
 ID:   43452
 Comment by:   m dot ford at leedsmet dot ac dot uk
 Reported By:  sean dot thorne at gmail dot com
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: Mac OS X 10.4.11
 PHP Version:  5.2CVS-2007-11-29 (CVS)
 Assigned To:  derick
 New Comment:

Then there's a doc problem, because currently http://php.net/strtotime
describes its first argument as "The string to parse, according to the
GNU » Date Input Formats syntax", with a link to the GNU documentation. 
If strtotime() does not, in fact, implement the entirety of what's
described there, exactly as described, then what's actually implemented
should be incorporated into the PHP manual and that link removed.


Previous Comments:


[2008-07-15 17:23:37] [EMAIL PROTECTED]

Assigning this to myself, but be aware that we do not necessarily
implement this GNU date stuff -- we've never done this either. I'll
check it though.



[2008-07-15 17:19:38] m dot ford at leedsmet dot ac dot uk

Derick, please take another look at this.

I've examined it in some depth, and tend to agree there's a bug here. 
However, if you read the GNU Date Input Formats syntax, linked from
http://php.net/manual/function.strtotime.php, very closely, you find it
says:

"a day of the week will forward the date (only if necessary) to reach
that day of the week in the future"

... and ...

"a number may precede a day of the week item to move forward
supplementary weeks."

The crucial word here is "supplementary". Taken together, these
specifications suggest that, somewhat counter-intuitively:

   Monday month year

should represent the first Monday of the month, no matter what date it
falls on, and

   1 Monday month year

should be the Monday *after* that (i.e. the 2nd Monday!!), and so on.
Other wording in the GNU Date "Day of week items" section would tend to
confirm this interpretation.

I therefore submit that the bug actually manifests when the first
occurrence of the requested weekday falls on any date *other* than the
first of the month! :(

However you interpret it, it's nonetheless clear that the relationship
of "1 weekday" to "weekday" should be fixed -- either according to the
GNU specification to occur 1 week later, or more intuitively to mean the
same thing. It's definitely NOT right that "1 Monday" (for example)
means something different from "Monday" *only* when "Monday" is the 1st
of the month...!!



[2008-06-17 17:21:57] soapergem at gmail dot com

I also confirmed this. This is pretty serious, too! There are an
infinite number of examples in which you can reproduce it; here are a
few:


  //  expect 06-15-2008, get 06-22-2008
  $date = strtotime('3 Sunday June 2008');
  echo date('m-d-Y', $date);
  
  //  expect 07-08-2008, get 07-15-2008
  $date = strtotime('2 Tuesday July 2008');
  echo date('m-d-Y', $date);
  
  //  expect 08-22-2008, get 08-29-2008
  $date = strtotime('4 Friday August 2008');
  echo date('m-d-Y', $date);
  
  //  expect 09-29-2008, get 10-06-2008
  $date = strtotime('5 Monday September 2008');
  echo date('m-d-Y', $date);
  
  //  expect 10-01-2008, get 10-08-2008
  $date = strtotime('1 Wednesday October 2008');
  echo date('m-d-Y', $date);


Developers please take note: THIS IS A SERIOUS BUG! (and it's been
around for a long time)



[2008-04-02 14:06:23] billyt at claritytech dot com

We also wrote our own function that handles it. Although, it's purely
by random chance that we discovered the problem. It's not something we
would specifically have tested for.  I wonder how many other people are
using it in production with no idea that it's a problem.



[2008-03-30 22:39:34] sean dot thorne at gmail dot com

I ended up writing a compensator for the problem, because it appears
that the PHP Dev crew has better things to do then clean up the code
base...

I kept it simple and grabbed what day was the the first of the month
and then found where Thursday would be in comparison and knew the third
thursday was just 3 times whatever the date of the first thursday.



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

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



#44991 [Com]: Compile Failure With freetds0.82

2008-07-17 Thread hoffie at gentoo dot org
 ID:   44991
 Comment by:   hoffie at gentoo dot org
 Reported By:  scourgen at gmail dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Centos5.1(k2.6.18)
 PHP Version:  5.2.6
 New Comment:

Updated patch which covers ext/pdo_dblib as well:
http://overlays.gentoo.org/proj/php/browser/patches/php-patches/5.2.6/php5/freetds-compat.patch?rev=3488

Done by matthias at dsx dot at.


Previous Comments:


[2008-07-16 18:59:12] hoffie at gentoo dot org

I can confirm that above patch makes it possible to compile php-5.2.6
against both freetds-0.64 (i.e. it does not break backward
compatibility) and freetds-0.82 (i.e. it works with recent versions).

You can find a whitespace-fixed (bug tracker screwed it up) and
direction-fixed (patch had to be applied using -R) version of the patch
here:
http://overlays.gentoo.org/proj/php/browser/patches/php-patches/5.2.6/php5/mssql-freetds-compat.patch?rev=3485
Credits should still go to jklowden at freetds dot org.

Any way to get this patch in, especially since it does not seem to
break backwards compatibility?



[2008-07-16 07:56:25] matthias at dsx dot at

same on gentoo linux...
http://bugs.gentoo.org/show_bug.cgi?id=223891 (freetds bug)



[2008-06-12 00:19:27] jklowden at freetds dot org

This diff is what you want.  --jkl

--- config.m4-new   2008-06-11 20:13:47.0 -0400
+++ config.m4   2007-07-03 13:25:34.0 -0400
@@ -10,11 +10,11 @@
 
   if test "$PHP_MSSQL" = "yes"; then
 for i in /usr/local /usr; do
-  if test -f $i/include/sybdb.h; then
+  if test -f $i/include/tds.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/sybdb.h; then
+  elif test -f $i/include/freetds/tds.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include/freetds
 break
@@ -27,10 +27,10 @@
 
   elif test "$PHP_MSSQL" != "no"; then
 
-if test -f $PHP_MSSQL/include/sybdb.h; then
+if test -f $PHP_MSSQL/include/tds.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include
-elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then
+elif test -f $PHP_MSSQL/include/freetds/tds.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds
 else
@@ -38,8 +38,8 @@
 fi
   fi  
 
-  if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && 
test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
- AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
+  if test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a" && 
test ! -r "$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so"; then
+ AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
   fi
 
   PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)



[2008-05-29 20:09:21] brodie at mcw dot edu

I have the same issue--  note, this problem is due to that the freetds
environment NO LONGER PROVIDES tds.h, or libtds.so.   This is a total
re-design of freetds, and as such, completely breaks the ability of php
to use the -with-mssql option.

The re-design of FreeTDS as outlined above was as of version 0.82.

As documented, the --with-mssql=[freetds dir] will fail, and will
complain that the directory is not a freeTDS directory.



[2008-05-14 05:08:27] scourgen at gmail dot com

Description:

compile failure with freetds version 0.82(no tds.h,libtds.so)

Reproduce code:
---
configure:
./configure  --with-mssql=/usr/local/freetds  

Expected result:

configure: error: Directory /usr/local/freetds is not a FreeTDS
installation directory

Actual result:
--
there is no tds.h,libtds.so in freetds install directory(just in
freetds version 0.82)





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



#45525 [Asn->Csd]: Object Closure as

2008-07-17 Thread dmitry
 ID:   45525
 Updated by:   [EMAIL PROTECTED]
 Reported By:  david at grudl dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: windows xp
 PHP Version:  5.3CVS-2008-07-16 (snap)
 Assigned To:  dmitry
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2008-07-16 07:23:52] [EMAIL PROTECTED]

Dmitry, could you have a look please?



[2008-07-16 05:25:38] david at grudl dot com

Description:

Lambda functions and closures are AWESOME!

But they are not still supported as ob_start() argument.



Reproduce code:
---
function redirect($file)
{
$handle = fopen($file, 'w');
ob_start(function($buffer) use ($handle) {
fwrite($handle, $buffer);
});
}

redirect('output.html');
echo 'Hello World!'; 

Expected result:

Should work

Actual result:
--
Fatal error: ob_start(): No method name given: use
ob_start(array($object,'method')) to specify instance $object and the
name of a method of class Closure to use as output buffer.





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



#44555 [Opn]: mysql.connect_timeout ignored

2008-07-17 Thread tstarling at wikimedia dot org
 ID:   44555
 User updated by:  tstarling at wikimedia dot org
 Reported By:  tstarling at wikimedia dot org
 Status:   Open
 Bug Type: MySQL related
 Operating System: Windows XP
 PHP Version:  5.2.5
 Assigned To:  uw
 New Comment:

I don't know what you're talking about. The bug is not DNS-related.


Previous Comments:


[2008-07-16 22:36:08] [EMAIL PROTECTED]

As I see it the upper wait time is set to 100s. Your Windows gives a
DNS timeout after 20s. PHP bails at you after 20s. 20s < 100s, all
fine.





[2008-07-15 16:21:05] tstarling at wikimedia dot org

s/ARIN/IANA



[2008-07-15 15:27:20] tstarling at wikimedia dot org

No of course the host "1.2.3.4" doesn't exist, it's an IP address in
the unused 1.0.0.0/8 block reserved by ARIN, that's the point. 

If I instead use a hostname for a host which responds to DNS rapidly,
but drops ignores SYN packets on the port in question (such as
www.google.com), the result is the same. 

Are you asking me this question because you've tried it and can't
reproduce it? If so, maybe I can help to isolate the configuration.



[2008-07-14 16:57:08] [EMAIL PROTECTED]

Does the host 1.2.3.4 exist? If not, you're probably running into the
default DNS lookup timeout of your system -> bogus, not a bug. Try
changing your system settings,
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/96406.mspx?mfr=true



[2008-03-28 09:03:03] tstarling at wikimedia dot org

Description:

mysql.connect_timeout is ignored, a fixed timeout of 20s is used.
Observed on PHP 5.2.5 WinXP, not observed on PHP 5.1.4 Linux.

Reproduce code:
---
print mysql_get_client_info() ."\n";
ini_set('mysql.connect_timeout',1);
$t = -microtime(true);
mysql_connect('1.2.3.4');
$t += microtime(true);
print "$t\n";
ini_set('mysql.connect_timeout',100);
$t = -microtime(true);
mysql_connect('1.2.3.4');
$t += microtime(true);
print "$t\n";


Expected result:

5.0.45
1.00128006935
99.9788169861

Actual result:
--
5.0.45
20.999632
21.0206007957






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



#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread dirk at bean-it dot nl
 ID:   45066
 User updated by:  dirk at bean-it dot nl
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

Yes, and I was wrong... :)

In my opinion, bug#42625 went the wrong way (specially the last few
comments), so it would be clearer to start a new bugreport...


Previous Comments:


[2008-07-17 08:50:57] [EMAIL PROTECTED]

Ooops, it was you :)



[2008-07-17 08:49:40] [EMAIL PROTECTED]

Dirk,
I decided to look with Google for something similar and Bug#42625
appeared. The same problem, the same distro (Debian), the same version
of MySQL (5.0.32). The reported said he updated to some higher version
and the problem disappeared. Could this be the cause?

Best,
Andrey



[2008-07-17 08:10:14] dirk at bean-it dot nl

Mailed the output!



[2008-07-17 07:37:39] [EMAIL PROTECTED]

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey



[2008-07-17 06:36:13] dirk at bean-it dot nl

Hi,

Yes, I can reproduce this on serveral machines. All of my Debian amd64
machines (8 of them) and some of the i686 machines.

Cheers,

Dirk



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

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



#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread andrey
 ID:   45066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

Ooops, it was you :)


Previous Comments:


[2008-07-17 08:49:40] [EMAIL PROTECTED]

Dirk,
I decided to look with Google for something similar and Bug#42625
appeared. The same problem, the same distro (Debian), the same version
of MySQL (5.0.32). The reported said he updated to some higher version
and the problem disappeared. Could this be the cause?

Best,
Andrey



[2008-07-17 08:10:14] dirk at bean-it dot nl

Mailed the output!



[2008-07-17 07:37:39] [EMAIL PROTECTED]

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey



[2008-07-17 06:36:13] dirk at bean-it dot nl

Hi,

Yes, I can reproduce this on serveral machines. All of my Debian amd64
machines (8 of them) and some of the i686 machines.

Cheers,

Dirk



[2008-07-17 00:53:29] [EMAIL PROTECTED]

One last question: Are you able to reproduce this problem on any other
machine? 



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

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



#45483 [Com]: Add an era designater to DateTime methods when formatting or parsing dates

2008-07-17 Thread tj at systisoft dot com
 ID:   45483
 Comment by:   tj at systisoft dot com
 Reported By:  tj at systisoft dot com
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.3CVS-2008-07-11 (CVS)
 Assigned To:  derick
 New Comment:

On further thinking there should be a new format char for BC dates
because Y formats the date with year 0 which is conforming with
ISO8601.

But years in the proleptic Gregorian calendar do not have a year 0. The
year 0 in ISO8601 is 1 BC in the proleptic Gregorian calendar.


Previous Comments:


[2008-07-15 11:47:34] tj at systisoft dot com

There should also be a possibility to format a year without the sign,
because if you format with 'Y' you will get something like:

-2000 BC

This can either be done by an new format char for unsigned year or that
the 'Y' format is omitting the sign when a format char for the era
designator is present.



[2008-07-11 10:18:11] tj at systisoft dot com

Description:

It is currently not possible to specify an era designator in a format
when parsing or formatting dates with DateTime::createFromFormat or
DateTime::format.

An era designater would be BC or AD as in 1/1/0200 BC or 1/1/2004 AD.

I don't know which format char would be good since 'G' which is used in
some other format patterns as era designator seems to be already taken.

Reproduce code:
---
N/A

Expected result:

N/A

Actual result:
--
N/A





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



#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread andrey
 ID:   45066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

Dirk,
I decided to look with Google for something similar and Bug#42625
appeared. The same problem, the same distro (Debian), the same version
of MySQL (5.0.32). The reported said he updated to some higher version
and the problem disappeared. Could this be the cause?

Best,
Andrey


Previous Comments:


[2008-07-17 08:10:14] dirk at bean-it dot nl

Mailed the output!



[2008-07-17 07:37:39] [EMAIL PROTECTED]

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey



[2008-07-17 06:36:13] dirk at bean-it dot nl

Hi,

Yes, I can reproduce this on serveral machines. All of my Debian amd64
machines (8 of them) and some of the i686 machines.

Cheers,

Dirk



[2008-07-17 00:53:29] [EMAIL PROTECTED]

One last question: Are you able to reproduce this problem on any other
machine? 



[2008-07-16 06:33:56] dirk at bean-it dot nl

OK, here is the full valgrind output, minus the php output, to shorten
things a little.

Cheers,

Dirk

==29926== Memcheck, a memory error detector.
==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== Using LibVEX rev 1658, a library for dynamic binary
translation.
==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== For more details, rerun with: -v
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010C47: (within /lib/ld-2.3.6.so)
==29926==by 0x4006E47: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.

#40479 [Com]: zend_mm_heap corrupted

2008-07-17 Thread john dot glazebrook at guava dot com
 ID:   40479
 Comment by:   john dot glazebrook at guava dot com
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

OK, I don't know if this is useful but I'll keep posting stuff as I
find it here :-)

PHP 5.2.5 MysqlI 5.0.45

If I alter the database the seg fault goes away and I get normal
exceptions or errors or data results (depending if the SQL is working)
then if I change the DB back to what I need seg faults occur again. So I
think it must be an error in MysqlI or MySQL... ?

John


Previous Comments:


[2008-07-16 16:38:39] john dot glazebrook at guava dot com

Sorry, I forgot to say my server runs Red Hat Linux.

Um, I'm not sure if this is helpful, but I found the error when moving
from PEAR:DB over to ZF DB objects. So I only changed DB code. OK, some
psedudoish code:

class x {
  function db() {
$rpt = new Report();
$row = $rpt->createRow();
$row->text = 'xyz';
$row->save();
echo 'OK 2';
  }
}

$x = new x();
echo 'OK';
$x->db();
echo 'OK 3';

And I see:
 OK
 OK 2
 seg fault

Also changing the function to:

class x {
  function db() {
$rpt = new Report();
$row = $rpt->createRow();
$row->text = 'xyz';
$row->save();
echo 'OK 2';
$row = null;
echo 'M';
  }
}

this time it seg faults at $row = null;

Hope this is of some help. It really sucks :-(

John



[2008-07-16 16:31:08] john dot glazebrook at guava dot com

I found this 'zend_mm_heap corrupted' in my apache log files.

I am using 5.2.5 with almost everything enabled. Mysqli and I am using
Zend Frame work.

As far as I can tell my scripts case this (and a seg fault) when they
are looping through a Zend_DB_Table_Rowset object adding rows to a
table.

When the $row **goes out of scope** the script seg faults. So I get
this error when the function (well method) returns a value. I stripped
all code from the function apart from echos and the $row->save() and the
seg faults still happen.

Ho hum...

john



[2008-06-23 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-06-15 11:29:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2008-06-15 09:43:22] akdeiva at qxsystems dot com

Hi,

i too got the same issue and this is how the code works,

I am having some scripts to parse the HTML data and wherein i am having
part of the code as ,

$replaced_key = strtolower(str_replace("%", 
"percent", $key)); 
$replaced_key = str_replace(".", "", 
$replaced_key); 
$key = str_replace(" ", "_", $replaced_key); 


When i have the above code with the same variable name,

$key = strtolower(str_ireplace("%", "percent", 
$key)); 
$key = str_ireplace(".", "", $key); 
$key = str_ireplace(" ", "_", $key); 

I get the "zend_mm_heap corrupted" error wherein when changed the code
to the above way, it works fine.



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

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



#45527 [Bgs]: whitespaces in resultset of empty varchars/text

2008-07-17 Thread technischersupport at googlemail dot de
 ID:   45527
 User updated by:  technischersupport at googlemail dot de
 Reported By:  technischersupport at googlemail dot de
 Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Windows XP
 PHP Version:  5.2.6
 New Comment:

I asked a sysadmin about that bug and he sent me the following URL:

http://msdn.microsoft.com/en-us/library/ms143729.aspx

In the middle of the page (Features Not Supported in a Future Version
of SQL Server -> Other):

"Although the SQL Server 2005 Database Engine still supports
connections from existing applications using the DB-Library and Embedded
SQL APIs, it does not include the files or documentation needed to do
programming work on applications that use these APIs. A future version
of the SQL Server Database Engine will drop support for connections from
DB-Library or Embedded SQL applications. Do not use DB-Library or
Embedded SQL to develop new applications. Remove any dependencies on
either DB-Library or Embedded SQL when modifying existing applications.
Instead of these APIs, use the SQLClient namespace or an API such as OLE
DB or ODBC. SQL Server 2005 does not include the DB-Library DLL required
to run these applications. To run DB-Library or Embedded SQL
applications you must have available the DB-Library DLL from SQL Server
version 6.5, SQL Server 7.0, or SQL Server 2000."

So why is php using that discontinued code like that?


Previous Comments:


[2008-07-17 01:07:32] [EMAIL PROTECTED]

[4 Apr 2006 7:03pm UTC] [EMAIL PROTECTED] [delete]

This is a bug in the DB library used in the extension. The only
workarround is to trim the value and that would be wrong if the data
storred actually was a space.





[2008-07-16 09:21:35] technischersupport at googlemail dot de

Description:

It's the same bug as in:

http://bugs.php.net/bug.php?id=26012
http://bugs.php.net/bug.php?id=26315
http://bugs.php.net/bug.php?id=28124
http://bugs.php.net/bug.php?id=31641
http://bugs.php.net/bug.php?id=36968
http://bugs.php.net/bug.php?id=39204

described.

I'm using MSSQL 2005:
Microsoft SQL Server Standard Edition
Microsoft Windows NT 5.2 (3790)
9.00.3068.00

with php_mssql.dll
Version 5.2.6.6

ntwdblib.dll
Version 2000.02.08 (as supplied with php)


The Table:

[COLA] [varchar](5) NULL
[COLB] [varchar](25) NULL
[COLC] [varchar](5) NULL
[COLD] [varchar](25) NULL
[COLE] [varchar](40) NULL
[COLF] [text] NULL

I've written empty strings to the cells and read it out with the
appended code.

The bug isn't bogus!

Reproduce code:
---
$connection = mssql_connect($server, $username, $password, true);

$qry = "SELECT * FROM TABLE";
$result_id = mssql_query($qry, $connection);
$row = mssql_fetch_assoc($result_id)
print_r($row);

Expected result:

[COLA] => "foo"
[COLB] => "bar"
[COLC] => ""
[COLD] => ""
[COLE] => ""
[COLF] => ""

Actual result:
--
[COLA] => "foo"
[COLB] => "bar"
[COLC] => " "
[COLD] => " "
[COLE] => " "
[COLF] => " "





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



#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread dirk at bean-it dot nl
 ID:   45066
 User updated by:  dirk at bean-it dot nl
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

Mailed the output!


Previous Comments:


[2008-07-17 07:37:39] [EMAIL PROTECTED]

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey



[2008-07-17 06:36:13] dirk at bean-it dot nl

Hi,

Yes, I can reproduce this on serveral machines. All of my Debian amd64
machines (8 of them) and some of the i686 machines.

Cheers,

Dirk



[2008-07-17 00:53:29] [EMAIL PROTECTED]

One last question: Are you able to reproduce this problem on any other
machine? 



[2008-07-16 06:33:56] dirk at bean-it dot nl

OK, here is the full valgrind output, minus the php output, to shorten
things a little.

Cheers,

Dirk

==29926== Memcheck, a memory error detector.
==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== Using LibVEX rev 1658, a library for dynamic binary
translation.
==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== For more details, rerun with: -v
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010C47: (within /lib/ld-2.3.6.so)
==29926==by 0x4006E47: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninit

#45066 [Opn]: Cannot compile a working php with mysql and mysqli

2008-07-17 Thread andrey
 ID:   45066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dirk at bean-it dot nl
 Status:   Open
 Bug Type: MySQL related
 Operating System: Debian 4.0 / x86_64
 PHP Version:  5.2.6
 New Comment:

Can you provide us with full strace output? Probably will be too long
for the report, so you can send it to [EMAIL PROTECTED] . If Jani also
needs it I will forward it to him.

Thanks for helping nail down the issue!

Andrey


Previous Comments:


[2008-07-17 06:36:13] dirk at bean-it dot nl

Hi,

Yes, I can reproduce this on serveral machines. All of my Debian amd64
machines (8 of them) and some of the i686 machines.

Cheers,

Dirk



[2008-07-17 00:53:29] [EMAIL PROTECTED]

One last question: Are you able to reproduce this problem on any other
machine? 



[2008-07-16 06:33:56] dirk at bean-it dot nl

OK, here is the full valgrind output, minus the php output, to shorten
things a little.

Cheers,

Dirk

==29926== Memcheck, a memory error detector.
==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== Using LibVEX rev 1658, a library for dynamic binary
translation.
==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
al.
==29926== For more details, rerun with: -v
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so)
==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010C47: (within /lib/ld-2.3.6.so)
==29926==by 0x4006E47: (within /lib/ld-2.3.6.so)
==29926==by 0x572D230: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so)
==29926==by 0x572F467: (within /lib/libc-2.3.6.so)
==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so)
==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so)
==29926==by 0x570A426: __nss_lookup_function (in
/lib/libc-2.3.6.so)
==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so)
==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so)
==29926==
==29926== Conditional jump or move depends on uninitialised value(s)
==29926==at 0x4010C47: (within /lib/ld-2.3.6.so)
==29926==by 0x400B8A2: (within /lib/ld-2.3.6.so)
==29926==by 0

#45540 [Opn]: stream_context_create creates bad http request

2008-07-17 Thread jdespatis at yahoo dot fr
 ID:   45540
 User updated by:  jdespatis at yahoo dot fr
 Reported By:  jdespatis at yahoo dot fr
 Status:   Open
 Bug Type: Streams related
 Operating System: Linux Kubuntu
 PHP Version:  5.2.6
 New Comment:

Oups, my script bug.php contains a function

To test it, one can use this simple script :
(no need to create a nothing.mp4 to use this example)

 "bigbluezen", "password" => "demo",
"title" => "ultimate video topmoumoute", "tags" => "test machin bidule",
"channel" => "poetic");

  print_r(publish("nothing.mp4", $params));
?>


Previous Comments:


[2008-07-17 07:10:23] jdespatis at yahoo dot fr

Description:

I'm coding a little script to upload a video on Youtube, thanks to
stream functions in php.

It takes 2 steps:
1/ first connect on google to retrieve token, no problem with php code
2/ upload video with a query in POST, and there stream_context_create
is giving a completely broken query.. From time to time, i can make it
work, but it's pure random

I have used a sniffer as wireshark to see the exact http query

Reproduce code:
---
Here is the piece of code that does all this stuff:
http://www.despatis.com/php/bug.phps

Expected result:

PHP CLIENT => YOUTUBE SERVER:
POST /feeds/api/users/bigbluezen/uploads HTTP/1.0
Host: uploads.gdata.youtube.com
Content-Length: 792
Content-Type: multipart/related;
boundary="---cefe168b3cb99683a0f9ebd6f9b2cca6"
Authorization: GoogleLogin
auth=AIwbFAQtr5MDW_ctllHioiYCpY6I_uF6A9zBcSbIQ8AceGbcYfqrmytEICM8p6VjjzygDd2HPL0YhTcVk2MPmtb9y93-9Fs3yiej8hBtLF60_N_a6aWDg9Mrbm18nP-2dTVvTA6h77eJZrOJICzgN3dZyPT4AN1ffQ
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: application/atom+xml; charset=UTF-8


http://www.w3.org/2005/Atom";
xmlns:media="http://search.yahoo.com/mrss/";
xmlns:yt="http://gdata.youtube.com/schemas/2007";>
  
title foo
description
foo
http://gdata.youtube.com/schemas/2007/categories.cat";>People
key1, key2
  


-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: video/gif
Content-Transfer-Encoding: binary

XXX
-cefe168b3cb99683a0f9ebd6f9b2cca6--

Actual result:
--
The actual result, found with a sniffer (wireshark for example) is:

PHP CLIENT => YOUTUBE SERVER:
POST
/feeds/api/users/bigbluezen/uploads/wFqcFtuB9MY?client=ytapi-SourceRH-LaCartoonerie-3lludu8g-0
HTTP/1.0
Host: gdata.youtube.com
Authorization: GoogleLogin
auth=AIwbFASurkAdrgigXGJeP24Ebc0dM7EierouUTZ7Nqm2pjSzo2aRtNXQgOo-_ebco_-w7CmpxcZqysZKS_UGCUSc-K6tD5NI84jIc7sf1Sq8cPtcbknOrvlqxF6PNBj-kLzeXEPnBwKoE4vJDuwE0ag7Aleyo-u3hw
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug:
c447e7c1c0b79e8dc97c76cdc16e9843.gifbScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

EOF

As you can see, the first query is completely messy !!

The funny thing is that: if i change '' to '' at line 64, the http query is good...

One could thing  in the xml and change another things (add
an echo somewhere, but this trick doesn't work all the time)

As the result is very random, i think file_get_contents doesn't get all
data from the string, leaving some \r\n, which mess the following http
query, maybe something like that...






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



#45540 [NEW]: stream_context_create creates bad http request

2008-07-17 Thread jdespatis at yahoo dot fr
From: jdespatis at yahoo dot fr
Operating system: Linux Kubuntu
PHP version:  5.2.6
PHP Bug Type: Streams related
Bug description:  stream_context_create creates bad http request

Description:

I'm coding a little script to upload a video on Youtube, thanks to stream
functions in php.

It takes 2 steps:
1/ first connect on google to retrieve token, no problem with php code
2/ upload video with a query in POST, and there stream_context_create is
giving a completely broken query.. From time to time, i can make it work,
but it's pure random

I have used a sniffer as wireshark to see the exact http query

Reproduce code:
---
Here is the piece of code that does all this stuff:
http://www.despatis.com/php/bug.phps

Expected result:

PHP CLIENT => YOUTUBE SERVER:
POST /feeds/api/users/bigbluezen/uploads HTTP/1.0
Host: uploads.gdata.youtube.com
Content-Length: 792
Content-Type: multipart/related;
boundary="---cefe168b3cb99683a0f9ebd6f9b2cca6"
Authorization: GoogleLogin
auth=AIwbFAQtr5MDW_ctllHioiYCpY6I_uF6A9zBcSbIQ8AceGbcYfqrmytEICM8p6VjjzygDd2HPL0YhTcVk2MPmtb9y93-9Fs3yiej8hBtLF60_N_a6aWDg9Mrbm18nP-2dTVvTA6h77eJZrOJICzgN3dZyPT4AN1ffQ
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: application/atom+xml; charset=UTF-8


http://www.w3.org/2005/Atom";
xmlns:media="http://search.yahoo.com/mrss/";
xmlns:yt="http://gdata.youtube.com/schemas/2007";>
  
title foo
description foo
http://gdata.youtube.com/schemas/2007/categories.cat";>People
key1, key2
  


-cefe168b3cb99683a0f9ebd6f9b2cca6
Content-Type: video/gif
Content-Transfer-Encoding: binary

XXX
-cefe168b3cb99683a0f9ebd6f9b2cca6--

Actual result:
--
The actual result, found with a sniffer (wireshark for example) is:

PHP CLIENT => YOUTUBE SERVER:
POST
/feeds/api/users/bigbluezen/uploads/wFqcFtuB9MY?client=ytapi-SourceRH-LaCartoonerie-3lludu8g-0
HTTP/1.0
Host: gdata.youtube.com
Authorization: GoogleLogin
auth=AIwbFASurkAdrgigXGJeP24Ebc0dM7EierouUTZ7Nqm2pjSzo2aRtNXQgOo-_ebco_-w7CmpxcZqysZKS_UGCUSc-K6tD5NI84jIc7sf1Sq8cPtcbknOrvlqxF6PNBj-kLzeXEPnBwKoE4vJDuwE0ag7Aleyo-u3hw
X-GData-Client: ytapi-SourceRH-LaCartoonerie-3lludu8g-0
X-GData-Key:
key=AI39si44WZavBNwYryVhVFaMH4Y8e0JbTAr83bScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug:
c447e7c1c0b79e8dc97c76cdc16e9843.gifbScAxKby6LBW3xEyBzaXrV7MTw3sm56SmYVhSOWRXNfUrS0sqC1i7313ycFrQ
Slug: c447e7c1c0b79e8dc97c76cdc16e9843.gif

EOF

As you can see, the first query is completely messy !!

The funny thing is that: if i change '' to '' at line 64, the http query is good...

One could thing  in the xml and change another things (add an echo
somewhere, but this trick doesn't work all the time)

As the result is very random, i think file_get_contents doesn't get all
data from the string, leaving some \r\n, which mess the following http
query, maybe something like that...


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



#45537 [Opn->Fbk]: localhost web page crashes if php5ts.dll (5.2.6.6) exist

2008-07-17 Thread pajoye
 ID:   45537
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roldan at introsplash dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.2.6
 New Comment:

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

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




Previous Comments:


[2008-07-17 06:36:43] roldan at introsplash dot com

Description:

localhost web page crashes if php5ts.dll (5.2.6.6) exist

Reproduce code:
---
PC: Dell XSP
System: Windows XP Media Center Edition version 2002 Service pack2

Using Apache 2.2.9
PHP 5.2.6

Running this simple code:


Causes the web program to crash:

Apache HTTP Server has encountered a problem..

szAppName : httpd.exe szAppVer : 2.2.9.0 szModName : php5ts.dll

szModVer : 5.2.6.6 offset : 0009c51d   

If I rename the php5ts.dll file after I start the Apache server the
server wont crash.

Actual result:
--



















http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8h" ORIGINAL_FILENAME="libeay32.dll"
INTERNAL_NAME="libeay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.8"
UPTO_BIN_PRODUCT_VERSION="0.9.8.8" LINK_DATE="06/10/2008 21:45:14"
UPTO_LINK_DATE="06/10/2008 21:45:14" VER_LANGUAGE="English (United
States) [0x409]" />




http://www.openssl.org/"; PRODUCT_NAME="The OpenSSL Toolkit"
FILE_VERSION="0.9.8h" ORIGINAL_FILENAME="ssleay32.dll"
INTERNAL_NAME="ssleay32" LEGAL_COPYRIGHT="Copyright © 1998-2005 The
OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="0.9.8.8"
UPTO_BIN_PRODUCT_VERSION="0.9.8.8" LINK_DATE="06/10/2008 21:46:08"
UPTO_LINK_DATE="06/10/2008 21:46:08" VER_LANGUAGE="English (United
States) [0x409]" />












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