Hi, I'm running OLSpd 1.7.16 on Ubuntu 22.04 (under CyberPanel 2.3) and I only get php 7.4 up to 8.0
I need 7.2 and 7.3 and I tried the post below, nothing worked. I'm aware that these old versions may not be available in Ubuntu 22 -so I tried to install them manually.
I run below as root
#1 I followed the std procedure by OSLte, but 7.2 - 7.3 are not available.
https://docs.litespeedtech.com/lsws/extapp/php/getting_started/#source
> sudo apt-cache search lsphp // 7.2 - 7.3 do not show up
> wget -O - https://repo.litespeed.sh | sudo bash // add OLSpeed repo
> apt-get install lsphp72 lsphp72-common lsphp72-curl lsphp72-mysql lsphp72-opcache lsphp72-imap lsphp72-opcache
// error: Unable to locate package lsphp72
// The doc says that old php versions may not show up in newer OS versions
// So, I tried to install them manually
#2 I've installed 7.2 and 7.3 on Ubuntu, but how do I tell OSLte to use them?
https://kifarunix.com/install-php-7-1-7-2-7-3-7-4-on-ubuntu-22-04/
> apt-cache policy php
> add-apt-repository ppandrej/php --yes &> /dev/null
> apt update
> apt install php7.2
> apt install php7.3
// now that 7.2 and 7.3 are installed, how OSLte can use them?
#3 Trying to compile PHP source
https://docs.litespeedtech.com/lsws/extapp/php/getting_started/#source
> sudo apt-get install build-essential pkg-config openssl libssl-dev openssl-blacklist openssl-blacklist-extra bison autoconf automake libtool re2c flex libxml2-dev libssl-dev libbz2-dev libcurl4-openssl-dev libdb5.1-dev libjpeg-dev libpng12-dev libXpm-dev libfreetype6-dev libt1-dev libgmp3-dev libc-client2007e-dev libldap2-dev libmcrypt-dev libmhash-dev freetds-dev zlib1g-dev libmysqlclient-dev libncurses5-dev libpcre3-dev unixODBC-dev libsqlite0-dev libaspell-dev libreadline6-dev librecode-dev libsnmp-dev libtidy-dev libxslt-dev libt1-dev
// the above return missing libraries, if I ignore and proceed, I get other errors..
> cd /tmp
> sudo wget https://www.php.net/distributions/php-7.3.31.tar.gz
> sudo tar -xf php-7.3.31.tar.gz
> cd php-7.3.31
// the sudo below return the error: sudo: unable to execute ./configure: Permission denied
// nothing happen if I change chmod to configure
> sudo ./configure '--prefix=/usr/local/lsws/lsphp73' '--with-libdir=lib64' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--with-curl' '--with-openssl' '--with-gettext' '--with-mcrypt' '--enable-mbstring=all' '--enable-mbregex' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--enable-ftp' '--with-imap=/usr' '--with-imap-ssl' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--enable-pcntl' '--with-freetype-dir=/usr' '--with-pdo-mysql=/usr' '--with-litespeed'
// As posted on CyberPanel
https://community.cyberpanel.net/t/php-7-2-7-3-missing/40141
Many thanks
I need 7.2 and 7.3 and I tried the post below, nothing worked. I'm aware that these old versions may not be available in Ubuntu 22 -so I tried to install them manually.
I run below as root
#1 I followed the std procedure by OSLte, but 7.2 - 7.3 are not available.
https://docs.litespeedtech.com/lsws/extapp/php/getting_started/#source
> sudo apt-cache search lsphp // 7.2 - 7.3 do not show up
> wget -O - https://repo.litespeed.sh | sudo bash // add OLSpeed repo
> apt-get install lsphp72 lsphp72-common lsphp72-curl lsphp72-mysql lsphp72-opcache lsphp72-imap lsphp72-opcache
// error: Unable to locate package lsphp72
// The doc says that old php versions may not show up in newer OS versions
// So, I tried to install them manually
#2 I've installed 7.2 and 7.3 on Ubuntu, but how do I tell OSLte to use them?
https://kifarunix.com/install-php-7-1-7-2-7-3-7-4-on-ubuntu-22-04/
> apt-cache policy php
> add-apt-repository ppandrej/php --yes &> /dev/null
> apt update
> apt install php7.2
> apt install php7.3
// now that 7.2 and 7.3 are installed, how OSLte can use them?
#3 Trying to compile PHP source
https://docs.litespeedtech.com/lsws/extapp/php/getting_started/#source
> sudo apt-get install build-essential pkg-config openssl libssl-dev openssl-blacklist openssl-blacklist-extra bison autoconf automake libtool re2c flex libxml2-dev libssl-dev libbz2-dev libcurl4-openssl-dev libdb5.1-dev libjpeg-dev libpng12-dev libXpm-dev libfreetype6-dev libt1-dev libgmp3-dev libc-client2007e-dev libldap2-dev libmcrypt-dev libmhash-dev freetds-dev zlib1g-dev libmysqlclient-dev libncurses5-dev libpcre3-dev unixODBC-dev libsqlite0-dev libaspell-dev libreadline6-dev librecode-dev libsnmp-dev libtidy-dev libxslt-dev libt1-dev
// the above return missing libraries, if I ignore and proceed, I get other errors..
> cd /tmp
> sudo wget https://www.php.net/distributions/php-7.3.31.tar.gz
> sudo tar -xf php-7.3.31.tar.gz
> cd php-7.3.31
// the sudo below return the error: sudo: unable to execute ./configure: Permission denied
// nothing happen if I change chmod to configure
> sudo ./configure '--prefix=/usr/local/lsws/lsphp73' '--with-libdir=lib64' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--with-curl' '--with-openssl' '--with-gettext' '--with-mcrypt' '--enable-mbstring=all' '--enable-mbregex' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--enable-ftp' '--with-imap=/usr' '--with-imap-ssl' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--enable-pcntl' '--with-freetype-dir=/usr' '--with-pdo-mysql=/usr' '--with-litespeed'
// As posted on CyberPanel
https://community.cyberpanel.net/t/php-7-2-7-3-missing/40141
Many thanks