2
Galera I need your help.
My restfull client application is sending a header called 'Auth' with an authentication token to the PHP server. When I do the tests with a server running on localhost everything works great. However, when I put the same code on the Localweb server doesn’t work, I can’t recover the header, the code below always falls on Else as if I wasn’t sending the header.
function authenticateApp() {
$headers = apache_request_headers();
if (isset($headers["Authorization"])) {
//Se o header foi existe faz os teste de autenticação;
} else {
//Se não foi passado retorna um código de erro
//No localhost funciona, no servidor da Localweb sempre cai aqui.
}
}
Note: that in both localhost and localweb I am using version 5.6 of PHP. My local machine is Windows and the server is Linux, does it have something to do?
of a print_r on the variable $headers and post the return here.
– Hiago Souza
Thanks for the comment Hiago Souza, thanks to him I was able to solve.
– Adriano Neris
That’s it :) (Y)
– Hiago Souza