I'm doing some changes on a website hosted on a managed dedicated server from Hetzner and I found that somehow some php flags set in .htaccess are passed to PHP running as fastCGI. As far as I was aware, fastCGI/FPM flags need to be set in php.ini, so I'm confused and would like to understand how this trickery works. Unfortunately I have restricted access to the server, so I cannot see the apache setup.
For example, the .htaccess
file has the following configuration (without being wrapped in an IfModule conditional).
php_value memory_limit 256M
php_flag log_errors on
php_value error_log /usr/home/shedrub/php_error.log
And when I run a php page with phpinfo()
I get:
Server API: CGI/FastCGI
Directive Local Value Master Value
memory_limit 96M 96M
log_errors On Off
error_log /[redacted]/php_error.log no value
A couple of interesting points:
- The
memory_limit
flag is not passed or cannot be passed. - If I wrap the block in
.htaccess
with<IfModule mod_php5.c>
, the values are still passed to the php process. - If I change one of the values in .htaccess, it takes a couple of minutes for it to appear in phpinfo. I reckon this is because an old process is still handling requests.
So it feels like this works like a mix of an apache module and fastCGI. Any ideas how this is possible? Or am I missing something about how fastCGI works in apache?