How to Install/build PHP 7.3 manually on CWP – Centos Web Panel

by Sandy

In this tutorial we’ll cover php 7.3 installation manually via commands on CWP server, it is pretty easy to build the php from source which will drastically increase the performance and stability. To build from source/manually you need to follow this tutorial step by step to achieve php 7.3 version installation. PHP 7.3 required addition configs like libzip please follow the tutorial step by step (don’t miss any)

PHP 5.6/7.0/7.1/7.2https://www.mysterydata.com/how-to-install-build-php-5-6-7-0-7-1-7-2-manually-on-cwp-centos-web-panel/

Step 1

Install the dependencies :

yum -y install 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 icu libicu libicu-devel gmp-devel curl-devel libmcrypt-devel pcre-devel sqlite-devel db4-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel

Step 2

Install EPEL :

yum install epel-release

Then install some more dependencies and remove the libzip package :

rpm -e --nodeps libzip libzip-devel
yum -y install cmake3 cmake zlib-devel --enablerepo=epel

Installing Latest version Libzip from source :

cd /usr/local/src
rm -rf libzip*
wget https://libzip.org/download/libzip-1.5.1.tar.gz
tar zxvf libzip*
cd libzip*
mkdir build
cd build
/usr/bin/cmake3 ..
make && make install

Step 3

Installing php 7.3:

rm -rf /usr/local/php-7-3
mkdir -p /usr/local/php-7-3
cd /usr/local/php-7-3
wget http://php.net/distributions/php-7.3.6.tar.gz
tar zxvf php-7.3.6.tar.gz
cd php-7.3.6
./configure --with-config-file-path=/usr/local/php --with-config-file-scan-dir=/usr/local/php/php.d --with-zlib=/usr --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-tidy --with-curl --with-iconv --with-gmp --with-pspell --with-gd --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-jis-conv --with-zlib-dir=/usr --with-xpm-dir=/usr --with-openssl --with-pdo-mysql=/usr --with-gettext=/usr --with-bz2=/usr --with-mysqli --enable-soap --enable-phar --with-xsl --with-xmlrpc --with-kerberos --enable-posix --enable-sockets --with-pcre-regex --with-libdir=lib64 --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-shmop --enable-intl --with-icu-dir=/usr --with-imap --with-imap-ssl --with-litespeed --with-pgsql=/usr/lib64/pgsql --with-pdo-pgsql 
make && make install

Step 4

Restart apache server and check php version via command :

service httpd restart
php -v

Please note you don’t need to run every time STEP 1 and STEP 2 if you done it previously.

If this post helps you in any way please consider a donation

Donate with PayPal :

md-donate

Donate with Paytm :

md-donate

You may also like

7
Leave a Reply

avatar
5 Comment threads
2 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
6 Comment authors
SandypajafumoAlis UmakArdhia MangkuBloody Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Devesh
Guest

Thank you so much for the tutorial.
I encountered this
virtual memory exhausted: Cannot allocate memory make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
and solved it by adding –disable-fileinfo at the end on the ./configure command
i.e
./configure –with-config-file-path=/usr/local/php –with-config-file-scan-dir=/usr/local/php/php.d –with-zlib=/usr –enable-mbstring –enable-zip –enable-bcmath –enable-pcntl –enable-ftp –enable-exif –enable-calendar –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-wddx –with-tidy –with-curl –with-iconv –with-gmp –with-pspell –with-gd –with-jpeg-dir=/usr –with-freetype-dir=/usr –with-png-dir=/usr –enable-gd-jis-conv –with-zlib-dir=/usr –with-xpm-dir=/usr –with-openssl –with-pdo-mysql=/usr –with-gettext=/usr –with-bz2=/usr –with-mysqli –enable-soap –enable-phar –with-xsl –with-xmlrpc –with-kerberos –enable-posix –enable-sockets –with-pcre-regex –with-libdir=lib64 –with-mysql-sock=/var/lib/mysql/mysql.sock –enable-shmop –enable-intl –with-icu-dir=/usr –with-imap –with-imap-ssl –with-litespeed –with-pgsql=/usr/lib64/pgsql –with-pdo-pgsql –disable-fileinfo

Bloody
Guest
Bloody

Hey nach langem qualvollem testen u. fehlversuchen, habe ich mal deine Version probiert.
Echt Super u. einfach , vielen Dank für dein Tutorial, einfacher gehts wirklich nicht mehr.. 😉

Ardhia Mangku
Guest
Ardhia Mangku

sudo rpm -e –nodeps libzip
getting result:
error: package libzip is not installed

Alis Umak
Guest
Alis Umak

Hi, Thanks for great tutorials. I’ve created a list of your tutorials for CWP Manuals. I’m a newbee for control panels and server planet. There are some points which I couldn’t understand those ; 1-Why do I need CWP if I can do it manually some important part of it. 2-Can I still control them with CWP Panel If I folllow your php, redis or memcahed tuorials which are explained cleanly on your website. 3-On the other hand, cwp is out of date. For example , Redis comes V:3.x(Latest version:5.x) postgresql comes with V:9x (Latest version:11.x). phpPGadmin is not stable… Read more »

pajafumo
Guest
pajafumo

I get this errors after run #php -v PHP Warning: PHP Startup: Unable to load dynamic library ‘intl.so’ (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library ‘intl.so’ (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/intl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library ‘memcache.so’ (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/memcache.so (/usr/local/lib/php/extensions/no-debug-non-zts-20180731/memcache.so:… Read more »