I installed OpenLiteSpeed on a server. Default PHP version was 7.3. I wanted PHP 7.4 on this server. To install PHP 7.4, run
1 |
apt install -y lsphp74 lsphp74-apcu lsphp74-common lsphp74-curl lsphp74-dbg lsphp74-dev lsphp74-igbinary lsphp74-imagick lsphp74-imap lsphp74-intl lsphp74-ioncube lsphp74-json lsphp74-ldap lsphp74-memcached lsphp74-modules-source lsphp74-msgpack lsphp74-mysql lsphp74-opcache lsphp74-pear lsphp74-pgsql lsphp74-pspell lsphp74-redis lsphp74-snmp lsphp74-sqlite3 lsphp74-sybase lsphp74-tidy |
To change PHP version, i edited file
1 |
vi /usr/local/lsws/conf/httpd_config.conf |
Find
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
extProcessor lsphp{ type lsapi address uds://tmp/lshttpd/lsphp.sock maxConns 10 env PHP_LSAPI_CHILDREN=10 env LSAPI_AVOID_FORK=200M initTimeout 60 retryTimeout 0 persistConn 1 pcKeepAliveTimeout respBuffer 0 autoStart 1 path lsphp73/bin/lsphp backlog 100 instances 1 priority 0 memSoftLimit 2047M memHardLimit 2047M procSoftLimit 1400 procHardLimit 1500 } |
In that, find
1 |
path lsphp73/bin/lsphp |
Replace with
1 |
path lsphp74/bin/lsphp |
Now restart PHP and openlitespeed
1 2 |
killall -9 lsphp systemctl restart lsws |
See OpenLiteSpeed […]