php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36544 Bad Request. Can't find HTTP_RAW_POST_DATA
Submitted: 2006-02-27 16:40 UTC Modified: 2006-02-28 18:45 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: roderja at hotmail dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.1.2 OS: windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 18 = ?
Subscribe to this entry?

 
 [2006-02-27 16:40 UTC] roderja at hotmail dot com
Description:
------------
Run the web services server, and got the following messgae.
"Can't find HTTP_RAW_POST_DATA"
I put the server1.php and its myservice.wsdl at the same folder. Thanks.

Reproduce code:
---------------
<?php 

function SayHello() { 
  return 'Hello'; 
} 
ini_set("soap.wsdl_cache_enabled", "0"); 
$server = new SoapServer("myservice.wsdl"); 
$server->addFunction("getQuote"); 
$server->handle(); 

Expected result:
----------------
Hello

Actual result:
--------------
  <?xml version="1.0" encoding="UTF-8" ?> 
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode> 
  <faultstring>Bad Request. Can't find HTTP_RAW_POST_DATA</faultstring> 
  </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-27 23:12 UTC] me at contents dot nl
I don't see the error. You are not executing a soap request, you're probably just opening the the file in your browser. Hence the server cannot find a soap request in the post data.
 [2006-02-28 13:07 UTC] roderja at hotmail dot com
Could you please help me to figure out how to run this web services on my localhost? I want to try the server and client at the same machine. Thank you very much.
By the way, could you plese tell me where or what kind of document is good for me to learn the PHP SOAP. ( I already know www.php.net) and which newsgroup should I go. I appreciate.
 [2006-02-28 16:32 UTC] bjori@php.net
Which SAPI are you using?

Try:
$data = file_get_contents('php://input');
$server->handle($data);
 [2006-02-28 18:06 UTC] roderja at hotmail dot com
Thank you it works.

I am a beginner and y environment is :
windows xp sp2
XAMPP 1.5.1
 .Update MySQL 5.0.18 
 .Update Apache 2.2.0 
 .Update PHP 5.1.1 
 .Update phpMyAdmin 2.7.0 pl1 

Could you please tell me the following question where can I find the answer? When I survey at www.php.net it tell me how the function difinition, but I don't know how to combine them together. for example, why do you know add that two code is works? I want to know where can I learn these kinds of good information. I appreciate.

1. I don't know what kind of SAPI did I use.
2. Does the following code is just only good for server and client at the same machine?
$data = file_get_contents('php://input');
$server->handle($data);
 [2006-02-28 18:45 UTC] bjori@php.net
This is not a help board. Please check http://php.net/mailing-lists.php for appropriate places to ask.

Regarding reading material http://www.zend.com/php5/articles/php5-SOAP.php should have some info for you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 05:01:27 2019 UTC