User:Daveh/PHP 8 Install

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Installation[edit]

  • Run (assumes REMI repo is already setup):
    yum install php81
  • Current version installed is 8.1.27
  • Install the following packages:
     php81-php-bcmath
     php81-php-fpm
     php81-php-gd
     php81-php-intl
     php81-php-mbstring
     php81-php-mcrypt
     php81-php-mysqlnd
     php81-php-opcache
     php81-php-pdo
     php81-php-pecl-apcu
     php81-php-pecl-mysql
     php81-php-pecl-memcache
     php81-php-pecl-memcached
     php81-php-pecl-xhprof
     php81-php-pecl-zip
     php81-php-snmp
     php81-php-xml
     php81-php-pecl-luasandbox
  • Edit the PHP FPM config at: /etc/opt/remi/php81/php-fpm.d/www.conf
    access.log = /var/log/httpd/$pool.php81.access.log
    listen = 127.0.0.1:9004
  • Copy custom PHP config:
    cp /etc/php.d/00-php.ini /etc/opt/remi/php81/php.d/
  • Start the FPM process with:
    systemctl start php81-php-fpm
  • Enable the FPM process with:
    systemctl enable php81-php-fpm
  • Enable use of php81 in Apache with the following:
    <FilesMatch \.php$> 
         SetHandler proxy:fcgi://localhost:9004/
    </FilesMatch> 
  • Create symlinks for convenience:
     ln -s /etc/opt/remi/php81/ /etc/php81
     ln -s /var/opt/remi/php81/log/php-fpm/error.log /var/log/httpd/php81error.log 
     ln -s /var/opt/remi/php81/log/php-fpm/www-error.log /var/log/httpd/php81wwwerror.log

Benchmarking[edit]

  • SFWIki Content3 PHP 7.4
  • Main Page = 25 req/s
  • Recent Changes = 16 req/s
  • SFWIki Content3 PHP 8.1
  • Main Page = 21 req/s
  • Recent Changes = 10 req/s