User Tools

Site Tools


linux:webserver:php

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:webserver:php [2016/11/30 11:24]
tkilla [Opcache]
linux:webserver:php [2023/03/25 10:58] (current)
tkilla [Install PHP 7.4 in Debian Buster / SURY REPO]
Line 46: Line 46:
  
  
 +===== PHP Modules =====
 +
 +Wordpress required:
 +
 +   apt install php-iconv php-exif php-memcached php-soap  php-yaml php-imap php-markdown php-readline php-curl  php-opcache  php-zip php-dom php-mbstring php-imagick php-fileinfo php-json php-xml php-simplexml
  
 ===== Apache & PHP-FPM ===== ===== Apache & PHP-FPM =====
Line 118: Line 123:
 Test how much RAM your site needs. This is the max, not the regular used memory. Most sites run with ~100mb, but require more for special tasks. Test how much RAM your site needs. This is the max, not the regular used memory. Most sites run with ~100mb, but require more for special tasks.
   php_admin_value[memory_limit] = 512M    php_admin_value[memory_limit] = 512M 
 +
 +
 +==== PHP-FPM Status Page in Console ====
 +
 +  apt-get install libfcgi0ldbl
 +  
 +  SCRIPT_NAME=/status SCRIPT_FILENAME=/status QUERY_STRING= REQUEST_METHOD=GET cgi-fcgi -bind -connect /var/run/php5-fpm-$VHOSTNAME.sock
 +
 +
 +  * https://www.thatsgeeky.com/2012/02/directly-connecting-to-php-fpm/
 +
  
 ==== php.ini settings ==== ==== php.ini settings ====
Line 163: Line 179:
  
   include hhvm.conf;   include hhvm.conf;
 +
 +
 +===== PHP5-FPM and PHP7.0 parallel Setup =====
 +
 +On debian jessie this works very well. Just install all php7.0 packages from backports.
 +
 +==== Install packages: ====
 +
 +   apt-get install php7.0-mbstring php7.0-apcu php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-imagick php7.0-imap php7.0-intl php7.0-json php7.0-mcrypt php7.0-memcache php7.0-memcached php7.0-mysqlnd php7.0-pspell php7.0-readline php7.0-recode php7.0-snmp php7.0-sqlite php7.0-tidy php7.0-xmlrpc php7.0-xsl
 +   
 +==== Check which version is the default now and adjust: ====
 +
 +  php -v
 +  update-alternatives --co==== Headline ====
 +nfig php
 +
 +==== Nginx Config - just replace the socket: ====
 +
 +  fastcgi_pass unix:/run/php/php7.0-fpm.sock;
 +
 +fastcgi.conf, etc ~should~ be compatible
 +
 +==== PHP7.0-FPM Config: ====
 +
 +edit or copy configs from php5: 
 +  * /etc/php/7.0/fpm/php-fpm.conf
 +  * /etc/php/7.0/fpm/php.ini
 +  * all configs in /etc/php/7.0/mods-available/
 +
 +Pools:
 +Move a site-pool from php5 or create a new one in: /etc/php/7.0/fpm/pool.d/
 +
 +You only need to adjust the socket line, to point to /var/run/php7.0-fpm-SITENAME.sock
 +
 +Check, if all required php modules are installed and configured.. good luck :)
 +
 +===== Install PHP 7.4 in Debian Buster / SURY REPO =====
 +
 +php7.4-fpm needs systemd :(
 +
 +Add Sury Repo:
 +  apt -y install lsb-release apt-transport-https ca-certificates 
 +  wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
 +  echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
 +  apt update
 +  apt install php7.4
 +
 +Install Modules:
 +  apt-get install php7.4-{fpm,bcmath,bz2,intl,gd,mbstring,mysql,zip,mysql,memcache,memcached,xml,json,curl}
 +
 +  /etc/init.d/php7.4-fpm restart
  
  
linux/webserver/php.1480501486.txt.gz ยท Last modified: 2016/11/30 11:24 by tkilla