Link

Installing and configuring PHP

ownCloud 10.4.1 on CentOS 8 requires PHP 7.3 to be installed. PHP versions later than 7.3 are not supported. Check the ownCloud Supported Prerequisties for the latest supported PHP version. To install PHP, complete the following steps:

  1. Install the EPEL repository.
     sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    
  2. Next, install yum utils and enable the Remi repository.
     sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
    
  3. After installing yum-utils and Remi packages, search for available PHP modules.
     sudo dnf module list php
    

    The available PHP modules, stream, and installation profiles are listed.

  4. Next, reset PHP to the base version.
     sudo dnf module reset php
    
  5. After resetting the base PHP version, enable the PHP Remi 7.3 module.
     sudo dnf module enable php:remi-7.3
    
  6. Verify the correct PHP version is installed.
     php -v 
    

    You should see a message with the PHP version: PHP 7.3.18.

  7. To complete the PHP installation, install PHP, PHP-FPM (FastCGI Process Manager) and associated PHP modules.
     sudo dnf install php php-opcache php-gd php-curl php-mysqlnd php-intl php-json php-ldap php-mbstring php-xml php-zip
    
  8. Start PHP-FPM.
     sudo systemctl start php-fpm
    

    You should see a message that the PHP-FPM service is active: Active: active (running) since Mon 2020-06-01 22:40:24 GMT; 30s ago

  9. Set PHP-FPM to start automatically at system boot time.
     sudo systemctl enable php-fpm
    
  10. Configure SELinux to allow Apache to execute PHP code with PHP-FPM.
    setsebool -P httpd_execmem 1
    
  11. Restart the Apache web server to allow Apache to start using PHP.
    sudo systemctl restart httpd