Fetches all HTTP request headers from the current request. Works in the Apache, FastCGI, CLI, FPM and NSAPI server module in Netscape/iPlanet/SunONE webservers.
If you’re running PHP via an FPM socket on UNIX, or using the FastCGI interface, this function will work. The fact is begins with apache is misleading, but is hardly atypical of PHP function naming.
2
Answers
Some people have written their own functions on the PHP docs site.
https://www.php.net/manual/en/function.apache-request-headers.php
See if that helps (haven’t tried it).
As per the documentation:
https://www.php.net/manual/en/function.apache-request-headers.php
If you’re running PHP via an FPM socket on UNIX, or using the FastCGI interface, this function will work. The fact is begins with
apache
is misleading, but is hardly atypical of PHP function naming.