Issue

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

Resolution

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

 

February 2017
PHP 5.4.16
1&1 VPS
CentOS 7

No comments

Leave your comment

In reply to Some User
Captcha Image