ILIAS 8 Install Tutorial for Ubuntu 22.04

General PHP config

  • Because of the fact that the can switch between several PHP versions we have also several files called php.ini
  • The php.ini is the central control file for PHP
  • Lets have a look what we have got:
    • ls /etc/php
  • In my case:
    • 7.1ย  7.4ย  8.0ย  8.2ย  8.3
  • Remeber. We can switch the PHP version using:
    • update-alternatives --config php
  • Everytime you switch you have to check the accoirding php.ini
  • Here we configure PHP8.2:
cd /etc/php/8.0/apache2
mv php.ini php.ini.ori
nano php.ini
  • Paste this in, save and exit:
; Maximum allowed script execution time (e.g., for large file uploads/downloads)
max_execution_time = 3600
 
; Maximum number of input variables (useful for large forms)
max_input_vars = 10000
 
; Maximum amount of memory a script may consume
memory_limit = 2G
 
; Maximum size of POST data (e.g., for file uploads)
post_max_size = 1G
 
; Maximum file size for uploaded files
upload_max_filesize = 1G
 
; Error reporting settings for better security in production environments
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE
display_errors = Off
 
; Session handling settings
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 14400
session.hash_function = 0
session.cookie_httponly = On
session.cookie_secure = On
session.save_handler = files
 
; Allow opening URLs (important for certain functionalities in ILIAS)
allow_url_fopen = 1
 
; OPcache settings for better performance
opcache.enable = 1
opcache.enable_cli = 0
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.save_comments = 1
opcache.revalidate_freq = 1
 
; APCu Cache settings for optimized caching performance
apc.enabled = 1
apc.shm_size = 512M
apc.ttl = 7200
apc.enable_cli = Off
apc.gc_ttl = 3600
apc.entries_hint = 8192
apc.slam_defense = On
apc.serializer = igbinary
 
; Logging settings to improve debugging (optional, adjust as needed)
log_errors = On
error_log = /var/log/php_errors.log
systemctl restart apache2
  • Repeat this for all PHP versions you could use. Its to simple to forget this.
  • If the folder apache2 does not exist, just create it by yourselfe!
cp php.ini /etc/php/8.3/apache2/
 
cp: cannot create regular file '/etc/php/8.3/apache2/': No such file or directory
 
mkdir -p /etc/php/8.3/apache2/


No comment has been posted yet.