This translation is older than the original page and might be outdated. See what has changed.
Translations of this page:
 

PHP-Settings

The installation routine (see below) checks the PHP settings and warns about possible problems. One setting that usually needs to be changed concerns file sizes:

  • By default, PHP only accepts files up to 2 MB when uploading files in a form. If SoSci Survey should also support uploading of media files, this is too little.
    • Therefore, set the value 32M for the value upload_max_filesize in the file php.ini.
    • If the variable post_max_size has a smaller value, enter 32M here as well. The latter also avoids problems with very large questionnaires (e.g. a lot of HTML or PHP code).
    • If the setting memory_limit has a value below 32M, this value must be increased as well, so that the upload of large files works correctly. To really get exactly to the upper limit of 32 MB when uploading, this value must be even slightly higher (e.g. 33M), because SoSci Survey itself also needs some memory.
  • If many files (e.g. images) are to be uploaded in a survey, it makes sense to transfer all images in one step. How many files are transferred at once is controlled by the max_file_uploads setting. The standard configuration with 20 images may be a bit tight and can be increased to e.g. 50 or 100.

The other PHP settings are already suitable for SoSci Survey in a standard installation. The following describes the necessary changes in case the installation routine raises an alarm.

  • PHP's safe mode should be disabled so that scripts are not aborted after 30 seconds.
    • The maximum runtime for PHP script is limited by the PHP setting “max_execution_time”. However, when downloading large data sets or performing server maintenance, it is necessary for the script to be able to override this restriction. This is only possible for the script if PHP is not running in “Safe Mode”.
    • To disable safe mode, look for the entry safe_mode in PHP.INI and enter the value off.
    • It is not useful to change the setting for max_execution_time in PHP.INI. The default value of 30 seconds ensures that incorrectly programmed questionnaires (e.g. with an endless loop) are aborted.
  • SoSci Survey requires a number of PHP modules for proper operation.
    • Required are: `mysql`, `mbstring`, `zip`, `gd`, `curl` and under PHP 5 possibly `pcre` and `zlib`
    • Under Linux these libraries are installed via appropriate packages, e.g. via `sudo apt-get install php-mysql php-mbstring php-zip php-gd php-curl`.
    • Under Windows (e.g. XAMPP) a library can be easily activated by removing the semicolon in front of the corresponding extension line in PHP.INI. Afterwards, the web server must be restarted.
    • After activating/adding modules it may be necessary to restart the web server, under Debian Linux for example using /etc/init.d/apache2 restart.
en/server/php-settings.txt · Last modified: 30.06.2021 13:00 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki