From 02111c58562a972215cd6a536613b9f1fc9e03f2 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 19 Sep 2018 11:59:48 -0600 Subject: [PATCH] Provide basic apache testing for ddev, for #1094 (explicit apache tests still required) (#1101) * Complete rework of supervisord config (no more tail process) * Provide php config for apache and cgi folders * Change apache output to go to stderr in container * Fix testing to reflect the use of apache --- .circleci/config.yml | 48 +++++ .../etc/apache2/apache-site-default.conf | 2 +- .../files/etc/apache2/apache2.conf | 2 +- .../files/etc/nginx/nginx-site-backdrop.conf | 2 +- .../files/etc/nginx/nginx-site-default.conf | 2 +- .../files/etc/nginx/nginx-site-drupal6.conf | 2 +- .../files/etc/nginx/nginx-site-drupal7.conf | 2 +- .../files/etc/nginx/nginx-site-drupal8.conf | 2 +- .../files/etc/nginx/nginx-site-typo3.conf | 2 +- .../files/etc/nginx/nginx-site-wordpress.conf | 2 +- .../files/etc/php/5.6/apache2/php.ini | 204 ++++++++++++++++++ .../files/etc/php/5.6/cgi/php.ini | 204 ++++++++++++++++++ .../files/etc/php/5.6/fpm/php-fpm.conf | 2 +- .../files/etc/php/7.0/apache2/php.ini | 198 +++++++++++++++++ .../files/etc/php/7.0/cgi/php.ini | 198 +++++++++++++++++ .../files/etc/php/7.0/fpm/php-fpm.conf | 2 +- .../files/etc/php/7.1/apache2/php.ini | 197 +++++++++++++++++ .../files/etc/php/7.1/cgi/php.ini | 197 +++++++++++++++++ .../files/etc/php/7.1/fpm/php-fpm.conf | 2 +- .../files/etc/php/7.2/apache2/php.ini | 197 +++++++++++++++++ .../files/etc/php/7.2/cgi/php.ini | 197 +++++++++++++++++ .../files/etc/php/7.2/fpm/php-fpm.conf | 2 +- .../files/etc/supervisor/apache.conf | 11 + .../files/etc/supervisor/conf.d/mailhog.conf | 4 + .../etc/supervisor/conf.d/supervisor.conf | 5 + .../files/etc/supervisor/php-fpm.conf | 6 + .../supervisor/supervisord-apache-cgi.conf | 4 + .../supervisor/supervisord-apache-fpm.conf | 3 + .../etc/supervisor/supervisord-nginx-fpm.conf | 9 + .../files/etc/supervisord-apache-cgi.conf | 36 ---- .../files/etc/supervisord-apache-fpm.conf | 64 ------ .../files/etc/supervisord-nginx-fpm.conf | 64 ------ containers/ddev-webserver/files/start.sh | 2 +- .../files/var/www/html/docroot/test/fatal.php | 2 + .../ddev-webserver/test/containertest.sh | 41 ++-- pkg/version/version.go | 2 +- 36 files changed, 1723 insertions(+), 196 deletions(-) create mode 100644 containers/ddev-webserver/files/etc/php/5.6/apache2/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/5.6/cgi/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.0/apache2/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.0/cgi/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.1/apache2/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.1/cgi/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.2/apache2/php.ini create mode 100644 containers/ddev-webserver/files/etc/php/7.2/cgi/php.ini create mode 100644 containers/ddev-webserver/files/etc/supervisor/apache.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/conf.d/mailhog.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/conf.d/supervisor.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/php-fpm.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/supervisord-apache-cgi.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/supervisord-apache-fpm.conf create mode 100644 containers/ddev-webserver/files/etc/supervisor/supervisord-nginx-fpm.conf delete mode 100644 containers/ddev-webserver/files/etc/supervisord-apache-cgi.conf delete mode 100644 containers/ddev-webserver/files/etc/supervisord-apache-fpm.conf delete mode 100644 containers/ddev-webserver/files/etc/supervisord-nginx-fpm.conf create mode 100644 containers/ddev-webserver/files/var/www/html/docroot/test/fatal.php diff --git a/.circleci/config.yml b/.circleci/config.yml index 81c340caa0a..40ebe29ca82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,6 +41,48 @@ jobs: name: ddev tests no_output_timeout: "40m" + golang_test_apache_fpm: + machine: + image: circleci/classic:201711-01 + working_directory: ~/go/src/github.com/drud/ddev + environment: + GOPATH: /home/circleci/go + DDEV_TEST_WEBSERVER_TYPE: apache-fpm + # Experiment with only testing TYPO3 with the apache run. + GOTEST_SHORT: 5 + steps: + - attach_workspace: + at: ~/ + - run: + command: ./.circleci/circle_vm_setup.sh + name: Circle VM setup - tools, docker, golang + # Now build using the regular ddev-only technique - this results in a fully clean set of executables. + # Run the built-in ddev tests with the executables just built. + - run: + command: make -s test + name: ddev tests + no_output_timeout: "40m" + + golang_test_apache_cgi: + machine: + image: circleci/classic:201711-01 + working_directory: ~/go/src/github.com/drud/ddev + environment: + GOPATH: /home/circleci/go + DDEV_TEST_WEBSERVER_TYPE: apache-cgi + # Experiment with only testing TYPO3 with the apache run. + GOTEST_SHORT: 5 + steps: + - attach_workspace: + at: ~/ + - run: + command: ./.circleci/circle_vm_setup.sh + name: Circle VM setup - tools, docker, golang + - run: + command: make -s test + name: ddev tests + no_output_timeout: "40m" + staticrequired: machine: image: circleci/classic:201711-01 @@ -170,6 +212,12 @@ workflows: - golang_test_nginx_fpm: requires: - golang_build + - golang_test_apache_fpm: + requires: + - golang_build + - golang_test_apache_cgi: + requires: + - golang_build - staticrequired: requires: - golang_build diff --git a/containers/ddev-webserver/files/etc/apache2/apache-site-default.conf b/containers/ddev-webserver/files/etc/apache2/apache-site-default.conf index db76807193c..b254f670392 100644 --- a/containers/ddev-webserver/files/etc/apache2/apache-site-default.conf +++ b/containers/ddev-webserver/files/etc/apache2/apache-site-default.conf @@ -20,7 +20,7 @@ # modules, e.g. #LogLevel info ssl:warn - ErrorLog ${APACHE_LOG_DIR}/error.log + ErrorLog /dev/stdout CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are diff --git a/containers/ddev-webserver/files/etc/apache2/apache2.conf b/containers/ddev-webserver/files/etc/apache2/apache2.conf index c04067efb7f..c7ff15b6978 100644 --- a/containers/ddev-webserver/files/etc/apache2/apache2.conf +++ b/containers/ddev-webserver/files/etc/apache2/apache2.conf @@ -125,7 +125,7 @@ HostnameLookups Off # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # -ErrorLog ${APACHE_LOG_DIR}/error.log +ErrorLog /dev/stdout # # LogLevel: Control the severity of messages logged to the error_log. diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-backdrop.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-backdrop.conf index 2c10ffa51d4..005d07de51f 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-backdrop.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-backdrop.conf @@ -23,7 +23,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-default.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-default.conf index 2d2173b7696..d1475a8f447 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-default.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-default.conf @@ -23,7 +23,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal6.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal6.conf index dceebda37d5..4f8294ccfa0 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal6.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal6.conf @@ -33,7 +33,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal7.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal7.conf index 1874623ff65..adaf6f1fb43 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal7.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal7.conf @@ -23,7 +23,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal8.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal8.conf index 629cca74f51..332def10ca8 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal8.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-drupal8.conf @@ -23,7 +23,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-typo3.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-typo3.conf index cace3e19b71..b0f323111e4 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-typo3.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-typo3.conf @@ -23,7 +23,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; location / { diff --git a/containers/ddev-webserver/files/etc/nginx/nginx-site-wordpress.conf b/containers/ddev-webserver/files/etc/nginx/nginx-site-wordpress.conf index 4a21d9ee08e..9d7b8a1a326 100644 --- a/containers/ddev-webserver/files/etc/nginx/nginx-site-wordpress.conf +++ b/containers/ddev-webserver/files/etc/nginx/nginx-site-wordpress.conf @@ -28,7 +28,7 @@ server { # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; - error_log /var/log/nginx/error.log info; + error_log /dev/stdout info; access_log /var/log/nginx/access.log; # From wordpress demo global_restrictions.conf diff --git a/containers/ddev-webserver/files/etc/php/5.6/apache2/php.ini b/containers/ddev-webserver/files/etc/php/5.6/apache2/php.ini new file mode 100644 index 00000000000..bca78e122ac --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/5.6/apache2/php.ini @@ -0,0 +1,204 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +track_errors = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; +always_populate_raw_post_data = -1 + +[mbstring] +; Required for drupal6 +mbstring.http_output = pass +mbstring.http_input = pass + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/5.6/cgi/php.ini b/containers/ddev-webserver/files/etc/php/5.6/cgi/php.ini new file mode 100644 index 00000000000..bca78e122ac --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/5.6/cgi/php.ini @@ -0,0 +1,204 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +track_errors = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; +always_populate_raw_post_data = -1 + +[mbstring] +; Required for drupal6 +mbstring.http_output = pass +mbstring.http_input = pass + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/5.6/fpm/php-fpm.conf b/containers/ddev-webserver/files/etc/php/5.6/fpm/php-fpm.conf index d5e71cf411f..3f356a3647a 100644 --- a/containers/ddev-webserver/files/etc/php/5.6/fpm/php-fpm.conf +++ b/containers/ddev-webserver/files/etc/php/5.6/fpm/php-fpm.conf @@ -22,7 +22,7 @@ pid = /run/php-fpm.pid ; Note: the default prefix is /var ; Default Value: log/php-fpm.log ; Output to stdout, where supervisord will manage it. -error_log = /proc/self/fd/2 +error_log = /dev/stdout ; syslog_facility is used to specify what type of program is logging the ; message. This lets syslogd specify that messages from different facilities diff --git a/containers/ddev-webserver/files/etc/php/7.0/apache2/php.ini b/containers/ddev-webserver/files/etc/php/7.0/apache2/php.ini new file mode 100644 index 00000000000..ade18479eed --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.0/apache2/php.ini @@ -0,0 +1,198 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +track_errors = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.0/cgi/php.ini b/containers/ddev-webserver/files/etc/php/7.0/cgi/php.ini new file mode 100644 index 00000000000..ade18479eed --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.0/cgi/php.ini @@ -0,0 +1,198 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +track_errors = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.0/fpm/php-fpm.conf b/containers/ddev-webserver/files/etc/php/7.0/fpm/php-fpm.conf index d1c8bec6077..4aa8995a987 100644 --- a/containers/ddev-webserver/files/etc/php/7.0/fpm/php-fpm.conf +++ b/containers/ddev-webserver/files/etc/php/7.0/fpm/php-fpm.conf @@ -22,7 +22,7 @@ pid = /run/php-fpm.pid ; Note: the default prefix is /var ; Default Value: log/php-fpm.log ; Output to stdout, where supervisord will manage it. -error_log = /proc/self/fd/2 +error_log = /dev/stdout ; syslog_facility is used to specify what type of program is logging the ; message. This lets syslogd specify that messages from different facilities diff --git a/containers/ddev-webserver/files/etc/php/7.1/apache2/php.ini b/containers/ddev-webserver/files/etc/php/7.1/apache2/php.ini new file mode 100644 index 00000000000..7de6c6fd0bf --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.1/apache2/php.ini @@ -0,0 +1,197 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.1/cgi/php.ini b/containers/ddev-webserver/files/etc/php/7.1/cgi/php.ini new file mode 100644 index 00000000000..7de6c6fd0bf --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.1/cgi/php.ini @@ -0,0 +1,197 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.1/fpm/php-fpm.conf b/containers/ddev-webserver/files/etc/php/7.1/fpm/php-fpm.conf index c142d53ff1a..359c10aa537 100644 --- a/containers/ddev-webserver/files/etc/php/7.1/fpm/php-fpm.conf +++ b/containers/ddev-webserver/files/etc/php/7.1/fpm/php-fpm.conf @@ -22,7 +22,7 @@ pid = /run/php-fpm.pid ; Note: the default prefix is /var ; Default Value: log/php-fpm.log ; Output to stdout, where supervisord will manage it. -error_log = /proc/self/fd/2 +error_log = /dev/stdout ; syslog_facility is used to specify what type of program is logging the ; message. This lets syslogd specify that messages from different facilities diff --git a/containers/ddev-webserver/files/etc/php/7.2/apache2/php.ini b/containers/ddev-webserver/files/etc/php/7.2/apache2/php.ini new file mode 100644 index 00000000000..7de6c6fd0bf --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.2/apache2/php.ini @@ -0,0 +1,197 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.2/cgi/php.ini b/containers/ddev-webserver/files/etc/php/7.2/cgi/php.ini new file mode 100644 index 00000000000..7de6c6fd0bf --- /dev/null +++ b/containers/ddev-webserver/files/etc/php/7.2/cgi/php.ini @@ -0,0 +1,197 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[PHP] +engine = On +short_open_tag = Off +precision = 14 +output_buffering = 4096 +zlib.output_compression = Off +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 17 +disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, +disable_classes = +zend.enable_gc = On +expose_php = Off +; Resource Limits ; +max_execution_time = 600 +request_terminate_timeout = 0 +max_input_time = -1 +;max_input_nesting_level = 64 +max_input_vars = 1500 +memory_limit = 1024M +; Error handling and logging ; +error_reporting = E_ALL +display_errors = On +display_startup_errors = On +log_errors = On +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = On +; Data Handling ; +variables_order = "EGPCS" +request_order = "GP" +register_argc_argv = Off +auto_globals_jit = On +post_max_size = 100M +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +default_charset = "UTF-8" +; Paths and Directories ; +doc_root = +user_dir = +enable_dl = Off +cgi.fix_pathinfo=0 +; File Uploads ; +file_uploads = On +upload_max_filesize = 100M +max_file_uploads = 20 +; Fopen wrappers ; +allow_url_fopen = On +allow_url_include = Off +default_socket_timeout = 60 +;auto_detect_line_endings = Off +; Dynamic Extensions ; + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = America/Denver + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[mail function] +SMTP = localhost +smtp_port = 25 +mail.add_x_header = On +sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025" + +[SQL] +sql.safe_mode = Off + +[ODBC] +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[Interbase] +ibase.allow_persistent = 1 +ibase.max_persistent = -1 +ibase.max_links = -1 +ibase.timestampformat = "%Y-%m-%d %H:%M:%S" +ibase.dateformat = "%Y-%m-%d" +ibase.timeformat = "%H:%M:%S" + +[MySQLi] +mysqli.max_persistent = -1 +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.cache_size = 2000 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off + +[PostgreSQL] +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] +bcmath.scale = 0 + +[Session] +session.save_handler = files +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.serialize_handler = php +session.gc_probability = 0 +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.hash_function = 0 +session.hash_bits_per_character = 5 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" + +[Assertion] +zend.assertions = -1 + +[Tidy] +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + + +[ldap] +ldap.max_links = -1 + +[opcache] +opcache.enable=1 +opcache.enable_cli=1 +opcache.memory_consumption=192 +opcache.interned_strings_buffer=16 +opcache.max_accelerated_files=20000 +;opcache.max_wasted_percentage=5 +;opcache.use_cwd=1 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +;opcache.revalidate_path=0 +;opcache.save_comments=1 +opcache.fast_shutdown=1 +;opcache.enable_file_override=0 +;opcache.optimization_level=0xffffffff +;opcache.inherited_hack=1 +;opcache.dups_fix=0 +;opcache.blacklist_filename= +;opcache.max_file_size=0 +;opcache.consistency_checks=0 +;opcache.force_restart_timeout=180 +;opcache.error_log= +;opcache.log_verbosity_level=1 +;opcache.preferred_memory_model= +;opcache.protect_memory=0 +;opcache.restrict_api= +;opcache.mmap_base= +;opcache.file_cache= +;opcache.file_cache_only=0 +;opcache.file_cache_consistency_checks=1 +;opcache.file_cache_fallback=1 +;opcache.huge_code_pages=1 +;opcache.validate_permission=0 +;opcache.validate_root=0 diff --git a/containers/ddev-webserver/files/etc/php/7.2/fpm/php-fpm.conf b/containers/ddev-webserver/files/etc/php/7.2/fpm/php-fpm.conf index d5c8bf4df82..bed5f72c064 100644 --- a/containers/ddev-webserver/files/etc/php/7.2/fpm/php-fpm.conf +++ b/containers/ddev-webserver/files/etc/php/7.2/fpm/php-fpm.conf @@ -22,7 +22,7 @@ pid = /run/php-fpm.pid ; Note: the default prefix is /var ; Default Value: log/php-fpm.log ; Output to stdout, where supervisord will manage it. -error_log = /proc/self/fd/2 +error_log = /dev/stdout ; syslog_facility is used to specify what type of program is logging the ; message. This lets syslogd specify that messages from different facilities diff --git a/containers/ddev-webserver/files/etc/supervisor/apache.conf b/containers/ddev-webserver/files/etc/supervisor/apache.conf new file mode 100644 index 00000000000..364597a10a8 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/apache.conf @@ -0,0 +1,11 @@ +[program:apache2] +; startsecs = 1 +stopwaitsecs = 20 +startretries=10 +stopsignal = WINCH +command=/usr/sbin/apache2ctl -k restart -D "FOREGROUND" +priority=6 +stdout_logfile=/proc/self/fd/2 +stdout_logfile_maxbytes=0 +redirect_stderr=true +exitcodes=0,1 diff --git a/containers/ddev-webserver/files/etc/supervisor/conf.d/mailhog.conf b/containers/ddev-webserver/files/etc/supervisor/conf.d/mailhog.conf new file mode 100644 index 00000000000..fb0f6a2bdcd --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/conf.d/mailhog.conf @@ -0,0 +1,4 @@ +[program:mailhog] +command=/usr/local/bin/mailhog +autorestart=true +startretries=10 diff --git a/containers/ddev-webserver/files/etc/supervisor/conf.d/supervisor.conf b/containers/ddev-webserver/files/etc/supervisor/conf.d/supervisor.conf new file mode 100644 index 00000000000..60dd764f399 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/conf.d/supervisor.conf @@ -0,0 +1,5 @@ +[supervisord] +logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) +loglevel=info ; (log level;default info; others: debug,warn,trace) +pidfile=//var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +nodaemon=false ; (start in foreground if true;default false) diff --git a/containers/ddev-webserver/files/etc/supervisor/php-fpm.conf b/containers/ddev-webserver/files/etc/supervisor/php-fpm.conf new file mode 100644 index 00000000000..e462f7eaea4 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/php-fpm.conf @@ -0,0 +1,6 @@ +[program:php-fpm] +command = /usr/sbin/php-fpm --nodaemonize --force-stderr --allow-to-run-as-root +priority=5 +stdout_logfile=/proc/self/fd/2 +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-cgi.conf b/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-cgi.conf new file mode 100644 index 00000000000..6496b23f077 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-cgi.conf @@ -0,0 +1,4 @@ +[include] +files = /etc/supervisor/apache.conf /etc/supervisor/conf.d/*.conf + + diff --git a/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-fpm.conf b/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-fpm.conf new file mode 100644 index 00000000000..7a9f97bb622 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/supervisord-apache-fpm.conf @@ -0,0 +1,3 @@ +[include] +files = /etc/supervisor/apache.conf /etc/supervisor/php-fpm.conf /etc/supervisor/conf.d/*.conf + diff --git a/containers/ddev-webserver/files/etc/supervisor/supervisord-nginx-fpm.conf b/containers/ddev-webserver/files/etc/supervisor/supervisord-nginx-fpm.conf new file mode 100644 index 00000000000..3a335497ab1 --- /dev/null +++ b/containers/ddev-webserver/files/etc/supervisor/supervisord-nginx-fpm.conf @@ -0,0 +1,9 @@ +[include] +files = /etc/supervisor/php-fpm.conf /etc/supervisor/conf.d/*.conf + +[program:nginx] +command=/usr/sbin/nginx +priority=10 +stdout_logfile=/proc/self/fd/2 +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/containers/ddev-webserver/files/etc/supervisord-apache-cgi.conf b/containers/ddev-webserver/files/etc/supervisord-apache-cgi.conf deleted file mode 100644 index 18019249043..00000000000 --- a/containers/ddev-webserver/files/etc/supervisord-apache-cgi.conf +++ /dev/null @@ -1,36 +0,0 @@ -[unix_http_server] -file=/tmp/supervisor.sock ; (the path to the socket file) - -[supervisord] -logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) -logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) -logfile_backups=10 ; (num of main logfile rotation backups;default 10) -loglevel=info ; (log level;default info; others: debug,warn,trace) -pidfile=//var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -nodaemon=false ; (start in foreground if true;default false) -minfds=1024 ; (min. avail startup file descriptors;default 1024) -minprocs=200 ; (min. avail process descriptors;default 200) -user=root ; - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket - -[program:apache2] -command=/usr/sbin/apache2ctl -DFOREGROUND - -[program:mailhog] -command=/usr/local/bin/mailhog -autostart=true -autorestart=true -startretries=10 -directory=/var/www/html -redirect_stderr=true -stdout_logfile=/var/log/mailhog.log -stdout_logfile_maxbytes=50MB -stdout_logfile_backups=10 diff --git a/containers/ddev-webserver/files/etc/supervisord-apache-fpm.conf b/containers/ddev-webserver/files/etc/supervisord-apache-fpm.conf deleted file mode 100644 index a37af86a111..00000000000 --- a/containers/ddev-webserver/files/etc/supervisord-apache-fpm.conf +++ /dev/null @@ -1,64 +0,0 @@ -[unix_http_server] -file=/tmp/supervisor.sock ; (the path to the socket file) - -[supervisord] -logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) -logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) -logfile_backups=10 ; (num of main logfile rotation backups;default 10) -loglevel=info ; (log level;default info; others: debug,warn,trace) -pidfile=//var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -nodaemon=false ; (start in foreground if true;default false) -minfds=1024 ; (min. avail startup file descriptors;default 1024) -minprocs=200 ; (min. avail process descriptors;default 200) -user=root ; - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket - -[program:php-fpm] -command = /usr/sbin/php-fpm -R -autostart=true -autorestart=true -priority=5 -stdout_logfile=/var/log/php-fpm.log -stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/php-fpm.log -stderr_logfile_maxbytes=0 - -[program:apache2] -command=/usr/sbin/apache2ctl -DFOREGROUND -autostart=true -autorestart=true -priority=6 -stderr_events_enabled=true -stdout_logfile=/var/log/apache2/access.log -stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/apache2/error.log -stderr_logfile_maxbytes=0 - - -[program:mailhog] -command=/usr/local/bin/mailhog -autostart=true -autorestart=true -startretries=10 -directory=/var/www/html -redirect_stderr=true -stdout_logfile=/var/log/mailhog.log -stdout_logfile_maxbytes=50MB -stdout_logfile_backups=10 - -[program:tail] -command=/usr/bin/tail -f /var/log/apache2/error.log /var/log/php-fpm.log -autostart=true -autorestart=true -priority=30 -startretries=10 -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 diff --git a/containers/ddev-webserver/files/etc/supervisord-nginx-fpm.conf b/containers/ddev-webserver/files/etc/supervisord-nginx-fpm.conf deleted file mode 100644 index 8bab15fee3d..00000000000 --- a/containers/ddev-webserver/files/etc/supervisord-nginx-fpm.conf +++ /dev/null @@ -1,64 +0,0 @@ -[unix_http_server] -file=/tmp/supervisor.sock ; (the path to the socket file) - -[supervisord] -logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) -logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) -logfile_backups=10 ; (num of main logfile rotation backups;default 10) -loglevel=info ; (log level;default info; others: debug,warn,trace) -pidfile=//var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -nodaemon=false ; (start in foreground if true;default false) -minfds=1024 ; (min. avail startup file descriptors;default 1024) -minprocs=200 ; (min. avail process descriptors;default 200) -user=root ; - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket - -[program:php-fpm] -command = /usr/sbin/php-fpm -R -autostart=true -autorestart=true -priority=5 -stdout_logfile=/var/log/php-fpm.log -stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/php-fpm.log -stderr_logfile_maxbytes=0 - -[program:nginx] -command=/usr/sbin/nginx -autostart=true -autorestart=true -priority=10 -stdout_events_enabled=true -stderr_events_enabled=true -stdout_logfile=/var/log/nginx/access.log -stdout_logfile_maxbytes=0 -stderr_logfile=/var/log/nginx/error.log -stderr_logfile_maxbytes=0 - -[program:mailhog] -command=/usr/local/bin/mailhog -autostart=true -autorestart=true -startretries=10 -directory=/var/www/html -redirect_stderr=true -stdout_logfile=/var/log/mailhog.log -stdout_logfile_maxbytes=50MB -stdout_logfile_backups=10 - -[program:tail] -command=/usr/bin/tail -f /var/log/nginx/error.log /var/log/php-fpm.log -autostart=true -autorestart=true -priority=30 -startretries=10 -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 diff --git a/containers/ddev-webserver/files/start.sh b/containers/ddev-webserver/files/start.sh index 7afc349cb00..01cdc40a45b 100755 --- a/containers/ddev-webserver/files/start.sh +++ b/containers/ddev-webserver/files/start.sh @@ -89,4 +89,4 @@ fi echo 'Server started' -exec /usr/bin/supervisord -n -c "/etc/supervisord-${DDEV_WEBSERVER_TYPE}.conf" +exec /usr/bin/supervisord -n -c "/etc/supervisor/supervisord-${DDEV_WEBSERVER_TYPE}.conf" diff --git a/containers/ddev-webserver/files/var/www/html/docroot/test/fatal.php b/containers/ddev-webserver/files/var/www/html/docroot/test/fatal.php new file mode 100644 index 00000000000..9de63941ca9 --- /dev/null +++ b/containers/ddev-webserver/files/var/www/html/docroot/test/fatal.php @@ -0,0 +1,2 @@ + 1 => 1" @@ -90,7 +90,7 @@ for v in 5.6 7.0 7.1 7.2; do # Make sure the phpstatus url is working for testing php-fpm. curl -s localhost:$HOST_PORT/phpstatus | grep "idle processes" - docker rm -f $CONTAINER + docker rm -f $CONTAINER_NAME done # Run various project_types and check behavior. @@ -100,44 +100,51 @@ for project_type in drupal6 drupal7 drupal8 typo3 backdrop wordpress default; do if [ "$project_type" == "drupal6" ]; then PHP_VERSION="5.6" fi - CONTAINER=$(docker run -u "$MOUNTUID:$MOUNTGID" -p $HOST_PORT:$CONTAINER_PORT -e "DOCROOT=docroot" -e "DDEV_PHP_VERSION=$PHP_VERSION" -e "DDEV_PROJECT_TYPE=$project_type" -d --name $CONTAINER_NAME -d $DOCKER_IMAGE) + docker run -u "$MOUNTUID:$MOUNTGID" -p $HOST_PORT:$CONTAINER_PORT -e "DOCROOT=docroot" -e "DDEV_PHP_VERSION=$PHP_VERSION" -e "DDEV_PROJECT_TYPE=$project_type" -d --name $CONTAINER_NAME -d $DOCKER_IMAGE if ! containercheck; then exit 1 fi curl --fail localhost:$HOST_PORT/test/phptest.php # Make sure that the project-specific config has been linked in. - docker exec -t $CONTAINER grep "# ddev $project_type config" //etc/nginx/nginx-site.conf + docker exec -t $CONTAINER_NAME grep "# ddev $project_type config" //etc/nginx/nginx-site.conf # Make sure that the right PHP version was selected for the project_type # Only drupal6 is currently different here. - docker exec -t $CONTAINER php --version | grep "PHP $PHP_VERSION" + docker exec -t $CONTAINER_NAME php --version | grep "PHP $PHP_VERSION" # xdebug should be disabled by default. docker exec -t $CONTAINER_NAME php --re xdebug | grep "xdebug does not exist" # Make sure we don't have lots of "closed keepalive connection" complaints - docker logs $CONTAINER | grep -v "closed keepalive connection" + (docker logs $CONTAINER_NAME 2>&1 | grep -v "closed keepalive connection") || (echo "Found unwanted closed keepalive connection messages" && exit 101) # Make sure both nginx logs and fpm logs are being tailed - docker logs $CONTAINER | grep "==> /var/log/nginx/error.log" >/dev/null - docker logs $CONTAINER | grep "==> /var/log/php-fpm.log" >/dev/null + curl --fail localhost:$HOST_PORT/test/fatal.php + (docker logs $CONTAINER_NAME 2>&1 | grep "WARNING:.* said into stderr:.*fatal.php on line " >/dev/null) || (echo "Failed to find WARNING: .pool www" && exit 102) + (docker logs $CONTAINER_NAME 2>&1 | grep "FastCGI sent in stderr: .PHP message: PHP Fatal error:" >/dev/null) || (echo "failed to find FastCGI sent in stderr" && exit 103) # Make sure that backdrop drush commands were added on backdrop and only backdrop if [ "$project_type" == "backdrop" ] ; then # The .drush/commands/backdrop directory should only exist for backdrop apptype - docker exec -t $CONTAINER bash -c 'if [ ! -d ~/.drush/commands/backdrop ] ; then echo "Failed to find expected backdrop drush commands"; exit 1; fi' + docker exec -t $CONTAINER_NAME bash -c 'if [ ! -d ~/.drush/commands/backdrop ] ; then echo "Failed to find expected backdrop drush commands"; exit 1; fi' else - docker exec -t $CONTAINER bash -c 'if [ -d ~/.drush/commands/backdrop ] ; then echo "Found unexpected backdrop drush commands"; exit 2; fi' + docker exec -t $CONTAINER_NAME bash -c 'if [ -d ~/.drush/commands/backdrop ] ; then echo "Found unexpected backdrop drush commands"; exit 2; fi' fi - docker rm -f $CONTAINER + docker rm -f $CONTAINER_NAME done -echo "testing use of custom nginx and php configs" +echo "--- testing use of custom nginx and php configs" docker run -u "$(id -u):$(id -g)" -p $HOST_PORT:$CONTAINER_PORT -e "DOCROOT=potato" -e "DDEV_PHP_VERSION=7.2" -v "/$PWD/test/testdata:/mnt/ddev_config:ro" -d --name $CONTAINER_NAME -d $DOCKER_IMAGE docker exec -t $CONTAINER_NAME grep "docroot is /var/www/html/potato in custom conf" //etc/nginx/sites-enabled/nginx-site.conf # Enable xdebug (and then disable again) and make sure it does the right thing. +echo "--- Turn on and off xdebug and check the results docker exec -t $CONTAINER_NAME enable_xdebug docker exec -t $CONTAINER_NAME php --re xdebug | grep "xdebug.remote_enable" docker exec -t $CONTAINER_NAME disable_xdebug docker exec -t $CONTAINER_NAME php --re xdebug | grep "xdebug does not exist" +# Verify that the custom php configuration in ddev_config/php is activated. +echo "--- Verify that /mnt/ddev_config is mounted and we have php overrides there. +docker exec -t $CONTAINER_NAME ls -lR //mnt/ddev_config >/dev/null + # With overridden value we should have assert.active=0, not the default -docker exec -t $CONTAINER_NAME php -i | grep "assert.active.*=> 0 => 0" +echo "--- Check that assert.active override is working" +docker exec -t $CONTAINER_NAME php -i | grep "assert.active.*=> 0 => 0" >/dev/null diff --git a/pkg/version/version.go b/pkg/version/version.go index 76f4fbc45fa..e55c8dc125c 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -23,7 +23,7 @@ var DockerComposeFileFormatVersion = "3.6" var WebImg = "drud/ddev-webserver" // WebTag defines the default web image tag for drud dev -var WebTag = "20180915_php_imagick" // Note that this can be overridden by make +var WebTag = "20180911_apache_supervisor" // Note that this can be overridden by make // DBImg defines the default db image used for applications. var DBImg = "drud/ddev-dbserver"