Hello,
Anybody know to how upgrade php version 8.2. I have a website does not support 8.1 so I need to upgrade the php version to 8.2.
Please can you suggest a method or help me with a topic?
How to use php version 8.2
Ramadhan Mubarak @fayssal
To install php 8.2 on ubuntu
apt-get install lsphp82 lsphp82-common lsphp82-mysql
Prefer from source ?
$ 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
$ cd /tmp
$ wget https://www.php.net/distributions/php-8.2.4.tar.gz
$ tar -xf php-8.2.4.tar.gz
$ cd php-8.2.4
## It is absolutely required to run ./configure with --with-litespeed since we have to build PHP with LSAPI
$ ./configure '--prefix=/usr/local/lsws/lsphp82' '--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'
$ make
$ make install
Then configure PHP 8.2 in WebAdmin console to be used as SAPI app
You need to restart lsws service for these changes to be effected.
service lsws reload
thank you @ josephgodwinke
You too Ramadan Mubarak Bro.
I install ubuntu method but it does’t work with me. please can help me?
i don’t understand the second case prefer from source?
compiling PHP with LSAPI from source
Which part are you stuck ?
apt-get install lsphp82 lsphp82-common lsphp82-mysql
What is the error ?
it installed but it dones’t appear in the php version
It will not appear under CyberPanel until a future release. For now you can use it like this:
i’m sorry i don’t understand you i’m a beginner in that field. please can you explain me step by step.
i login to litespeed webadmin panel console what next step can i do?
Click Virtual Hosts → myphp8.2website → External App → Add new LSAPI app with address uds://tmp/lshttpd/lsphp82.sock
this command is not work for me. is there any problem?
What error do you get ?
message appear:
E: Invalid operation build-essential
Run sudo apt-get update && sudo apt-get install build-essential first if that works revert back here
the command works: sudo apt-get update && sudo apt-get install build-essential
what is the next step?
This whole command - run it
it doesn’t work sir
Did your run
$ apt-get 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
yes i did but it doesn’t work
Any errors
E: Invalid operation build-essential
Which server os is this ?
ubuntu 20 version
$ 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
Run it like that and continue with preceeding steps
@josephgodwinke Can you shared the link from that Server Configuration->External App I did not find it in my CyberPanel.
Thanks

Log into webadmin console and look for the above
Thank you @josephgodwinke
For the users like me that never went into the OpenLiteSpeed webadmin before, the admin panel is served in:
your-ip:7080
Also in the case like me again
that never ever visited before. you need to assign the user/password.
Log in via ssh and run the OpenLiteSpeed admpass.sh in here to assign the credentials.
/usr/local/lsws/admin/misc/admpass.sh
Edit:
I recommend you to login with http://your.server.ip:7080/ since https will logs you out at any click.
Any update for this thread? For me it didnt work also ![]()
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libreadline-dev’ instead of ‘libreadline6-dev’
Note, selecting ‘libxslt1-dev’ instead of ‘libxslt-dev’
Package libdb5.1-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package libpng12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package openssl-blacklist is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘openssl-blacklist’ has no installation candidate
E: Unable to locate package openssl-blacklist-extra
E: Package ‘libdb5.1-dev’ has no installation candidate
E: Package ‘libpng12-dev’ has no installation candidate
E: Unable to locate package libXpm-dev
E: Unable to locate package libt1-dev
E: Unable to locate package unixODBC-dev
E: Unable to locate package libt1-dev
All you need to do now is upgrade CyberPanel to 2.3.5, and you will get PHP 8.2 installed ![]()

02 - Upgrading CyberPanel - Docs / 01 - Install/Upgrade - CyberPanel Community

