By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

5.2.2 and POST data change?

P: n/a
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.

--
Tom "Tom" Harrington
MondoMouse makes your mouse mightier
See http://www.atomicbird.com/mondomouse/
May 15 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Tom Harrington wrote:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.
Tom,

Perhaps the upgrade replaced their php.ini file. What does phpinfo()
show for "always_populate_raw_post_data"?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 15 '07 #2

P: n/a
Tom Harrington wrote:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.
Hi,

Your conclusion makes sense to me too.
What does ini_get("always_populate_raw_post_data") say?

Regards,
Erwin Moller
May 15 '07 #3

P: n/a
In article <f8******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
Tom Harrington wrote:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.

Tom,

Perhaps the upgrade replaced their php.ini file. What does phpinfo()
show for "always_populate_raw_post_data"?
phpinfo() shows that it's off.

However the php.ini file on the server was last edited in May 2006,
which has me wondering if this is some kind of undocumented change from
5.1.1 to 5.2.2. If it was off before yesterday then $HTTP_RAW_POST_DATA
shouldn't have ever worked for me.

The docs for always_populate_raw_post_data say that it defaults to
"off", and php.ini isn't turning it on. Maybe it was accidentally
defaulting to "on" in 5.1.1 and 5.2.2 fixed this? Still there's nothing
in the changelogs to indicate this.

--
Tom "Tom" Harrington
MondoMouse makes your mouse mightier
See http://www.atomicbird.com/mondomouse/
May 15 '07 #4

P: n/a
Tom Harrington wrote:
In article <f8******************************@comcast.com>,
Jerry Stuckle <js*******@attglobal.netwrote:
>Tom Harrington wrote:
>>My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.
Tom,

Perhaps the upgrade replaced their php.ini file. What does phpinfo()
show for "always_populate_raw_post_data"?

phpinfo() shows that it's off.

However the php.ini file on the server was last edited in May 2006,
which has me wondering if this is some kind of undocumented change from
5.1.1 to 5.2.2. If it was off before yesterday then $HTTP_RAW_POST_DATA
shouldn't have ever worked for me.

The docs for always_populate_raw_post_data say that it defaults to
"off", and php.ini isn't turning it on. Maybe it was accidentally
defaulting to "on" in 5.1.1 and 5.2.2 fixed this? Still there's nothing
in the changelogs to indicate this.
I don't think so, but it's been a while since I was on 5.1.x. However,
I seem to remember it defaulting to off way back into the 4.x range.

You can't always go by the date, however. That may be the date of the
default php.ini file which came with 5.2.2. You'd have to check it for
sure.

Or it could be they copied another php.ini file dated May, 2006 on top
of the one they had there. Or maybe they had php compiled to use a
different php.ini file and now this one is being used.

Or a hundred other maybes.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 15 '07 #5

P: n/a
Tom Harrington kirjoitti:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.
Check it out, it's a bug:
http://bugs.php.net/bug.php?id=41293

--
Ra*********@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
May 15 '07 #6

P: n/a
In article <f2**********@nyytiset.pp.htv.fi>,
Rami Elomaa <ra*********@gmail.comwrote:
Tom Harrington kirjoitti:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.

What would have caused this change? I've been using the script for
months without trouble, so having it die on the same day as the 5.2.2
update doesn't seem like it could be a coincidence.

I've worked around the problem by using
file_get_contents("php://input"), but I'd really like to understand why
my script suddenly broke with this udpate.

Check it out, it's a bug:
http://bugs.php.net/bug.php?id=41293
Ooohhh, thanks. Fortunately php://input seems to be working for me.

--
Tom "Tom" Harrington
MondoMouse makes your mouse mightier
See http://www.atomicbird.com/mondomouse/
May 15 '07 #7

P: n/a
At Tue, 15 May 2007 09:17:36 -0600, Tom Harrington let his monkeys type:
My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.
I've worked around the problem by using
file_get_contents("php://input") [...]
This one's new to me. Anyone willing to explain what
file_get_contents("php://input") exactly fetches?
How hould I interpret the 'php' protocol, and what does //input point to?
Tried it on my host, got an empty string.

TIA
Sh.

May 20 '07 #8

P: n/a
Schraalhans Keukenmeester kirjoitti:
At Tue, 15 May 2007 09:17:36 -0600, Tom Harrington let his monkeys type:
>My web host updated yesterday from PHP 5.1.1 to 5.2.2, and one of my
scripts immediately broke, although the 5.2.2 release notes don't seem
to indicate I should have a problem.

The script relied on having $HTTP_RAW_POST_DATA set. Starting yesterday
it's always an empty string.

I guessed that my web host had changed the setting of the
always_populate_raw_post_data flag. However they assure me that their
php.ini did not change with the update.
I've worked around the problem by using
file_get_contents("php://input") [...]

This one's new to me. Anyone willing to explain what
file_get_contents("php://input") exactly fetches?
How hould I interpret the 'php' protocol, and what does //input point to?
Tried it on my host, got an empty string.
Read the fine manual :)
http://fi2.php.net/manual/fi/wrappers.php.php

I suppose if it's empty then it is something you can configure to be set
or not, and it defaults to no supposedly. Actually I got interested in
this as well and I'll try to find if this is something you need to
configure. Looking at my phpinfo() I see a line that says

Registered PHP Streams: zip, php, file, data, http, ftp, compress.bzip2,
compress.zlib, https, ftps

php is mentioned in it so you'd think that it should exist, but alas, I
get an empty string just as well.

Strange. gotta look into this some more...

--
Ra*********@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
May 20 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.