Install PHP 8.2.0 in CWP
Based On and Credit To:
Sandeep B. – November 26, 2021
https://www.uxlinux.com/install-php-8-1-latest-version-in-cwp-control-panel/
READ ME FIRST
This article is provided as a courtesy.
Installing, configuring, and troubleshooting third-party applications is outside the scope of basic support provided by Starburst Services.
NOTE: ionCube 12.0.x does NOT support PHP 8.2.x as of 12 December 2022.
Below was tested on AlmaLinux 8.7 & CWP 0.9.8.1148
Start with PHP 8.1.13
Compiled in CWP WITHOUT: imagick, ioncube, sodium
dnf install oniguruma oniguruma-devel gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel pcre-devel sqlite-devel libdb-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel libwebp libwebp-devel expat expat-devel libmemcached libmemcached-devel
dnf install libzip libzip-devel
dnf install cmake zlib-devel
cd /usr/local/src
rm -rf libzip*
wget https://libzip.org/download/libzip-1.9.2.tar.gz
tar zxvf libzip*
cd libzip*/
mkdir build
cd build
/usr/bin/cmake3 ..
make && make install
cd /usr/local/src
rm -rf pcre2*
wget https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.41/pcre2-10.41.zip -O pcre2.zip
unzip pcre2.zip
cd pcre2-*/
./configure
make && make install
cd /usr/local/src
rm -rf master* libavif-master*
wget https://github.com/AOMediaCodec/libavif/archive/refs/heads/master.zip
unzip master.zip
cd libavif-main
mkdir build-dir
cd build-dir
cmake ..
make
make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
mkdir -p /usr/local/php-82
cd /usr/local/php-82
wget http://php.net/distributions/php-8.2.0.tar.gz
tar zxvf php-8.2.0.tar.gz
cd php-8.2.0
./configure --with-config-file-path=/usr/local/php --enable-cgi --with-config-file-scan-dir=/usr/local/php/php.d --with-zlib=/usr --enable-mbstring --with-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-curl --with-iconv --with-gmp --with-pspell --enable-gd --with-avif --with-jpeg --with-freetype --enable-gd-jis-conv --with-webp --with-zlib-dir=/usr --with-xpm --with-openssl --with-pdo-mysql=mysqlnd --with-gettext=/usr --with-bz2=/usr --with-mysqli --enable-soap --enable-phar --with-xsl --with-kerberos --enable-posix --enable-sockets --with-external-pcre --with-libdir=lib64 --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-intl --with-password-argon2 --enable-litespeed --with-ldap=/usr --with-ldap-sasl=/usr
make
make install
php -v
You should see (if all went well):
PHP 8.2.0 (cli) (built: Dec 12 2022 17:57:50) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
Now in CWP, you should see:
Did you found this Knowledge Base Article useful?
Please considering thanking our SysOp Team.
KB Article Created: 2022-12-12
people found this article helpful. What about you?