Gaston Posted November 14 Share Posted November 14 Hi to all, I installed php8.3 and apache2 on ubuntu OS 64. I have used php to get data from post request but now I need to get data from chunked data from encoding http header. I found some threads in different forum about this matter and points to edit php.ini or install php-fpm (which I did). In order to get data incoming from post request I use: $data = file_get_contents('php://input'); which needs to disable this variable in php.ini enable_post_data_reading But Im unable to get data incoming from encoding, just empty array. So that is why I installed php-fpm and tried to get again data. But again nothing. I found this thread link in which explain more or less about this issue with php but how do I configure php-fpm? in apache2 default config I got this (see image below) I tried this code also: <?php // phpinfo(); //if($_SERVER['REQUEST_METHOD']=='POST') $data = file_get_contents('php://input'); $file = fopen("data.txt", "w"); fwrite($file, $data); fclose($file); ?> but nothing. So the main question is ...how do i get those data coming from POST request with chunked encoding? How to set apache2 or php to be able to gt those data? By the way..I use tigershark to check http and the data is sent. I tried with normal header and and small php and all work like a charm. But using encoding I can't see nothing at all. Regards Gastón Quote Link to comment https://forums.phpfreaks.com/topic/325484-php-and-apache-trouble-with-http-chunk-encoding/ Share on other sites More sharing options...
Solution requinix Posted November 15 Solution Share Posted November 15 You commented out the SetEnv? Quote Link to comment https://forums.phpfreaks.com/topic/325484-php-and-apache-trouble-with-http-chunk-encoding/#findComment-1640127 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.