Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
howto:lamp:php_parallel [2014/02/18 12:40]
h.roddewig angelegt
howto:lamp:php_parallel [2018/12/13 15:23] (aktuell)
h.roddewig
Zeile 1: Zeile 1:
-<​code>​aptitude ​install ​bison byacc flex</​code> ​+{{keywords>​anleitung howto 14.04 ubuntu PHP7 PHP5.6 paralell version versionen}} 
 +{{description>​Dieses HowTo erklärt in einzelnen Schritten die Installation und Konfiguration zum parallelbetrieb von PHP 5.6 und PHP 7 auf Ubuntu 14.04 LTS}} 
 +====== HowTo / Anleitung zur Installation mehrere PHP Versionen auf Ubuntu 14.04 LTS====== 
 +Python Software proberties installieren 
 +<​code>​sudo apt-get ​install ​python-software-properties</​code> ​ 
 +\\ 
 +Zusätzliche Packetquellen hinzugügen:​ 
 +<​code>​sudo add-apt-repository ppa:​ondrej/​php</​code>​ 
 +\\ 
 +Packetquellen aktualisieren:​ 
 +<​code>​sudo apt-get update</​code>​ 
 +\\ 
 +PHP 5.6, PHP7 und diverse Module installieren:​ 
 +<​code>​sudo apt-get install libapache2-mod-fastcgi php5.6-fpm php5.6 php5.6-mcrypt php5.6-mbstring php5.6-mysql php5.6-zip php5.6-gd php5.6-xml php7.0-fpm libapache2-mod-fastcgi php7.0-fpm php7.0 php7.0-mcrypt php7.0-mbstring php7.0-mysql php7.0-zip php7.0-gd php7.0-xml</​code>​ 
 +\\ 
 +Apache default vhost anpassen: 
 +<​code>​sudo vim /​etc/​apache2/​sites-enabled/​000-default.conf</​code>​ 
 +Code einfügen:​ 
 +<​code><​IfModule mod_fastcgi.c>​ 
 +  AddHandler php56-fcgi-www .php 
 +  Action php56-fcgi-www /​php56-fcgi-www 
 +  Alias /​php56-fcgi-www /​usr/​lib/​cgi-bin/​php56-fcgi-www 
 +  FastCgiExternalServer /​usr/​lib/​cgi-bin/​php56-fcgi-www -socket /​run/​php/​php5.6-fpm.sock -pass-header Authorization
  
-<code>​./​configure --prefix=/usr/share/php43\ ​--datadir=/usr/share/php43\ ​--mandir=/usr/​share/​man\ ​--bindir=/usr/bin/php43\ ​--includedir=/usr/include\ ​--sysconfdir=/etc/php43/apache2\ ​--with-config-file-path=/etc/php43/apache2\ ​--with-config-file-scan-dir=/etc/php43/conf.d--enable-libxml--enable-session--enable-xml--enable-simplexml--enable-filter--disable-debug--enable-inline-optimization--disable-rpath--disable-static--enable-shared\ --with-pic--with-mysql--with-pdo-mysql--with-gnu-ld--enable-pdo\ --with-gnu-ld</​code>​+  ​<Directory "/usr/lib/cgi-bin">​ 
 +     ​Require all granted 
 +  </Directory>​ 
 +</IfModule>​ 
 + 
 +<​IfModule mod_fastcgi.c>​ 
 +   ​AddHandler php70-fcgi-www .php 
 +   ​Action php70-fcgi-www ​/php70-fcgi-www 
 +   ​Alias ​/php70-fcgi-www /usr/lib/cgi-bin/php70-fcgi-www 
 +   ​FastCgiExternalServer ​/usr/lib/cgi-bin/php70-fcgi-www -socket ​/run/php/php7.0-fpm.sock ​-pass-header Authorization 
 + 
 +   <​Directory "/usr/lib/cgi-bin">​ 
 +      Require all granted 
 +   </Directory>​ 
 +</IfModule>​ 
 +</code> 
 +\\ 
 +PHP 5.6 bzw 7.0 für jeweiligen Vhost aktivieren: ​\\ \\ 
 + 
 +Der folgende Code muss zwischen  
 +<​code>​ 
 +<​VirtualHost *> 
 +..... 
 +</<​VirtualHost>​ 
 +</​code>​ 
 +eingetragen werden. 
 +\\ \\ 
 +PHP5.6: 
 +<​code><​IfModule mod_fastcgi.c>​ 
 +   <​FilesMatch ".+\.ph(p[345]?​|t|tml)$">​ 
 +      SetHandler php56-fcgi-www 
 +   </​FilesMatch>​ 
 +</​IfModule>​ 
 +</​code>​ 
 + 
 +oder 
 +\\ \\ 
 +PHP 7: 
 +<​code>​ 
 +<​IfModule mod_fastcgi.c>​ 
 +   <​FilesMatch ".+\.ph(p[345]?​|t|tml)$">​ 
 +      SetHandler php70-fcgi-www 
 +   </​FilesMatch>​ 
 +</​IfModule>​ 
 +</​code>​