Answered by:
Is raw POST data passed to FastCGI instance? How can I tell?

Question
-
User1994580635 posted
For a longer explanation of my issue, see this question on StackOverflow.
I've upgraded from PHP 5.2 (ISAPI) to PHP 5.3 (FastCGI), and now my binary POST data is not available to the receiving PHP script. I'm trying to determine whether this is because of a difference between PHP versions or a difference between ISAPI and FastCGI.
So I'm wondering, does IIS 5.1 handle this raw POST data differently such that it wouldn't be passed through my FastCGI module but would be passed to my ISAPI module? I haven't read anything that suggests this to be the case, but the difference is baffling me.
If the problem is instead caused by PHP, how can I determine that the raw POST data is indeed being passed to the PHP instance?
Wednesday, January 18, 2012 3:52 PM
Answers
-
User-1672167363 posted
Hello,
"Is there IIS FastCGI configuration" "Which would allow this to work when receiving chunked encoding" ?
My script receives gzipped data from a desktop application via POST
Which it retrieves and processes from
$HTTP_RAW_POST_DATA
.In PHP 5.2.16 (ISAPI),
$HTTP_RAW_POST_DATA
is correctly being populated with the expected binary data.After upgrading to PHP 5.3.9 (FastCGI),
$HTTP_RAW_POST_DATA
is not defined.How can I get the data?
I thnk these should help:
Get Fiddler 2 http://www.fiddler2.com/fiddler2/ do the configuration for IE and FireFox Browsers.
Use the IIS 5.1 Status Codes http://blog.crowe.co.nz/archive/2005/08/26/231.aspx lots of information.
Ericlaws Blog http://blogs.msdn.com/b/ieinternals/
Reference http://www.fastcgi.com/devkit/doc/fcgi-devel-kit.htm
Regards,
Martin
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Thursday, January 19, 2012 5:56 PM
All replies
-
User-1672167363 posted
Hello,
You have upgraded versions PHP 5.2 / PHP 5.3 POST data is the same. I looked at Stack Over Flow :D.
The problem is likey with the http://learn.iis.net/page.aspx/248/configuring-the-fastcgi-extension-for-iis-60/ Handler
and configuration. You can run a test.php <?php phpinfo(); ?> you run test,php in the IIS Server the page the post data.
The PHP Install guide http://learn.iis.net/page.aspx/724/install-and-configure-php/ should help.
Common problems are displaying errors Time / Zone settings along with extensions.
If you have to check the php.ini setting you can post the extensions setion to be checked.
HTH
Martin
Wednesday, January 18, 2012 6:11 PM -
User1994580635 posted
I've added a sample script to the StackOverflow question linked in my original post above. The determining factor that causes the problem is when I send my POST with the header "Transfer-Encoding: chunked". So, receiving chunked encoding seems to be breaking it.
Is there some IIS or FastCGI configuration that I'm missing which would allow this to work when receiving chunked encoding? I've seen settings that enable sending chunked encoding but not receiving chunked encoding.
Thursday, January 19, 2012 3:34 PM -
User-1672167363 posted
Hello,
"Is there IIS FastCGI configuration" "Which would allow this to work when receiving chunked encoding" ?
My script receives gzipped data from a desktop application via POST
Which it retrieves and processes from
$HTTP_RAW_POST_DATA
.In PHP 5.2.16 (ISAPI),
$HTTP_RAW_POST_DATA
is correctly being populated with the expected binary data.After upgrading to PHP 5.3.9 (FastCGI),
$HTTP_RAW_POST_DATA
is not defined.How can I get the data?
I thnk these should help:
Get Fiddler 2 http://www.fiddler2.com/fiddler2/ do the configuration for IE and FireFox Browsers.
Use the IIS 5.1 Status Codes http://blog.crowe.co.nz/archive/2005/08/26/231.aspx lots of information.
Ericlaws Blog http://blogs.msdn.com/b/ieinternals/
Reference http://www.fastcgi.com/devkit/doc/fcgi-devel-kit.htm
Regards,
Martin
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Thursday, January 19, 2012 5:56 PM