PhpPaket: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 6: Zeile 6:


== Installation ==
== Installation ==
<pre>VERSION=7.4
<pre>
apt install php${VERSION}-cli php${VERSION}-common php${VERSION}-curl php${VERSION}-fpm php${VERSION}-gd php${VERSION}-igbinary \
PHP_VERS=8.2
php${VERSION}-imagick php${VERSION}-imap php${VERSION}-intl php${VERSION}-mbstring \
apt install php$PHP_VERS php$PHP_VERS-cli php$PHP_VERS-common php$PHP_VERS-curl php$PHP_VERS-fpm \
php${VERSION}-memcache php${VERSION}-memcached php${VERSION}-msgpack php${VERSION}-mysql \
  php$PHP_VERS-gd php$PHP_VERS-igbinary php$PHP_VERS-imagick php$PHP_VERS-intl \
php${VERSION}-opcache php${VERSION}-readline php${VERSION}-redis php${VERSION}-xdebug \
  php$PHP_VERS-mbstring php$PHP_VERS-memcached php$PHP_VERS-msgpack php$PHP_VERS-mysql \
php${VERSION}-xml php${VERSION}-zip php${VERSION}-yaml php${VERSION}-json
  php$PHP_VERS-opcache php$PHP_VERS-pgsql php$PHP_VERS-phpdbg php$PHP_VERS-readline  \
  php$PHP_VERS-redis php$PHP_VERS-xdebug php$PHP_VERS-xml php$PHP_VERS-zip
</pre>
</pre>
<pre>add-apt-repository ppa:ondrej/php
<pre>add-apt-repository ppa:ondrej/php

Version vom 20. September 2023, 19:44 Uhr


Links

Installation

PHP_VERS=8.2
apt install php$PHP_VERS php$PHP_VERS-cli php$PHP_VERS-common php$PHP_VERS-curl php$PHP_VERS-fpm \
  php$PHP_VERS-gd php$PHP_VERS-igbinary php$PHP_VERS-imagick  php$PHP_VERS-intl  \
  php$PHP_VERS-mbstring php$PHP_VERS-memcached php$PHP_VERS-msgpack php$PHP_VERS-mysql \
  php$PHP_VERS-opcache php$PHP_VERS-pgsql php$PHP_VERS-phpdbg php$PHP_VERS-readline  \
  php$PHP_VERS-redis php$PHP_VERS-xdebug php$PHP_VERS-xml php$PHP_VERS-zip 
add-apt-repository ppa:ondrej/php
apt-get install php5.6-cli php5.6-common php5.6-curl php5.6-fpm php5.6-gd php5.6-imap \
   php5.6-intl php5.6-json php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-opcache \
   php5.6-readline php5.6-sqlite3 php5.6-xml php5.6-zip 

Error-Logging

  • php.ini:
    • error_log = /var/log/php/php.log
    • log_errors = on
  • im Programm:
    • error_reporting(E_ALL);
    • error_log("=== start");

Wichtige Konfiguration in php.ini

memory_limit = 2048M
upload_max_filesize = 512M
max_file_uploads = 100
post_max_size = 512M
max_execution_time = 600
max_input_time = 600
default_socket_timeout = 600
[Session]
#session.save_handler = files
session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379"

[opcache]
opcache.enable=1
opcache.memory_consumption=1024
opcache.interned_strings_buffer=512

[XDebug]
; Ist normalerweise in xdebug-spezifischer Konfiguration, z.B. mods.d/20-xdebug
;zend_extension="/usr/lib/php/20160303/xdebug.so"
xdebug.remote_port=9004
xdebug.remote_enable=On
xdebug.remote_host=192.168.100.100
; Alternativ: remote-Adresse selber ermitteln:
;xdebug.remote_connect_back=On
xdebug.remote_log=/var/log/php/xdebug.log
xdebug.remote_autostart=1
  • in NGINX:
    • fastcgi_read_timeout 3600s;

Konfiguration ausgeben

php -i