Jump to content

Install PHP 8.1 from source in CWP?


Fidolas
Go to solution Solved by Sandeep B.,

Recommended Posts

  • Solution

for php switcher you can build it form source :

follow Step 1 from here 

Step 2 :

mkdir -p /usr/local/php-81
cd /usr/local/php-81
wget http://php.net/distributions/php-8.1.25.tar.gz
tar zxvf php-8.1.25.tar.gz
cd php-8.1.25
./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

 

Link to comment
Share on other sites

In my case I needed these parameters:

--prefix=/opt/alt/php-fpm81/usr --with-config-file-path=/opt/alt/php-fpm81/usr/php --with-config-file-scan-dir=/opt/alt/php-fpm81/usr/php/php.d

to make it work with PHP-FPM selector in CWP. I added it here to help others in my same situation.

Edited by Fidolas
  • Like 1
Link to comment
Share on other sites

  • Sandeep B. changed the title to Install PHP 8.1 from source in CWP?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...