Closed
Description
Did a vanilla nginx/unit/php7/wordpress install on a fresh Ubuntu Xenial and noticed that I couldn't log in to wp-admin or post comments. Seems like $_POST doesn't get populated[1]?
Not sure if its a known issue, if it is you can just go ahead and close this. :)
[1]:
Did a simple test to verify:
test.php: <?php print_r($_POST); ?>
$ curl --data "foo=bar" http://host/test.php
Array
(
)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Moving body data before headers for PHP POST.
vladkras commentedon Jan 12, 2018
So, what was wrong? I'm expiriencing same problem. NGINX Unit is installed from latest source from this repo (0.4 so far) and no proxies are used
VBart commentedon Jan 12, 2018
@vladkras that was broken recently and fixed again in b09227f. Have you checked this revision?
vladkras commentedon Jan 12, 2018
Yes, I'm using latest master (and I checked this file too). This what I've got in log with
curl -v --data 'foo=bar' 127.0.0.1:8300
as you can see data was recieved but result was empty
PS I use:
Alpine Linux 3.7 with Docker https://github.com/vladkras/nginx-unit-php7
vladkras commentedon Jan 12, 2018
I added logging to that part
I'm not sure how to set length correctly but now I see
in log. So that patch works but everything else is still like in my previous post.
VBart commentedon Jan 12, 2018
@vladkras it seems the previous attempt to fix isn't complete, please try the following patch:
vladkras commentedon Jan 12, 2018
@VBart yes, this line helps
I'll try to send more data and files too.
Waiting for control socket to be removed...
after unit reconfiguration #610Python: Fix ASGI applications accessed over IPv6.
Ruby: Allow empty response headers.
Ruby: Allow empty response headers.
NJS: avoiding arithmetic ops with NULL pointer in r->args.
19 remaining items