You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to detect when the FPM is in use automatically? It's be nice if it tried to detect that too (and maybe required a path to the conf file).
Well, in my case, I simply gave the path to the php-fpm.conf file, but the report was the same as for php.ini, so the scanner has ignored the settings found there.
One problem is that those files contain several pools and each one can have different PHP settings, so it can be quite complex to report back. Each cell giving advice should have a note about the setting for each pool.
Per example, php.ini has no open_basedir setting, but each pool as a path so that users can't access files outside of their home directory
FAIL | WARNING | | open_basedir | [apps] Path is set, [special] Path is set, [php.ini] Warning...
Here is a template to give you an idea of what it looks like
[DOMAINNAME]
listen = /var/run/php5-fpm/DOMAINNAME.socket
listen.backlog = -1
listen.owner = nginx
listen.group = www-data
listen.mode=0660
; Unix user/group of processes
user = (THE USERNAME OF THE USER THAT OWNS THE SITE FILES)
group = www-data
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
; Pass environment variables
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
; host-specific php ini settings here
; php_admin_value[open_basedir] = /var/www/DOMAINNAME/htdocs:/tmp
The bit at the end is where all the custom PHP values will be added
Activity
enygma commentedon Sep 10, 2014
Is there a way to detect when the FPM is in use automatically? It's be nice if it tried to detect that too (and maybe required a path to the conf file).
oparoz commentedon Sep 10, 2014
Well, in my case, I simply gave the path to the php-fpm.conf file, but the report was the same as for php.ini, so the scanner has ignored the settings found there.
One problem is that those files contain several pools and each one can have different PHP settings, so it can be quite complex to report back. Each cell giving advice should have a note about the setting for each pool.
Per example, php.ini has no open_basedir setting, but each pool as a path so that users can't access files outside of their home directory
FAIL | WARNING | | open_basedir | [apps] Path is set, [special] Path is set, [php.ini] Warning...
enygma commentedon Sep 10, 2014
Hmm, interesting....I'll have to check that out. thanks for the heads up!
oparoz commentedon Sep 10, 2014
Here is a template to give you an idea of what it looks like
The bit at the end is where all the custom PHP values will be added
enygma commentedon Sep 10, 2014
Are they always prefixed with that "php_admin_value"?
oparoz commentedon Sep 10, 2014
You also have the boolean values
php_flag[display_errors] = off
enygma commentedon Sep 10, 2014
cool, thanks