About Features Downloads Getting Started Documentation Events Support GitHub

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

administration:php_settings [2018/02/08 14:46] (current)
emaijala created
Line 1: Line 1:
 +====== PHP Settings ======
 +There are several PHP settings that may affect VuFind in different ways. This page lists settings that may be useful. Many of the settings can be set in httpd-vufind.conf (not all, though), but if the server doesn'​t run other software, they can also be simply put into a new file under /etc/php.d (typical in Linux systems) or into php.ini.
 +  * memory_limit - This is one of the most relevant settings. If you use e.g. VuFind'​s hierarchy support, you may need to increase the memory limit. 512M ought to be enough for almost anything!
 +  * session.use_strict_mode - Turn it on. [[http://​php.net/​manual/​en/​session.configuration.php#​ini.session.use-strict-mode|PHP'​s documentation]] says: "Note: Enabling session.use_strict_mode is mandatory for general session security. All sites are advised to enable this."
 +  * session.gc_divisor - On a busy site the default value of 1000 may result in session garbage collection to be run quite frequently. Increasing it to e.g. 10000 reduces this. 
 +  * expose_php - VuFind runs on PHP, but there'​s no need to expose that in every response from the web server, so turning this setting off is recommended.
 +  * max_input_vars - Default is 1000, and while it's enough for most situations, it may need to be increased e.g. for "Renew All" to work if users have more than a 1000 loans.
 +  * pcre.jit - If you encounter mysterious failures when running under PHP 7, turning this off may help. See https://​bugs.php.net/​bug.php?​id=71982 for more information. This may be specific to CentOS.
 +  * error_log - Location of PHP error log. Setting this to a file path makes PHP write all notices, warnings and errors to the file instead of Apache log. 
 +  * display_errors - Whether to display warnings and errors in browser. While VuFind has a nice error handler in development mode, it ignores e.g. PHP notices. Combined with error_reporting=E_ALL makes PHP display them on screen, which can be useful in detecting possible problems even without checking the error log. It is not recommended to use these in production, though!
 +  * opcache.enable - OPcache improves PHP performance with PHP 7.x versions, but turning it off when doing development or setup work may be useful since otherwise old .php files may be used from the memory cache.
administration/php_settings.txt · Last modified: 2018/02/08 14:46 by emaijala