After moving PHP application to 1&1 CentOS 7 VPS server PHP function apache_request_headers() stopped working.
With PHP display_errors set to On, following error is displayed: Call to undefined function apache_request_headers()
With display_errors set to Off, it simply throws: 500 Internal Server Error
apache_request_headers() function is available when PHP is installed as an Apache module. Since PHP 5.4.0 it is also available under FastCGI.
The issue was resolved by switching PHP from FPM to FastCGI. In Plesk interface this can be done following way:
- Websites and Domains > your_domain > PHP Settings
- run PHP as: FastCGI application served by Apache