Symptoms
When PHP pages are accessed, browser shows 500 error and following is thrown in webspace logs and httpd error_log:
Premature end of script headers: php
Cause
One of the causes is that the /etc/nsswitch.conf
file was modified to exclude ng database. Thus, a php-cgi script is not being executed - the server cannot locate the web user to run the script.
Resolution
Ensure that the file /etc/nsswitch.conf
contains lines:
~# egrep '^passwd|^shado' /etc/nsswitch.conf
passwd: files ng
shadow: files ng
And restart httpd:
~# service httpd restart
Please see KB #114406 for additional details.
NOTE: it might also be necessary to restart redis
and httpd
services for the changes in nsswitch.conf
to take place:
On NG webservers do:
~# service httpd stop ~# service redis stop
On POA Management Node do:
~# chkconfig --list | grep redis
To locate the exact
redis
service that is used with NG. E.g.,redis.75
. Issue:~# service redis.75 restart
On NG webservers do:
~# service redis start ~# service httpd start
Verify that nscd
service is not running, see KB #/121938 for details