Comments on How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (Debian Wheezy)

How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (Debian Wheezy) Since ISPConfig 3.0.5, it is possible to use multiple PHP versions on one server and select the optimal PHP version for a website. This feature works with PHP-FPM (starting with PHP 5.3) and FastCGI (all PHP 5.x versions). This tutorial shows how to build PHP 5.3 and PHP 5.4 as a PHP-FPM and a FastCGI version on a Debian Wheezy server. These PHP versions can be used together with the default PHP (installed through apt) in ISPConfig.

36 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Normen Marienfeld

Hallo zusammen,

Habe alles so gemacht wie im Tutorial beschrieben bleibe aber leider hängen bei:

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a

configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

 x86_64-linux-gnu existiert bei mir gar nicht ?

was kann ich da machen ?

System 

ispconfig 3.0.5.1

Debian 6.0 (Squeeze)

 

By:

Wheezy uses different /lib /lib64 structure than Squeeze does.

 You might need to use --with-libdir=lib64 instead.

 See https://www.howtoforge.com/building-php-5.4-from-source-on-debian-squeeze for Squeeze compatible ./configure.

By: Anonymous

Hallo,

 i have two WHEEZY machines one is with SID and other with stable repositories and both systems have /usr/lib/x86_64-linux-gnu/ folder.

I don't know why your WHEEZY does not contain this folder:

Ask by debian or find this directory and set it in --with-libdir= option.

 

By: likufanele

For Wheezy x32 bit you have to change the configure line from

--with-libdir=/lib/x86_64-linux-gnu \

to:

--with-libdir=/lib \

By: Peterb

these instructions have an error.

This line does not work

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a

After searching the directories, x86_64-linux-gnu does not exist.

The error is ln: filed to create symbolic link

libc-client.a   no such file

 

By: Evil Kitten

Hello, was doing the same with new 5.3.26 and got the error
 configure: error: xml2-config not found. Please check your libxml2 installation.
 had to install  libxml2-dev to fix it.

By: Brian

when I run the step When I use "Make" then Make Install, (Installing PHP-5.3.3). in the console show me this error


 ext/openssl/xp_ssl.o: In function `php_openssl_setup_crypto':                                                              

/usr/local/src/php5-build/php-5.3.3/ext/openssl/xp_ssl.c:353: undefined reference to `SSLv2_server_method'                 

/usr/local/src/php5-build/php-5.3.3/ext/openssl/xp_ssl.c:333: undefined reference to `SSLv2_client_method'                 

collect2: error: ld returned 1 exit status                                                                                 

make: *** [sapi/fpm/php-fpm] Error 1                                                                                       

root@server php5-build/php-5.3.3#

 

 

 How i Can solve this?

By: Julien Meyer

Hello, 

I had the same problem. It's a bug https://bugs.php.net/bug.php?id=54736

Apply the patch debian_patches_disable_SSLv2_for_openssl_1_0_0.patch and it will work. 

 

By: Anonymous

hello!!
For me show this error.
 
checking whether libmemcached supports sasl... no
configure: error: no, libmemcached sasl support is not enabled. Run configure with --disable-memcached-sasl to disable this check
ERROR: `/tmp/pear/temp/memcached/configure --with-libmemcached-dir=no' failed


By: Daniele

i have same problem....

and i unable to install 

 

checking whether libmemcached supports sasl... no
configure: error: no, libmemcached sasl support is not enabled. Run configure with --disable-memcached-sasl to disable this check
ERROR: `/tmp/pear/temp/memcached/configure --with-libmemcached-dir=no' failed

there is not a workaround?????

By:

In installed memcached like this:

cd /tmp

pecl_memcached_ver="2.2.0"
pecl download memcached-${pecl_memcached_ver}
tar xzvf memcached-${pecl_memcached_ver}.tgz
cd memcached-${pecl_memcached_ver}/
/opt/php-5.3.29/bin/phpize
./configure --disable-memcached-sasl --with-php-config=/opt/php-5.3.29/bin/php-config

make
make install

cd ..
rm -r memcached-${pecl_memcached_ver}

nano /opt/php-5.3.29/lib/php.ini


[memcached]
extension=memcached.so

/etc/init.d/php-5.3.29-fpm reload

 

By: Bruno

Thank !

By:

There was an error in dns.c

error: undefined reference to '__dn_expand'


Solution

Add " -lresolv" to EXTRA_LIBS in Makefile.

 

By: Anonymous

Compiling php 5.3.28 on debian jessie (testing) does not work without some changes.
First, freetype.h was not found. In line 32280 I removed

 if test -f "$i/include/freetype2/freetype/freetype.h"; then

 and added

 if test -f "$i/include/freetype2/freetype.h"; then

After that freetype.h was found.

---

checking whether build with IMAP works... no
configure: error: build test failed. Please check the config.log for details.

To solve that error I had to add /usr as path for --with-openssl and --with-imap:
--with-openssl=/usr --with-imap=/usr

By: mustafa

For  FastCGI is this line necessary?

--with-fpm-user=www-data \ --with-fpm-group=www-data \

By: mattheoh

Hi,

I just installed ISP Config 3 on Jessie (debian 8), so I have last PHP version.

I would like to add PHP 5.4.40 version.

I follow this tutorial but I have a problem at this step : cp /opt/php-5.4.40/etc/php-fpm.conf.default /opt/php-5.4.40/etc/php-fpm.conf

I have this return :

cp: cannot stat '/opt/php-5.4.40/etc/php-fpm.conf.default': No such file or directory

 

Can t find anywhere this php-fpm.conf.default

Would you have an idea ?

Thanks !

By: Tarik

Hi Mattheoh,

    Did you find a sulution to your problem as i'm in the same trouble !

   I try to adapt the conf to my links, for me it's not /opt/php-5.3.2.2/* but /usr/local/etc/php-fpm.conf 

   But i didn't find php-fpm.pid anywhere on the server !

   If you found a solution please share it with us.

Thanks for your help,

By: dx007

Hello !

I got an error when i'm running the following command on chapter 4:

apt-get build-dep php5

 

Console:

Note, selecting 'libc-client2007e-dev' instead of 'libc-client-dev'The following packages have unmet dependencies: mysql-server : Depends: mysql-server-5.5 but it is not going to be installedE: Build-dependencies for php5 could not be satisfied.

I can't go further, please can you help ?

Thank you very much !

 

By: Luigi

I followed the "how to" but at the start of php tells me this error

Starting php-fpm Jul 21 21:30:10.081954 [WARNING] Nothing matches the include pattern '/opt/php-5.3.3/etc/pool.d/*.conf' from /opt/php-5.3.3/etc/php-fpm.conf at line 274.Jul 21 21:30:10.082009 [WARNING] [pool www] pm.start_servers is not set. It's been set to 20.................................... failed

Any idea?

 

By: fdsfds

is this reliable ? you have 2 times the same page about installing 5.3, then you also install 5.4 instead of just compiling it... it does not make any sense

By: till

Off course it's reliable and makes sense ;) Read the tutorial closely, you compile php 5.3 as fcgi + php 5.3 as fpm + php 5.3 as fcgi + php 5.4 as fpm, this makes 4 compile sessions altogether as a php binary can only support fpm or fcgi but not both modes at the same time. If you don't want to use PHP in fpm and fcgi mode, then you can leave out either the fpm or fcgi version.

By: gfdg

and a 4th page doing exactly the same

dude are you on something ?

By: till

It's not the same. We have a nice tutorial on diff tools if you can't see the differences on your own at https://www.howtoforge.com/tutorial/compare-merge-text-file-linux-part-2/ and I'll recommend to check out the PHP documentation at php.net if you dont know the differences of a fcgi and a fpm PHP binary.

By: Aivaras

This manual do not work on debian 8.

-----------------------

Connecting to de.php.net (de.php.net)|82.100.240.32|:80... connected.HTTP request sent, awaiting response... 404 Not Found

----------------------------------

Impossible to download any version..

By: till

Your problem is not related to the sue of Debian 8. php.nt has moved the old php versions to the php archive, you can download them from there.

By: Rafael Santana

Hello. Could you explain how to do this now in Debian 8, 3.1 ISPConfig?

By: claudioimai

 Hello. I also had a few problems - since I'm installing PHP 5.2.17 into a Debian Jessie machine, probably.Also, I installed MariaDB instead of MySQL, via the ISPCONFIG 3 auto installer.

The error I found (and could not fix) is:

checking for MySQL support... yeschecking for specified location of the MySQL UNIX socket... nochecking for MySQL UNIX socket location... noconfigure: error: Cannot find MySQL header files under yes.Note that the MySQL client library is not bundled anymore!

The script is searching for /usr/include/mysql/mysql.h (actually the mysql.h file, which I don't have in the server)

I already installed the package libmariadbd-dev, but couldn't proceed anyway.

Any help?

By: claudioimai

Hello, I just wanted to point that I fixed - so far - the problem  with mysql.f

I found it at /usr/include/mariadb/mysql.h

Therefore added the lines in bold at the code as follows:

 for i in $PHP_MYSQL /usr/local /usr; do    if test -r $i/include/mysql/mysql.h; then      MYSQL_DIR=$i      MYSQL_INC_DIR=$i/include/mysql      break    elif test -r $i/include/mysql.h; then      MYSQL_DIR=$i      MYSQL_INC_DIR=$i/include      break    elif test -r $i/include/mariadb/mysql.h; then      MYSQL_DIR=$i      MYSQL_INC_DIR=$i/include/mariadb      break    fi  done

By: Chris

 

When i try to run this ===> /etc/init.d/php-5.4.12-fpm startStarting php-fpm /etc/init.d/php-5.4.12-fpm: line 40: /opt/php-5.4.12/sbin/php-fpm: No such file or directory failed

 

Any ideas how to fix this please?

By: rodolfo

I you install mariadb the comand "apt-get build-dep php5" will give you an error.

You should install:

apt-get install libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg62-turbo-dev libpng12-dev libfreetype6-dev libmysqld-dev postgresql-server-dev-9.4

and then:

mkdir /usr/include/freetype2/freetypeln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h

and with debian 8 php will be compiled just fine

 

By: Tarik

Hi Mattheoh,

    Did you find a sulution to your problem as i'm in the same trouble !

   I try to adapt the conf to my links, for me it's not /opt/php-5.3.2.2/* but /usr/local/etc/php-fpm.conf 

   But i didn't find php-fpm.pid anywhere on the server !

   If you found a solution please share it with us.

Thanks for your help,

By: Maria Font

To install PHP 5.5.38 I had to install some additional dev dependencies:

 

```

  319  apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev  325  apt install libxml2  326  apt install libxml2-dev   328  apt install bzip2  329  apt install libbz2-dev   331  apt install libcurl3  332  apt install curl  335  sudo apt-get install libcurl4-gnutls-dev  337  apt install libjpeg-dev  339  apt install libpng16-dev  341  apt install libfreetype6-dev  343  apt install libpng-dev  344  apt install libfreetype6-dev  346  apt install libkrb5-dev  351  apt install postgresql  353  apt install libpq-dev   355  apt install libxslt1-dev ```

By: Miro

root@vps144432:/usr/local/src/php5-build# wget http://de.php.net/get/php-5.3.22.tar.bz2/from/this/mirror -O php-5.3.22.tar.bz2

--2017-08-31 01:32:42--  http://de.php.net/get/php-5.3.22.tar.bz2/from/this/mirror

Resolving de.php.net (de.php.net)... 82.100.240.32, 212.124.37.9

Connecting to de.php.net (de.php.net)|82.100.240.32|:80... connected.

HTTP request sent, awaiting response... 404 Not Found

2017-08-31 01:32:43 ERROR 404: Not Found.

 

By: jacob
By: NoName

1.

for i386 change line :

ln -s /usr/lib/libc-client.a /usr/lib/i386-linux-gnu/libc-client.

By: NoName

2. and change with this :

--with-libdir=/lib/i386-linux-gnu \