Site problems with PHP-FPM and nginx_apach

Strator

Verified User
Joined
Jan 19, 2011
Messages
250
Not sure where to put this post actually...

I was having some problems with one of my sites ("Failed to read FastCGI header"). Right now I am assuming that I may have caused the problem myself by tinkering with the php.ini file (and doing something wrong).

No problem, so I removed the php.ini file and reinstalled php. New php.ini file is now in place, but my site is now completely messed up. It seems like portions of the code aren't properly read - I can even see some of the php brackets in the output (=not good). Instinctively it seems like probably parts of the site are stored in some cache and need to be reloaded, but how to do it? I restarted apache, php, nginx - even restartet the server - no fix.

I do have opcache activated. Set it to "no" in custombuild and restarted php-fpm - do I need to recompile as well? Also (1) I am not sure if this is the culprit and (2) if it was, I am sure there is an easier fix to clean up the cache than to recompile php.

Any help appreciated!

PS: I also set opcache.enable=0 in php.ini but that didn't do the trick.
 
Please try setting short_open_tag = On in your php.ini file (restart php-fpm service after the changes).
 
Thanks a ton - you are not only a genius, but also a clairvoyant. :)

Concerning the original issue ("Failed to read FastCGI header"), which is fixed now - on the server I was migrating from (PHP 5.5.19 & apache only), I had dl on the disabled functions list. On the new server (PHP 5.6.3 & nginx_apache), I had to enable it to get rid of the above error (on a site running an older version of phpBB). Do you possibly have an idea why?
 
Yes, I do have CentOS7 installed, but I also run DA 1.46.3 so this is not what is (pardon the pun) bugging me.

The error comes up when I put "dl" on php's list of disabled functions and then run the following:
if (function_exists('dl')) {}

503 Service Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

By comparison, I can do this even with "dl" disabled without the page crashing:
dl(trim($extension));
 
Is error reporting enabled? Probably that's the cause? :) Or, it might be a new bug. Error logs might have more info about why it happens.
 
Just to add to the curiosities - as it turned out, certain pages of phpBB still produced this error, and I had to enable passthru as well to get rid of the errors. Like el, passthru was disabled on the last server with apache only.
 
Back
Top