Thomas Hambach - Web engineer

Web development & web design
home   -   portfolio   -   resume -   contact
Vroooooooaaaap, i'm an airplane
February 11th, 2008

always_populate_raw_post_data disabled? here’s a workaround

Since HostGator does not support changing the value of always_populate_raw_post_data in PHP to “1″, I had to find a work around. After spending an hour Googling my issue and it turning zero-dot-zero results I was forced into being creative.

Appearantly you can use the input wrappers to go around this setting. Perhaps you could find this useful in the future

1
2
3
4
5
6
7
8
9
<php
if(!$HTTP_RAW_POST_DATA){
$HTTP_RAW_POST_DATA = file_get_contents(’php://input’);
if(empty($HTTP_RAW_POST_DATA))
{
// die here
}
}

Posted in php, snippets |

Related posts


Leave a Reply

copyright 2008 by http://www.rdlt.com
Entries (RSS) - Register - Log in
Wordpress - RDLT Media - mortgage companies