Zum Inhalt springen

PHP Wechseln: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Simon Zeberli (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Simon Zeberli (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
 
Zeile 81: Zeile 81:
log_errors = On
log_errors = On
</syntaxhighlight>
</syntaxhighlight>
==Live Server==
<syntaxhighlight line='line' lang="bash">
;Computech *******************************************************************
;Computech *******************************************************************
;https://queirozf.com/entries/installing-xhprof-php-profiler-on-ubuntu
;https://queirozf.com/entries/installing-xhprof-php-profiler-on-ubuntu
Zeile 162: Zeile 165:
memcache.max_failover_attempts = 40
memcache.max_failover_attempts = 40
cgi.fix_pathinfo=1
cgi.fix_pathinfo=1
<syntaxhighlight line='line' lang="bash">
</syntaxhighlight>
</syntaxhighlight>

Aktuelle Version vom 27. November 2023, 10:48 Uhr

Die PHP Version wechseln müssen einige Einstellungen übernommen werden:

cd /etc/php/7.4/mods-available ergänzen: sudo nano apcu.ini

apc.enabled=1
apc.shm_size=256M

PHP.ini=

;Computech

;xDebug
zend_extension=/usr/lib/php/20210902/xdebug.so
;xdebug.remote_host = 10.14.10.107
;xdebug.remote_enable = true
;xdebug.remote_port = 9000
;xdebug.start_with_request = yes
;xdebug.idekey=ct
;xdebug.extdended_info=1
;xdebug.remote_autostart = true
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_handler=dbgp
xdebug.remote_port=9009
xdebug.remote_autostart=1
xdebug.remote_log="/var/www/xdebug.log"

;OPCache
opcache.enable=1
opcache.memory_consumption=512
opcache.max_accelerated_files=6000
opcache_revalidate_freq = 512
max_execution_time = 300
default_socket_timeout = 300

;PHP Allgemein

file_uploads = On
allow_url_fopen = On
post_max_size = 256M
upload_max_filesize = 128M
max_input_vars = 1500
allow_url_fopen=on;
memory_limit = 512M
upload_max_filesize = 128M
display_errors = on
max_execution_time = 0
max_input_time = -1

cgi.fix_pathinfo=0
extension=ssh2.so;
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
extension=apcu.so
extension=intl.so
extension=yaml.so

; Link:                 https://www.webhosterwissen.de/know-how/eigener-webserver/tutorial-e-mails-mit-eigenem-server-versenden-per-smtp-ubuntu-18-04/
; Einstellungen:        sudo nano /etc/msmtprc
sendmail_path = "/usr/bin/msmtp -t"

extension=uploadprogress
uploadprogress.get_contents=On
uploadprogress.file.filename_template=/tmp/upt_%s.txt
uploadprogress.file.contents_template=/tmp/upload_contents_%s

error_reporting(E_ALL);
ini_set('display_errors', '1');
display_startup_errors = on

;https://queirozf.com/entries/installing-xhprof-php-profiler-on-ubuntu
;sudo pecl install -f xhprof
;extension=xhprof.so
extension = 'amqp.so'

display_errors = On
log_errors = On

Live Server

;Computech *******************************************************************
;https://queirozf.com/entries/installing-xhprof-php-profiler-on-ubuntu
;sudo pecl install -f xhprof
;extension=xhprof.so

; Upload Progressbar
;extension=uploadprogress
uploadprogress.get_contents=On
uploadprogress.file.filename_template=/tmp/upt_%s.txt
uploadprogress.file.contents_template=/tmp/upload_contents_%s

;OPCache
;zend_extension=opcache.so;
max_execution_time =120  ;-1
default_socket_timeout = 60     ;-1
realpath_cache_size=4096K
realpath_cache_ttl=120
opcache.enable=1;
opcache.enable_cli=1;
opcache.memory_consumption=2048;        512
opcache.interned_strings_buffer=16;     64
opcache.max_accelerated_files=20000;    10000
;opcache_revalidate_freq = 10
opcache.fast_shutdown=1;
opcache.revalidate_path=0;
opcache.validate_timestamps=0;          1
opcache.max_file_size=4096;
;opcache.file_cache=/var/www/.opcache;
;opcache.file_cache_only=1;
;opcache.save_comments=1;
opcache.revalidate_freq=0;              2
opcache.optimization_level=0xFFFFFFFF;  2147467263

opcache.use_cwd=1
opcache.file_cache_fallback=0
opcache.file_update_protection=0
opcache.consistency_checks=512

opcache.jit_buffer_size = 256M
opcache.jit = 1255
opcache.jit => tracing
;xDebug
;xdebug.client_enable = true
;xdebug.start_with_request = yes
;xdebug.remote_log="/var/www/xdebug.log"
;#xdebug.client_host = 10.14.30.28
;#zend_extension=/usr/lib/php/20210902/xdebug.so

; Sendmail
; Link:                 https://www.webhosterwissen.de/know-how/eigener-webserver/tutorial-e-mails-mit-eigenem-server-versenden-per-smtp-ubuntu-18-04/
; Einstellungen:        sudo nano /etc/msmtprc
;sendmail_path="/usr/bin/msmtp -t"
sendmail_path ="/usr/local/bin/mhsendmail -t"
; PHP Allgmein
file_uploads=On
allow_url_fopen=On
post_max_size=256M
upload_max_filesize=256M
max_input_vars=1500
memory_limit=2G
display_errors=on
log_errors=on
max_execution_time=300
max_input_time=300
cgi.fix_pathinfo=0              ;1
display_startup_errors=on

;ini_set('display_errors', '1');
;extension=brotli.so

; MySQL
max_input_vars 4000
extension=brotli.so


extension=memcache.so
[memcache]
memcache.chunk_size=24576
memcache.allow_failover = 1
memcache.max_failover_attempts = 40
cgi.fix_pathinfo=1