[FONT=Tahoma]Note:
tried to correct the typo error in title in main forum index
from ..
HTMLRAW_POST_DATA .. testing xform submit
to ..
HTTPRAW_POST_DATA .. testing xform submit
but could not edit title after posting ..[/FONT]
Problem:
I am trying to echo the login submission from an xform .. following this tutorial ..
http://www.sitepoint.com/blogs/2005/10/27/cross-browser-xforms/
The PHP code in the submit.php is ..
echo htmlentities($GLOBALS['HTTP_RAW_POST_DATA']);
and in php.ini ..
register_globals = On;
and
always_populate_raw_post_data = On;
....
On xform submission this does not work .. returns HTTP status 501 ..
But the correct xform xml data is being posted (monitored by Fiddler HTTP Proxy Tool).
....
This PHP5 changelog
http://php.inspire.net.nz/ChangeLog-5.php
says .. "Fixed bug with $HTTP_RAW_POST_DATA not getting set. "
I've just upgraded from PHP-5.0.2 to PHP-5.1.4 .. and it still returns HTTP Status 501
"The server does not support the functionality needed to fulfill this request ()."
p.s.
Inspecting the HTTP Request with Fiddler HTTP Proxy Tool this is the request information sent to submit.php .. seen in Fiddler Session Inspector ..
Raw:
Content-Type: application/xml; charset=UTF-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; formsPlayer 2.0; Sidewinder 1.0; SV1; Maxthon; .NET CLR 1.1.4322)
Host: localhost:8080
Content-Length: 131
Proxy-Connection: Keep-Alive
Pragma: no-cache
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<login>
<username>alpha</username>
<password>beta</password>
</login>
...
and
Forms:
= BODY ====
This request contains a body, but it is not of Content-Type: application/x-www-form-urlencoded.
....
The FORM posting script index.php has this at the top of code ..
// Send true XHTML to browsers that request it
if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) {
header('Content-type: application/xhtml+xml');
}
DL