About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools

Warning: This page has not been updated in over over a year and may be outdated or deprecated.

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. 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 notices, warnings and errors in browser. VuFind®'s built-in error handler should display these for you in development mode, and in production you never want to expose errors to the end user. Thus, it is generally not recommended to turn this setting on.
  • opcache.enable - OPcache improves PHP performance, 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: 2023/03/28 23:40 by demiankatz