title: “PHP Version updaten (Debian, als fcgid)”
date: 2014-10-23T13:34:46
slug: php-version-updaten-debian-als-fcgid
Gewünschte PHP Version downloaden, kompilieren und installieren.
Beispiel:
./configure --prefix=/usr/share/php56 --datadir=/usr/share/php56 --mandir=/usr/share/man --bindir=/usr/bin/php56 --with-libdir=lib/x86\_64-linux-gnu --includedir=/usr/include/php56 --sysconfdir=/etc/php56/apache2 --with-config-file-path=/etc/php56/apache2 --with-config-file-scan-dir=/etc/php56/conf.d --enable-libxml --enable-session --with-pcre-regex=/usr --enable-xml --enable-simplexml --enable-filter --disable-debug --enable-inline-optimization --disable-rpath --disable-static --enable-shared --with-pic --with-gnu-ld --with-mysql --with-gd --with-jpeg-dir --with-png-dir --with-xpm-dir --enable-exif --with-zlib --with-bz2 --with-curl --with-mysqli --with-freetype-dir --enable-soap --enable-sockets --enable-calendar --enable-ftp --enable-mbstring --enable-gd-native-ttf --enable-bcmath --enable-zip --with-pear --with-openssl --with-imap --with-imap-ssl --with-kerberos --enable-phar --enable-pdo --with-pdo-mysql --with-mysqli --enable-intl --with-mcrypt
make
make install
Alte PHP Version disablen (wenn noch die originale vom OS am Laufen ost)
a2dismod php5
Mod FCGI für Apache installieren
apt-get install libapache2-mod-fcgid
In FCGI Config folgendes eintragen:
<IfModule mod\_fcgid.c>
DirectoryIndex index.php
<FilesMatch "\.php$">
AddHandler fcgid-script .php
FCGIWrapper /usr/bin/php56/php-cgi .php
Options +ExecCGI
</FilesMatch>
FcgidConnectTimeout 20
SocketPath /var/lib/apache2/fcgid/sock
</IfModule>
