diff --git a/.env b/.env index 9779d512..10888786 100644 --- a/.env +++ b/.env @@ -15,8 +15,8 @@ ###> docker ### REDIS_HOST=redis -PHPFPM_HOST=php -PHPFPM_CANARY_HOST=php +PHPFPM_HOST=phpfpm +PHPFPM_CANARY_HOST=phpfpm RESOLVER_IP=127.0.0.11 DARK_CANARY_THRESHOLD=0 # 0% ENABLE_CW=0 diff --git a/docker-compose.yml b/docker-compose.yml index 44a2f545..e9a4b40d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,37 +1,35 @@ version: '3.8' services: - webserver: - image: bref/fpm-dev-gateway - container_name: badge-poser-bref + nginx: + build: + context: . + dockerfile: sys/docker/alpine-nginx/Dockerfile + network: host + container_name: badge-poser-nginx + env_file: + - ./.env + - ./.env.local depends_on: - - php + - phpfpm deploy: resources: limits: cpus: '0.25' memory: 128M - env_file: - - ./.env - - ./.env.local environment: - ENABLE_CW=0 ports: - 8001:80 volumes: - .:/var/task - environment: - HANDLER: public/index.php - DOCUMENT_ROOT: public - php: -# image: bref/php-80-fpm-dev + phpfpm: build: context: . - #dockerfile: sys/docker/alpine-phpfpm/Dockerfile - dockerfile: sys/docker/Dockerfile + dockerfile: sys/docker/bref-phpfpm/Dockerfile network: host - container_name: badge-poser-php + container_name: badge-poser-phpfpm volumes: - .:/var/task:ro depends_on: diff --git a/sys/README.md b/sys/README.md index 5631f786..fbd5d2b4 100644 --- a/sys/README.md +++ b/sys/README.md @@ -26,7 +26,7 @@ aws ecr get-login-password --profile badge-poser | docker login --password-stdin VER=$(date +%s); docker build -t $ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/badge-poser:nginx-$VER -f sys/docker/alpine-nginx/Dockerfile . -docker build -t $ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/badge-poser:phpfpm-$VER -f sys/docker/alpine-phpfpm/Dockerfile . +docker build -t $ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/badge-poser:phpfpm-$VER -f sys/docker/bref-phpfpm/Dockerfile . docker push $ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/badge-poser:nginx-$VER docker push $ACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/badge-poser:phpfpm-$VER @@ -45,25 +45,3 @@ docker-compose up npm install artillery ./node_modules/.bin/artillery run sys/docker/artillery.yml ``` - - -# COMPILE BREF - -## BREF - -``` -cd runtime -cd base ; docker build --file php-74.Dockerfile -t bref/build-php-74 --target build-environment . -cd base ; docker build --file php-74.Dockerfile -t bref/tmp/cleaned-build-php-74 . -cd layers/function ; docker build -t bref/php-74 --build-arg PHP_VERSION=74 . -cd layers/fpm ; docker build -t bref/php-74-fpm --build-arg PHP_VERSION=74 . -cd layers/fpm ; docker build -t fabiocicerchia/bref-php-74-fpm --build-arg PHP_VERSION=74 . -cd layers/fpm-dev ; docker build -t bref/php-74-fpm-dev --build-arg PHP_VERSION=74 . -cd layers/fpm-dev ; docker build -t fabiocicerchia/bref-php-74-fpm-dev --build-arg PHP_VERSION=74 . -``` - -## BREF-EXTRA - -``` -cd layers/gd; docker build -t fabiocicerchia/bref-extra-gd-php-74 . --build-arg PHP_VERSION=74 -``` diff --git a/sys/cloudformation/stack.yaml b/sys/cloudformation/stack.yaml index fe4a7dc5..ed6aca58 100644 --- a/sys/cloudformation/stack.yaml +++ b/sys/cloudformation/stack.yaml @@ -375,9 +375,9 @@ Resources: ContainerDefinitions: - Name: 'phpfpm' PortMappings: - - HostPort: 9000 + - HostPort: 9001 Protocol: tcp - ContainerPort: 9000 + ContainerPort: 9001 Environment: - Name: APP_ENV Value: !Ref EnvAPPENV diff --git a/sys/docker/Dockerfile b/sys/docker/Dockerfile deleted file mode 100644 index 85744b7d..00000000 --- a/sys/docker/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM bref/php-80-fpm-dev - -COPY --from=bref/extra-gd-php-80 /opt /opt -COPY --from=bref/extra-imagick-php-80 /opt /opt -COPY --from=bref/extra-redis-php-80 /opt /opt -COPY --from=bref/extra-yaml-php-80 /opt /opt - -ENV LD_LIBRARY_PATH=/opt/bref/lib64:/opt/bref/lib diff --git a/sys/docker/alpine-nginx/Dockerfile b/sys/docker/alpine-nginx/Dockerfile index f473f905..7f0f94e0 100644 --- a/sys/docker/alpine-nginx/Dockerfile +++ b/sys/docker/alpine-nginx/Dockerfile @@ -1,4 +1,4 @@ -FROM fabiocicerchia/nginx-lua:1.19.4-alpine3.12.1 +FROM fabiocicerchia/nginx-lua:1.21.0-alpine3.13.5 ENV RUN_IN_CONTAINER="True" diff --git a/sys/docker/alpine-phpfpm/Dockerfile b/sys/docker/alpine-phpfpm/Dockerfile deleted file mode 100644 index 9fdeb396..00000000 --- a/sys/docker/alpine-phpfpm/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM php:8.0.3-fpm-alpine3.13 - -ENV RUN_IN_CONTAINER="True" - -RUN apk add --no-cache --virtual .builddeps \ - autoconf \ - g++ \ - gcc \ - make \ - unzip \ - wget \ - && apk add --no-cache \ - freetype-dev \ - git \ - icu-dev \ - jpeg-dev \ - libpng-dev \ - libzip-dev \ - oniguruma-dev \ - yaml-dev \ - zlib-dev \ - && docker-php-ext-configure gd --with-freetype --with-jpeg \ - && docker-php-ext-install -j"$(nproc)" \ - bcmath \ - gd \ - intl \ - mbstring \ - opcache \ - zip \ - && wget https://github.com/FriendsOfPHP/pickle/releases/download/v0.6.0/pickle.phar -O /usr/local/bin/pickle \ - && chmod +x /usr/local/bin/pickle \ - && pickle install yaml@2.1.0 --defaults --no-interaction \ - && pickle install redis@5.3.2 --defaults --no-interaction \ - # && pickle install msgpack@2.1.1 --defaults --no-interaction \ - && ln -nfs /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini - -COPY sys/php/php.ini /usr/local/etc/php/php.ini -COPY sys/php/docker-php-ext-opcache8.ini /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini -COPY sys/php/php-fpm.conf /usr/local/etc/php-fpm.conf -COPY sys/php/www.conf /usr/local/etc/php-fpm.d/www.conf -COPY sys/php/zz-docker8.conf /usr/local/etc/php-fpm.d/zz-docker8.conf -COPY --from=awsbuilder /tmp /tmp -COPY --from=awsbuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=awsbuilder /opt/aws/amazon-cloudwatch-agent /opt/aws/amazon-cloudwatch-agent - -WORKDIR /application - -COPY . /application -COPY --from=jsbuilder /application/public/build /application/public/build - -# REF: https://github.com/docker-library/php/issues/240 -RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv -ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so - -COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer - -RUN /usr/local/bin/composer install --optimize-autoloader --no-ansi --no-interaction --no-progress \ - && apk del .builddeps \ - && php-fpm -t \ - && php-fpm -tt - -RUN mkdir -p /application/var/cache && chmod 777 /application/var/cache -RUN mkdir -p /application/var/log && chmod 777 /application/var/log - -ENTRYPOINT ["/application/sys/docker/alpine-phpfpm/start.sh"] - -CMD ["php-fpm"] diff --git a/sys/docker/bref-phpfpm/Dockerfile b/sys/docker/bref-phpfpm/Dockerfile new file mode 100644 index 00000000..34442a09 --- /dev/null +++ b/sys/docker/bref-phpfpm/Dockerfile @@ -0,0 +1,27 @@ +FROM bref/php-80-fpm-dev + +ENV LD_LIBRARY_PATH=/opt/bref/lib64:/opt/bref/lib + +COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer +COPY --from=bref/extra-gd-php-80 /opt /opt +COPY --from=bref/extra-imagick-php-80 /opt /opt +COPY --from=bref/extra-redis-php-80 /opt /opt +COPY --from=bref/extra-yaml-php-80 /opt /opt +COPY --from=awsbuilder /tmp /tmp +COPY --from=awsbuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=awsbuilder /opt/aws/amazon-cloudwatch-agent /opt/aws/amazon-cloudwatch-agent +COPY sys/php/php.ini /opt/bref/etc/php/php.ini +COPY sys/php/docker-php-ext-opcache8.ini /opt/bref/etc/php/conf.d/ext-opcache.ini +COPY sys/php/php-fpm.conf /opt/bref/etc/php-fpm.conf.default +COPY sys/php/www.conf /opt/bref/etc/php-fpm.d/www.conf.default + +COPY . /var/task + +WORKDIR /var/task + +RUN /usr/local/bin/composer install --optimize-autoloader --no-ansi --no-interaction --no-progress \ + && php-fpm -t \ + && php-fpm -tt + +ENTRYPOINT ["/var/task/sys/docker/bref-phpfpm/start.sh"] +CMD /opt/bin/php-fpm --nodaemonize --fpm-config /opt/bref/etc/php-fpm.conf -d opcache.validate_timestamps=1 --force-stderr diff --git a/sys/docker/alpine-phpfpm/start.sh b/sys/docker/bref-phpfpm/start.sh similarity index 100% rename from sys/docker/alpine-phpfpm/start.sh rename to sys/docker/bref-phpfpm/start.sh diff --git a/sys/nginx/default.conf.template b/sys/nginx/default.conf.template index 42421fb2..a40b6192 100644 --- a/sys/nginx/default.conf.template +++ b/sys/nginx/default.conf.template @@ -25,7 +25,7 @@ server { listen 80; server_name poser.pugx.org poser.packagist.org poser.local stg.poser.pugx.org; - root /application/public; + root /var/task/public; if ($request_uri ~ "/dark-canary/") { set $skip_cache 1; } @@ -75,7 +75,7 @@ server { return string.gsub(ngx.var.document_uri, "/dark%-canary", "") } - fastcgi_pass ${PHPFPM_CANARY_HOST}:9000; + fastcgi_pass ${PHPFPM_CANARY_HOST}:9001; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; @@ -83,7 +83,7 @@ server { fastcgi_param REQUEST_URI $request_url; fastcgi_param DOCUMENT_URI $document_url; fastcgi_param SCRIPT_NAME /index.php; - fastcgi_param SCRIPT_FILENAME /application/public/index.php; + fastcgi_param SCRIPT_FILENAME /var/task/public/index.php; fastcgi_param DOCUMENT_ROOT $realpath_root; } @@ -118,7 +118,7 @@ server { # local = phpfpm # aws = 127.0.0.1 - fastcgi_pass ${PHPFPM_HOST}:9000; + fastcgi_pass ${PHPFPM_HOST}:9001; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; diff --git a/sys/php.ini b/sys/php.ini deleted file mode 100644 index 1428d33a..00000000 --- a/sys/php.ini +++ /dev/null @@ -1,4 +0,0 @@ -extension=/opt/bref-extra/gd.so -extension=/opt/bref-extra/imagick.so -extension=/opt/bref-extra/redis.so -extension=/opt/bref-extra/yaml.so diff --git a/sys/php/docker-php-ext-opcache.ini b/sys/php/docker-php-ext-opcache.ini deleted file mode 100644 index 5a0bb8df..00000000 --- a/sys/php/docker-php-ext-opcache.ini +++ /dev/null @@ -1,131 +0,0 @@ -; Enable Zend OPcache extension module -zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/opcache.so - -; Determines if Zend OPCache is enabled -opcache.enable=1 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -opcache.memory_consumption=256 - -; The amount of memory for interned strings in Mbytes. -opcache.interned_strings_buffer=8 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 1000000 are allowed. -opcache.max_accelerated_files=20000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 -opcache.validate_timestamps=0 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; If enabled, a fast shutdown sequence is used for the accelerated code -; Depending on the used Memory Manager this may cause some incompatibilities. -;opcache.fast_shutdown=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0xffffffff - -;opcache.inherited_hack=1 -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. -opcache.blacklist_filename=/etc/php.d/opcache*.blacklist - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -; RPM note : file cache directory must be owned by process owner -; for mod_php, see /etc/httpd/conf.d/php.conf -; for php-fpm, see /etc/php-fpm.d/*conf -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Implies opcache.file_cache_only=1 for a certain process that failed to -; reattach to the shared memory (for Windows only). Explicitly enabled file -; cache is required. -;opcache.file_cache_fallback=1 - -; Validate cached file permissions. -; Leads OPcache to check file readability on each access to cached file. -; This directive should be enabled in shared hosting environment, when few -; users (PHP-FPM pools) reuse the common OPcache shared memory. -;opcache.validate_permission=0 - -; Prevent name collisions in chroot'ed environment. -; This directive prevents file name collisions in different "chroot" -; environments. It should be enabled for sites that may serve requests in -; different "chroot" environments. -;opcache.validate_root=0 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -opcache.huge_code_pages=1 - diff --git a/sys/php/docker-php-ext-opcache8.ini b/sys/php/docker-php-ext-opcache8.ini index 3d02d53e..6f035d10 100644 --- a/sys/php/docker-php-ext-opcache8.ini +++ b/sys/php/docker-php-ext-opcache8.ini @@ -1,6 +1,3 @@ -; Enable Zend OPcache extension module -zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20200930/opcache.so - ; Determines if Zend OPCache is enabled opcache.enable=1 diff --git a/sys/php/php-fpm.conf b/sys/php/php-fpm.conf index 6920b2cf..946ca0e3 100644 --- a/sys/php/php-fpm.conf +++ b/sys/php/php-fpm.conf @@ -15,6 +15,7 @@ ; Note: the default prefix is /usr/local/var ; Default Value: none ;pid = run/php-fpm.pid +pid = /tmp/php-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written @@ -51,6 +52,8 @@ log_level = warning ; when logging to syslog. ; Default Value: 1024 ;log_limit = 4096 +; New PHP 7.3 option that includes the maximum length when writing to stderr +log_limit = 8192 ; Log buffering specifies if the log line is buffered which means that the ; line is written in a single write operation. If the value is false, then the @@ -146,4 +149,3 @@ process_control_timeout = 10s ; - the global prefix if it's been set (-p argument) ; - /usr/local otherwise include=etc/php-fpm.d/*.conf - diff --git a/sys/php/php.ini b/sys/php/php.ini index 8ad33c27..8ad64b1b 100644 --- a/sys/php/php.ini +++ b/sys/php/php.ini @@ -88,6 +88,7 @@ ;;;;;;;;;;;;;;;;;;; ; Quick Reference ; ;;;;;;;;;;;;;;;;;;; + ; The following are all the settings which are different in either the production ; or development versions of the INIs with respect to PHP's default behavior. ; Please see the actual settings later in the document for more details as to why @@ -99,12 +100,12 @@ ; Production Value: Off ; display_startup_errors -; Default Value: Off +; Default Value: On ; Development Value: On ; Production Value: Off ; error_reporting -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +; Default Value: E_ALL ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT @@ -153,6 +154,16 @@ ; Development Value: "GPCS" ; Production Value: "GPCS" +; zend.exception_ignore_args +; Default Value: Off +; Development Value: Off +; Production Value: On + +; zend.exception_string_param_max_len +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 + ;;;;;;;;;;;;;;;;;;;; ; php.ini Options ; ;;;;;;;;;;;;;;;;;;;; @@ -354,21 +365,31 @@ zend.enable_gc = On ; If enabled, scripts may be written in encodings that are incompatible with ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such ; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off ;zend.multibyte = Off ; Allows to set the default encoding for the scripts. This value will be used ; unless "declare(encoding=...)" directive appears at the top of the script. ; Only affects if zend.multibyte is set. -; Default: "" ;zend.script_encoding = -; Allows to include or exclude arguments from stack traces generated for exceptions -; Default: Off +; Allows to include or exclude arguments from stack traces generated for exceptions. ; In production, it is recommended to turn this setting on to prohibit the output ; of sensitive information in stack traces +; Default Value: Off +; Development Value: Off +; Production Value: On zend.exception_ignore_args = On +; Allows setting the maximum string length in an argument of a stringified stack trace +; to a value between 0 and 1000000. +; This has no effect when zend.exception_ignore_args is enabled. +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 +; In production, it is recommended to set this to 0 to reduce the output +; of sensitive information in stack traces. +zend.exception_string_param_max_len = 0 + ;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; @@ -462,7 +483,7 @@ memory_limit = 192M ; E_ALL & ~E_NOTICE (Show all errors, except for notices) ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +; Default Value: E_ALL ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT ; http://php.net/error-reporting @@ -486,11 +507,9 @@ error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_errors = Off ; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. We strongly recommend you -; set this to 'off' for production servers. -; Default Value: Off +; separately from display_errors. We strongly recommend you set this to 'off' +; for production servers to avoid leaking configuration details. +; Default Value: On ; Development Value: On ; Production Value: Off ; http://php.net/display-startup-errors @@ -528,19 +547,9 @@ ignore_repeated_source = Off ; http://php.net/report-memleaks report_memleaks = On -; This setting is on by default. +; This setting is off by default. ;report_zend_debug = 0 -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; This directive is DEPRECATED. -; Default Value: Off -; Development Value: Off -; Production Value: Off -; http://php.net/track-errors -;track_errors = Off - ; Turn off normal error reporting and emit XML-RPC error XML ; http://php.net/xmlrpc-errors ;xmlrpc_errors = 0 @@ -920,7 +929,7 @@ default_socket_timeout = 60 ;extension=ffi ;extension=ftp ;extension=fileinfo -;extension=gd2 +;extension=gd ;extension=gettext ;extension=gmp ;extension=intl @@ -930,6 +939,7 @@ default_socket_timeout = 60 ;extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +;extension=oci8_19 ; Use with Oracle Database 19 Instant Client ;extension=odbc ;extension=openssl ;extension=pdo_firebird @@ -950,9 +960,10 @@ default_socket_timeout = 60 ;extension=sodium ;extension=sqlite3 ;extension=tidy -;extension=xmlrpc ;extension=xsl +;zend_extension=opcache + ;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;; @@ -974,10 +985,10 @@ date.timezone = UTC ;date.default_longitude = 35.2333 ; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 +;date.sunrise_zenith = 90.833333 ; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 +;date.sunset_zenith = 90.833333 [filter] ; http://php.net/filter.default @@ -1055,8 +1066,6 @@ pcre.jit=0 ; http://php.net/pdo-odbc.connection-pooling ;pdo_odbc.connection_pooling=strict -;pdo_odbc.db2_instance_name - [Pdo_mysql] ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. @@ -1593,11 +1602,6 @@ zend.assertions = -1 ; http://php.net/assert.callback ;assert.callback = 0 -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - [COM] ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs ; http://php.net/com.typelib-file @@ -1623,6 +1627,10 @@ zend.assertions = -1 ; Default: system ANSI code page ;com.code_page= +; The version of the .NET framework to use. The value of the setting are the first three parts +; of the framework's version number, separated by dots, and prefixed with "v", e.g. "v4.0.30319". +;com.dotnet_version= + [mbstring] ; language for internal character representation. ; This affects mb_send_mail() and mbstring.detect_order. @@ -1640,7 +1648,7 @@ zend.assertions = -1 ; http input encoding. ; mbstring.encoding_translation = On is needed to use this setting. ; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < input_encoding < mbsting.http_input +; The precedence is: default_charset < input_encoding < mbstring.http_input ; http://php.net/mbstring.http-input ;mbstring.http_input = @@ -1672,20 +1680,8 @@ zend.assertions = -1 ; http://php.net/mbstring.substitute-character ;mbstring.substitute_character = none -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -; Default: Off -;mbstring.strict_detection = On +; Enable strict encoding detection. +;mbstring.strict_detection = Off ; This directive specifies the regex pattern of content types for which mb_output_handler() ; is activated. @@ -1694,12 +1690,10 @@ zend.assertions = -1 ; This directive specifies maximum stack depth for mbstring regular expressions. It is similar ; to the pcre.recursion_limit for PCRE. -; Default: 100000 ;mbstring.regex_stack_limit=100000 ; This directive specifies maximum retry count for mbstring regular expressions. It is similar ; to the pcre.backtrack_limit for PCRE. -; Default: 1000000 ;mbstring.regex_retry_limit=1000000 [gd] @@ -1814,6 +1808,11 @@ ldap.max_links = -1 ; size of the optimized code. ;opcache.save_comments=1 +; If enabled, compilation warnings (including notices and deprecations) will +; be recorded and replayed each time a file is included. Otherwise, compilation +; warnings will only be emitted when the file is first cached. +;opcache.record_warnings=0 + ; Allow file existence override (file_exists, etc.) performance feature. ;opcache.enable_file_override=0 @@ -1953,4 +1952,3 @@ ldap.max_links = -1 ; List of headers files to preload, wildcard patterns allowed. ;ffi.preload= - diff --git a/sys/php/www.conf b/sys/php/www.conf index cb1fe3dc..fc88f150 100644 --- a/sys/php/www.conf +++ b/sys/php/www.conf @@ -12,7 +12,7 @@ ; - 'chdir' ; - 'php_values' ; - 'php_admin_values' -; When not set, the global prefix (or NONE) applies instead. +; When not set, the global prefix (or /opt/bref) applies instead. ; Note: This directive can also be relative to the global prefix. ; Default Value: none ;prefix = /path/to/pools/$pool @@ -20,8 +20,8 @@ ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. -user = www-data -group = www-data +user = nobody +group = nobody ; The address on which to accept FastCGI requests. ; Valid syntaxes are: @@ -33,7 +33,7 @@ group = www-data ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = :9000 +listen = 127.0.0.1:9001 ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) @@ -45,8 +45,8 @@ listen = :9000 ; and group can be specified either by name or by their numeric IDs. ; Default Values: user and group are set as the running user ; mode is set to 0660 -listen.owner = www-data -listen.group = www-data +;listen.owner = nobody +;listen.group = nobody ;listen.mode = 0660 ; When POSIX Access Control Lists are supported you can set them using ; these options, value is a comma separated list of user/group names. @@ -71,7 +71,7 @@ listen.group = www-data ; process.priority = -19 ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user -; or group is differrent than the master process user. It allows to create process +; or group is different than the master process user. It allows to create process ; core dump and ptrace the process for the pool user. ; Default Value: no ; process.dumpable = yes @@ -111,26 +111,22 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -;pm.max_children = 5 -pm.max_children = 100 +pm.max_children = 5 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: (min_spare_servers + max_spare_servers) / 2 -;pm.start_servers = 2 -pm.start_servers = 5 +pm.start_servers = 2 ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -;pm.min_spare_servers = 1 -pm.min_spare_servers = 5 +pm.min_spare_servers = 1 ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -;pm.max_spare_servers = 3 -pm.max_spare_servers = 15 +pm.max_spare_servers = 3 ; The number of seconds after which an idle process will be killed. ; Note: Used only when pm is set to 'ondemand' @@ -144,7 +140,7 @@ pm.max_spare_servers = 15 ;pm.max_requests = 500 ; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: +; recognized as a status page. It shows the following information: ; pool - the name of the pool; ; process manager - static, dynamic or ondemand; ; start time - the date and time FPM has started; @@ -234,7 +230,7 @@ pm.max_spare_servers = 15 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/local/share/php/fpm/status.html +; It's available in: /opt/bref/share/php/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it @@ -242,6 +238,22 @@ pm.max_spare_servers = 15 ; Default Value: not set ;pm.status_path = /status +; The address on which to accept FastCGI status request. This creates a new +; invisible pool that can handle requests independently. This is useful +; if the main pool is busy with long running requests because it is still possible +; to get the status before finishing the long running requests. +; +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Default Value: value of the listen option +;pm.status_listen = 127.0.0.1:9001 + ; The ping URI to call the monitoring page of FPM. If this value is not set, no ; URI will be recognized as a ping page. This could be used to test from outside ; that FPM is alive and responding, or to @@ -275,13 +287,13 @@ access.log = /proc/self/fd/2 ; %d: time taken to serve the request ; it can accept the following format: ; - %{seconds}d (default) -; - %{miliseconds}d +; - %{milliseconds}d ; - %{mili}d ; - %{microseconds}d ; - %{micro}d ; %e: an environment variable (same as $_ENV or $_SERVER) ; it must be associated with embraces to specify the name of the env -; variable. Some exemples: +; variable. Some examples: ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e ; %f: script filename @@ -380,7 +392,7 @@ access.log = /proc/self/fd/2 ; Redirect worker stdout and stderr into main error log. If not set, stdout and ; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page +; Note: on highloaded environment, this can cause some delay in the page ; process time (several ms). ; Default Value: no ;catch_workers_output = yes @@ -433,7 +445,7 @@ access.log = /proc/self/fd/2 ; instead. ; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr/local) +; (pool, global or /opt/bref) ; Default Value: nothing is defined by default except the values in php.ini and ; specified at startup with the -d argument @@ -442,4 +454,3 @@ access.log = /proc/self/fd/2 ;php_admin_value[error_log] = /var/log/fpm-php.www.log ;php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 32M - diff --git a/sys/php/zz-docker8.conf b/sys/php/zz-docker8.conf deleted file mode 100644 index 205ceb25..00000000 --- a/sys/php/zz-docker8.conf +++ /dev/null @@ -1,6 +0,0 @@ -[global] -daemonize = no - -[www] -listen = 9000 -