Eu escrevi um programa de linha de comando simples que abre um navegador e envia dados para um determinado URL. Por alguma razão, uma vez que o pedido chega ao meu servidor apache, apache vê os dados do post, mas não consegue enviá-lo para o PHP. Ao tentar
echo var_dump($_POST, true)
Eu vejo uma matriz vazia. Eu configurei o mod_dumpio e posso ver a requisição chegando e os dados do POST estão definitivamente lá (eu dupliquei a linha que mostra o apache recebendo os dados do post para facilitar a localização abaixo):
[Thu Jul 07 08:24:48 2016] [notice] Apache/2.2.22 (Debian) PHP/5.4.36-0+deb7u3 configured -- resuming normal operations
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 17 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): POST / HTTP/1.1\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 47 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept: text/html, application/xhtml+xml, */*\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 49 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Type: application/x-www-form-urlencoded\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept-Language: en-US\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 82 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 32 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept-Encoding: gzip, deflate\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 19 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Host: local.kiosk\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 20 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Length: 34\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Connection: Keep-Alive\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 25 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Cache-Control: no-cache\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 2 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): \r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [readbytes-blocking] 34 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 34 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): mm=7H235727A768&mn=JKIUYRHT0081563
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 271 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): HTTP/1.1 200 OK\r\nDate: Thu, 07 Jul 2016 13:25:22 GMT\r\nServer: Apache/2.2.22 (Debian)\r\nX-Powered-By: PHP/5.4.36-0+deb7u3\r\nVary: Accept-Encoding\r\nContent-Encoding: gzip\r\nContent-Length: 91\r\nKeep-Alive: timeout=5, max=100\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\n\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-IMMORTAL): 10 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-IMMORTAL): \x1f\x8b\b
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 73 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): \xcb\xc9ON\xcc\xb1I*\xd2\xb7\x83\x10\x05E\xa9v\x89EE\x89\x95\n\x1a\\n\n\xea\xb9\xb9\xea\n\xb6v\n\xeaF\xceF\xe6.\xe6F\xe6\x8e\xc6ff\xea:'\x99<\x88\x8c\xbf\xa3\xa7\x97s\x88K\xa8\x81\x81\x85\xa1\x89\xa9)PR\x13
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-POOL): 8 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-POOL): \x89\x02;[T
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOS): 0 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [eatcrlf-nonblocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(127): mod_dumpio: dumpio_in - 11
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 16 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): GET / HTTP/1.1\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 47 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept: text/html, application/xhtml+xml, */*\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept-Language: en-US\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 82 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 32 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Accept-Encoding: gzip, deflate\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 19 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Host: local.kiosk\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Connection: Keep-Alive\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 2 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): \r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 270 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): HTTP/1.1 200 OK\r\nDate: Thu, 07 Jul 2016 13:25:22 GMT\r\nServer: Apache/2.2.22 (Debian)\r\nX-Powered-By: PHP/5.4.36-0+deb7u3\r\nVary: Accept-Encoding\r\nContent-Encoding: gzip\r\nContent-Length: 44\r\nKeep-Alive: timeout=5, max=99\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\n\r\n
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-IMMORTAL): 10 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-IMMORTAL): \x1f\x8b\b
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 26 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): \xcb\xc9ON\xcc\xb1I*\xd2\xb7\x83\x10\x05E\xa9v\x89EE\x89\x95\n\x1a\\x9a
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-POOL): 8 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-POOL): \xac\xb0\x89\xac\x1d
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOS): 0 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [eatcrlf-nonblocking] 0 readbytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(127): mod_dumpio: dumpio_in - 11
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Thu Jul 07 08:25:22 2016] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Thu Jul 07 08:25:27 2016] [debug] mod_dumpio.c(127): mod_dumpio: dumpio_in - 70007
[Thu Jul 07 08:25:27 2016] [debug] mod_dumpio.c(143): mod_dumpio: dumpio_out
[Thu Jul 07 08:25:27 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Thu Jul 07 08:25:27 2016] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOC): 0 bytes
Alguma idéia de por que o PHP não está reconhecendo os dados do post?
Tags php apache-2.2 http