The PHP script in the request is passed my own HTTP header: X-Data-Token

As in the php-script to read it, if the apache_request_headers () function on the server is not available, and naturally it does not appear in the $ _SERVER array .

  • What about the get_headers function? Is she silent too? - And
  • So, judging by the description, it doesn’t do what I need: "it returns all the headers from the server’s response to the HTTP request." I need HTTP headers on the server not for the server’s response, but for the client’s request. - Enshtein
  • Then, except to refer to getallheaders - but she is an alias apache_request_headers, you said, without her. However, except for $ _SERVER, which also comes empty for you, it will not be possible to return anything else. If you just try to look in the direction of the socket and write a separate thread, the request itself from the client. - And
  • And why you do not have access to this function? Not enough PHP version? Maybe worth upgrading? - higimo
  • The hosting costs: PHP - 5.3.3, in FastCGI mode, and according to the documentation: php.net/manual/ru/function.apache-request-headers.php, support for this function in PHP with FastCGI mode is available only from version 5.4 .0. Therefore, probably, I should either upgrade the PHP version or switch PHP to the Apache or CGI module mode. - Enshtein

0