473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

5.2.2 and POST data change?

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
8 3162
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hi all, I have been working on a simple form to collect user data. The form is written in ASP. The target action is a PHP script on a completely different system. The problem I have been...
1
by: Al Stoltz | last post by:
Greetings all. I've got a small web application (just a web interface to a MS-access database) and I recently upgraded ActiveState's python dist. from 2.2 to their latest (2.3.2 I think). In the...
2
by: vm | last post by:
Hi, for some reason my POST is not working properly. I am basically just trying to get a simple stock quote from yahoo by posting the ticker symbol (GE as an example) into finance.yahoo.com. ...
6
by: Pete Mahoney | last post by:
I am trying to 'POST' values from a form in a ASP file that has anonymous access permissions. I can retrieve the form values when I redirect to this page from another page which has also has...
6
by: brian_mckracken | last post by:
This might not be the right group for this question, since its kind of a pure html question... Given the html construct: <form action='index.php?expand=0,10000' method='post'> Email: <input...
4
by: Martin Feuersteiner | last post by:
Dear Group I'm having trouble with the script below. How do I set the RequestType so the script will use POST instead of GET? I tried the script below with no luck. Thanks for your time &...
2
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser ...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
6
by: jackfoust | last post by:
I'm trying to POST from a form a simple username and password onto another website. Firefox and Opera post the data and results are returned successfully. The site returns "missing user id and...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.