#22338 [Com]: XML-RPC classes rely on $HTTP_RAW_POST_DATA
| From: | migelanca at yahoo dot com | Date: | Tue, 24 Oct 2006 12:25:43 +0000 |
| Subject: | #22338 [Com]: XML-RPC classes rely on $HTTP_RAW_POST_DATA | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103946@lists.php.net to get a copy of this message | ||
ID: 22338
Comment by: migelanca at yahoo dot com
Reported By: stuart at gnqs dot org
Status: No Feedback
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 4.3.0
Assigned To: ssb
New Comment:
When you ar using nuSoap is posible redirect the warning, only put the
next line on the first line the server seb service>
error_reporting(E_ERROR | E_WARNING | E_PARSE);
With that line the error don't generate problems.
Previous Comments:
------------------------------------------------------------------------
[2006-03-13 18:08:17] jeichorn@php.net
You shouldn't use file/implode to read files, it uses tons of memory
and you have better options.
In this case any version of php that has php://input has
file_get_contents, so just use that.
------------------------------------------------------------------------
[2006-03-12 10:40:33] ifyoumind at yahoo dot com
Hi,
Am trying to use NUSOAP and it requires HTTP_RAW_POST_DATA variable
set. I have both the register_globals and always_populate_raw_post_data
on but still it gives me an error HTTP_RAW_POST_DATA. I read quiet a lot
of forum where almost in all places the question is clear and the answer
still is murky. It doesn't make any sense when
always_populate_raw_post_data turned on when I echo $HTTP_RAW_POST_DATA
it actually gives me an error!
------------------------------------------------------------------------
[2005-05-24 01:00:04] pear-dev at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-05-16 12:08:19] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-07-31 03:52:59] nicos@php.net
According to bertrand, here is a patch for that.
I need feedback from the maintainer before commiting it.
Index: Server.php
===================================================================
RCS file: /repository/pear/XML_RPC/Server.php,v
retrieving revision 1.2
diff -u -u -r1.2 Server.php
--- Server.php 28 Feb 2002 10:59:30 -0000 1.2
+++ Server.php 31 Jul 2003 08:52:13 -0000
@@ -221,8 +221,13 @@
global $XML_RPC_err, $XML_RPC_str, $XML_RPC_errxml,
$XML_RPC_defencoding, $XML_RPC_Server_dmap;
- if ($data=="") {
- $data=$HTTP_RAW_POST_DATA;
+ if (isset($HTTP_RAW_POST_DATA)) {
+ $input = $HTTP_RAW_POST_DATA;
+ } else {
+ $input = implode("\r\n", file('php://input'));
+ }
+ if (empty($data)) {
+ $data = $input;
}
$parser = xml_parser_create($XML_RPC_defencoding);
@@ -301,9 +306,13 @@
// a debugging routine: just echos back the input
// packet as a string value
-
+ if (isset($HTTP_RAW_POST_DATA)) {
+ $input = $HTTP_RAW_POST_DATA;
+ } else {
+ $input = implode("\r\n", file('php://input'));
+ }
$r=new XML_RPC_Response;
- $r->xv=new XML_RPC_Value( "'Aha said I: '" .
$HTTP_RAW_POST_DATA, "string");
+ $r->xv=new XML_RPC_Value( "'Aha said I: '" . $input,
"string");
print $r->serialize();
}
}
------------------------------------------------------------------------
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/22338
--
Edit this bug report at http://bugs.php.net/?id=22338&edit=1