Req #54022 [Asn]: Add support for curl_easy_reset

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=54022&edit=1

 ID: 54022
 Updated by: pierr...@php.net
 Reported by:mtdowling at gmail dot com
 Summary:Add support for curl_easy_reset
 Status: Assigned
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   Mac OS X
 PHP Version:5.3.5
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

The provided patch is not valid. All the handlers of the php_curl_handlers 
structure also need to be reseted.


Previous Comments:

[2011-08-19 20:17:08] mtdowling at gmail dot com

Any news on this?  I submitted a patch and announced it on the mailing list.  
Please let me know if you need anything further from me.


[2011-02-15 04:57:36] mtdowling at gmail dot com

Description:

It's difficult to use the same curl handle for multiple requests to the same 
host and port when many unknown options could have been applied to the handle 
after its creation.  Many of the curl_setopt options can be removed from a 
handle using some careful option setting, but some options cannot.  Adding a 
curl_easy_reset method to the PHP bindings would allow PHP developers to more 
easily implement connection pooling and utilize keep-alive sessions over 
HTTP/1.1.

curl_easy_reset has been available since version 7.12.1 
(http://curl.haxx.se/libcurl/c/curl_easy_reset.html):

Re-initializes all options previously set on a specified CURL handle to the 
default values. This puts back the handle to the same state as it was in when 
it was just created with curl_easy_init(3).

It does not change the following information kept in the handle: live 
connections, the Session ID cache, the DNS cache, the cookies and shares.







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


Bug #55540 [PATCH]: no curl_share? nice...

2011-11-22 Thread pierr...@php.net
Edit report at https://bugs.php.net/bug.php?id=55540&edit=1

 ID: 55540
 Patch added by: pierr...@php.net
 Reported by:jorsmal at gmail dot com
 Summary:no curl_share? nice...
 Status: Assigned
 Type:   Bug
 Package:cURL related
 Operating System:   any
 PHP Version:Irrelevant
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: curl_share.diff
Revision:   1322032272
URL:
https://bugs.php.net/patch-display.php?bug=55540&patch=curl_share.diff&revision=1322032272


Previous Comments:

[2011-09-09 00:50:32] ka...@php.net

Well you are most welcome to provide a patch for exposing curl_share(), be 
constructive instead ;-)


[2011-08-30 16:46:16] jorsmal at gmail dot com

Description:

using ubuntu lucid with php 5.3.2.1, but i could be using any os with any php 
version.

php-curl extension does not include curl_share functions?

the goal is for developers to use pecl-http? some developers may just use 
something else than php...







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


Req #54995 [Asn->Csd]: Missing CURLINFO_RESPONSE_CODE support

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=54995&edit=1

 ID: 54995
 Updated by: pierr...@php.net
 Reported by:steven dot hartland at multiplay dot co dot uk
 Summary:Missing CURLINFO_RESPONSE_CODE support
-Status: Assigned
+Status: Closed
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   N/A
 PHP Version:5.3.6
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Added in trunk


Previous Comments:

[2011-11-23 05:45:17] pierr...@php.net

Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&revision=319706
Log: Fixed bug #54995


[2011-06-05 17:00:59] steven dot hartland at multiplay dot co dot uk

Description:

As of libcurl 7.10.7 CURLINFO_HTTP_CODE is now known as CURLINFO_RESPONSE_CODE 
this doesn't seem to have been updated in ext/curl the result being a failure 
if 
CURLINFO_RESPONSE_CODE is used with curl_getinfo

Test script:
---
Try to use: curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

Expected result:

curl_getinfo($ch, CURLINFO_RESPONSE_CODE) should return the same as 
curl_getinfo($ch, CURLINFO_HTTP_CODE) currently does.

Actual result:
--
Always fails as CURLINFO_RESPONSE_CODE isn't defined






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


Req #53543 [Asn->]: Add "CURLOPT_NOPROXY" to curl_setopts()

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=53543&edit=1

 ID: 53543
 Updated by: pierr...@php.net
 Reported by:benvercammen at gmail dot com
 Summary:Add "CURLOPT_NOPROXY" to curl_setopts()
-Status: Assigned
+Status: To be documented
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   Windows XP (probably all OS'es)
 PHP Version:Irrelevant
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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.

Added with many other new CURLOPT_* in trunk


Previous Comments:

[2010-12-14 15:56:43] benvercammen at gmail dot com

Description:

First of all, this isn't a bug but a feature request. I know it's one that 
shouldn't be necessary to be implemented under normal conditions, but here's my 
case...

For some strange reason, while using cURL on my machine, it always tries to go 
via proxy localhost:5865. I checked with some other people and they don't have 
the issue. Still, this is what I get:

C:\curl>curl google.com -v
* About to connect() to proxy localhost port 5865 (#0)
*   Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host


This is easily circumvented by adding "--noproxy google.com" to the command, as 
cURL won't be looking for a proxy anymore. However, using the PHP cURL 
functions, there seems to be no way to add that option to the command. Even if 
I don't set any proxy via curl_setopt(), cURL will still try to use the 
localhost proxy, which still results in the "couldn't connect to host" error...

So, that's why I'd like to see the "CURLOPT_NOPROXY" option added to the PHP 
curl functions. Is there any chance of this being implemented in a near 
release, or are there other workarounds I may not have thought of?

(Check http://curl.haxx.se/changes.html#7_19_4 for the release note)







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


Bug #60101 [Opn->Fbk]: Limit to session_regenerate_id updates

2011-11-22 Thread yohgaki
Edit report at https://bugs.php.net/bug.php?id=60101&edit=1

 ID: 60101
 Updated by: yohg...@php.net
 Reported by:funkychunkymunky at gmail dot com
 Summary:Limit to session_regenerate_id updates
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Session related
 Operating System:   Debian Squeeze
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

I've test with my PHP 5.3 and trunk (with strict session patch) with cli. 
Although, I had to add ob_start() at the beginning, it executes all.

I guess you are using Apache web server to test it. Is there any crash log in 
your apache's error_log? If so, please submit backtrace.


Previous Comments:

[2011-10-19 22:54:12] funkychunkymunky at gmail dot com

Description:

Was doing some debugging on our session class and wanted to start from scratch 
on 
a few tests so we came up with the following, just to see how frequently we his 
collisions using the default session configs.

It appears that session_regenerate_id quits regenerating after 114 runs, after 
which the function simply fails.



Test script:
---
$arr = array();
session_id();
session_start();

for( $i = 0; $i <= 10; $i++ )
{
$ses = session_id();
if(!session_regenerate_id(true) ) {
exit;
}
echo "Session: ". $ses. "\n";
$arr[$ses]++;
}
print_r( array_count_values( $arr ) );

Expected result:

Every call to session_regenerate_id and then to session_id would result in a 
new 
ID, and without limit.









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


Req #60311 [Opn->Wfx]: Allow multiple arguments instead of array

2011-11-22 Thread yohgaki
Edit report at https://bugs.php.net/bug.php?id=60311&edit=1

 ID: 60311
 Updated by: yohg...@php.net
 Reported by:olafvdspek at gmail dot com
 Summary:Allow multiple arguments instead of array
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
 Package:PostgreSQL related
 Operating System:   *
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

I understand your idea, I hate to pass arrays also.
However, PHP 5.4 allows short hand array notation (i.e. []), so you can do it 
as 
follows.

$result = pg_query_params($dbconn, 'SELECT * FROM shops WHERE name = $1 and age 
= $2', ["Joe's Widgets", 42]);

Just a 2 chars from PHP 5.4! Isn't great?
So I will not implement this.


Previous Comments:

[2011-11-16 10:59:38] olafvdspek at gmail dot com

Description:

This is a great function, but it could be even simpler. Is it possible to use 
multiple arguments instead of the array? See the test script.

http://php.net/manual/en/function.pg-query-params.php

Test script:
---
$result = pg_query_params($dbconn, 'SELECT * FROM shops WHERE name = $1 and age 
= $2', array("Joe's Widgets", 42));

$result = pg_query_params($dbconn, 'SELECT * FROM shops WHERE name = $1 and age 
= $2', "Joe's Widgets", 42);








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


Bug #53807 [Fbk->Csd]: Apache CRASH (getopt)

2011-11-22 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=53807&edit=1

 ID: 53807
 Updated by: larue...@php.net
 Reported by:hm at mail dot ru
 Summary:Apache CRASH (getopt)
-Status: Feedback
+Status: Closed
 Type:   Bug
 Package:Output Control
 Operating System:   WINDOWS XP SP3 x86
 PHP Version:5.3.5
-Assigned To:
+Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I believe this bug has been fixed in: http://svn.php.net/viewvc?
view=revision&revision=312079

thanks


Previous Comments:

[2011-11-22 08:57:46] dio at integraasp dot com

Description :
same problem with getopt, apache connection was reset after runs the following 
script from browser. in the CLI, the script works fine.

the script:
---
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.




[2011-01-21 22:39:32] hm at mail dot ru

Description:

Apache is restarting (crash) after launch the script in browser.

Test script:
---
https://bugs.php.net/bug.php?id=53807&edit=1


[PHP-BUG] Bug #60362 [NEW]: non-existent sub-sub keys should not have values

2011-11-22 Thread danielc at analysisandsolutions dot com
From: 
Operating system: linux
PHP version:  5.4SVN-2011-11-23 (SVN)
Package:  Arrays related
Bug Type: Bug
Bug description:non-existent sub-sub keys should not have values

Description:

In an array, a sub-sub-key of an existing key is now returning a letter of
the value indexed by the main key.  This is a regression in 5.4.  PHP 5.3
still operates as expected.  I suspect this is related to the array
dereferencing changes.

Test script:
---
$arr = array('exists' => 'foo');

if (isset($arr['exists']['non_existent'])) {
echo "expected: sub-key 'non_existent' is set: ";
var_dump($arr['exists']['non_existent']);
} else {
echo "BEHAVIOR CHANGED: sub-key 'non_existent' is not set.\n";
}
if (isset($arr['exists'][1])) {
echo "expected: sub-key 1 is set: ";
var_dump($arr['exists'][1]);
} else {
echo "BEHAVIOR CHANGED: sub-key 1 is not set.\n";
}

echo "---\n";
if (isset($arr['exists']['non_existent']['sub_sub'])) {
echo "BEHAVIOR CHANGED: sub-key 'sub_sub' is set: ";
var_dump($arr['exists']['non_existent']['sub_sub']);
} else {
echo "good: sub-sub-key 'sub_sub' is not set.\n";
}
if (isset($arr['exists'][1][0])) {
echo "BEHAVIOR CHANGED: sub-sub-key 0 is set: ";
var_dump($arr['exists'][1][0]);
} else {
echo "good: sub-sub-key 0 is not set.\n";
}

echo "---\n";
if (empty($arr['exists']['non_existent'])) {
echo "BEHAVIOR CHANGED: sub-key 'non_existent' is empty.\n";
} else {
echo "expected: sub-key 'non_existent' is not empty: ";
var_dump($arr['exists']['non_existent']);
}
if (empty($arr['exists'][1])) {
echo "BEHAVIOR CHANGED: sub-key 1 is empty.\n";
} else {
echo "expected: sub-key 1 is NOT empty: ";
var_dump($arr['exists'][1]);
}

echo "---\n";
if (empty($arr['exists']['non_existent']['sub_sub'])) {
echo "good: sub-sub-key 'sub_sub' is empty.\n";
} else {
echo "BEHAVIOR CHANGED: sub-sub-key 'sub_sub' is not empty: ";
var_dump($arr['exists']['non_existent']['sub_sub']);
}
if (empty($arr['exists'][1][0])) {
echo "good: sub-sub-key 0 is empty.\n";
} else {
echo "BEHAVIOR CHANGED: sub-sub-key 0 is not empty: ";
var_dump($arr['exists'][1][0]);
}


Expected result:

expected: sub-key 'non_existent' is set: string(1) "f"
expected: sub-key 1 is set: string(1) "o"
---
good: sub-sub-key 'sub_sub' is not set.
good: sub-sub-key 0 is not set.
---
expected: sub-key 'non_existent' is not empty: string(1) "f"
expected: sub-key 1 is NOT empty: string(1) "o"
---
good: sub-sub-key 'sub_sub' is empty.
good: sub-sub-key 0 is empty.


Actual result:
--
expected: sub-key 'non_existent' is set: string(1) "f"
expected: sub-key 1 is set: string(1) "o"
---
BEHAVIOR CHANGED: sub-key 'sub_sub' is set: string(1) "f"
BEHAVIOR CHANGED: sub-sub-key 0 is set: string(1) "o"
---
expected: sub-key 'non_existent' is not empty: string(1) "f"
expected: sub-key 1 is NOT empty: string(1) "o"
---
BEHAVIOR CHANGED: sub-sub-key 'sub_sub' is not empty: string(1) "f"
BEHAVIOR CHANGED: sub-sub-key 0 is not empty: string(1) "o"


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

Bug #7515 [Com]: very weird, magic, invisible referencing

2011-11-22 Thread yann-gael at gueheneuc dot net
Edit report at https://bugs.php.net/bug.php?id=7515&edit=1

 ID: 7515
 Comment by: yann-gael at gueheneuc dot net
 Reported by:waldschr...@php.net
 Summary:very weird, magic, invisible referencing
 Status: Closed
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   linux + win2k
 PHP Version:4.0 Latest CVS (28/10/2000)
 Block user comment: N
 Private report: N

 New Comment:

PS. I narrowed down the test:
class obj {
function method() {
}
}
$o->root=new obj();
var_dump($o);

$o->root->method();
var_dump($o);

and its output with PHP 4.2.3 compiled for m68k-amigaos:
object(stdClass)(1) {
  ["root"]=>
  object(obj)(0) {
  }
}
object(stdClass)(1) {
  ["root"]=>
  &object(obj)(0) {
  }
}

(note the ampersand in the second dump), while, with PHP 5.2.14 for Windows, 
the output is:
object(stdClass)#2 (1) {
  ["root"]=>
  object(obj)#1 (0) {
  }
}
object(stdClass)#2 (1) {
  ["root"]=>
  object(obj)#1 (0) {
  }
}

Does it make sense that in the second assign "$o->root->method();", the method 
is viewed as a reference to and object?

Please forgive me if my question is silly, I am a newbie in OO PHP.


Previous Comments:

[2011-11-22 22:44:58] yann-gael at gueheneuc dot net

I compiled PHP 4.2.3 for m68k-amigaos and the test case tests/lang/029.php 
fails. Could you tell me more about what has been changed into the Zend engine 
to fix this bug so that I can track this change and the bug?

(I don't think that I should reopen this bug for m68k-amigaos, should I?)

Thanks!
Tygre


[2002-06-03 09:33:02] mfisc...@php.net

Zend Engine 2 fixes this.


[2002-04-11 15:28:02] rodif...@php.net

I have reproducted this problem... and am pretty sure what is exactly is going 
wrong...
bar = new bar();
 }
}

class bar
{
 function bar()
 {
  $this->tmp = "bar";
 }
 function do_nothing()
 {
 }
}
$foo = new foo();
$foo->bar->tmp = "test";
$foo2 = $foo;
$foo2->bar->tmp = "foo";
var_dump($foo);
var_dump($foo2);

// now
$foo->bar->do_nothing();
$foo3 = $foo;
$foo3->bar->tmp = "bug";
var_dump($foo);
var_dump($foo3);
?>

 Basically when you call a method from a objects member object. It creates that 
member as a refrence. 

/* i set this to critical because i think this should be resloved right away */

- Brad



[2002-01-11 16:11:31] bryce at redhat dot com

I'm looking at putting php 4.1.1 into the next RH release 
however I noticed that this bug still seems to be happening 

(From make test)
Running tests in /usr/src/redhat/php-4.1.1//tests/lang
...
OO Bug Test (Bug #7515) (029.phpt)  ... failed

[root@dhcpd201 lang]# cat  029.exp
success
[root@dhcpd201 lang]# cat  029.out
failure

I this something that can either be fixed or can I turn a
blind eye to this..

Phil
=--=


[2001-12-12 08:14:56] yohg...@php.net

Is this still a issue? This report is updated a year ago...
If this report is outstanding, PHP Version is better to be updated...




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

https://bugs.php.net/bug.php?id=7515


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


Bug #7515 [Com]: very weird, magic, invisible referencing

2011-11-22 Thread yann-gael at gueheneuc dot net
Edit report at https://bugs.php.net/bug.php?id=7515&edit=1

 ID: 7515
 Comment by: yann-gael at gueheneuc dot net
 Reported by:waldschr...@php.net
 Summary:very weird, magic, invisible referencing
 Status: Closed
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   linux + win2k
 PHP Version:4.0 Latest CVS (28/10/2000)
 Block user comment: N
 Private report: N

 New Comment:

I compiled PHP 4.2.3 for m68k-amigaos and the test case tests/lang/029.php 
fails. Could you tell me more about what has been changed into the Zend engine 
to fix this bug so that I can track this change and the bug?

(I don't think that I should reopen this bug for m68k-amigaos, should I?)

Thanks!
Tygre


Previous Comments:

[2002-06-03 09:33:02] mfisc...@php.net

Zend Engine 2 fixes this.


[2002-04-11 15:28:02] rodif...@php.net

I have reproducted this problem... and am pretty sure what is exactly is going 
wrong...
bar = new bar();
 }
}

class bar
{
 function bar()
 {
  $this->tmp = "bar";
 }
 function do_nothing()
 {
 }
}
$foo = new foo();
$foo->bar->tmp = "test";
$foo2 = $foo;
$foo2->bar->tmp = "foo";
var_dump($foo);
var_dump($foo2);

// now
$foo->bar->do_nothing();
$foo3 = $foo;
$foo3->bar->tmp = "bug";
var_dump($foo);
var_dump($foo3);
?>

 Basically when you call a method from a objects member object. It creates that 
member as a refrence. 

/* i set this to critical because i think this should be resloved right away */

- Brad



[2002-01-11 16:11:31] bryce at redhat dot com

I'm looking at putting php 4.1.1 into the next RH release 
however I noticed that this bug still seems to be happening 

(From make test)
Running tests in /usr/src/redhat/php-4.1.1//tests/lang
...
OO Bug Test (Bug #7515) (029.phpt)  ... failed

[root@dhcpd201 lang]# cat  029.exp
success
[root@dhcpd201 lang]# cat  029.out
failure

I this something that can either be fixed or can I turn a
blind eye to this..

Phil
=--=


[2001-12-12 08:14:56] yohg...@php.net

Is this still a issue? This report is updated a year ago...
If this report is outstanding, PHP Version is better to be updated...


[2000-12-16 13:40:39] waldschr...@php.net

assigned to zeev, as discussed we either need
a) a permanent fix
b) a permanent deep copy function and understand this effect
as a feature and users will eventually have to use deep
copies for some containers




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

https://bugs.php.net/bug.php?id=7515


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


Req #60341 [Com]: SplFixedArray should throw specific exceptions.

2011-11-22 Thread morrison dot levi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60341&edit=1

 ID: 60341
 Comment by: morrison dot levi at gmail dot com
 Reported by:morrison dot levi at gmail dot com
 Summary:SplFixedArray should throw specific exceptions.
 Status: Assigned
 Type:   Feature/Change Request
 Package:SPL related
 Operating System:   irrelevant
 PHP Version:5.3
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

Note that the proposed patch isn't perfect.  Using a string index that is not 
numeric will throw OutOfBoundsException instead of InvalidArgumentException.  I 
haven't figured out how to do that in C yet, hopefully I'll figure it out soon 
or 
someone else knows how and can submit the patch.


Previous Comments:

[2011-11-22 19:46:59] morrison dot levi at gmail dot com

I have a patch nearly ready for this.  It's at home, not on this machine, but I 
noticed that it got assigned, so I thought it was worth mentioning.

Also, I think that:

$fixedArray[] = ''; 

Should throw OverflowException instead of RuntimeException. See 
http://stackoverflow.com/questions/8219158/correct-exception-type-for-adding-to-
an-array-when-it-isnt-allowed and 
http://php.net/manual/en/class.overflowexception.php


[2011-11-21 17:36:11] morrison dot levi at gmail dot com

This should really be titled 'SplFixedArray should throw specific exceptions'


[2011-11-19 21:31:32] morrison dot levi at gmail dot com

Description:

SplFixedArray thankfully throws exceptions when you try to do incorrect things 
with indices.  However, the types of exceptions are just too generic.  If I 
give 
the wrong type of index, that's a logic error (I'd expect InvalidArgument or at 
least something that inherits from LogicError to be thrown).  If I give an 
index 
that's that's a valid type but doesn't exist, I'd expect an 
OutOfBoundsException 
to be thrown.  Instead I get a generic RuntimeException.

I should expect because they are very different problems that I would at least 
get a distinguishing message between the two.  However, I get the same 
descriptions:  'Index invalid or out of range'.  The very message suggests they 
should be different exceptions.

The first fix would sort-of break backwards compatibility: throw an 
InvalidArgumentException for things of the wrong type.

The second fix, throw OutOfBoundsException on incorrect index, could be 
implemented and keep backwards compatibility.

Test script:
---
$fa = new SplFixedArray(1);

$fa[new StdClass()]; //expect InvalidArgumentException or perhaps 
OutOfRangeException

$fa[2] = 'james'; // expect OutOfBoundsException

Expected result:

I expect $fa[new StdClass] to throw an InvalidArgumentException, not a 
RuntimeException

I expect $fa['2'] to throw OutOfBoundsException not a RuntimeException.

Actual result:
--
Both throw RuntimeExceptions.






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


Req #60360 [Com]: Add a phpinfo() somewhere on GCOV

2011-11-22 Thread tyr...@php.net
Edit report at https://bugs.php.net/bug.php?id=60360&edit=1

 ID: 60360
 Comment by: tyr...@php.net
 Reported by:pierr...@php.net
 Summary:Add a phpinfo() somewhere on GCOV
 Status: Open
 Type:   Feature/Change Request
 Package:Unknown/Other Function
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

It should be generated per build basis, so we can check it for each execution.
If Nuno doesn't mind, I can do this, as it seems trivial to implement.


Previous Comments:

[2011-11-22 20:09:17] pierr...@php.net

Description:

It would be nice to have a phpinfo() somewhere on the gcov server to know which 
version of a specific lib is used.







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


[PHP-BUG] Req #60360 [NEW]: Add a phpinfo() somewhere on GCOV

2011-11-22 Thread pierr...@php.net
From: 
Operating system: 
PHP version:  Irrelevant
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:Add a phpinfo() somewhere on GCOV

Description:

It would be nice to have a phpinfo() somewhere on the gcov server to know
which 
version of a specific lib is used.


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



Req #60341 [Com]: SplFixedArray should throw specific exceptions.

2011-11-22 Thread morrison dot levi at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60341&edit=1

 ID: 60341
 Comment by: morrison dot levi at gmail dot com
 Reported by:morrison dot levi at gmail dot com
 Summary:SplFixedArray should throw specific exceptions.
 Status: Assigned
 Type:   Feature/Change Request
 Package:SPL related
 Operating System:   irrelevant
 PHP Version:5.3
 Assigned To:colder
 Block user comment: N
 Private report: N

 New Comment:

I have a patch nearly ready for this.  It's at home, not on this machine, but I 
noticed that it got assigned, so I thought it was worth mentioning.

Also, I think that:

$fixedArray[] = ''; 

Should throw OverflowException instead of RuntimeException. See 
http://stackoverflow.com/questions/8219158/correct-exception-type-for-adding-to-
an-array-when-it-isnt-allowed and 
http://php.net/manual/en/class.overflowexception.php


Previous Comments:

[2011-11-21 17:36:11] morrison dot levi at gmail dot com

This should really be titled 'SplFixedArray should throw specific exceptions'


[2011-11-19 21:31:32] morrison dot levi at gmail dot com

Description:

SplFixedArray thankfully throws exceptions when you try to do incorrect things 
with indices.  However, the types of exceptions are just too generic.  If I 
give 
the wrong type of index, that's a logic error (I'd expect InvalidArgument or at 
least something that inherits from LogicError to be thrown).  If I give an 
index 
that's that's a valid type but doesn't exist, I'd expect an 
OutOfBoundsException 
to be thrown.  Instead I get a generic RuntimeException.

I should expect because they are very different problems that I would at least 
get a distinguishing message between the two.  However, I get the same 
descriptions:  'Index invalid or out of range'.  The very message suggests they 
should be different exceptions.

The first fix would sort-of break backwards compatibility: throw an 
InvalidArgumentException for things of the wrong type.

The second fix, throw OutOfBoundsException on incorrect index, could be 
implemented and keep backwards compatibility.

Test script:
---
$fa = new SplFixedArray(1);

$fa[new StdClass()]; //expect InvalidArgumentException or perhaps 
OutOfRangeException

$fa[2] = 'james'; // expect OutOfBoundsException

Expected result:

I expect $fa[new StdClass] to throw an InvalidArgumentException, not a 
RuntimeException

I expect $fa['2'] to throw OutOfBoundsException not a RuntimeException.

Actual result:
--
Both throw RuntimeExceptions.






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


Bug #55448 [Com]: Error at a Soap request

2011-11-22 Thread benbunk at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=55448&edit=1

 ID: 55448
 Comment by: benbunk at gmail dot com
 Reported by:sunfundev at gmail dot com
 Summary:Error at a Soap request
 Status: Open
 Type:   Bug
 Package:SOAP related
 Operating System:   Windows/FreeBSD
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

PHP 5.2.10 on RHEL 5 (Versions irrelevant) 

Description: 
Ideally, a xml_encode or xmlspecialchars function would be created to handle 
this. 

There is a set list of acceptable chars in the xml documentation. All other 
characters not in this list should be excluded. Here is a short list (more 
found at the documentation link provided): 

Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] 
/* any Unicode character, excluding the surrogate blocks, FFFE, and . */

Documentation:
--
W3C. Extensible Markup Language (XML) 1.0 (Fifth Edition). W3C XML Working 
Group. 2008. (http://www.w3.org/TR/xml/#charsets)

Work around:

Here's a simple function in php that can strip out the control characters which 
is a good-enough solution but far from complete: 

function xmlspecialchars($escapStr) {
  $needles = array(
chr(0x0),
chr(0x01),
chr(0x02),
chr(0x03),
chr(0x04),
chr(0x05),
chr(0x06),
chr(0x07),
chr(0x08),
chr(0x09),
chr(0x1),
chr(0x10),
chr(0x11),
chr(0x12),
chr(0x13),
chr(0x14),
chr(0x15),
chr(0x16),
chr(0x17),
chr(0x18),
chr(0x19),
chr(0x2),
chr(0x3),
chr(0x9),
chr(0xa),
chr(0xb),
chr(0xc),
chr(0xd),
chr(0xe),
chr(0xf),
  );

  return str_replace($needles, ' ', $escapStr);
}


Previous Comments:

[2011-08-18 14:22:21] sunfundev at gmail dot com

Change title


[2011-08-18 14:10:56] sunfundev at gmail dot com

Description:

PHP 5.3.6 on Windows and FreeBSD

There is a problem with soap-call when one of the parameters contains control
characters.

Expected result:

$options = array(
"location" => Config::$config['soap_location'],
"uri" => Config::$config['soap_uri'],
"trace" => 1,
"exceptions" => true
);

$soap_client = new SoapClient(null, $options);
$result = 
$soap_client->login(array('user_name'=>Config::$config['login'],'password'=Config::$config['password']));
$session_id = $result->id;

$entrie = array(
array('name' => 'first_name', 'value' => 'normal string'),
array('name' => 'last_name', 'value' => (string)chr(0x1A)),
array('name' => 'email1', 'value' => 'soapt...@soaptest.com')
);

$soap_client->__soapCall("set_entries", array($session_id, 'Leads', 
array($entrie)));

Actual result:
--
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] error in msg 
parsing:
XML error parsing SOAP payload on line 2: Invalid character in 
H:\xampp\htdocs\test.php:55
Stack trace:
#0 H:\xampp\htdocs\test.php(55): SoapClient->__soapCall('set_entries', Array)
#1 {main}
  thrown in H:\xampp\htdocs\test.php on line 55






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


Bug #55635 [Asn->]: CURLOPT_BINARYTRANSFER no longer used?

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=55635&edit=1

 ID: 55635
 Updated by: pierr...@php.net
 Reported by:matthijs at stdin dot nl
 Summary:CURLOPT_BINARYTRANSFER no longer used?
-Status: Assigned
+Status: To be documented
 Type:   Bug
 Package:cURL related
 PHP Version:trunk-SVN-2011-09-07 (SVN)
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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:

[2011-11-22 17:13:14] pierr...@php.net

Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&revision=319692
Log: Fixed bug #55635


[2011-09-07 13:41:50] matthijs at stdin dot nl

Description:

While trying to find out what CURLOPT_BINARYTRANSFER did exactly, I found that 
it isn't used at all. I looked around in the ext/curl directory in trunk for 
uses of the PHP_CURL_BINARY and PHP_CURL_ASCII constants, and found that 
they're only used for setting the ch->handlers->write->type value, but this 
value is never used anywhere.

It seems the last use of the constants has disappeared in r211314 ("fix bug 
#37061 (curl_exec() doesn't zero-terminate binary strings) - we get the data 
length from cURL, so it's binary safe.
fix leak appearing when re-using curl handle").

I'm not 100% sure my analysis is correct, but if it is, I guess the (code for) 
the option should be removed and the documentation updated. there's no need for 
them to be zero-terminated

It actually makes sense not to distinguish between binary and non-binary 
results: A normal string is just a special case of binary string, so always 
returning a "binary string" should work just fine. AFAIK strings always have a 
length associated with them, so zero bytes could occur within any PHP string 
(it's just that using strings with zero bytes in them don't always work with 
external C functions that expect zero terminated strings...).







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


Bug #60359 [Opn]: imap_rfc822_parse_headers parses overquoted letter body

2011-11-22 Thread prokern at mail dot ru
Edit report at https://bugs.php.net/bug.php?id=60359&edit=1

 ID: 60359
 User updated by:prokern at mail dot ru
 Reported by:prokern at mail dot ru
 Summary:imap_rfc822_parse_headers parses overquoted letter
 body
 Status: Open
 Type:   Bug
 Package:IMAP related
 Operating System:   Windows XP SP3/OpenSUSE
 PHP Version:5.3.8
 Block user comment: N
 Private report: N

 New Comment:

Test script:
---
$fh =   fopen("1.txt", "r");
$data   =   fread($fh,filesize("c:\\1.txt"));
$ob =   imap_rfc822_parse_headers($data);
var_dump($ob);
fclose($fh);

Updated to:

$fh =   fopen("1.txt", "r");
$data   =   fread($fh,filesize("1.txt"));
$ob =   imap_rfc822_parse_headers($data);
var_dump($ob);
fclose($fh);

Actually, does not matter.


Previous Comments:

[2011-11-22 14:43:57] prokern at mail dot ru

Description:

Good day!

imap_rfc822_parse_headers is trying to parse overquoted rfc822 letter.

file with letter source for test can be obtained by link: 

http://webfile.ru/5685845

General structure:

Received: from Techno-Mailbox.techno.elar.local ([192.168.30.4]) by
 techno-mailbox ([192.168.30.4]) with mapi; Wed, 16 Nov 2011 13:03:12 +0400
From: =?koi8-r?Q?=E2=C5=CC=CF=D7_=F3=C5=D2=C7=C5=CA?= 
To: =?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?= 

Date: Wed, 16 Nov 2011 12:00:48 +0300
Subject:
 =?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
 =?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=
Thread-Topic:
 =?koi8-r?B?79LHwc7J2sHDydEgUmFpZC3NwdPTydfBIM7BINPF0tfF0sUg4fP1IPPLIMTM?=
 =?koi8-r?B?0SDQ0s/Fy9TP1yDr8DE1OPA=?=
Thread-Index: AcykL9kUOYSp27TdSzG9fv1U7pZmtwAC6KYAAACmlLA=
Message-ID: 
Accept-Language: ru-RU
Content-Language: ru-RU
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 03
X-MS-Exchange-Organization-AuthSource: Techno-Mailbox.techno.elar.local
X-MS-Has-Attach: yes
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
acceptlanguage: ru-RU
Content-Type: multipart/related;

boundary="_004_E4A56102102B144890018A88CFB5852C2155936598technomailbox_";
type="multipart/alternative"
MIME-Version: 1.0

--_004_E4A56102102B144890018A88CFB5852C2155936598technomailbox_
Content-Type: multipart/alternative;
boundary="_000_E4A56102102B144890018A88CFB5852C2155936598technomailbox_"

--_000_E4A56102102B144890018A88CFB5852C2155936598technomailbox_
Content-Type: text/plain; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

=E1=CC=D8=C2=C5=D2=D4!

=F7=CF=D4 =D4=C1=CB =C4=CF=CC=D6=CE=CF =C2=D9=D4=D8 =D0=CF =D2=C5=C7=CC=C1=
=CD=C5=CE=D4=D5.




=F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD,
=E2=C5=CC=CF=D7 =F3=C5=D2=C7=C5=CA





ELAR

=EB=CF=D2=D0=CF=D2=C1=C3=C9=D1 <=FC=CC=C5=CB=D4=D2=CF=CE=CE=D9=CA =E1=D2=C8=
=C9=D7>
127083 =ED=CF=D3=CB=D7=C1, =F0=C5=D4=D2=CF=D7=D3=CB=CF-=F2=C1=DA=D5=CD=CF=
=D7=D3=CB=C1=D1 =C1=CC=CC=C5=D1, 12=C1
=F4=C5=CC=C5=C6=CF=CE +7 (495) 792-3131 #, =E6=C1=CB=D3 +7 (499) 251-3603
E-mail:  sbe...@elar.ru  =C9=CE=D4=C5=D2=CE=C5=D4-=
=C1=C4=D2=C5=D3: www.elar.ru





  _

From: =E7=CF=D2=C4=C9=C5=CE=CB=CF =F3=C5=D2=C7=C5=CA
Sent: Wednesday, November 16, 2011 1:42 PM
To: =E2=C5=CC=CF=D7 =F3=C5=D2=C7=C5=CA
Subject: RE: =EF=D2=C7=C1=CE=C9=DA=C1=C3=C9=D1 Raid-=CD=C1=D3=D3=C9=D7=C1 =
=CE=C1 =D3=C5=D2=D7=C5=D2=C5 =E1=F3=F5 =F3=CB =C4=CC=D1 =D0=D2=CF=C5=CB=D4=
=CF=D7 =EB=F0158=F0

...

Test script:
---
$fh =   fopen("1.txt", "r");
$data   =   fread($fh,filesize("c:\\1.txt"));
$ob =   imap_rfc822_parse_headers($data);
var_dump($ob);
fclose($fh);

Expected result:

object(stdClass)[1]
  public 'date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'Date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'subject' => string 
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?= 
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'Subject' => string 
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?= 
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'message_id' => string 
'' (length=59)
  public 'toaddress' => string 
'=?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?= 
, =E2=C5=CC=CF=D7@UNKNOWN, 
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR.", 
=E7=CF=D2=C4=C9=C5=CE=CB=CF@UNKNOWN, 
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR."' (length=237)
  public 'to' => 
array
  0 => 
object(stdClass)[2]
  public 'personal' => string 
'=?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?=' (length=59)
  public 'mailbox' => string 'asdvigkov' (length=9)
  public 'host' => string 'elar.ru' (length=7)

Actual result:
--
object(stdClas

[PHP-BUG] Bug #60359 [NEW]: imap_rfc822_parse_headers parses overquoted letter body

2011-11-22 Thread prokern at mail dot ru
From: 
Operating system: Windows XP SP3/OpenSUSE
PHP version:  5.3.8
Package:  IMAP related
Bug Type: Bug
Bug description:imap_rfc822_parse_headers parses overquoted letter body

Description:

Good day!

imap_rfc822_parse_headers is trying to parse overquoted rfc822 letter.

file with letter source for test can be obtained by link: 

http://webfile.ru/5685845

General structure:

Received: from Techno-Mailbox.techno.elar.local ([192.168.30.4]) by
 techno-mailbox ([192.168.30.4]) with mapi; Wed, 16 Nov 2011 13:03:12
+0400
From: =?koi8-r?Q?=E2=C5=CC=CF=D7_=F3=C5=D2=C7=C5=CA?= 
To: =?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?=

Date: Wed, 16 Nov 2011 12:00:48 +0300
Subject:
 =?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
 =?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=
Thread-Topic:
 =?koi8-r?B?79LHwc7J2sHDydEgUmFpZC3NwdPTydfBIM7BINPF0tfF0sUg4fP1IPPLIMTM?=
 =?koi8-r?B?0SDQ0s/Fy9TP1yDr8DE1OPA=?=
Thread-Index: AcykL9kUOYSp27TdSzG9fv1U7pZmtwAC6KYAAACmlLA=
Message-ID: 
Accept-Language: ru-RU
Content-Language: ru-RU
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 03
X-MS-Exchange-Organization-AuthSource: Techno-Mailbox.techno.elar.local
X-MS-Has-Attach: yes
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
acceptlanguage: ru-RU
Content-Type: multipart/related;

boundary="_004_E4A56102102B144890018A88CFB5852C2155936598technomailbox_";
type="multipart/alternative"
MIME-Version: 1.0

--_004_E4A56102102B144890018A88CFB5852C2155936598technomailbox_
Content-Type: multipart/alternative;
boundary="_000_E4A56102102B144890018A88CFB5852C2155936598technomailbox_"

--_000_E4A56102102B144890018A88CFB5852C2155936598technomailbox_
Content-Type: text/plain; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

=E1=CC=D8=C2=C5=D2=D4!

=F7=CF=D4 =D4=C1=CB =C4=CF=CC=D6=CE=CF =C2=D9=D4=D8 =D0=CF
=D2=C5=C7=CC=C1=
=CD=C5=CE=D4=D5.




=F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD,
=E2=C5=CC=CF=D7 =F3=C5=D2=C7=C5=CA





ELAR

=EB=CF=D2=D0=CF=D2=C1=C3=C9=D1 <=FC=CC=C5=CB=D4=D2=CF=CE=CE=D9=CA
=E1=D2=C8=
=C9=D7>
127083 =ED=CF=D3=CB=D7=C1, =F0=C5=D4=D2=CF=D7=D3=CB=CF-=F2=C1=DA=D5=CD=CF=
=D7=D3=CB=C1=D1 =C1=CC=CC=C5=D1, 12=C1
=F4=C5=CC=C5=C6=CF=CE +7 (495) 792-3131 #, =E6=C1=CB=D3 +7 (499) 251-3603
E-mail:  sbe...@elar.ru  =C9=CE=D4=C5=D2=CE=C5=D4-=
=C1=C4=D2=C5=D3: www.elar.ru





  _

From: =E7=CF=D2=C4=C9=C5=CE=CB=CF =F3=C5=D2=C7=C5=CA
Sent: Wednesday, November 16, 2011 1:42 PM
To: =E2=C5=CC=CF=D7 =F3=C5=D2=C7=C5=CA
Subject: RE: =EF=D2=C7=C1=CE=C9=DA=C1=C3=C9=D1 Raid-=CD=C1=D3=D3=C9=D7=C1
=
=CE=C1 =D3=C5=D2=D7=C5=D2=C5 =E1=F3=F5 =F3=CB =C4=CC=D1
=D0=D2=CF=C5=CB=D4=
=CF=D7 =EB=F0158=F0

...

Test script:
---
$fh =   fopen("1.txt", "r");
$data   =   fread($fh,filesize("c:\\1.txt"));
$ob =   imap_rfc822_parse_headers($data);
var_dump($ob);
fclose($fh);

Expected result:

object(stdClass)[1]
  public 'date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'Date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'subject' => string
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'Subject' => string
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'message_id' => string
'' (length=59)
  public 'toaddress' => string
'=?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?=
, =E2=C5=CC=CF=D7@UNKNOWN,
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR.",
=E7=CF=D2=C4=C9=C5=CE=CB=CF@UNKNOWN,
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR."' (length=237)
  public 'to' => 
array
  0 => 
object(stdClass)[2]
  public 'personal' => string
'=?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?=' (length=59)
  public 'mailbox' => string 'asdvigkov' (length=9)
  public 'host' => string 'elar.ru' (length=7)

Actual result:
--
object(stdClass)[1]
  public 'date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'Date' => string 'Wed, 16 Nov 2011 12:00:48 +0300' (length=31)
  public 'subject' => string
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'Subject' => string
'=?koi8-r?B?Rlc6IO/Sx8HOydrBw8nRIFJhaWQtzcHT08nXwSDOwSDTxdLXxdLFIOHz9SDz?=
=?koi8-r?B?yyDEzNEg0NLPxcvUz9cg6/AxNTjw?=' (length=115)
  public 'message_id' => string
'' (length=59)
  public 'toaddress' => string
'=?koi8-r?Q?=F3=C4=D7=C9=D6=CB=CF=D7_=E1=CC=D8=C2=C5=D2=D4?=
, =E2=C5=CC=CF=D7@UNKNOWN,
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR.",
=E7=CF=D2=C4=C9=C5=CE=CB=CF@UNKNOWN,
UNEXPECTED_DATA_AFTER_ADDRESS@".SYNTAX-ERROR."' (length=237)
  public 'to' => 
array
  0 => 
o

Bug #60358 [Csd->Bgs]: Output of var_dump() has changed

2011-11-22 Thread felipe
Edit report at https://bugs.php.net/bug.php?id=60358&edit=1

 ID: 60358
 Updated by: fel...@php.net
 Reported by:mapi at pdepend dot org
 Summary:Output of var_dump() has changed
-Status: Closed
+Status: Bogus
 Type:   Bug
 Package:Variables related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

.


Previous Comments:

[2011-11-22 13:22:06] mapi at pdepend dot org

@laruence
Sorry may fault. As @derick said, this is an xdebug related issue. When I 
disable 
the xdebug extension the output of PHP 5.3 and PHP 5.4 is equal.


[2011-11-22 13:21:03] mapi at pdepend dot org

This output change only appears when xdebug is enabled.


[2011-11-22 11:21:09] der...@php.net

It's likely that this is Xdebug. Could you confirm?


[2011-11-22 11:04:56] larue...@php.net

Please try using this snapshot:

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

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

I can not reproduce this with 5.4-trunk.


[2011-11-22 09:41:41] mapi at pdepend dot org

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to 
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. 
With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'






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


Bug #7701 [Com]: loads include files twice

2011-11-22 Thread dinofly at planetemu dot net
Edit report at https://bugs.php.net/bug.php?id=7701&edit=1

 ID: 7701
 Comment by: dinofly at planetemu dot net
 Reported by:fmoreira at imediata dot pt
 Summary:loads include files twice
 Status: Closed
 Type:   Bug
 Package:IIS related
 Operating System:   W2k IIS5
 PHP Version:4.0.3pl1
 Block user comment: N
 Private report: N

 New Comment:

Hi,

I am experiencing the same issue on IIS 6 and PHP 5.2.5.

This is not limited to the "include" or "include_once", as i was able to 
reproduce it with this simple script :



This produces the following error :
Notice: Constant MY_CONSTANT already defined in [...]\index.php on line 2

There is no auto_prepend nor auto_append file configured.

Since it occurs on a client's platform, i am afraid that i can't change 
anything on this server nor show you the whole phpinfo as it is confidential, 
but here is the beginning :

PHP Version 5.2.5

System  Windows NT EUROSUGAR 5.2 build 3790
Build Date  Nov 8 2007 23:18:08
Configure Command   cscript /nologo configure.js "--enable-snapshot-build" 
"--with-gd=shared"
Server API  ISAPI
Virtual Directory Support   enabled
Configuration File (php.ini) Path   C:\WINDOWS
Loaded Configuration File   C:\WINDOWS\php.ini
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   enabled
Zend Memory Manager enabled
IPv6 Supportenabled
Registered PHP Streams  php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters   convert.iconv.*, string.rot13, string.toupper, 
string.tolower, string.strip_tags, convert.*, consumed, zlib.* 


Hope this helps...


Previous Comments:

[2001-03-08 20:34:12] sni...@php.net

No feedback.

--Jani



[2001-01-28 16:06:13] jmo...@php.net

Can reproduce this on Win2k IIS 5.0, please upgrade to latest verison of PHP 
and report if it still doesnt work

James


[2001-01-28 15:55:55] jmo...@php.net

lets actually assign this this time and see if I remember to do it ;)


[2000-12-30 12:18:06] jmo...@php.net

Ill try to recreate this one and get to the bottom of it.

James


[2000-11-08 17:21:55] fmoreira at imediata dot pt

after trying include_once the same error ocurrs

"Fatal error: Cannot redeclare imagens_carregar() in include/funcoes.php on 
line 18"

imagens_carregar() is the first function in the included file






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

https://bugs.php.net/bug.php?id=7701


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


Bug #60358 [Com]: Output of var_dump() has changed

2011-11-22 Thread mapi at pdepend dot org
Edit report at https://bugs.php.net/bug.php?id=60358&edit=1

 ID: 60358
 Comment by: mapi at pdepend dot org
 Reported by:mapi at pdepend dot org
 Summary:Output of var_dump() has changed
 Status: Closed
 Type:   Bug
 Package:Variables related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

@laruence
Sorry may fault. As @derick said, this is an xdebug related issue. When I 
disable 
the xdebug extension the output of PHP 5.3 and PHP 5.4 is equal.


Previous Comments:

[2011-11-22 13:21:03] mapi at pdepend dot org

This output change only appears when xdebug is enabled.


[2011-11-22 11:21:09] der...@php.net

It's likely that this is Xdebug. Could you confirm?


[2011-11-22 11:04:56] larue...@php.net

Please try using this snapshot:

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

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

I can not reproduce this with 5.4-trunk.


[2011-11-22 09:41:41] mapi at pdepend dot org

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to 
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. 
With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'






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


Bug #60358 [Fbk->Csd]: Output of var_dump() has changed

2011-11-22 Thread mapi at pdepend dot org
Edit report at https://bugs.php.net/bug.php?id=60358&edit=1

 ID: 60358
 User updated by:mapi at pdepend dot org
 Reported by:mapi at pdepend dot org
 Summary:Output of var_dump() has changed
-Status: Feedback
+Status: Closed
 Type:   Bug
 Package:Variables related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

This output change only appears when xdebug is enabled.


Previous Comments:

[2011-11-22 11:21:09] der...@php.net

It's likely that this is Xdebug. Could you confirm?


[2011-11-22 11:04:56] larue...@php.net

Please try using this snapshot:

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

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

I can not reproduce this with 5.4-trunk.


[2011-11-22 09:41:41] mapi at pdepend dot org

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to 
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. 
With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'






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


Bug #60358 [Fbk]: Output of var_dump() has changed

2011-11-22 Thread derick
Edit report at https://bugs.php.net/bug.php?id=60358&edit=1

 ID: 60358
 Updated by: der...@php.net
 Reported by:mapi at pdepend dot org
 Summary:Output of var_dump() has changed
 Status: Feedback
 Type:   Bug
 Package:Variables related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

It's likely that this is Xdebug. Could you confirm?


Previous Comments:

[2011-11-22 11:04:56] larue...@php.net

Please try using this snapshot:

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

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

I can not reproduce this with 5.4-trunk.


[2011-11-22 09:41:41] mapi at pdepend dot org

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to 
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. 
With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'






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


Bug #60358 [Opn->Fbk]: Output of var_dump() has changed

2011-11-22 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=60358&edit=1

 ID: 60358
 Updated by: larue...@php.net
 Reported by:mapi at pdepend dot org
 Summary:Output of var_dump() has changed
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:Variables related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
 Block user comment: N
 Private report: N

 New Comment:

Please try using this snapshot:

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

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

I can not reproduce this with 5.4-trunk.


Previous Comments:

[2011-11-22 09:41:41] mapi at pdepend dot org

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to 
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. 
With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'






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


Bug #60357 [Opn->Csd]: __toString() method triggers E_NOTICE "Array to string conversion"

2011-11-22 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=60357&edit=1

 ID: 60357
 Updated by: larue...@php.net
 Reported by:mapi at pdepend dot org
 Summary:__toString() method triggers E_NOTICE "Array to
 string conversion"
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Reflection related
 Operating System:   Ubuntu 11.10
 PHP Version:5.4.0RC1
-Assigned To:
+Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2011-11-22 10:10:54] larue...@php.net

Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=319670
Log: Fixed bug #60357 (__toString() method triggers E_NOTICE "Array to 
string conversion")


[2011-11-22 09:27:17] mapi at pdepend dot org

Description:

When a function defines an array parameter with a default value, the 
__toString() 
method of the ReflectionParameter class will trigger an E_NOTICE. See the 
attached test script.

Test script:
---
__toString() );

Expected result:

string(44) "Parameter #0 [  array $x = Array ]"

Actual result:
--
PHP Notice:  Array to string conversion in /tmp/ref.php on line 5
PHP Stack trace:
PHP   1. {main}() /tmp/ref.php:0
PHP   2. ReflectionParameter->__toString() /tmp/ref.php:5

Notice: Array to string conversion in /tmp/ref.php on line 5

Call Stack:
0.0002 230464   1. {main}() /tmp/ref.php:0
0.0002 231488   2. ReflectionParameter->__toString() /tmp/ref.php:5

string(44) 'Parameter #0 [  array $x = Array ]'






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


[PHP-BUG] Bug #60358 [NEW]: Output of var_dump() has changed

2011-11-22 Thread mapi at pdepend dot org
From: 
Operating system: Ubuntu 11.10
PHP version:  5.4.0RC1
Package:  Variables related
Bug Type: Bug
Bug description:Output of var_dump() has changed

Description:

Maybe it's not a bug, but a behavior change. With all PHP versions prior to
5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes.
With 
5.4.0 this has changed and the string is now enclosed by single quotes,
except 
the string already contains a single quote

Test script:
---
php -r 'var_dump("Manuel");'

Expected result:

string(6) "Manuel"

Actual result:
--
string(6) 'Manuel'

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



[PHP-BUG] Bug #60357 [NEW]: __toString() method triggers E_NOTICE "Array to string conversion"

2011-11-22 Thread mapi at pdepend dot org
From: 
Operating system: Ubuntu 11.10
PHP version:  5.4.0RC1
Package:  Reflection related
Bug Type: Bug
Bug description:__toString() method triggers E_NOTICE "Array to string 
conversion"

Description:

When a function defines an array parameter with a default value, the
__toString() 
method of the ReflectionParameter class will trigger an E_NOTICE. See the 
attached test script.

Test script:
---
__toString() );

Expected result:

string(44) "Parameter #0 [  array $x = Array ]"

Actual result:
--
PHP Notice:  Array to string conversion in /tmp/ref.php on line 5
PHP Stack trace:
PHP   1. {main}() /tmp/ref.php:0
PHP   2. ReflectionParameter->__toString() /tmp/ref.php:5

Notice: Array to string conversion in /tmp/ref.php on line 5

Call Stack:
0.0002 230464   1. {main}() /tmp/ref.php:0
0.0002 231488   2. ReflectionParameter->__toString()
/tmp/ref.php:5

string(44) 'Parameter #0 [  array $x = Array ]'

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



Req #51507 [Opn->]: Setting filename for @... multipart uploads

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=51507&edit=1

 ID: 51507
 Updated by: pierr...@php.net
 Reported by:david at frankieandshadow dot com
 Summary:Setting filename for @... multipart uploads
-Status: Open
+Status: To be documented
 Type:   Feature/Change Request
 Package:cURL related
 Operating System:   n/a
 PHP Version:5.2.13
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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.

This functionality is implemented but you need to remove the space beetween the 
";" and the "filename". You can even put the type :

curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=>"@{$pathname};type=image/jpeg; 
filename=name.jpg"));


Previous Comments:

[2010-04-08 11:47:10] david at frankieandshadow dot com

Description:

Using curl_setopt, you can make a multipart POST by passing an array of 
parameters, and if preceded by an @, a file upload is created from the path 
following the @.
  curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=>"@{$pathname}"));
However, I haven't been able to find a way to set the filename part of the 
multipart description, so that it generates e.g.
  Content-disposition: form-data; name="myfile"; filename="desiredfilename"
  Content-Type: text/plain
That is, there isn't a way to get "desiredfilename" in there. The only option 
seems to be for the filename part appears to come from the name of the file 
within the path. The cURL command line interface seems to support explicitly 
setting the filename different from the name of the source file with 
'-F "@path ; filename=whatever'
so presumably it is possible in the library, but not exposed through the PHP 
binding.

In case it was merely passing on the string to the cURL library verbatim, I 
tried:
 curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=>"@{$pathname}; 
filename=\"desiredfilename\""));
but that gives an error.

The problem is that the files I have are stored with simple numeric names and 
the file names which an external user would know them by are in the database 
that indexes the disk files. I have a workround which is to make a temporary 
hard link to the file by its user name and give that to cURL, but I don't think 
I should really need to do that.

Test script:
---
$now = time(); $tmpdirpath = "/tmp/enspub-{$now}-{$version->id}";
mkdir($tmpdirpath);
$tmpfilepath = "{$tmpdirpath}/" . mb_ereg_replace('[/?%*:|"<>@~=+]', 
'_', $version->name); // replace disallowed characters
link($version->pathname(), $tmpfilepath);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); /* tell me, not echo */
curl_setopt($ch, CURLOPT_POST, TRUE);
$post['file'] = "@{$tmpfilepath}"; 
/* ... and other $post settings ... */
curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
$data = curl_exec($ch);
/* ... error checking ... */
curl_close($ch);
@unlink($tmpfilepath);
@rmdir($tmpdirpath);



Expected result:

It works, but I'd like to be able to set the filename explicitly without 
copying the file.

Actual result:
--
n/a






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


Bug #53807 [Com]: Apache CRASH (getopt)

2011-11-22 Thread dio at integraasp dot com
Edit report at https://bugs.php.net/bug.php?id=53807&edit=1

 ID: 53807
 Comment by: dio at integraasp dot com
 Reported by:hm at mail dot ru
 Summary:Apache CRASH (getopt)
 Status: Feedback
 Type:   Bug
 Package:Output Control
 Operating System:   WINDOWS XP SP3 x86
 PHP Version:5.3.5
 Block user comment: N
 Private report: N

 New Comment:

Description :
same problem with getopt, apache connection was reset after runs the following 
script from browser. in the CLI, the script works fine.

the script:
---
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.




[2011-01-21 22:39:32] hm at mail dot ru

Description:

Apache is restarting (crash) after launch the script in browser.

Test script:
---
https://bugs.php.net/bug.php?id=53807&edit=1


Bug #51711 [Opn->Csd]: Test curl_basic_008 will fail if dns resolver uses search domain

2011-11-22 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=51711&edit=1

 ID: 51711
 Updated by: pierr...@php.net
 Reported by:post at wickenrode dot com
 Summary:Test curl_basic_008 will fail if dns resolver uses
 search domain
-Status: Open
+Status: Closed
 Type:   Bug
 Package:cURL related
 Operating System:   Linux 2.6.18 i686
 PHP Version:5.3.2
-Assigned To:
+Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

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

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2010-05-01 02:37:18] post at wickenrode dot com

Also affects curl_basic_010.phpt and curl_error_basic.phpt


[2010-05-01 02:32:40] post at wickenrode dot com

Description:

Precondition:
If the server has a dns entry "*.server IN CNAME server" and will append 
"server" 
to non-absolute dns names the DNS query will actually succeed and the test will 
fail.

The DNS resolvers method of appending a search domain specified in 
/etc/resolv.conf is valid.

Thus the test should use an absolute DNS name.

# curl http://23rrweffgert.234tr3dger
[...default apache page...]

# curl http://23rrweffgert.234tr3dger.
curl: (6) Couldn't resolve host '23rrweffgert.234tr3dger.'







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