====== php7.0-fpm sur Debian 8 ====== Debian 9 n'a plus besoin d'ajouter un dépôt tier. php7.0 est directement dans les dépôts officiels. ===== Information ===== PHP 7 n'est pas disponible par défaut sur Debian8. Il faut donc ajouter le dépôt "**dotdeb**" qui permet de l'installer. Le but est d'utiliser php5-fpm et php7.0-fpm en simultané. ===== Dépôt dotdeb ===== Créer le fichier ''/etc/apt/sources.list.d/dotdeb.list'' et ajouter le contenu suivant : deb http://packages.dotdeb.org jessie all deb-src http://packages.dotdeb.org jessie all Et saisir les commandes suivantes : wget https://www.dotdeb.org/dotdeb.gpg apt-key add dotdeb.gpg apt update ===== Installation des packages ===== apt install php7.0-fpm php7.0 php7.0-sqlite php7.0-mysql php7.0-gd php7.0-curl php7.0-apcu php7.0-xml php7.0-zip php7.0-mbstring ===== Configuration ===== post_max_size = 20M upload_max_filesize = 20M max_execution_time = 60 memory_limit = 128M ; configuration for php ZendOpcache module ; priority=05 zend_extension=opcache.so opcache.memory_consumption = 128 opcache.interned_strings_buffer = 16 opcache.max_accelerated_files = 4000 opcache.revalidate_freq = 10 opcache.fast_shutdown=1 pm = ondemand pm.max_children = 20 pm.process_idle_timeout = 10s pm.max_requests = 500 Pensez à relancer php7.0-fpm : service php7.0-fpm restart ===== Vhost ===== Require all granted AddHandler php-fcgi .php Action php-fcgi /php-fcgi-domain.info Alias /php-fcgi-domain.info /usr/lib/cgi-bin/php-fcgi-domain.info FastCgiExternalServer /usr/lib/cgi-bin/php-fcgi-domain.info -socket /var/run/php/php7.0-fpm.sock -pass-header Authorization -idle-timeout 3600 Pour changer de version de php utilisée, il suffit de pointer dans le vhost sur le bon socket php-fpm. Ceci n'est qu'un extrait du fichier vhost, concernant php7.0-fpm. [[linux:apache_php_mariadb_ssl_letsencrypt|Pour plus d'infos, voir comment installer un serveur web.]] ===== Solutions compatibles php7.0 ===== Liste non exhaustive de mes tests sur php7.0, validés : * [[https://wordpress.org/|Wordpress]] 4.5.3 * [[https://kanboard.net/|Kanboard]] 1.3.0 * [[https://nextcloud.com/|Nextcloud]] 9.0.51 * [[https://www.dokuwiki.org/|Dokuwiki]] Release 2016-06-26 "Elenor of Tsort" * [[http://lychee.electerious.com/|Lychee]] 3.1.2 * [[https://github.com/PrivateBin/PrivateBin|PrivateBin]] 1.1 * [[https://gitlab.com/mojo42/Jirafeau|Jirafeau]] 1.1 * [[http://ezservermonitor.com/|eZ Server Monitor]] 2.5 * [[https://piwik.org|Piwik]] 2.16.2 ===== Sources ===== [[https://angristan.fr/installer-php-7-debian-8-jessie-depot-dotdeb/|angristan.fr]]