• Synology DS216+, PHP 5.6 에서 7.4로 적용
  • Wordpress, phpMyadmin 7.4 적용을 위한 수정 (Update: Mar 01, 2021)

환경 구성

  • Model: DS216+
  • DSM: v6.2.3-25426 Update 3
  • PHP: v5.6.40-0059
  • PHP74: v7.4.9-0005
  • WordPress: v5.3.2
  • phpMyadmin: v4.9.2-0183
  • Photo Station: v6.8.14-3501
  • MariaDB: v10.3.21-0063

1. 패키지 관리자로 설치된 PHP 7.4 확인

~# ls -al /run/php-fpm/php74-fpm.sock
srw-rw---- 1 http http 0 Feb 28 23:31 /run/php-fpm/php74-fpm.sock

2. phpMyadmin 수정

~# vi /var/packages/phpMyAdmin/target/nginx_conf/www.phpMyAdmin.enable.conf
변경 전: fastcgi_pass unix:/run/php-fpm/php72-fpm.sock;
변경 후: fastcgi_pass unix:/run/php-fpm/php74-fpm.sock;
~# vi /var/packages/phpMyAdmin/INFO
변경 전: install_dep_packages="WebStation>=2.0.0-0065:PHP7.2>=7.2.20-0004"
변경 후: install_dep_packages="WebStation>=2.0.0-0065:PHP7.4>=7.4.9-0005"

3. WordPress 수정

~# vi /var/packages/WordPress/INFO
변경 전: install_dep_packages="WebStation>=2.0.0-0065:MariaDB10:PHP7.2>=7.2.20-0004:Apache2.2>=2.2.31-0005"
변경 후: install_dep_packages="WebStation>=2.0.0-0065:MariaDB10:PHP7.4>=7.4.9-0005:Apache2.2>=2.2.31-0005"
~# vi /var/packages/WordPress/target/synology_added/wordpress.conf
변경 전: FastCgiExternalServer /php-fpm-wordpress-handler -socket /run/php-fpm/php72-fpm.sock -idle-timeout 3600
변경 후: FastCgiExternalServer /php-fpm-wordpress-handler -socket /run/php-fpm/php74-fpm.sock -idle-timeout 3600

4. 추가 확인과 변경 사항

~# php --ini
Configuration File (php.ini) Path: /etc/php
Loaded Configuration File:         /etc/php/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

~# php74 --ini
figuration File (php.ini) Path: /usr/local/etc/php74/cli
ded Configuration File:         /usr/local/etc/php74/cli/php.ini
n for additional .ini files in: /usr/local/etc/php74/cli/conf.d
itional .ini files parsed:      /usr/local/etc/php74/cli/conf.d/extension.   ,
r/local/etc/php74/cli/conf.d/timezone.ini
~# ls -al /usr/local/lib/php74/modules/
total 8
drwxr-xr-x 2 root root 4096 Feb 28 23:15 .
drwxr-xr-x 3 root root 4096 Feb 28 23:15 ..

~# vi /usr/local/etc/php74/cli/php.ini
변경 전: extension_dir = /usr/local/lib/php74/modules
변경 후: extension_dir = /volume1/@appstore/PHP7.4/usr/local/lib/php74/modules
       extension = pdo_mysql.so

5. photo station 수정

; 포토스테이션은 아래처럼 수정했음에도 PHP 7.0 실행을 항상 요구하네요.
; 현재 7.4로 안되지만 다음 수정에 참고하기 위해 남겨 놓습니다.

# vi /var/packages/PhotoStation/conf/PKG_DEPS
변경 전:
[PHP7.0]
pkg_min_ver=7.0.16-0021

변경 후:
[PHP7.4]
pkg_min_ver=7.4.9-0005

참고