Comments on How to compile and install PHP 7.4 as PHP-FPM & FastCGI for ISPConfig 3 on Ubuntu 18.04 LTS
This tutorial shows how to build PHP 7.4 as PHP-FPM and FastCGI version on Ubuntu 18.04 LTS that uses the ISPConfig 3 Hosting Control Panel.
18 Comment(s)
Comments
Thank you very much for this tutorial. I was almost half way through it doing it by myself but I was too insecure to do this on production machines. So I decided to setup a test environment. And then I noticed this now post so I tried it without even reading up on it first. Worked like charm!! I'm confident enough now to also set up php 7.4 on some production machines.
As always, great job!! Keep up the good work!
hello, and thx for the tutorial.
do it work on debian 9?
Please dont advocate this advice. Debsury already has PHP 7.4 packaged.
As soon as you hack out the frame work of using a repo, all bets are off. Thats for security and quality of package building. Please see https://deb.sury.org/
Ubuntu PPA ppa:ondrej/php – the main PHP repository Debian DPA packages.sury.org/php – the main PHP repository for DebianHTH
The pros and cons are listed here already: https://www.howtoforge.com/community/threads/php7-4-is-released.83337/#post-396671
Seems like --with-pear is deprecated.
configure: WARNING: The --with-pear option is deprecated
When try to configure memcache and I get this error:
checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are locatedERROR: `/tmp/pear/temp/memcached/configure --with-php-config=/opt/php-7.4/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes' failed
To solve it is necesary install libmemcached-dev, the library not appear in the prerequisites.
To install the library just execute this:
sudo apt install libmemcached-dev
Hey there, great howto but after setting this up I am getting errors on my cron.
Do 9. Apr 12:42:02 CEST 2020 PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:83
Do 9. Apr 12:42:02 CEST 2020 Stack trace:
Do 9. Apr 12:42:02 CEST 2020 #0 /usr/local/ispconfig/server/lib/app.inc.php(47): db->__construct()
Do 9. Apr 12:42:02 CEST 2020 #1 /usr/local/ispconfig/server/lib/app.inc.php(232): app->__construct()
Do 9. Apr 12:42:02 CEST 2020 #2 /usr/local/ispconfig/security/check.php(32): require('/usr/local/ispc...')
Do 9. Apr 12:42:02 CEST 2020 #3 {main}
Do 9. Apr 12:42:02 CEST 2020 thrown in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 83
Can somebody help me with that please. It is very urgent for me to get this working again :(
PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:83
I'm guessing you probbaly dont have the mysqli extension enabled or installed. You can confirm this by checking your phpinfo() if mysqli extension is there.
Perhaps you left out the --with-mysqli flag while compiling PHP from the command above.
--with-mysqli[=FILE]Include MySQLi support. FILE is the path to mysql_config. If no value or mysqlnd is passed as FILE, the MySQL native driver will be usedThat said, you should listen to what @why said and prefer grabbing instead from the sury.org repository.
For example:
$ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg $ echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list $ sudo apt-get -y update && sudo apt-get -y --no-install-recommends install \ php7.4-cli php7.4-curl php7.4-mysql php7.4-fpm php7.4-common php7.4-xml php7.4-xmlrpc \ php7.4-gd php7.4-imagick php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap \ php7.4-zip
PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:83
I'm guessing you probbaly dont have the mysqli extension enabled or installed. You can confirm this by checking your phpinfo() if mysqli extension is there.
Perhaps you left out the --with-mysqli flag while compiling PHP from the command above.
--with-mysqli[=FILE]Include MySQLi support. FILE is the path to mysql_config. If no value or mysqlnd is passed as FILE, the MySQL native driver will be usedThat said, you should listen to what @why said and prefer grabbing instead from the sury.org repository.
For example:
$ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg $ echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list $ sudo apt-get -y update && sudo apt-get -y --no-install-recommends install \ php7.4-cli php7.4-curl php7.4-mysql php7.4-fpm php7.4-common php7.4-xml php7.4-xmlrpc \ php7.4-gd php7.4-imagick php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap \ php7.4-zip
thanks great work...is there a guide for php 7.4 on centos 7 with ispconfig, or anyone else try this guide on a centos machine ?
Thanks for the tutorial. I suggest to add another (optional) section after the point 3.2 to install imagick module for php-fpm (very useful if you need to host new wordpress websites). I achived this following these steps:
sudo apt-get install libmagickwand-dev libmagickcore-devcd /opt/php-7.4/etc../bin/pecl -C ./pear.conf update-channels../bin/pecl -C ./pear.conf install imagickecho extension=imagick.so >> /opt/php-7.4/lib/php.iniThanks for tuto. Just add pkg-config too the prerequiseites !
apt -y install build-essential nano net-tools autoconf pkg-config@Cedric. These packages are installed by default on any ISPConfig system, that's why they re not listed here again.
Trying to install ISPConfig on Godaddy GenV4 VPS with php7.4. I have tried several interations for "The Perfect Server Ubunto 16.04", then tried "How to use Multiple PHP Ubunto 1210." and this set of instruction. While I have gotten through this set of instructions with no errors, a simple php page of
dies with only a cryptic message in the error.log No such file or directory: [client xxx.xxx.xxx] FastCGI: failed to connect to server "/var/www/clients/client0/web1/cgi-bin/php-fcgi-*-80 What is the right recipe for getting php7.4 working with ISPConfig on a Ubunto 16.04 server?
Under step 3 i had to change --with-libdir=/lib/x86_64-linux-gnu to --with-libdir=/lib/ and i had to skip making the symlink.
I have ISPconfig version: 3.2.4 and did the installation of PHP 7.4 as instructed above. Since I host mostly WordPress sites, I did NOT install Memcache and xDebug.
My VPS runs Ubuntu v18.04 with the NGINX web server. I did enter the info you provided under the FastCGI Settings tab but I assume I didn't have to since I'm not running Apache?
My QUESTION:
When adding PHP 7.4 in the PHP FPM Setting tab, you provide three values above (in this tutorial). However, there are actually four fields.
What string do I use for the last field labelled: "PHP-FPM socket directory" ??
Thank you.
You can leave the socket directory field empty. ISPConfig will use the default socket directory then.
I don't understand how you know wich version to install