Sign inSign up

docphpro/php

By docphpro

•Updated over 4 years ago

Image
0

10K+

docphpro/php repository overview

⁠PHP

  • composer
  • php-fpm
  • xdebug

⁠adds php-fpm configuration -> /usr/local/etc/php-fpm.d/www.conf⁠

[www]
[www]
user = root
group = root
listen = [::]:9000
listen.owner = root
listen.group = root
pm = dynamic
pm.max_children = 50
pm.start_servers = 25
pm.min_spare_servers = 25
pm.max_spare_servers = 35
pm.max_requests = 500

⁠php-ini.development standard

engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
realpath_cache_size = 1M
realpath_cache_ttl = 12000
zend.enable_gc = On
zend.exception_ignore_args = Off
expose_php = On
max_execution_time = 300
max_input_time = 300
max_input_vars = 10000
memory_limit = -1
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 300M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 250M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
cli_server.color = On
date.timezone = Europe/Brussels
pdo_mysql.default_socket=
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = On
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
bcmath.scale = 0
session.save_handler = files
session.save_path = "/var/lib/php/sessions"
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
zend.assertions = 1
tidy.clean_output = Off
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 50
ldap.max_links = -1

⁠php-overrides.ini example -> /usr/local/etc/php/conf.d/00_php-ini-overrides.ini

sendmail_path = /usr/sbin/sendmail -S phpro-mailhog:1025
session.save_path = /var/lib/php/sessions
session.save_handler = redis
session.save_path = "tcp://phpro-redis:6379?auth=yourverycomplexpasswordhere"

⁠php-opcache.ini -> /usr/local/etc/php/conf.d/00_php-opcache.ini

opcache.enable = 1
opcache.enable_cli = 0
opcache.max_accelerated_files = 100000
opcache.memory_consumption = 192
opcache.interned_strings_buffer = 16
opcache.max_wasted_percentage = 5
opcache.validate_timestamps = 0
opcache.validate_permissions = 0
opcache.revalidate_path = 0
opcache.revalidate_freq = 2
opcache.max_file_size = 0
opcache.blacklist_filename = /usr/local/etc/php/conf.d/blacklist.txt

⁠xdebug example -> /usr/local/etc/php/conf.d/90-xdebug.ini

⁠Environment variables:
  • XDEBUG_SESSION="XDEBUG_PHPSTORM"
  • XDEBUG_MODE=debug
zend_extension="xdebug.so"
; REMOTE Debugging with your IDE
xdebug.mode=off
xdebug.start_with_request=trigger
xdebug.discover_client_host=yes
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.remote_handler=dbgp
⁠Automatically Starting the Debugger

The xdebug.remote_autostart setting has been removed. Instead, set xdebug.start_with_request to yes.

⁠Starting the Debugger During a Request

In Xdebug 3 calling xdebug_break() will only initiate a debugging session when xdebug.start_with_request is set to trigger.

It will no longer trigger a debugging session when xdebug.start_upon_error=yes (the replacement for Xdebug 2's xdebug.remote_mode=jit).

A debug session will be initiated upon a PHP Notice or Warning, or when a Throwable is thrown, when xdebug.start_upon_error is set to yes, regardless of what the value for xdebug.start_with_request is.

⁠XDEBUG_MODE ENV Docker

Besides setting the mode with xdebug.mode, you can also set the mode with the XDEBUG_MODE environment variable. If this environment variable is active, it overrides the mode as set through xdebug.mode.

xdebug.remote_mode For the req value (the original default), use xdebug.mode=debug with xdebug.start_with_request=trigger. If the original xdebug.remote_autostart behaviour is necessary, use xdebug.start_with_request=yes instead of trigger.

Feel free to change these as volumes overwrite the defaults

⁠For linux

add to docker-compose.yml

    extra_hosts:
      - "host.docker.internal:host-gateway"

Tag summary

Content type

Image

Digest

Size

236.1 MB

Last updated

almost 5 years ago

docker pull docphpro/php:8.1.0-dev