├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── UPGRADE └── 1-to-2.md ├── bin ├── docker-init └── dockeronify ├── dockeronify └── templates │ └── default │ ├── dockeronify.sh │ └── src │ ├── docker-compose.env.dist │ ├── docker-compose.yml │ └── docker │ ├── Dockerfile │ └── conf │ └── nginx_vhost.conf ├── elasticsearch ├── Dockerfile └── run.sh ├── mailcatcher └── Dockerfile ├── memcached └── Dockerfile ├── nginx ├── Dockerfile ├── coverage.conf ├── dev.conf ├── monitoring.conf └── monitoring.html ├── npmtools ├── Dockerfile └── entrypoint.sh ├── php-console ├── Dockerfile ├── entrypoint.sh └── php-cli.ini ├── php-fpm ├── Dockerfile ├── entrypoint.sh ├── php-fpm.ini └── www.conf ├── php ├── Dockerfile └── xdebug.ini ├── postgres ├── Dockerfile └── entrypoint.sh └── sample_symfony_app ├── bashrc.docker ├── composer.json ├── docker-compose.env.dist ├── docker-compose.yml ├── docker └── conf └── web ├── app.php ├── app_dev.php └── static-resource.html /.gitignore: -------------------------------------------------------------------------------- 1 | sample_symfony_app/.home-developer 2 | sample_symfony_app/composer.lock 3 | sample_symfony_app/vendor 4 | sample_symfony_app/docker-compose.env 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - master 4 | 5 | language: bash 6 | services: docker 7 | 8 | env: 9 | - SOFTWARE=elasticsearch 10 | - SOFTWARE=mailcatcher 11 | - SOFTWARE=memcached 12 | - SOFTWARE=nginx 13 | - SOFTWARE=npmtools 14 | - SOFTWARE=php 15 | - SOFTWARE=php-console 16 | - SOFTWARE=php-fpm 17 | - SOFTWARE=postgres 18 | 19 | before_script: 20 | - env | sort 21 | - cd "${SOFTWARE}" 22 | - image="greg0ire/${SOFTWARE}" 23 | 24 | script: 25 | - docker build --tag="$image" . 26 | 27 | after_script: 28 | - docker images 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Grégoire Paris 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Symfony development docker images 2 | 3 | Leverage the power of docker to make development initialization easy. The goal 4 | is to have the members of your team ready to code very quickly : 5 | 6 | 1. Installing Docker 7 | 2. Installing Docker Compose 8 | 3. Running `docker-compose up` 9 | 10 | For the moment there is : 11 | 12 | - an nginx image 13 | - a php-fpm image 14 | - a php-console image 15 | - a postgres image 16 | - a memcached image 17 | - a mailcatcher image 18 | - an elasticsearch image 19 | 20 | All images are based on the same docker image : `ubuntu:trusty`, so that disk 21 | usage is not too high. 22 | 23 | ## Setup inside a Symfony2 application 24 | 25 | The project contains a sample Symfony2 application. You can do the same thing 26 | in your app. 27 | 28 | 1. Create a docker directory, in order to have a clean separation from the rest 29 | of the project. 30 | 2. Create any configuration file needed by the containers you intend to use. 31 | Configuration files could be part of the image rather than mounted on it, that is 32 | true, but having them as part of your application is great, because it makes explicit 33 | what will be needed when deploying the application. 34 | 3. Create a `docker-compose.yml` file and map the volume with paths on your host. 35 | 36 | ## The containers 37 | 38 | ### The nginx container 39 | 40 | By default, defines a `monitoring.*` virtualhost. Try it, it displays nginx and 41 | php-fpm status pages. There also is a `coverage.*` virtualhost, for phpunit users. 42 | It will serve files from `/srv/build/coverage`. 43 | 44 | ### The php containers 45 | 46 | There are three php images. The first one serves as a base for the two others 47 | and you shouldn't use it. The two other are a php-fpm image, and a php-console 48 | image. The php-console was named like this because there are other things than 49 | the `php-fpm` package on it : there also is nodejs, ruby-sass and other 50 | development-related things, like composer or php-cs-fixer. 51 | 52 | Both images come with XDebug remote debugging ready to use! 53 | XDebug will try to reach your DBGP client on `172.17.42.1:9000`, please ensure 54 | that your client is not only listening on `localhost`. 55 | You will also need to configure remote path mappings in your debugging client 56 | so that the remote `/srv` folder is mapped to where your application is on your 57 | system. 58 | 59 | If you are using vim with [vdebug](https://github.com/joonty/vdebug), the 60 | configuration will look like this: 61 | 62 | ```viml 63 | let g:vdebug_options= { 64 | \ "server": '172.17.0.1', 65 | \ "path_maps": {"/srv": "/home/username/path/to/code"} 66 | \} 67 | ``` 68 | 69 | By default, XDebug is disabled on the console container for performance 70 | reasons. It can be enabled by using php's `-d` flag, like this : 71 | 72 | ```shell 73 | php -dzend_extension=xdebug.so 74 | ``` 75 | 76 | The recommended way to login to the console container is to exec the login 77 | command on it, like this: 78 | 79 | ```shell 80 | docker exec --user=$(whoami) --interactive --tty samplesymfonyapp_console_1 /bin/zsh 81 | ``` 82 | 83 | Of course, you may use `/bin/bash` if you prefer. 84 | 85 | To run Composer, you might need to be able to authenticate against private 86 | repositories. To deal with that, log into the console container, and then 87 | generate a new pair of keys (`ssh-keygen`). Finally, associate the public key 88 | with your account. 89 | 90 | ### The mailcatcher container 91 | 92 | Exposes an administration interface on port 80, and an SMTP service listening 93 | on port 25. 94 | 95 | ## DNS 96 | 97 | ### Prerequisites 98 | 99 | To use the DNS functionality, you have to run `bin/docker-init`. This script 100 | will run a dns server and map it to your localhost. You might need to have a 101 | look at the documentation of 102 | [dnsdock](https://github.com/tonistiigi/dnsdock/blob/master/readme.md) if it 103 | does not work. 104 | 105 | ``` 106 | bin/docker-init 107 | ``` 108 | 109 | ### Configuration 110 | 111 | In your docker-compose.yml file you can set `DNSDOCK_NAME` and `DNSDOCK_IMAGE` 112 | for each image that you want to subscribe in DNS. Additionaly, you can set the 113 | `DNSDOCK_ALIAS` to completely bypass the basic naming scheme. 114 | 115 | ``` 116 | webserver: 117 | image: greg0ire/nginx 118 | ports: 119 | - '80' 120 | environment: 121 | - DNSDOCK_IMAGE=web 122 | - DNSDOCK_NAME=my_project 123 | - DNSDOCK_ALIAS=my_app.dev 124 | ``` 125 | 126 | With that configuration you can access to your image with `my_project.web.docker` 127 | *and* `my_app.dev` 128 | 129 | No need to add any host in your hosts file. 130 | -------------------------------------------------------------------------------- /UPGRADE/1-to-2.md: -------------------------------------------------------------------------------- 1 | # 1 to 2 2 | 3 | Between version 1 and 2, the php image has been split into 3 images : 4 | 5 | - a base `php` image for the two others with packages and configurations that 6 | should be present in both; 7 | - a `php-fpm` image, to be used as upstream by the webserver; 8 | - a `php-console` image, to be used to run commands and tests. 9 | 10 | Migrating is quite simple, just follow these steps : 11 | 12 | 1. Duplicate the appserver container definition and name that definition 13 | `console`. Make it use the `php-console` image. 14 | 1. Change the `DNSDOCK_IMAGE` variable to `console`. 15 | 1. If you need to access the webserver container in your tests, add a link to 16 | this container. 17 | 1. Change the appserver container definition so that it uses the `php-fpm` image. 18 | 1. Remove the `SSH_AUTH_SOCK` environment variable from it. 19 | 1. Check your CI script for references to the appserver container, and change 20 | them to the console container. 21 | -------------------------------------------------------------------------------- /bin/docker-init: -------------------------------------------------------------------------------- 1 | #!/bin/bash -u 2 | if [ "$(whoami)" = 'root' ] 3 | then 4 | echo "No need to run this script as root" 5 | exit 1 6 | fi 7 | 8 | # Launch docker dns container 9 | dnsdockname=dns_dock 10 | docker ps -a |grep "$dnsdockname" 11 | if [ $? -eq 0 ] 12 | then 13 | docker start dns_dock 14 | else 15 | docker run --detach=true --volume=/var/run/docker.sock:/var/run/docker.sock \ 16 | --publish=172.17.0.1:53:53/udp --name dns_dock tonistiigi/dnsdock 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /bin/dockeronify: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmdline () { 4 | 5 | 6 | readonly PROGDIR=$(readlink -m $0/..) 7 | readonly BASETEMPLATESDIR=$PROGDIR/../dockeronify/templates 8 | 9 | local THEME=default 10 | 11 | local arg=$@ 12 | for arg 13 | do 14 | local delim="" 15 | case "$arg" in 16 | #translate --gnu-long-options to -g (short options) 17 | --theme) args="${args}-t ";; 18 | --help) args="${args}-h ";; 19 | #pass through anything else 20 | *) [[ "${arg:0:1}" == "-" ]] || delim="\"" 21 | args="${args}${delim}${arg}${delim} ";; 22 | esac 23 | done 24 | 25 | readonly DIR=$@ 26 | 27 | #Reset the positional parameters to the short options 28 | eval set -- $args 29 | 30 | while getopts "t:h" OPTION 31 | do 32 | case $OPTION in 33 | h) 34 | usage 35 | exit 0 36 | ;; 37 | t) 38 | readonly THEME=$OPTARG 39 | ;; 40 | esac 41 | done 42 | 43 | readonly TEMPLATEDIR=$(readlink -m $BASETEMPLATESDIR/$THEME) 44 | 45 | if [ ! $DIR ]; then 46 | echo "You have to specify which dir you want dockeronify" 47 | exit 48 | fi 49 | 50 | if [ ! -d $DIR ]; then 51 | echo "This directory does not exist : " $DIR 52 | exit 53 | fi 54 | 55 | if [ ! -d $TEMPLATEDIR ]; then 56 | echo "This directory does not exist : " $TEMPLATEDIR 57 | exit 58 | fi 59 | 60 | if [ ! -f $TEMPLATEDIR/dockeronify.sh ]; then 61 | echo "The file 'dockeronify.sh' does not exist in " $TEMPLATEDIR 62 | exit 63 | fi 64 | 65 | # Call the 'dockeronify.sh' with $DIR and $PROGDIR 66 | $TEMPLATEDIR/dockeronify.sh $DIR $PROGDIR/.. 67 | } 68 | 69 | usage() { 70 | cat << HELPEND 71 | Usage: dockeronify [OPTIONS] DIR 72 | 73 | Runtime to quickly install dockerony configurations files in 'DIR' 74 | 75 | Options: 76 | -h, --help to see this content 77 | -t, --theme=THEME The template name in dockeronify/templates 78 | this directory must contain dockeronify.sh 79 | this script will call with two arguents 80 | - the dockerony path directory 81 | - the project path directory 82 | HELPEND 83 | } 84 | 85 | main() { 86 | cmdline $@ 87 | } 88 | main $@ 89 | -------------------------------------------------------------------------------- /dockeronify/templates/default/dockeronify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | main() { 3 | readonly TEMPLATEDIR=$(readlink -m $0/../src) 4 | 5 | readonly DIR=$1 6 | 7 | # Copy files 8 | cp --recursive --no-clobber $TEMPLATEDIR/* $DIR 9 | } 10 | 11 | main $@ 12 | -------------------------------------------------------------------------------- /dockeronify/templates/default/src/docker-compose.env.dist: -------------------------------------------------------------------------------- 1 | USERNAME={your_unix_local_username} 2 | UNIX_UID={your_unix_local_uid} 3 | CONTAINER_SHELL={/bin/bash|/bin/zsh} 4 | 5 | POSTGRES_DB={your_db_name} 6 | POSTGRES_USER={your_db_user} 7 | POSTGRES_PASSWORD={your_db_password} 8 | 9 | RABBITMQ_PASS={your_admin_pass} 10 | 11 | DNSDOCK_NAME={your_container_suffix} 12 | -------------------------------------------------------------------------------- /dockeronify/templates/default/src/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # This container is specific to the application. 2 | # It contains configuration and data for other containers. 3 | data: 4 | image: ubuntu:trusty 5 | volumes: 6 | - .:/srv 7 | - ./docker/conf/nginx_vhost.conf:/etc/nginx/sites-enabled/my_app.conf 8 | - .home-developer:/home/developer 9 | - /var/lib/postgresql/data 10 | - /var/lib/elasticsearch 11 | 12 | webserver: 13 | image: greg0ire/nginx 14 | volumes_from: 15 | - data 16 | links: 17 | - appserver 18 | env_file: 19 | - ./docker-compose.env 20 | environment: 21 | - DNSDOCK_IMAGE=web 22 | 23 | appserver: 24 | image: greg0ire/php-fpm 25 | volumes_from: 26 | - data 27 | links: 28 | - database 29 | - memorycache 30 | - searchengine 31 | - mailer 32 | - messagebroker 33 | env_file: 34 | - ./docker-compose.env 35 | environment: 36 | - DNSDOCK_IMAGE=app 37 | 38 | console: 39 | image: greg0ire/php-console 40 | volumes_from: 41 | - data 42 | links: 43 | - database 44 | - memorycache 45 | - searchengine 46 | - mailer 47 | - messagebroker 48 | env_file: 49 | - ./docker-compose.env 50 | environment: 51 | - DNSDOCK_IMAGE=console 52 | 53 | database: 54 | image: greg0ire/postgres 55 | volumes_from: 56 | - data 57 | env_file: 58 | - ./docker-compose.env 59 | environment: 60 | - DNSDOCK_IMAGE=db 61 | mailer: 62 | image: greg0ire/mailcatcher 63 | env_file: 64 | - ./docker-compose.env 65 | environment: 66 | - DNSDOCK_IMAGE=mailer 67 | 68 | memorycache: 69 | image: greg0ire/memcached 70 | env_file: 71 | - ./docker-compose.env 72 | environment: 73 | - DNSDOCK_IMAGE=memcache 74 | 75 | searchengine: 76 | image: greg0ire/elasticsearch 77 | volumes_from: 78 | - data 79 | env_file: 80 | - ./docker-compose.env 81 | environment: 82 | - DNSDOCK_IMAGE=search 83 | 84 | frontendmanagertools: 85 | image: greg0ire/npmtools 86 | volumes_from: 87 | - data 88 | env_file: 89 | - ./docker-compose.env 90 | environment: 91 | - DNSDOCK_IMAGE=fmt 92 | 93 | # Don't use 'guest/guest' to connect to this container (it is blocked) 94 | messagebroker: 95 | image: tutum/rabbitmq 96 | env_file: 97 | - ./docker-compose.env 98 | environment: 99 | - DNSDOCK_IMAGE=mb 100 | -------------------------------------------------------------------------------- /dockeronify/templates/default/src/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | VOLUME /srv 4 | VOLUME /var/lib/postgresql/data 5 | VOLUME /var/lib/elasticsearch 6 | -------------------------------------------------------------------------------- /dockeronify/templates/default/src/docker/conf/nginx_vhost.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | index app_dev.php; 5 | 6 | root /srv/web; 7 | 8 | # Make site accessible from http://www.{container_name}.{image_name}.docker/ 9 | server_name www.*; 10 | 11 | location / { 12 | # First attempt to serve request as file, then 13 | # as directory, then fall back to displaying a 404. 14 | try_files $uri $uri/ /app_dev.php$is_args$query_string; 15 | } 16 | 17 | location ~* \.php { 18 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 19 | # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini 20 | 21 | fastcgi_pass appserver:9000; 22 | fastcgi_index app_dev.php; 23 | include fastcgi_params; 24 | fastcgi_param PATH_INFO $fastcgi_path_info; 25 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /elasticsearch/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && apt-get install --yes wget && \ 6 | wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add - && \ 7 | echo 'deb http://packages.elasticsearch.org/elasticsearch/1.5/debian stable main' \ 8 | | tee /etc/apt/sources.list.d/elasticsearch.list && \ 9 | apt-get update && \ 10 | apt-get install --yes --no-install-recommends openjdk-7-jre-headless elasticsearch && \ 11 | /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head && \ 12 | rm --recursive --force /var/lib/apt/lists/* 13 | 14 | RUN /usr/share/elasticsearch/bin/plugin --install elasticsearch/marvel/latest 15 | 16 | ADD run.sh /usr/local/bin/run.sh 17 | 18 | EXPOSE 9200 9300 19 | 20 | ENTRYPOINT ["/usr/local/bin/run.sh"] 21 | -------------------------------------------------------------------------------- /elasticsearch/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Stolen from https://raw.githubusercontent.com/partlab/docker/master/ubuntu-elasticsearch/run 4 | 5 | . /lib/lsb/init-functions 6 | 7 | PATH=/bin:/usr/bin:/sbin:/usr/sbin 8 | DEFAULT=/etc/default/elasticsearch 9 | ES_HOME=/usr/share/elasticsearch 10 | # Heap Size (defaults to 256m min, 1g max) 11 | #ES_HEAP_SIZE=2g 12 | # Heap new generation 13 | #ES_HEAP_NEWSIZE= 14 | # max direct memory 15 | #ES_DIRECT_SIZE= 16 | # ElasticSearch log directory 17 | LOG_DIR=/var/log/elasticsearch 18 | # ElasticSearch data directory 19 | DATA_DIR=/var/lib/elasticsearch 20 | # ElasticSearch work directory 21 | WORK_DIR=/tmp/elasticsearch 22 | # ElasticSearch configuration directory 23 | CONF_DIR=/etc/elasticsearch 24 | # ElasticSearch configuration file (elasticsearch.yml) 25 | CONF_FILE=$CONF_DIR/elasticsearch.yml 26 | # Maximum number of VMA (Virtual Memory Areas) a process can own 27 | MAX_MAP_COUNT=65535 28 | PID_FILE=/var/run/$NAME.pid 29 | DAEMON=$ES_HOME/bin/elasticsearch 30 | DAEMON_OPTS="-p $PID_FILE -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR" 31 | 32 | JDK_DIRS="/usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/default-java" 33 | 34 | # Look for the right JVM to use 35 | for jdir in $JDK_DIRS; do 36 | if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then 37 | JAVA_HOME="$jdir" 38 | fi 39 | done 40 | export JAVA_HOME 41 | 42 | # overwrite settings from default file 43 | if [ -f "$DEFAULT" ]; then 44 | . "$DEFAULT" 45 | fi 46 | 47 | export ES_HEAP_SIZE 48 | export ES_HEAP_NEWSIZE 49 | export ES_DIRECT_SIZE 50 | 51 | # Check DAEMON exists 52 | test -x $DAEMON || exit 0 53 | 54 | checkJava() { 55 | if [ -x "$JAVA_HOME/bin/java" ]; then 56 | JAVA="$JAVA_HOME/bin/java" 57 | else 58 | JAVA=`which java` 59 | fi 60 | 61 | if [ ! -x "$JAVA" ]; then 62 | echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" 63 | exit 1 64 | fi 65 | } 66 | 67 | checkJava 68 | 69 | log_daemon_msg "Starting ElasticSearch Server" 70 | 71 | # Prepare environment 72 | mkdir -p "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" && chown elasticsearch:elasticsearch "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" 73 | touch "$PID_FILE" && chown elasticsearch:elasticsearch "$PID_FILE" 74 | 75 | if [ -n "$MAX_MAP_COUNT" ]; then 76 | sysctl -q -w vm.max_map_count=$MAX_MAP_COUNT 77 | fi 78 | 79 | # Start Daemon 80 | exec sudo -u elasticsearch $DAEMON $DAEMON_OPTS 81 | 82 | -------------------------------------------------------------------------------- /mailcatcher/Dockerfile: -------------------------------------------------------------------------------- 1 | # Stolen from https://github.com/akretion/docker-mailcatcher 2 | 3 | FROM ubuntu:trusty 4 | 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | RUN apt-get update && \ 8 | apt-get install --yes sqlite3 libsqlite3-dev build-essential ruby2.0 ruby2.0-dev && \ 9 | rm /usr/bin/ruby && sudo ln -s /usr/bin/ruby2.0 /usr/bin/ruby && \ 10 | rm -fr /usr/bin/gem && sudo ln -s /usr/bin/gem2.0 /usr/bin/gem && \ 11 | gem install mailcatcher --no-rdoc --no-ri && \ 12 | apt-get remove --purge --yes libsqlite3-dev ruby2.0-dev build-essential && \ 13 | apt-get autoremove --yes && \ 14 | apt-get autoclean && \ 15 | apt-get clean && \ 16 | rm --recursive --force /var/lib/apt/lists/* /tmp/* /var/tmp/* 17 | 18 | EXPOSE 80 19 | EXPOSE 25 20 | 21 | ENTRYPOINT ["mailcatcher", \ 22 | "--smtp-ip=0.0.0.0", \ 23 | "--smtp-port=25", \ 24 | "--http-ip=0.0.0.0", \ 25 | "--http-port=80", \ 26 | "--foreground" \ 27 | ] 28 | -------------------------------------------------------------------------------- /memcached/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && \ 6 | apt-get install --yes memcached && \ 7 | rm --recursive --force /var/lib/apt/lists/* 8 | 9 | EXPOSE 11211 10 | 11 | USER memcache 12 | 13 | ENTRYPOINT ["memcached"] 14 | -------------------------------------------------------------------------------- /nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && \ 6 | apt-get install --yes nginx && \ 7 | rm --recursive --force /var/lib/apt/lists/* 8 | 9 | # forward request and error logs to docker log collector 10 | RUN ln --symbolic --force /dev/stdout /var/log/nginx/access.log 11 | RUN ln --symbolic --force /dev/stderr /var/log/nginx/error.log 12 | 13 | EXPOSE 80 443 14 | 15 | ADD monitoring.conf /etc/nginx/conf.d/ 16 | ADD monitoring.html /usr/share/nginx/html/monitoring.html 17 | ADD coverage.conf /etc/nginx/conf.d/ 18 | 19 | ADD dev.conf /etc/nginx/conf.d/ 20 | 21 | ENTRYPOINT ["nginx"] 22 | CMD ["-g", "daemon off;"] 23 | -------------------------------------------------------------------------------- /nginx/coverage.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | server_name coverage.*; 5 | 6 | index index.html; 7 | root /srv/build/coverage; 8 | } 9 | -------------------------------------------------------------------------------- /nginx/dev.conf: -------------------------------------------------------------------------------- 1 | fastcgi_buffers 4 256k; 2 | fastcgi_buffer_size 256k; 3 | 4 | client_max_body_size 10m; 5 | -------------------------------------------------------------------------------- /nginx/monitoring.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | server_name monitoring.*; 5 | 6 | index monitoring.html; 7 | root /usr/share/nginx/html; 8 | 9 | location ~ ^/(status|ping)$ { 10 | access_log off; 11 | allow all; 12 | include fastcgi_params; 13 | fastcgi_pass appserver:9000; 14 | } 15 | 16 | 17 | location /nginx_status { 18 | stub_status on; 19 | access_log off; 20 | allow all; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /nginx/monitoring.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Monitoring 5 | 6 | 7 |

Monitoring

8 |

Nginx

9 |

10 | Here is the Nginx status page 11 |

12 |

php-fpm

13 |

Ping

14 |

15 | Check if php-fpm is alive. 16 |

17 | 18 |

Status pages

19 | 20 |

Summary pages

21 |

Pick a format :

22 | 28 | 29 |

Detailed pages

30 |

Pick a format :

31 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /npmtools/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | # Install packages that are specific to our stack 6 | RUN apt-get update && \ 7 | apt-get install --yes \ 8 | curl \ 9 | git \ 10 | nodejs-legacy \ 11 | npm \ 12 | wget \ 13 | zsh && \ 14 | rm --recursive --force /var/lib/apt/lists/* 15 | 16 | # install bower 17 | RUN npm install --global bower 18 | 19 | COPY entrypoint.sh / 20 | 21 | RUN chmod u+x /entrypoint.sh 22 | 23 | RUN mkdir /home/developer 24 | 25 | ENTRYPOINT ["/entrypoint.sh"] 26 | -------------------------------------------------------------------------------- /npmtools/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ "$USERNAME" -a ! "$(id "$USERNAME")" ]; then 5 | 6 | if [ -z "$UNIX_UID" ]; then 7 | UNIX_UID=1001 8 | fi 9 | 10 | # Create user 11 | useradd --uid "$UNIX_UID" --home /home/developer "$USERNAME" --shell "$CONTAINER_SHELL" 12 | 13 | chown "$USERNAME:$USERNAME" /home/developer 14 | 15 | fi 16 | 17 | exec "$@" 18 | -------------------------------------------------------------------------------- /php-console/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM greg0ire/php:latest 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && \ 6 | apt-get install --yes \ 7 | curl \ 8 | make \ 9 | git-core \ 10 | nodejs-legacy \ 11 | npm \ 12 | zsh && \ 13 | rm --recursive --force /var/lib/apt/lists/* 14 | 15 | # Install composer 16 | RUN curl --silent --show-error https://getcomposer.org/installer | php && \ 17 | mv composer.phar /usr/local/bin/composer 18 | 19 | # Install php-cs-fixer 20 | RUN curl --silent --show-error http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer 21 | RUN chmod a+x /usr/local/bin/php-cs-fixer 22 | 23 | ADD php-cli.ini /etc/php/cli/conf.d/30-dockerony.ini 24 | 25 | RUN phpdismod xdebug 26 | 27 | VOLUME /home/developer 28 | 29 | COPY entrypoint.sh / 30 | 31 | RUN chmod u+x /entrypoint.sh 32 | 33 | ENTRYPOINT ["/entrypoint.sh"] 34 | 35 | CMD ["tail", "--follow", "/var/log/dmesg"] 36 | -------------------------------------------------------------------------------- /php-console/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ "$USERNAME" -a ! "$(id "$USERNAME")" ]; then 5 | 6 | if [ -z "$UNIX_UID" ]; then 7 | UNIX_UID=1001 8 | fi 9 | 10 | # Create user 11 | useradd --uid "$UNIX_UID" --home /home/developer "$USERNAME" --shell "$CONTAINER_SHELL" 12 | 13 | chown "$USERNAME:$USERNAME" /home/developer 14 | fi 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /php-console/php-cli.ini: -------------------------------------------------------------------------------- 1 | date.timezone = "Europe/Paris" 2 | error_reporting = -1 3 | -------------------------------------------------------------------------------- /php-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM greg0ire/php:latest 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | # Install packages that are specific to our stack 6 | RUN apt-get update && \ 7 | apt-get install --yes \ 8 | php7.0-fpm && \ 9 | rm --recursive --force /var/lib/apt/lists/* 10 | 11 | # Sanctify (the opposite of daemonize :D ) php-fpm 12 | RUN sed -i -e 's/;daemonize\s*=\s*yes/daemonize = no/g' /etc/php/7.0/fpm/php-fpm.conf 13 | 14 | ADD www.conf /etc/php/7.0/fpm/pool.d/www.conf 15 | ADD php-fpm.ini /etc/php/7.0/fpm/php.ini 16 | 17 | COPY entrypoint.sh / 18 | 19 | RUN chmod u+x /entrypoint.sh 20 | RUN mkdir /run/php 21 | 22 | EXPOSE 9000 23 | ENTRYPOINT ["/entrypoint.sh"] 24 | 25 | CMD ["php-fpm7.0", "--nodaemonize"] 26 | -------------------------------------------------------------------------------- /php-fpm/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ "$USERNAME" -a ! "$(id "$USERNAME")" ]; then 5 | 6 | if [ -z "$UNIX_UID" ]; then 7 | UNIX_UID=1001 8 | fi 9 | 10 | # Create user 11 | useradd --uid "$UNIX_UID" "$USERNAME" 12 | 13 | # Replace www-data by $USERNAME 14 | sed --in-place --expression="s/www-data/$USERNAME/g" /etc/php/7.0/fpm/pool.d/www.conf 15 | 16 | fi 17 | 18 | exec "$@" 19 | -------------------------------------------------------------------------------- /php-fpm/php-fpm.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | ;;;;;;;;;;;;;;;;;;; 4 | ; About php.ini ; 5 | ;;;;;;;;;;;;;;;;;;; 6 | ; PHP's initialization file, generally called php.ini, is responsible for 7 | ; configuring many of the aspects of PHP's behavior. 8 | 9 | ; PHP attempts to find and load this configuration from a number of locations. 10 | ; The following is a summary of its search order: 11 | ; 1. SAPI module specific location. 12 | ; 2. The PHPRC environment variable. (As of PHP 5.2.0) 13 | ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) 14 | ; 4. Current working directory (except CLI) 15 | ; 5. The web server's directory (for SAPI modules), or directory of PHP 16 | ; (otherwise in Windows) 17 | ; 6. The directory from the --with-config-file-path compile time option, or the 18 | ; Windows directory (C:\windows or C:\winnt) 19 | ; See the PHP docs for more specific information. 20 | ; http://php.net/configuration.file 21 | 22 | ; The syntax of the file is extremely simple. Whitespace and lines 23 | ; beginning with a semicolon are silently ignored (as you probably guessed). 24 | ; Section headers (e.g. [Foo]) are also silently ignored, even though 25 | ; they might mean something in the future. 26 | 27 | ; Directives following the section heading [PATH=/www/mysite] only 28 | ; apply to PHP files in the /www/mysite directory. Directives 29 | ; following the section heading [HOST=www.example.com] only apply to 30 | ; PHP files served from www.example.com. Directives set in these 31 | ; special sections cannot be overridden by user-defined INI files or 32 | ; at runtime. Currently, [PATH=] and [HOST=] sections only work under 33 | ; CGI/FastCGI. 34 | ; http://php.net/ini.sections 35 | 36 | ; Directives are specified using the following syntax: 37 | ; directive = value 38 | ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. 39 | ; Directives are variables used to configure PHP or PHP extensions. 40 | ; There is no name validation. If PHP can't find an expected 41 | ; directive because it is not set or is mistyped, a default value will be used. 42 | 43 | ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one 44 | ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression 45 | ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a 46 | ; previously set variable or directive (e.g. ${foo}) 47 | 48 | ; Expressions in the INI file are limited to bitwise operators and parentheses: 49 | ; | bitwise OR 50 | ; ^ bitwise XOR 51 | ; & bitwise AND 52 | ; ~ bitwise NOT 53 | ; ! boolean NOT 54 | 55 | ; Boolean flags can be turned on using the values 1, On, True or Yes. 56 | ; They can be turned off using the values 0, Off, False or No. 57 | 58 | ; An empty string can be denoted by simply not writing anything after the equal 59 | ; sign, or by using the None keyword: 60 | 61 | ; foo = ; sets foo to an empty string 62 | ; foo = None ; sets foo to an empty string 63 | ; foo = "None" ; sets foo to the string 'None' 64 | 65 | ; If you use constants in your value, and these constants belong to a 66 | ; dynamically loaded extension (either a PHP extension or a Zend extension), 67 | ; you may only use these constants *after* the line that loads the extension. 68 | 69 | ;;;;;;;;;;;;;;;;;;; 70 | ; About this file ; 71 | ;;;;;;;;;;;;;;;;;;; 72 | ; PHP comes packaged with two INI files. One that is recommended to be used 73 | ; in production environments and one that is recommended to be used in 74 | ; development environments. 75 | 76 | ; php.ini-production contains settings which hold security, performance and 77 | ; best practices at its core. But please be aware, these settings may break 78 | ; compatibility with older or less security conscience applications. We 79 | ; recommending using the production ini in production and testing environments. 80 | 81 | ; php.ini-development is very similar to its production variant, except it is 82 | ; much more verbose when it comes to errors. We recommend using the 83 | ; development version only in development environments, as errors shown to 84 | ; application users can inadvertently leak otherwise secure information. 85 | 86 | ; This is php.ini-production INI file. 87 | 88 | ;;;;;;;;;;;;;;;;;;; 89 | ; Quick Reference ; 90 | ;;;;;;;;;;;;;;;;;;; 91 | ; The following are all the settings which are different in either the production 92 | ; or development versions of the INIs with respect to PHP's default behavior. 93 | ; Please see the actual settings later in the document for more details as to why 94 | ; we recommend these changes in PHP's behavior. 95 | 96 | ; display_errors 97 | ; Default Value: On 98 | ; Development Value: On 99 | ; Production Value: Off 100 | 101 | ; display_startup_errors 102 | ; Default Value: Off 103 | ; Development Value: On 104 | ; Production Value: Off 105 | 106 | ; error_reporting 107 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 108 | ; Development Value: E_ALL 109 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 110 | 111 | ; html_errors 112 | ; Default Value: On 113 | ; Development Value: On 114 | ; Production value: On 115 | 116 | ; log_errors 117 | ; Default Value: Off 118 | ; Development Value: On 119 | ; Production Value: On 120 | 121 | ; max_input_time 122 | ; Default Value: -1 (Unlimited) 123 | ; Development Value: 60 (60 seconds) 124 | ; Production Value: 60 (60 seconds) 125 | 126 | ; output_buffering 127 | ; Default Value: Off 128 | ; Development Value: 4096 129 | ; Production Value: 4096 130 | 131 | ; register_argc_argv 132 | ; Default Value: On 133 | ; Development Value: Off 134 | ; Production Value: Off 135 | 136 | ; request_order 137 | ; Default Value: None 138 | ; Development Value: "GP" 139 | ; Production Value: "GP" 140 | 141 | ; session.gc_divisor 142 | ; Default Value: 100 143 | ; Development Value: 1000 144 | ; Production Value: 1000 145 | 146 | ; session.hash_bits_per_character 147 | ; Default Value: 4 148 | ; Development Value: 5 149 | ; Production Value: 5 150 | 151 | ; short_open_tag 152 | ; Default Value: On 153 | ; Development Value: Off 154 | ; Production Value: Off 155 | 156 | ; track_errors 157 | ; Default Value: Off 158 | ; Development Value: On 159 | ; Production Value: Off 160 | 161 | ; url_rewriter.tags 162 | ; Default Value: "a=href,area=href,frame=src,form=,fieldset=" 163 | ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" 164 | ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" 165 | 166 | ; variables_order 167 | ; Default Value: "EGPCS" 168 | ; Development Value: "GPCS" 169 | ; Production Value: "GPCS" 170 | 171 | ;;;;;;;;;;;;;;;;;;;; 172 | ; php.ini Options ; 173 | ;;;;;;;;;;;;;;;;;;;; 174 | ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" 175 | ;user_ini.filename = ".user.ini" 176 | 177 | ; To disable this feature set this option to empty value 178 | ;user_ini.filename = 179 | 180 | ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) 181 | ;user_ini.cache_ttl = 300 182 | 183 | ;;;;;;;;;;;;;;;;;;;; 184 | ; Language Options ; 185 | ;;;;;;;;;;;;;;;;;;;; 186 | 187 | ; Enable the PHP scripting language engine under Apache. 188 | ; http://php.net/engine 189 | engine = On 190 | 191 | ; This directive determines whether or not PHP will recognize code between 192 | ; tags as PHP source which should be processed as such. It is 193 | ; generally recommended that should be used and that this feature 194 | ; should be disabled, as enabling it may result in issues when generating XML 195 | ; documents, however this remains supported for backward compatibility reasons. 196 | ; Note that this directive does not control the would work. 308 | ; http://php.net/syntax-highlighting 309 | ;highlight.string = #DD0000 310 | ;highlight.comment = #FF9900 311 | ;highlight.keyword = #007700 312 | ;highlight.default = #0000BB 313 | ;highlight.html = #000000 314 | 315 | ; If enabled, the request will be allowed to complete even if the user aborts 316 | ; the request. Consider enabling it if executing long requests, which may end up 317 | ; being interrupted by the user or a browser timing out. PHP's default behavior 318 | ; is to disable this feature. 319 | ; http://php.net/ignore-user-abort 320 | ;ignore_user_abort = On 321 | 322 | ; Determines the size of the realpath cache to be used by PHP. This value should 323 | ; be increased on systems where PHP opens many files to reflect the quantity of 324 | ; the file operations performed. 325 | ; http://php.net/realpath-cache-size 326 | ;realpath_cache_size = 16k 327 | 328 | ; Duration of time, in seconds for which to cache realpath information for a given 329 | ; file or directory. For systems with rarely changing files, consider increasing this 330 | ; value. 331 | ; http://php.net/realpath-cache-ttl 332 | ;realpath_cache_ttl = 120 333 | 334 | ; Enables or disables the circular reference collector. 335 | ; http://php.net/zend.enable-gc 336 | zend.enable_gc = On 337 | 338 | ; If enabled, scripts may be written in encodings that are incompatible with 339 | ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such 340 | ; encodings. To use this feature, mbstring extension must be enabled. 341 | ; Default: Off 342 | ;zend.multibyte = Off 343 | 344 | ; Allows to set the default encoding for the scripts. This value will be used 345 | ; unless "declare(encoding=...)" directive appears at the top of the script. 346 | ; Only affects if zend.multibyte is set. 347 | ; Default: "" 348 | ;zend.script_encoding = 349 | 350 | ;;;;;;;;;;;;;;;;; 351 | ; Miscellaneous ; 352 | ;;;;;;;;;;;;;;;;; 353 | 354 | ; Decides whether PHP may expose the fact that it is installed on the server 355 | ; (e.g. by adding its signature to the Web server header). It is no security 356 | ; threat in any way, but it makes it possible to determine whether you use PHP 357 | ; on your server or not. 358 | ; http://php.net/expose-php 359 | expose_php = Off 360 | 361 | ;;;;;;;;;;;;;;;;;;; 362 | ; Resource Limits ; 363 | ;;;;;;;;;;;;;;;;;;; 364 | 365 | ; Maximum execution time of each script, in seconds 366 | ; http://php.net/max-execution-time 367 | ; Note: This directive is hardcoded to 0 for the CLI SAPI 368 | max_execution_time = 30 369 | 370 | ; Maximum amount of time each script may spend parsing request data. It's a good 371 | ; idea to limit this time on productions servers in order to eliminate unexpectedly 372 | ; long running scripts. 373 | ; Note: This directive is hardcoded to -1 for the CLI SAPI 374 | ; Default Value: -1 (Unlimited) 375 | ; Development Value: 60 (60 seconds) 376 | ; Production Value: 60 (60 seconds) 377 | ; http://php.net/max-input-time 378 | max_input_time = 60 379 | 380 | ; Maximum input variable nesting level 381 | ; http://php.net/max-input-nesting-level 382 | ;max_input_nesting_level = 64 383 | 384 | ; How many GET/POST/COOKIE input variables may be accepted 385 | ; max_input_vars = 1000 386 | 387 | ; Maximum amount of memory a script may consume (128MB) 388 | ; http://php.net/memory-limit 389 | memory_limit = 128M 390 | 391 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 392 | ; Error handling and logging ; 393 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 394 | 395 | ; This directive informs PHP of which errors, warnings and notices you would like 396 | ; it to take action for. The recommended way of setting values for this 397 | ; directive is through the use of the error level constants and bitwise 398 | ; operators. The error level constants are below here for convenience as well as 399 | ; some common settings and their meanings. 400 | ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT 401 | ; those related to E_NOTICE and E_STRICT, which together cover best practices and 402 | ; recommended coding standards in PHP. For performance reasons, this is the 403 | ; recommend error reporting setting. Your production server shouldn't be wasting 404 | ; resources complaining about best practices and coding standards. That's what 405 | ; development servers and development settings are for. 406 | ; Note: The php.ini-development file has this setting as E_ALL. This 407 | ; means it pretty much reports everything which is exactly what you want during 408 | ; development and early testing. 409 | ; 410 | ; Error Level Constants: 411 | ; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) 412 | ; E_ERROR - fatal run-time errors 413 | ; E_RECOVERABLE_ERROR - almost fatal run-time errors 414 | ; E_WARNING - run-time warnings (non-fatal errors) 415 | ; E_PARSE - compile-time parse errors 416 | ; E_NOTICE - run-time notices (these are warnings which often result 417 | ; from a bug in your code, but it's possible that it was 418 | ; intentional (e.g., using an uninitialized variable and 419 | ; relying on the fact it is automatically initialized to an 420 | ; empty string) 421 | ; E_STRICT - run-time notices, enable to have PHP suggest changes 422 | ; to your code which will ensure the best interoperability 423 | ; and forward compatibility of your code 424 | ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup 425 | ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's 426 | ; initial startup 427 | ; E_COMPILE_ERROR - fatal compile-time errors 428 | ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) 429 | ; E_USER_ERROR - user-generated error message 430 | ; E_USER_WARNING - user-generated warning message 431 | ; E_USER_NOTICE - user-generated notice message 432 | ; E_DEPRECATED - warn about code that will not work in future versions 433 | ; of PHP 434 | ; E_USER_DEPRECATED - user-generated deprecation warnings 435 | ; 436 | ; Common Values: 437 | ; E_ALL (Show all errors, warnings and notices including coding standards.) 438 | ; E_ALL & ~E_NOTICE (Show all errors, except for notices) 439 | ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) 440 | ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) 441 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 442 | ; Development Value: E_ALL 443 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 444 | ; http://php.net/error-reporting 445 | error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT 446 | 447 | ; This directive controls whether or not and where PHP will output errors, 448 | ; notices and warnings too. Error output is very useful during development, but 449 | ; it could be very dangerous in production environments. Depending on the code 450 | ; which is triggering the error, sensitive information could potentially leak 451 | ; out of your application such as database usernames and passwords or worse. 452 | ; For production environments, we recommend logging errors rather than 453 | ; sending them to STDOUT. 454 | ; Possible Values: 455 | ; Off = Do not display any errors 456 | ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) 457 | ; On or stdout = Display errors to STDOUT 458 | ; Default Value: On 459 | ; Development Value: On 460 | ; Production Value: Off 461 | ; http://php.net/display-errors 462 | display_errors = On 463 | 464 | ; The display of errors which occur during PHP's startup sequence are handled 465 | ; separately from display_errors. PHP's default behavior is to suppress those 466 | ; errors from clients. Turning the display of startup errors on can be useful in 467 | ; debugging configuration problems. We strongly recommend you 468 | ; set this to 'off' for production servers. 469 | ; Default Value: Off 470 | ; Development Value: On 471 | ; Production Value: Off 472 | ; http://php.net/display-startup-errors 473 | display_startup_errors = Off 474 | 475 | ; Besides displaying errors, PHP can also log errors to locations such as a 476 | ; server-specific log, STDERR, or a location specified by the error_log 477 | ; directive found below. While errors should not be displayed on productions 478 | ; servers they should still be monitored and logging is a great way to do that. 479 | ; Default Value: Off 480 | ; Development Value: On 481 | ; Production Value: On 482 | ; http://php.net/log-errors 483 | log_errors = On 484 | 485 | ; Set maximum length of log_errors. In error_log information about the source is 486 | ; added. The default is 1024 and 0 allows to not apply any maximum length at all. 487 | ; http://php.net/log-errors-max-len 488 | log_errors_max_len = 1024 489 | 490 | ; Do not log repeated messages. Repeated errors must occur in same file on same 491 | ; line unless ignore_repeated_source is set true. 492 | ; http://php.net/ignore-repeated-errors 493 | ignore_repeated_errors = Off 494 | 495 | ; Ignore source of message when ignoring repeated messages. When this setting 496 | ; is On you will not log errors with repeated messages from different files or 497 | ; source lines. 498 | ; http://php.net/ignore-repeated-source 499 | ignore_repeated_source = Off 500 | 501 | ; If this parameter is set to Off, then memory leaks will not be shown (on 502 | ; stdout or in the log). This has only effect in a debug compile, and if 503 | ; error reporting includes E_WARNING in the allowed list 504 | ; http://php.net/report-memleaks 505 | report_memleaks = On 506 | 507 | ; This setting is on by default. 508 | ;report_zend_debug = 0 509 | 510 | ; Store the last error/warning message in $php_errormsg (boolean). Setting this value 511 | ; to On can assist in debugging and is appropriate for development servers. It should 512 | ; however be disabled on production servers. 513 | ; Default Value: Off 514 | ; Development Value: On 515 | ; Production Value: Off 516 | ; http://php.net/track-errors 517 | track_errors = Off 518 | 519 | ; Turn off normal error reporting and emit XML-RPC error XML 520 | ; http://php.net/xmlrpc-errors 521 | ;xmlrpc_errors = 0 522 | 523 | ; An XML-RPC faultCode 524 | ;xmlrpc_error_number = 0 525 | 526 | ; When PHP displays or logs an error, it has the capability of formatting the 527 | ; error message as HTML for easier reading. This directive controls whether 528 | ; the error message is formatted as HTML or not. 529 | ; Note: This directive is hardcoded to Off for the CLI SAPI 530 | ; Default Value: On 531 | ; Development Value: On 532 | ; Production value: On 533 | ; http://php.net/html-errors 534 | html_errors = On 535 | 536 | ; If html_errors is set to On *and* docref_root is not empty, then PHP 537 | ; produces clickable error messages that direct to a page describing the error 538 | ; or function causing the error in detail. 539 | ; You can download a copy of the PHP manual from http://php.net/docs 540 | ; and change docref_root to the base URL of your local copy including the 541 | ; leading '/'. You must also specify the file extension being used including 542 | ; the dot. PHP's default behavior is to leave these settings empty, in which 543 | ; case no links to documentation are generated. 544 | ; Note: Never use this feature for production boxes. 545 | ; http://php.net/docref-root 546 | ; Examples 547 | ;docref_root = "/phpmanual/" 548 | 549 | ; http://php.net/docref-ext 550 | ;docref_ext = .html 551 | 552 | ; String to output before an error message. PHP's default behavior is to leave 553 | ; this setting blank. 554 | ; http://php.net/error-prepend-string 555 | ; Example: 556 | ;error_prepend_string = "" 557 | 558 | ; String to output after an error message. PHP's default behavior is to leave 559 | ; this setting blank. 560 | ; http://php.net/error-append-string 561 | ; Example: 562 | ;error_append_string = "" 563 | 564 | ; Log errors to specified file. PHP's default behavior is to leave this value 565 | ; empty. 566 | ; http://php.net/error-log 567 | ; Example: 568 | ;error_log = php_errors.log 569 | ; Log errors to syslog (Event Log on Windows). 570 | ;error_log = syslog 571 | 572 | ;windows.show_crt_warning 573 | ; Default value: 0 574 | ; Development value: 0 575 | ; Production value: 0 576 | 577 | ;;;;;;;;;;;;;;;;; 578 | ; Data Handling ; 579 | ;;;;;;;;;;;;;;;;; 580 | 581 | ; The separator used in PHP generated URLs to separate arguments. 582 | ; PHP's default setting is "&". 583 | ; http://php.net/arg-separator.output 584 | ; Example: 585 | ;arg_separator.output = "&" 586 | 587 | ; List of separator(s) used by PHP to parse input URLs into variables. 588 | ; PHP's default setting is "&". 589 | ; NOTE: Every character in this directive is considered as separator! 590 | ; http://php.net/arg-separator.input 591 | ; Example: 592 | ;arg_separator.input = ";&" 593 | 594 | ; This directive determines which super global arrays are registered when PHP 595 | ; starts up. G,P,C,E & S are abbreviations for the following respective super 596 | ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty 597 | ; paid for the registration of these arrays and because ENV is not as commonly 598 | ; used as the others, ENV is not recommended on productions servers. You 599 | ; can still get access to the environment variables through getenv() should you 600 | ; need to. 601 | ; Default Value: "EGPCS" 602 | ; Development Value: "GPCS" 603 | ; Production Value: "GPCS"; 604 | ; http://php.net/variables-order 605 | variables_order = "GPCS" 606 | 607 | ; This directive determines which super global data (G,P & C) should be 608 | ; registered into the super global array REQUEST. If so, it also determines 609 | ; the order in which that data is registered. The values for this directive 610 | ; are specified in the same manner as the variables_order directive, 611 | ; EXCEPT one. Leaving this value empty will cause PHP to use the value set 612 | ; in the variables_order directive. It does not mean it will leave the super 613 | ; globals array REQUEST empty. 614 | ; Default Value: None 615 | ; Development Value: "GP" 616 | ; Production Value: "GP" 617 | ; http://php.net/request-order 618 | request_order = "GP" 619 | 620 | ; This directive determines whether PHP registers $argv & $argc each time it 621 | ; runs. $argv contains an array of all the arguments passed to PHP when a script 622 | ; is invoked. $argc contains an integer representing the number of arguments 623 | ; that were passed when the script was invoked. These arrays are extremely 624 | ; useful when running scripts from the command line. When this directive is 625 | ; enabled, registering these variables consumes CPU cycles and memory each time 626 | ; a script is executed. For performance reasons, this feature should be disabled 627 | ; on production servers. 628 | ; Note: This directive is hardcoded to On for the CLI SAPI 629 | ; Default Value: On 630 | ; Development Value: Off 631 | ; Production Value: Off 632 | ; http://php.net/register-argc-argv 633 | register_argc_argv = Off 634 | 635 | ; When enabled, the ENV, REQUEST and SERVER variables are created when they're 636 | ; first used (Just In Time) instead of when the script starts. If these 637 | ; variables are not used within a script, having this directive on will result 638 | ; in a performance gain. The PHP directive register_argc_argv must be disabled 639 | ; for this directive to have any affect. 640 | ; http://php.net/auto-globals-jit 641 | auto_globals_jit = On 642 | 643 | ; Whether PHP will read the POST data. 644 | ; This option is enabled by default. 645 | ; Most likely, you won't want to disable this option globally. It causes $_POST 646 | ; and $_FILES to always be empty; the only way you will be able to read the 647 | ; POST data will be through the php://input stream wrapper. This can be useful 648 | ; to proxy requests or to process the POST data in a memory efficient fashion. 649 | ; http://php.net/enable-post-data-reading 650 | ;enable_post_data_reading = Off 651 | 652 | ; Maximum size of POST data that PHP will accept. 653 | ; Its value may be 0 to disable the limit. It is ignored if POST data reading 654 | ; is disabled through enable_post_data_reading. 655 | ; http://php.net/post-max-size 656 | post_max_size = 8M 657 | 658 | ; Automatically add files before PHP document. 659 | ; http://php.net/auto-prepend-file 660 | auto_prepend_file = 661 | 662 | ; Automatically add files after PHP document. 663 | ; http://php.net/auto-append-file 664 | auto_append_file = 665 | 666 | ; By default, PHP will output a media type using the Content-Type header. To 667 | ; disable this, simply set it to be empty. 668 | ; 669 | ; PHP's built-in default media type is set to text/html. 670 | ; http://php.net/default-mimetype 671 | default_mimetype = "text/html" 672 | 673 | ; PHP's default character set is set to UTF-8. 674 | ; http://php.net/default-charset 675 | default_charset = "UTF-8" 676 | 677 | ; PHP internal character encoding is set to empty. 678 | ; If empty, default_charset is used. 679 | ; http://php.net/internal-encoding 680 | ;internal_encoding = 681 | 682 | ; PHP input character encoding is set to empty. 683 | ; If empty, default_charset is used. 684 | ; http://php.net/input-encoding 685 | ;input_encoding = 686 | 687 | ; PHP output character encoding is set to empty. 688 | ; If empty, default_charset is used. 689 | ; mbstring or iconv output handler is used. 690 | ; See also output_buffer. 691 | ; http://php.net/output-encoding 692 | ;output_encoding = 693 | 694 | ;;;;;;;;;;;;;;;;;;;;;;;;; 695 | ; Paths and Directories ; 696 | ;;;;;;;;;;;;;;;;;;;;;;;;; 697 | 698 | ; UNIX: "/path1:/path2" 699 | ;include_path = ".:/usr/share/php" 700 | ; 701 | ; Windows: "\path1;\path2" 702 | ;include_path = ".;c:\php\includes" 703 | ; 704 | ; PHP's default setting for include_path is ".;/path/to/php/pear" 705 | ; http://php.net/include-path 706 | 707 | ; The root of the PHP pages, used only if nonempty. 708 | ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root 709 | ; if you are running php as a CGI under any web server (other than IIS) 710 | ; see documentation for security issues. The alternate is to use the 711 | ; cgi.force_redirect configuration below 712 | ; http://php.net/doc-root 713 | doc_root = 714 | 715 | ; The directory under which PHP opens the script using /~username used only 716 | ; if nonempty. 717 | ; http://php.net/user-dir 718 | user_dir = 719 | 720 | ; Directory in which the loadable extensions (modules) reside. 721 | ; http://php.net/extension-dir 722 | ; extension_dir = "./" 723 | ; On windows: 724 | ; extension_dir = "ext" 725 | 726 | ; Directory where the temporary files should be placed. 727 | ; Defaults to the system default (see sys_get_temp_dir) 728 | ; sys_temp_dir = "/tmp" 729 | 730 | ; Whether or not to enable the dl() function. The dl() function does NOT work 731 | ; properly in multithreaded servers, such as IIS or Zeus, and is automatically 732 | ; disabled on them. 733 | ; http://php.net/enable-dl 734 | enable_dl = Off 735 | 736 | ; cgi.force_redirect is necessary to provide security running PHP as a CGI under 737 | ; most web servers. Left undefined, PHP turns this on by default. You can 738 | ; turn it off here AT YOUR OWN RISK 739 | ; **You CAN safely turn this off for IIS, in fact, you MUST.** 740 | ; http://php.net/cgi.force-redirect 741 | ;cgi.force_redirect = 1 742 | 743 | ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with 744 | ; every request. PHP's default behavior is to disable this feature. 745 | ;cgi.nph = 1 746 | 747 | ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape 748 | ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP 749 | ; will look for to know it is OK to continue execution. Setting this variable MAY 750 | ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. 751 | ; http://php.net/cgi.redirect-status-env 752 | ;cgi.redirect_status_env = 753 | 754 | ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's 755 | ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok 756 | ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting 757 | ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting 758 | ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts 759 | ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. 760 | ; http://php.net/cgi.fix-pathinfo 761 | ;cgi.fix_pathinfo=1 762 | 763 | ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate 764 | ; security tokens of the calling client. This allows IIS to define the 765 | ; security context that the request runs under. mod_fastcgi under Apache 766 | ; does not currently support this feature (03/17/2002) 767 | ; Set to 1 if running under IIS. Default is zero. 768 | ; http://php.net/fastcgi.impersonate 769 | ;fastcgi.impersonate = 1 770 | 771 | ; Disable logging through FastCGI connection. PHP's default behavior is to enable 772 | ; this feature. 773 | ;fastcgi.logging = 0 774 | 775 | ; cgi.rfc2616_headers configuration option tells PHP what type of headers to 776 | ; use when sending HTTP response code. If set to 0, PHP sends Status: header that 777 | ; is supported by Apache. When this option is set to 1, PHP will send 778 | ; RFC2616 compliant header. 779 | ; Default is zero. 780 | ; http://php.net/cgi.rfc2616-headers 781 | ;cgi.rfc2616_headers = 0 782 | 783 | ;;;;;;;;;;;;;;;; 784 | ; File Uploads ; 785 | ;;;;;;;;;;;;;;;; 786 | 787 | ; Whether to allow HTTP file uploads. 788 | ; http://php.net/file-uploads 789 | file_uploads = On 790 | 791 | ; Temporary directory for HTTP uploaded files (will use system default if not 792 | ; specified). 793 | ; http://php.net/upload-tmp-dir 794 | ;upload_tmp_dir = 795 | 796 | ; Maximum allowed size for uploaded files. 797 | ; http://php.net/upload-max-filesize 798 | upload_max_filesize = 2M 799 | 800 | ; Maximum number of files that can be uploaded via a single request 801 | max_file_uploads = 20 802 | 803 | ;;;;;;;;;;;;;;;;;; 804 | ; Fopen wrappers ; 805 | ;;;;;;;;;;;;;;;;;; 806 | 807 | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. 808 | ; http://php.net/allow-url-fopen 809 | allow_url_fopen = On 810 | 811 | ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. 812 | ; http://php.net/allow-url-include 813 | allow_url_include = Off 814 | 815 | ; Define the anonymous ftp password (your email address). PHP's default setting 816 | ; for this is empty. 817 | ; http://php.net/from 818 | ;from="john@doe.com" 819 | 820 | ; Define the User-Agent string. PHP's default setting for this is empty. 821 | ; http://php.net/user-agent 822 | ;user_agent="PHP" 823 | 824 | ; Default timeout for socket based streams (seconds) 825 | ; http://php.net/default-socket-timeout 826 | default_socket_timeout = 60 827 | 828 | ; If your scripts have to deal with files from Macintosh systems, 829 | ; or you are running on a Mac and need to deal with files from 830 | ; unix or win32 systems, setting this flag will cause PHP to 831 | ; automatically detect the EOL character in those files so that 832 | ; fgets() and file() will work regardless of the source of the file. 833 | ; http://php.net/auto-detect-line-endings 834 | ;auto_detect_line_endings = Off 835 | 836 | ;;;;;;;;;;;;;;;;;;;;;; 837 | ; Dynamic Extensions ; 838 | ;;;;;;;;;;;;;;;;;;;;;; 839 | 840 | ; If you wish to have an extension loaded automatically, use the following 841 | ; syntax: 842 | ; 843 | ; extension=modulename.extension 844 | ; 845 | ; For example, on Windows: 846 | ; 847 | ; extension=msql.dll 848 | ; 849 | ; ... or under UNIX: 850 | ; 851 | ; extension=msql.so 852 | ; 853 | ; ... or with a path: 854 | ; 855 | ; extension=/path/to/extension/msql.so 856 | ; 857 | ; If you only provide the name of the extension, PHP will look for it in its 858 | ; default extension directory. 859 | ; 860 | ; Windows Extensions 861 | ; Note that ODBC support is built in, so no dll is needed for it. 862 | ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+) 863 | ; extension folders as well as the separate PECL DLL download (PHP 5+). 864 | ; Be sure to appropriately set the extension_dir directive. 865 | ; 866 | ;extension=php_bz2.dll 867 | ;extension=php_curl.dll 868 | ;extension=php_fileinfo.dll 869 | ;extension=php_gd2.dll 870 | ;extension=php_gettext.dll 871 | ;extension=php_gmp.dll 872 | ;extension=php_intl.dll 873 | ;extension=php_imap.dll 874 | ;extension=php_interbase.dll 875 | ;extension=php_ldap.dll 876 | ;extension=php_mbstring.dll 877 | ;extension=php_exif.dll ; Must be after mbstring as it depends on it 878 | ;extension=php_mysqli.dll 879 | ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client 880 | ;extension=php_openssl.dll 881 | ;extension=php_pdo_firebird.dll 882 | ;extension=php_pdo_mysql.dll 883 | ;extension=php_pdo_oci.dll 884 | ;extension=php_pdo_odbc.dll 885 | ;extension=php_pdo_pgsql.dll 886 | ;extension=php_pdo_sqlite.dll 887 | ;extension=php_pgsql.dll 888 | ;extension=php_shmop.dll 889 | 890 | ; The MIBS data available in the PHP distribution must be installed. 891 | ; See http://www.php.net/manual/en/snmp.installation.php 892 | ;extension=php_snmp.dll 893 | 894 | ;extension=php_soap.dll 895 | ;extension=php_sockets.dll 896 | ;extension=php_sqlite3.dll 897 | ;extension=php_tidy.dll 898 | ;extension=php_xmlrpc.dll 899 | ;extension=php_xsl.dll 900 | 901 | ;;;;;;;;;;;;;;;;;;; 902 | ; Module Settings ; 903 | ;;;;;;;;;;;;;;;;;;; 904 | 905 | [CLI Server] 906 | ; Whether the CLI web server uses ANSI color coding in its terminal output. 907 | cli_server.color = On 908 | 909 | [Date] 910 | ; Defines the default timezone used by the date functions 911 | ; http://php.net/date.timezone 912 | date.timezone = "Europe/Paris" 913 | 914 | ; http://php.net/date.default-latitude 915 | ;date.default_latitude = 31.7667 916 | 917 | ; http://php.net/date.default-longitude 918 | ;date.default_longitude = 35.2333 919 | 920 | ; http://php.net/date.sunrise-zenith 921 | ;date.sunrise_zenith = 90.583333 922 | 923 | ; http://php.net/date.sunset-zenith 924 | ;date.sunset_zenith = 90.583333 925 | 926 | [filter] 927 | ; http://php.net/filter.default 928 | ;filter.default = unsafe_raw 929 | 930 | ; http://php.net/filter.default-flags 931 | ;filter.default_flags = 932 | 933 | [iconv] 934 | ; Use of this INI entry is deprecated, use global input_encoding instead. 935 | ; If empty, default_charset or input_encoding or iconv.input_encoding is used. 936 | ; The precedence is: default_charset < intput_encoding < iconv.input_encoding 937 | ;iconv.input_encoding = 938 | 939 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 940 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 941 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 942 | ;iconv.internal_encoding = 943 | 944 | ; Use of this INI entry is deprecated, use global output_encoding instead. 945 | ; If empty, default_charset or output_encoding or iconv.output_encoding is used. 946 | ; The precedence is: default_charset < output_encoding < iconv.output_encoding 947 | ; To use an output encoding conversion, iconv's output handler must be set 948 | ; otherwise output encoding conversion cannot be performed. 949 | ;iconv.output_encoding = 950 | 951 | [intl] 952 | ;intl.default_locale = 953 | ; This directive allows you to produce PHP errors when some error 954 | ; happens within intl functions. The value is the level of the error produced. 955 | ; Default is 0, which does not produce any errors. 956 | ;intl.error_level = E_WARNING 957 | 958 | [sqlite3] 959 | ;sqlite3.extension_dir = 960 | 961 | [Pcre] 962 | ;PCRE library backtracking limit. 963 | ; http://php.net/pcre.backtrack-limit 964 | ;pcre.backtrack_limit=100000 965 | 966 | ;PCRE library recursion limit. 967 | ;Please note that if you set this value to a high number you may consume all 968 | ;the available process stack and eventually crash PHP (due to reaching the 969 | ;stack size limit imposed by the Operating System). 970 | ; http://php.net/pcre.recursion-limit 971 | ;pcre.recursion_limit=100000 972 | 973 | ;Enables or disables JIT compilation of patterns. This requires the PCRE 974 | ;library to be compiled with JIT support. 975 | ;pcre.jit=1 976 | 977 | [Pdo] 978 | ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" 979 | ; http://php.net/pdo-odbc.connection-pooling 980 | ;pdo_odbc.connection_pooling=strict 981 | 982 | ;pdo_odbc.db2_instance_name 983 | 984 | [Pdo_mysql] 985 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 986 | ; http://php.net/pdo_mysql.cache_size 987 | pdo_mysql.cache_size = 2000 988 | 989 | ; Default socket name for local MySQL connects. If empty, uses the built-in 990 | ; MySQL defaults. 991 | ; http://php.net/pdo_mysql.default-socket 992 | pdo_mysql.default_socket= 993 | 994 | [Phar] 995 | ; http://php.net/phar.readonly 996 | ;phar.readonly = On 997 | 998 | ; http://php.net/phar.require-hash 999 | ;phar.require_hash = On 1000 | 1001 | ;phar.cache_list = 1002 | 1003 | [mail function] 1004 | ; For Win32 only. 1005 | ; http://php.net/smtp 1006 | SMTP = localhost 1007 | ; http://php.net/smtp-port 1008 | smtp_port = 25 1009 | 1010 | ; For Win32 only. 1011 | ; http://php.net/sendmail-from 1012 | ;sendmail_from = me@example.com 1013 | 1014 | ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). 1015 | ; http://php.net/sendmail-path 1016 | ;sendmail_path = 1017 | 1018 | ; Force the addition of the specified parameters to be passed as extra parameters 1019 | ; to the sendmail binary. These parameters will always replace the value of 1020 | ; the 5th parameter to mail(). 1021 | ;mail.force_extra_parameters = 1022 | 1023 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename 1024 | mail.add_x_header = On 1025 | 1026 | ; The path to a log file that will log all mail() calls. Log entries include 1027 | ; the full path of the script, line number, To address and headers. 1028 | ;mail.log = 1029 | ; Log mail to syslog (Event Log on Windows). 1030 | ;mail.log = syslog 1031 | 1032 | [SQL] 1033 | ; http://php.net/sql.safe-mode 1034 | sql.safe_mode = Off 1035 | 1036 | [ODBC] 1037 | ; http://php.net/odbc.default-db 1038 | ;odbc.default_db = Not yet implemented 1039 | 1040 | ; http://php.net/odbc.default-user 1041 | ;odbc.default_user = Not yet implemented 1042 | 1043 | ; http://php.net/odbc.default-pw 1044 | ;odbc.default_pw = Not yet implemented 1045 | 1046 | ; Controls the ODBC cursor model. 1047 | ; Default: SQL_CURSOR_STATIC (default). 1048 | ;odbc.default_cursortype 1049 | 1050 | ; Allow or prevent persistent links. 1051 | ; http://php.net/odbc.allow-persistent 1052 | odbc.allow_persistent = On 1053 | 1054 | ; Check that a connection is still valid before reuse. 1055 | ; http://php.net/odbc.check-persistent 1056 | odbc.check_persistent = On 1057 | 1058 | ; Maximum number of persistent links. -1 means no limit. 1059 | ; http://php.net/odbc.max-persistent 1060 | odbc.max_persistent = -1 1061 | 1062 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1063 | ; http://php.net/odbc.max-links 1064 | odbc.max_links = -1 1065 | 1066 | ; Handling of LONG fields. Returns number of bytes to variables. 0 means 1067 | ; passthru. 1068 | ; http://php.net/odbc.defaultlrl 1069 | odbc.defaultlrl = 4096 1070 | 1071 | ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. 1072 | ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation 1073 | ; of odbc.defaultlrl and odbc.defaultbinmode 1074 | ; http://php.net/odbc.defaultbinmode 1075 | odbc.defaultbinmode = 1 1076 | 1077 | ;birdstep.max_links = -1 1078 | 1079 | [Interbase] 1080 | ; Allow or prevent persistent links. 1081 | ibase.allow_persistent = 1 1082 | 1083 | ; Maximum number of persistent links. -1 means no limit. 1084 | ibase.max_persistent = -1 1085 | 1086 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1087 | ibase.max_links = -1 1088 | 1089 | ; Default database name for ibase_connect(). 1090 | ;ibase.default_db = 1091 | 1092 | ; Default username for ibase_connect(). 1093 | ;ibase.default_user = 1094 | 1095 | ; Default password for ibase_connect(). 1096 | ;ibase.default_password = 1097 | 1098 | ; Default charset for ibase_connect(). 1099 | ;ibase.default_charset = 1100 | 1101 | ; Default timestamp format. 1102 | ibase.timestampformat = "%Y-%m-%d %H:%M:%S" 1103 | 1104 | ; Default date format. 1105 | ibase.dateformat = "%Y-%m-%d" 1106 | 1107 | ; Default time format. 1108 | ibase.timeformat = "%H:%M:%S" 1109 | 1110 | [MySQLi] 1111 | 1112 | ; Maximum number of persistent links. -1 means no limit. 1113 | ; http://php.net/mysqli.max-persistent 1114 | mysqli.max_persistent = -1 1115 | 1116 | ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements 1117 | ; http://php.net/mysqli.allow_local_infile 1118 | ;mysqli.allow_local_infile = On 1119 | 1120 | ; Allow or prevent persistent links. 1121 | ; http://php.net/mysqli.allow-persistent 1122 | mysqli.allow_persistent = On 1123 | 1124 | ; Maximum number of links. -1 means no limit. 1125 | ; http://php.net/mysqli.max-links 1126 | mysqli.max_links = -1 1127 | 1128 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 1129 | ; http://php.net/mysqli.cache_size 1130 | mysqli.cache_size = 2000 1131 | 1132 | ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use 1133 | ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the 1134 | ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look 1135 | ; at MYSQL_PORT. 1136 | ; http://php.net/mysqli.default-port 1137 | mysqli.default_port = 3306 1138 | 1139 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1140 | ; MySQL defaults. 1141 | ; http://php.net/mysqli.default-socket 1142 | mysqli.default_socket = 1143 | 1144 | ; Default host for mysql_connect() (doesn't apply in safe mode). 1145 | ; http://php.net/mysqli.default-host 1146 | mysqli.default_host = 1147 | 1148 | ; Default user for mysql_connect() (doesn't apply in safe mode). 1149 | ; http://php.net/mysqli.default-user 1150 | mysqli.default_user = 1151 | 1152 | ; Default password for mysqli_connect() (doesn't apply in safe mode). 1153 | ; Note that this is generally a *bad* idea to store passwords in this file. 1154 | ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") 1155 | ; and reveal this password! And of course, any users with read access to this 1156 | ; file will be able to reveal the password as well. 1157 | ; http://php.net/mysqli.default-pw 1158 | mysqli.default_pw = 1159 | 1160 | ; Allow or prevent reconnect 1161 | mysqli.reconnect = Off 1162 | 1163 | [mysqlnd] 1164 | ; Enable / Disable collection of general statistics by mysqlnd which can be 1165 | ; used to tune and monitor MySQL operations. 1166 | ; http://php.net/mysqlnd.collect_statistics 1167 | mysqlnd.collect_statistics = On 1168 | 1169 | ; Enable / Disable collection of memory usage statistics by mysqlnd which can be 1170 | ; used to tune and monitor MySQL operations. 1171 | ; http://php.net/mysqlnd.collect_memory_statistics 1172 | mysqlnd.collect_memory_statistics = Off 1173 | 1174 | ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. 1175 | ; http://php.net/mysqlnd.net_cmd_buffer_size 1176 | ;mysqlnd.net_cmd_buffer_size = 2048 1177 | 1178 | ; Size of a pre-allocated buffer used for reading data sent by the server in 1179 | ; bytes. 1180 | ; http://php.net/mysqlnd.net_read_buffer_size 1181 | ;mysqlnd.net_read_buffer_size = 32768 1182 | 1183 | [OCI8] 1184 | 1185 | ; Connection: Enables privileged connections using external 1186 | ; credentials (OCI_SYSOPER, OCI_SYSDBA) 1187 | ; http://php.net/oci8.privileged-connect 1188 | ;oci8.privileged_connect = Off 1189 | 1190 | ; Connection: The maximum number of persistent OCI8 connections per 1191 | ; process. Using -1 means no limit. 1192 | ; http://php.net/oci8.max-persistent 1193 | ;oci8.max_persistent = -1 1194 | 1195 | ; Connection: The maximum number of seconds a process is allowed to 1196 | ; maintain an idle persistent connection. Using -1 means idle 1197 | ; persistent connections will be maintained forever. 1198 | ; http://php.net/oci8.persistent-timeout 1199 | ;oci8.persistent_timeout = -1 1200 | 1201 | ; Connection: The number of seconds that must pass before issuing a 1202 | ; ping during oci_pconnect() to check the connection validity. When 1203 | ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables 1204 | ; pings completely. 1205 | ; http://php.net/oci8.ping-interval 1206 | ;oci8.ping_interval = 60 1207 | 1208 | ; Connection: Set this to a user chosen connection class to be used 1209 | ; for all pooled server requests with Oracle 11g Database Resident 1210 | ; Connection Pooling (DRCP). To use DRCP, this value should be set to 1211 | ; the same string for all web servers running the same application, 1212 | ; the database pool must be configured, and the connection string must 1213 | ; specify to use a pooled server. 1214 | ;oci8.connection_class = 1215 | 1216 | ; High Availability: Using On lets PHP receive Fast Application 1217 | ; Notification (FAN) events generated when a database node fails. The 1218 | ; database must also be configured to post FAN events. 1219 | ;oci8.events = Off 1220 | 1221 | ; Tuning: This option enables statement caching, and specifies how 1222 | ; many statements to cache. Using 0 disables statement caching. 1223 | ; http://php.net/oci8.statement-cache-size 1224 | ;oci8.statement_cache_size = 20 1225 | 1226 | ; Tuning: Enables statement prefetching and sets the default number of 1227 | ; rows that will be fetched automatically after statement execution. 1228 | ; http://php.net/oci8.default-prefetch 1229 | ;oci8.default_prefetch = 100 1230 | 1231 | ; Compatibility. Using On means oci_close() will not close 1232 | ; oci_connect() and oci_new_connect() connections. 1233 | ; http://php.net/oci8.old-oci-close-semantics 1234 | ;oci8.old_oci_close_semantics = Off 1235 | 1236 | [PostgreSQL] 1237 | ; Allow or prevent persistent links. 1238 | ; http://php.net/pgsql.allow-persistent 1239 | pgsql.allow_persistent = On 1240 | 1241 | ; Detect broken persistent links always with pg_pconnect(). 1242 | ; Auto reset feature requires a little overheads. 1243 | ; http://php.net/pgsql.auto-reset-persistent 1244 | pgsql.auto_reset_persistent = Off 1245 | 1246 | ; Maximum number of persistent links. -1 means no limit. 1247 | ; http://php.net/pgsql.max-persistent 1248 | pgsql.max_persistent = -1 1249 | 1250 | ; Maximum number of links (persistent+non persistent). -1 means no limit. 1251 | ; http://php.net/pgsql.max-links 1252 | pgsql.max_links = -1 1253 | 1254 | ; Ignore PostgreSQL backends Notice message or not. 1255 | ; Notice message logging require a little overheads. 1256 | ; http://php.net/pgsql.ignore-notice 1257 | pgsql.ignore_notice = 0 1258 | 1259 | ; Log PostgreSQL backends Notice message or not. 1260 | ; Unless pgsql.ignore_notice=0, module cannot log notice message. 1261 | ; http://php.net/pgsql.log-notice 1262 | pgsql.log_notice = 0 1263 | 1264 | [bcmath] 1265 | ; Number of decimal digits for all bcmath functions. 1266 | ; http://php.net/bcmath.scale 1267 | bcmath.scale = 0 1268 | 1269 | [browscap] 1270 | ; http://php.net/browscap 1271 | ;browscap = extra/browscap.ini 1272 | 1273 | [Session] 1274 | ; Handler used to store/retrieve data. 1275 | ; http://php.net/session.save-handler 1276 | session.save_handler = files 1277 | 1278 | ; Argument passed to save_handler. In the case of files, this is the path 1279 | ; where data files are stored. Note: Windows users have to change this 1280 | ; variable in order to use PHP's session functions. 1281 | ; 1282 | ; The path can be defined as: 1283 | ; 1284 | ; session.save_path = "N;/path" 1285 | ; 1286 | ; where N is an integer. Instead of storing all the session files in 1287 | ; /path, what this will do is use subdirectories N-levels deep, and 1288 | ; store the session data in those directories. This is useful if 1289 | ; your OS has problems with many files in one directory, and is 1290 | ; a more efficient layout for servers that handle many sessions. 1291 | ; 1292 | ; NOTE 1: PHP will not create this directory structure automatically. 1293 | ; You can use the script in the ext/session dir for that purpose. 1294 | ; NOTE 2: See the section on garbage collection below if you choose to 1295 | ; use subdirectories for session storage 1296 | ; 1297 | ; The file storage module creates files using mode 600 by default. 1298 | ; You can change that by using 1299 | ; 1300 | ; session.save_path = "N;MODE;/path" 1301 | ; 1302 | ; where MODE is the octal representation of the mode. Note that this 1303 | ; does not overwrite the process's umask. 1304 | ; http://php.net/session.save-path 1305 | ;session.save_path = "/var/lib/php/sessions" 1306 | 1307 | ; Whether to use strict session mode. 1308 | ; Strict session mode does not accept uninitialized session ID and regenerate 1309 | ; session ID if browser sends uninitialized session ID. Strict mode protects 1310 | ; applications from session fixation via session adoption vulnerability. It is 1311 | ; disabled by default for maximum compatibility, but enabling it is encouraged. 1312 | ; https://wiki.php.net/rfc/strict_sessions 1313 | session.use_strict_mode = 0 1314 | 1315 | ; Whether to use cookies. 1316 | ; http://php.net/session.use-cookies 1317 | session.use_cookies = 1 1318 | 1319 | ; http://php.net/session.cookie-secure 1320 | ;session.cookie_secure = 1321 | 1322 | ; This option forces PHP to fetch and use a cookie for storing and maintaining 1323 | ; the session id. We encourage this operation as it's very helpful in combating 1324 | ; session hijacking when not specifying and managing your own session id. It is 1325 | ; not the be-all and end-all of session hijacking defense, but it's a good start. 1326 | ; http://php.net/session.use-only-cookies 1327 | session.use_only_cookies = 1 1328 | 1329 | ; Name of the session (used as cookie name). 1330 | ; http://php.net/session.name 1331 | session.name = PHPSESSID 1332 | 1333 | ; Initialize session on request startup. 1334 | ; http://php.net/session.auto-start 1335 | session.auto_start = 0 1336 | 1337 | ; Lifetime in seconds of cookie or, if 0, until browser is restarted. 1338 | ; http://php.net/session.cookie-lifetime 1339 | session.cookie_lifetime = 0 1340 | 1341 | ; The path for which the cookie is valid. 1342 | ; http://php.net/session.cookie-path 1343 | session.cookie_path = / 1344 | 1345 | ; The domain for which the cookie is valid. 1346 | ; http://php.net/session.cookie-domain 1347 | session.cookie_domain = 1348 | 1349 | ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. 1350 | ; http://php.net/session.cookie-httponly 1351 | session.cookie_httponly = 1352 | 1353 | ; Handler used to serialize data. php is the standard serializer of PHP. 1354 | ; http://php.net/session.serialize-handler 1355 | session.serialize_handler = php 1356 | 1357 | ; Defines the probability that the 'garbage collection' process is started 1358 | ; on every session initialization. The probability is calculated by using 1359 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator 1360 | ; and gc_divisor is the denominator in the equation. Setting this value to 1 1361 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1362 | ; the gc will run on any give request. 1363 | ; Default Value: 1 1364 | ; Development Value: 1 1365 | ; Production Value: 1 1366 | ; http://php.net/session.gc-probability 1367 | session.gc_probability = 0 1368 | 1369 | ; Defines the probability that the 'garbage collection' process is started on every 1370 | ; session initialization. The probability is calculated by using the following equation: 1371 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and 1372 | ; session.gc_divisor is the denominator in the equation. Setting this value to 1 1373 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1374 | ; the gc will run on any give request. Increasing this value to 1000 will give you 1375 | ; a 0.1% chance the gc will run on any give request. For high volume production servers, 1376 | ; this is a more efficient approach. 1377 | ; Default Value: 100 1378 | ; Development Value: 1000 1379 | ; Production Value: 1000 1380 | ; http://php.net/session.gc-divisor 1381 | session.gc_divisor = 1000 1382 | 1383 | ; After this number of seconds, stored data will be seen as 'garbage' and 1384 | ; cleaned up by the garbage collection process. 1385 | ; http://php.net/session.gc-maxlifetime 1386 | session.gc_maxlifetime = 1440 1387 | 1388 | ; NOTE: If you are using the subdirectory option for storing session files 1389 | ; (see session.save_path above), then garbage collection does *not* 1390 | ; happen automatically. You will need to do your own garbage 1391 | ; collection through a shell script, cron entry, or some other method. 1392 | ; For example, the following script would is the equivalent of 1393 | ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): 1394 | ; find /path/to/sessions -cmin +24 -type f | xargs rm 1395 | 1396 | ; Check HTTP Referer to invalidate externally stored URLs containing ids. 1397 | ; HTTP_REFERER has to contain this substring for the session to be 1398 | ; considered as valid. 1399 | ; http://php.net/session.referer-check 1400 | session.referer_check = 1401 | 1402 | ; How many bytes to read from the file. 1403 | ; http://php.net/session.entropy-length 1404 | ;session.entropy_length = 32 1405 | 1406 | ; Specified here to create the session id. 1407 | ; http://php.net/session.entropy-file 1408 | ; Defaults to /dev/urandom 1409 | ; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom 1410 | ; If neither are found at compile time, the default is no entropy file. 1411 | ; On windows, setting the entropy_length setting will activate the 1412 | ; Windows random source (using the CryptoAPI) 1413 | ;session.entropy_file = /dev/urandom 1414 | 1415 | ; Set to {nocache,private,public,} to determine HTTP caching aspects 1416 | ; or leave this empty to avoid sending anti-caching headers. 1417 | ; http://php.net/session.cache-limiter 1418 | session.cache_limiter = nocache 1419 | 1420 | ; Document expires after n minutes. 1421 | ; http://php.net/session.cache-expire 1422 | session.cache_expire = 180 1423 | 1424 | ; trans sid support is disabled by default. 1425 | ; Use of trans sid may risk your users' security. 1426 | ; Use this option with caution. 1427 | ; - User may send URL contains active session ID 1428 | ; to other person via. email/irc/etc. 1429 | ; - URL that contains active session ID may be stored 1430 | ; in publicly accessible computer. 1431 | ; - User may access your site with the same session ID 1432 | ; always using URL stored in browser's history or bookmarks. 1433 | ; http://php.net/session.use-trans-sid 1434 | session.use_trans_sid = 0 1435 | 1436 | ; Select a hash function for use in generating session ids. 1437 | ; Possible Values 1438 | ; 0 (MD5 128 bits) 1439 | ; 1 (SHA-1 160 bits) 1440 | ; This option may also be set to the name of any hash function supported by 1441 | ; the hash extension. A list of available hashes is returned by the hash_algos() 1442 | ; function. 1443 | ; http://php.net/session.hash-function 1444 | session.hash_function = 0 1445 | 1446 | ; Define how many bits are stored in each character when converting 1447 | ; the binary hash data to something readable. 1448 | ; Possible values: 1449 | ; 4 (4 bits: 0-9, a-f) 1450 | ; 5 (5 bits: 0-9, a-v) 1451 | ; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") 1452 | ; Default Value: 4 1453 | ; Development Value: 5 1454 | ; Production Value: 5 1455 | ; http://php.net/session.hash-bits-per-character 1456 | session.hash_bits_per_character = 5 1457 | 1458 | ; The URL rewriter will look for URLs in a defined set of HTML tags. 1459 | ; form/fieldset are special; if you include them here, the rewriter will 1460 | ; add a hidden field with the info which is otherwise appended 1461 | ; to URLs. If you want XHTML conformity, remove the form entry. 1462 | ; Note that all valid entries require a "=", even if no value follows. 1463 | ; Default Value: "a=href,area=href,frame=src,form=,fieldset=" 1464 | ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" 1465 | ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" 1466 | ; http://php.net/url-rewriter.tags 1467 | url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" 1468 | 1469 | ; Enable upload progress tracking in $_SESSION 1470 | ; Default Value: On 1471 | ; Development Value: On 1472 | ; Production Value: On 1473 | ; http://php.net/session.upload-progress.enabled 1474 | ;session.upload_progress.enabled = On 1475 | 1476 | ; Cleanup the progress information as soon as all POST data has been read 1477 | ; (i.e. upload completed). 1478 | ; Default Value: On 1479 | ; Development Value: On 1480 | ; Production Value: On 1481 | ; http://php.net/session.upload-progress.cleanup 1482 | ;session.upload_progress.cleanup = On 1483 | 1484 | ; A prefix used for the upload progress key in $_SESSION 1485 | ; Default Value: "upload_progress_" 1486 | ; Development Value: "upload_progress_" 1487 | ; Production Value: "upload_progress_" 1488 | ; http://php.net/session.upload-progress.prefix 1489 | ;session.upload_progress.prefix = "upload_progress_" 1490 | 1491 | ; The index name (concatenated with the prefix) in $_SESSION 1492 | ; containing the upload progress information 1493 | ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" 1494 | ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" 1495 | ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" 1496 | ; http://php.net/session.upload-progress.name 1497 | ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" 1498 | 1499 | ; How frequently the upload progress should be updated. 1500 | ; Given either in percentages (per-file), or in bytes 1501 | ; Default Value: "1%" 1502 | ; Development Value: "1%" 1503 | ; Production Value: "1%" 1504 | ; http://php.net/session.upload-progress.freq 1505 | ;session.upload_progress.freq = "1%" 1506 | 1507 | ; The minimum delay between updates, in seconds 1508 | ; Default Value: 1 1509 | ; Development Value: 1 1510 | ; Production Value: 1 1511 | ; http://php.net/session.upload-progress.min-freq 1512 | ;session.upload_progress.min_freq = "1" 1513 | 1514 | ; Only write session data when session data is changed. Enabled by default. 1515 | ; http://php.net/session.lazy-write 1516 | ;session.lazy_write = On 1517 | 1518 | [Assertion] 1519 | ; Switch whether to compile assertions at all (to have no overhead at run-time) 1520 | ; -1: Do not compile at all 1521 | ; 0: Jump over assertion at run-time 1522 | ; 1: Execute assertions 1523 | ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) 1524 | ; Default Value: 1 1525 | ; Development Value: 1 1526 | ; Production Value: -1 1527 | ; http://php.net/zend.assertions 1528 | zend.assertions = -1 1529 | 1530 | ; Assert(expr); active by default. 1531 | ; http://php.net/assert.active 1532 | ;assert.active = On 1533 | 1534 | ; Throw an AssertationException on failed assertions 1535 | ; http://php.net/assert.exception 1536 | ;assert.exception = On 1537 | 1538 | ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) 1539 | ; http://php.net/assert.warning 1540 | ;assert.warning = On 1541 | 1542 | ; Don't bail out by default. 1543 | ; http://php.net/assert.bail 1544 | ;assert.bail = Off 1545 | 1546 | ; User-function to be called if an assertion fails. 1547 | ; http://php.net/assert.callback 1548 | ;assert.callback = 0 1549 | 1550 | ; Eval the expression with current error_reporting(). Set to true if you want 1551 | ; error_reporting(0) around the eval(). 1552 | ; http://php.net/assert.quiet-eval 1553 | ;assert.quiet_eval = 0 1554 | 1555 | [COM] 1556 | ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs 1557 | ; http://php.net/com.typelib-file 1558 | ;com.typelib_file = 1559 | 1560 | ; allow Distributed-COM calls 1561 | ; http://php.net/com.allow-dcom 1562 | ;com.allow_dcom = true 1563 | 1564 | ; autoregister constants of a components typlib on com_load() 1565 | ; http://php.net/com.autoregister-typelib 1566 | ;com.autoregister_typelib = true 1567 | 1568 | ; register constants casesensitive 1569 | ; http://php.net/com.autoregister-casesensitive 1570 | ;com.autoregister_casesensitive = false 1571 | 1572 | ; show warnings on duplicate constant registrations 1573 | ; http://php.net/com.autoregister-verbose 1574 | ;com.autoregister_verbose = true 1575 | 1576 | ; The default character set code-page to use when passing strings to and from COM objects. 1577 | ; Default: system ANSI code page 1578 | ;com.code_page= 1579 | 1580 | [mbstring] 1581 | ; language for internal character representation. 1582 | ; This affects mb_send_mail() and mbstring.detect_order. 1583 | ; http://php.net/mbstring.language 1584 | ;mbstring.language = Japanese 1585 | 1586 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 1587 | ; internal/script encoding. 1588 | ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) 1589 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 1590 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 1591 | ;mbstring.internal_encoding = 1592 | 1593 | ; Use of this INI entry is deprecated, use global input_encoding instead. 1594 | ; http input encoding. 1595 | ; mbstring.encoding_traslation = On is needed to use this setting. 1596 | ; If empty, default_charset or input_encoding or mbstring.input is used. 1597 | ; The precedence is: default_charset < intput_encoding < mbsting.http_input 1598 | ; http://php.net/mbstring.http-input 1599 | ;mbstring.http_input = 1600 | 1601 | ; Use of this INI entry is deprecated, use global output_encoding instead. 1602 | ; http output encoding. 1603 | ; mb_output_handler must be registered as output buffer to function. 1604 | ; If empty, default_charset or output_encoding or mbstring.http_output is used. 1605 | ; The precedence is: default_charset < output_encoding < mbstring.http_output 1606 | ; To use an output encoding conversion, mbstring's output handler must be set 1607 | ; otherwise output encoding conversion cannot be performed. 1608 | ; http://php.net/mbstring.http-output 1609 | ;mbstring.http_output = 1610 | 1611 | ; enable automatic encoding translation according to 1612 | ; mbstring.internal_encoding setting. Input chars are 1613 | ; converted to internal encoding by setting this to On. 1614 | ; Note: Do _not_ use automatic encoding translation for 1615 | ; portable libs/applications. 1616 | ; http://php.net/mbstring.encoding-translation 1617 | ;mbstring.encoding_translation = Off 1618 | 1619 | ; automatic encoding detection order. 1620 | ; "auto" detect order is changed according to mbstring.language 1621 | ; http://php.net/mbstring.detect-order 1622 | ;mbstring.detect_order = auto 1623 | 1624 | ; substitute_character used when character cannot be converted 1625 | ; one from another 1626 | ; http://php.net/mbstring.substitute-character 1627 | ;mbstring.substitute_character = none 1628 | 1629 | ; overload(replace) single byte functions by mbstring functions. 1630 | ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), 1631 | ; etc. Possible values are 0,1,2,4 or combination of them. 1632 | ; For example, 7 for overload everything. 1633 | ; 0: No overload 1634 | ; 1: Overload mail() function 1635 | ; 2: Overload str*() functions 1636 | ; 4: Overload ereg*() functions 1637 | ; http://php.net/mbstring.func-overload 1638 | ;mbstring.func_overload = 0 1639 | 1640 | ; enable strict encoding detection. 1641 | ; Default: Off 1642 | ;mbstring.strict_detection = On 1643 | 1644 | ; This directive specifies the regex pattern of content types for which mb_output_handler() 1645 | ; is activated. 1646 | ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) 1647 | ;mbstring.http_output_conv_mimetype= 1648 | 1649 | [gd] 1650 | ; Tell the jpeg decode to ignore warnings and try to create 1651 | ; a gd image. The warning will then be displayed as notices 1652 | ; disabled by default 1653 | ; http://php.net/gd.jpeg-ignore-warning 1654 | ;gd.jpeg_ignore_warning = 0 1655 | 1656 | [exif] 1657 | ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. 1658 | ; With mbstring support this will automatically be converted into the encoding 1659 | ; given by corresponding encode setting. When empty mbstring.internal_encoding 1660 | ; is used. For the decode settings you can distinguish between motorola and 1661 | ; intel byte order. A decode setting cannot be empty. 1662 | ; http://php.net/exif.encode-unicode 1663 | ;exif.encode_unicode = ISO-8859-15 1664 | 1665 | ; http://php.net/exif.decode-unicode-motorola 1666 | ;exif.decode_unicode_motorola = UCS-2BE 1667 | 1668 | ; http://php.net/exif.decode-unicode-intel 1669 | ;exif.decode_unicode_intel = UCS-2LE 1670 | 1671 | ; http://php.net/exif.encode-jis 1672 | ;exif.encode_jis = 1673 | 1674 | ; http://php.net/exif.decode-jis-motorola 1675 | ;exif.decode_jis_motorola = JIS 1676 | 1677 | ; http://php.net/exif.decode-jis-intel 1678 | ;exif.decode_jis_intel = JIS 1679 | 1680 | [Tidy] 1681 | ; The path to a default tidy configuration file to use when using tidy 1682 | ; http://php.net/tidy.default-config 1683 | ;tidy.default_config = /usr/local/lib/php/default.tcfg 1684 | 1685 | ; Should tidy clean and repair output automatically? 1686 | ; WARNING: Do not use this option if you are generating non-html content 1687 | ; such as dynamic images 1688 | ; http://php.net/tidy.clean-output 1689 | tidy.clean_output = Off 1690 | 1691 | [soap] 1692 | ; Enables or disables WSDL caching feature. 1693 | ; http://php.net/soap.wsdl-cache-enabled 1694 | soap.wsdl_cache_enabled=1 1695 | 1696 | ; Sets the directory name where SOAP extension will put cache files. 1697 | ; http://php.net/soap.wsdl-cache-dir 1698 | soap.wsdl_cache_dir="/tmp" 1699 | 1700 | ; (time to live) Sets the number of second while cached file will be used 1701 | ; instead of original one. 1702 | ; http://php.net/soap.wsdl-cache-ttl 1703 | soap.wsdl_cache_ttl=86400 1704 | 1705 | ; Sets the size of the cache limit. (Max. number of WSDL files to cache) 1706 | soap.wsdl_cache_limit = 5 1707 | 1708 | [sysvshm] 1709 | ; A default size of the shared memory segment 1710 | ;sysvshm.init_mem = 10000 1711 | 1712 | [ldap] 1713 | ; Sets the maximum number of open links or -1 for unlimited. 1714 | ldap.max_links = -1 1715 | 1716 | [mcrypt] 1717 | ; For more information about mcrypt settings see http://php.net/mcrypt-module-open 1718 | 1719 | ; Directory where to load mcrypt algorithms 1720 | ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) 1721 | ;mcrypt.algorithms_dir= 1722 | 1723 | ; Directory where to load mcrypt modes 1724 | ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) 1725 | ;mcrypt.modes_dir= 1726 | 1727 | [dba] 1728 | ;dba.default_handler= 1729 | 1730 | [opcache] 1731 | ; Determines if Zend OPCache is enabled 1732 | ;opcache.enable=0 1733 | 1734 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 1735 | ;opcache.enable_cli=0 1736 | 1737 | ; The OPcache shared memory storage size. 1738 | ;opcache.memory_consumption=64 1739 | 1740 | ; The amount of memory for interned strings in Mbytes. 1741 | ;opcache.interned_strings_buffer=4 1742 | 1743 | ; The maximum number of keys (scripts) in the OPcache hash table. 1744 | ; Only numbers between 200 and 100000 are allowed. 1745 | ;opcache.max_accelerated_files=2000 1746 | 1747 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 1748 | ;opcache.max_wasted_percentage=5 1749 | 1750 | ; When this directive is enabled, the OPcache appends the current working 1751 | ; directory to the script key, thus eliminating possible collisions between 1752 | ; files with the same name (basename). Disabling the directive improves 1753 | ; performance, but may break existing applications. 1754 | ;opcache.use_cwd=1 1755 | 1756 | ; When disabled, you must reset the OPcache manually or restart the 1757 | ; webserver for changes to the filesystem to take effect. 1758 | ;opcache.validate_timestamps=1 1759 | 1760 | ; How often (in seconds) to check file timestamps for changes to the shared 1761 | ; memory storage allocation. ("1" means validate once per second, but only 1762 | ; once per request. "0" means always validate) 1763 | ;opcache.revalidate_freq=2 1764 | 1765 | ; Enables or disables file search in include_path optimization 1766 | ;opcache.revalidate_path=0 1767 | 1768 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 1769 | ; size of the optimized code. 1770 | ;opcache.save_comments=1 1771 | 1772 | ; If enabled, a fast shutdown sequence is used for the accelerated code 1773 | ;opcache.fast_shutdown=0 1774 | 1775 | ; Allow file existence override (file_exists, etc.) performance feature. 1776 | ;opcache.enable_file_override=0 1777 | 1778 | ; A bitmask, where each bit enables or disables the appropriate OPcache 1779 | ; passes 1780 | ;opcache.optimization_level=0xffffffff 1781 | 1782 | ;opcache.inherited_hack=1 1783 | ;opcache.dups_fix=0 1784 | 1785 | ; The location of the OPcache blacklist file (wildcards allowed). 1786 | ; Each OPcache blacklist file is a text file that holds the names of files 1787 | ; that should not be accelerated. The file format is to add each filename 1788 | ; to a new line. The filename may be a full path or just a file prefix 1789 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 1790 | ; that start with 'x'). Line starting with a ; are ignored (comments). 1791 | ;opcache.blacklist_filename= 1792 | 1793 | ; Allows exclusion of large files from being cached. By default all files 1794 | ; are cached. 1795 | ;opcache.max_file_size=0 1796 | 1797 | ; Check the cache checksum each N requests. 1798 | ; The default value of "0" means that the checks are disabled. 1799 | ;opcache.consistency_checks=0 1800 | 1801 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 1802 | ; is not being accessed. 1803 | ;opcache.force_restart_timeout=180 1804 | 1805 | ; OPcache error_log file name. Empty string assumes "stderr". 1806 | ;opcache.error_log= 1807 | 1808 | ; All OPcache errors go to the Web server log. 1809 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 1810 | ; You can also enable warnings (level 2), info messages (level 3) or 1811 | ; debug messages (level 4). 1812 | ;opcache.log_verbosity_level=1 1813 | 1814 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 1815 | ;opcache.preferred_memory_model= 1816 | 1817 | ; Protect the shared memory from unexpected writing during script execution. 1818 | ; Useful for internal debugging only. 1819 | ;opcache.protect_memory=0 1820 | 1821 | ; Allows calling OPcache API functions only from PHP scripts which path is 1822 | ; started from specified string. The default "" means no restriction 1823 | ;opcache.restrict_api= 1824 | 1825 | ; Mapping base of shared memory segments (for Windows only). All the PHP 1826 | ; processes have to map shared memory into the same address space. This 1827 | ; directive allows to manually fix the "Unable to reattach to base address" 1828 | ; errors. 1829 | ;opcache.mmap_base= 1830 | 1831 | ; Enables and sets the second level cache directory. 1832 | ; It should improve performance when SHM memory is full, at server restart or 1833 | ; SHM reset. The default "" disables file based caching. 1834 | ;opcache.file_cache= 1835 | 1836 | ; Enables or disables opcode caching in shared memory. 1837 | ;opcache.file_cache_only=0 1838 | 1839 | ; Enables or disables checksum validation when script loaded from file cache. 1840 | ;opcache.file_cache_consistency_checks=1 1841 | 1842 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 1843 | ; This should improve performance, but requires appropriate OS configuration. 1844 | ;opcache.huge_code_pages=1 1845 | 1846 | [curl] 1847 | ; A default value for the CURLOPT_CAINFO option. This is required to be an 1848 | ; absolute path. 1849 | ;curl.cainfo = 1850 | 1851 | [openssl] 1852 | ; The location of a Certificate Authority (CA) file on the local filesystem 1853 | ; to use when verifying the identity of SSL/TLS peers. Most users should 1854 | ; not specify a value for this directive as PHP will attempt to use the 1855 | ; OS-managed cert stores in its absence. If specified, this value may still 1856 | ; be overridden on a per-stream basis via the "cafile" SSL stream context 1857 | ; option. 1858 | ;openssl.cafile= 1859 | 1860 | ; If openssl.cafile is not specified or if the CA file is not found, the 1861 | ; directory pointed to by openssl.capath is searched for a suitable 1862 | ; certificate. This value must be a correctly hashed certificate directory. 1863 | ; Most users should not specify a value for this directive as PHP will 1864 | ; attempt to use the OS-managed cert stores in its absence. If specified, 1865 | ; this value may still be overridden on a per-stream basis via the "capath" 1866 | ; SSL stream context option. 1867 | ;openssl.capath= 1868 | 1869 | ; Local Variables: 1870 | ; tab-width: 4 1871 | ; End: 1872 | -------------------------------------------------------------------------------- /php-fpm/www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can we used in any directive and will be replaced by the 3 | ; pool name ('www' here) 4 | [www] 5 | 6 | ; Per pool prefix 7 | ; It only applies on the following directives: 8 | ; - 'slowlog' 9 | ; - 'listen' (unixsocket) 10 | ; - 'chroot' 11 | ; - 'chdir' 12 | ; - 'php_values' 13 | ; - 'php_admin_values' 14 | ; When not set, the global prefix (or /usr) applies instead. 15 | ; Note: This directive can also be relative to the global prefix. 16 | ; Default Value: none 17 | ;prefix = /path/to/pools/$pool 18 | 19 | ; Unix user/group of processes 20 | ; Note: The user is mandatory. If the group is not set, the default user's group 21 | ; will be used. 22 | user = www-data 23 | group = www-data 24 | 25 | ; The address on which to accept FastCGI requests. 26 | ; Valid syntaxes are: 27 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on 28 | ; a specific port; 29 | ; 'port' - to listen on a TCP socket to all addresses on a 30 | ; specific port; 31 | ; '/path/to/unix/socket' - to listen on a unix socket. 32 | ; Note: This value is mandatory. 33 | listen = 9000 34 | 35 | ; Set listen(2) backlog. 36 | ; Default Value: 65535 (-1 on FreeBSD and OpenBSD) 37 | ;listen.backlog = 65535 38 | 39 | ; Set permissions for unix socket, if one is used. In Linux, read/write 40 | ; permissions must be set in order to allow connections from a web server. Many 41 | ; BSD-derived systems allow connections regardless of permissions. 42 | ; Default Values: user and group are set as the running user 43 | ; mode is set to 0660 44 | listen.owner = www-data 45 | listen.group = www-data 46 | ;listen.mode = 0660 47 | 48 | ; List of ipv4 addresses of FastCGI clients which are allowed to connect. 49 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 50 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 51 | ; must be separated by a comma. If this value is left blank, connections will be 52 | ; accepted from any ip address. 53 | ; Default Value: any 54 | ;listen.allowed_clients = 127.0.0.1 55 | 56 | ; Specify the nice(2) priority to apply to the pool processes (only if set) 57 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 58 | ; Note: - It will only work if the FPM master process is launched as root 59 | ; - The pool processes will inherit the master process priority 60 | ; unless it specified otherwise 61 | ; Default Value: no set 62 | ; priority = -19 63 | 64 | ; Choose how the process manager will control the number of child processes. 65 | ; Possible Values: 66 | ; static - a fixed number (pm.max_children) of child processes; 67 | ; dynamic - the number of child processes are set dynamically based on the 68 | ; following directives. With this process management, there will be 69 | ; always at least 1 children. 70 | ; pm.max_children - the maximum number of children that can 71 | ; be alive at the same time. 72 | ; pm.start_servers - the number of children created on startup. 73 | ; pm.min_spare_servers - the minimum number of children in 'idle' 74 | ; state (waiting to process). If the number 75 | ; of 'idle' processes is less than this 76 | ; number then some children will be created. 77 | ; pm.max_spare_servers - the maximum number of children in 'idle' 78 | ; state (waiting to process). If the number 79 | ; of 'idle' processes is greater than this 80 | ; number then some children will be killed. 81 | ; ondemand - no children are created at startup. Children will be forked when 82 | ; new requests will connect. The following parameter are used: 83 | ; pm.max_children - the maximum number of children that 84 | ; can be alive at the same time. 85 | ; pm.process_idle_timeout - The number of seconds after which 86 | ; an idle process will be killed. 87 | ; Note: This value is mandatory. 88 | pm = dynamic 89 | 90 | ; The number of child processes to be created when pm is set to 'static' and the 91 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 92 | ; This value sets the limit on the number of simultaneous requests that will be 93 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 94 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 95 | ; CGI. The below defaults are based on a server without much resources. Don't 96 | ; forget to tweak pm.* to fit your needs. 97 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 98 | ; Note: This value is mandatory. 99 | pm.max_children = 5 100 | 101 | ; The number of child processes created on startup. 102 | ; Note: Used only when pm is set to 'dynamic' 103 | ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 104 | pm.start_servers = 2 105 | 106 | ; The desired minimum number of idle server processes. 107 | ; Note: Used only when pm is set to 'dynamic' 108 | ; Note: Mandatory when pm is set to 'dynamic' 109 | pm.min_spare_servers = 1 110 | 111 | ; The desired maximum number of idle server processes. 112 | ; Note: Used only when pm is set to 'dynamic' 113 | ; Note: Mandatory when pm is set to 'dynamic' 114 | pm.max_spare_servers = 3 115 | 116 | ; The number of seconds after which an idle process will be killed. 117 | ; Note: Used only when pm is set to 'ondemand' 118 | ; Default Value: 10s 119 | ;pm.process_idle_timeout = 10s; 120 | 121 | ; The number of requests each child process should execute before respawning. 122 | ; This can be useful to work around memory leaks in 3rd party libraries. For 123 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 124 | ; Default Value: 0 125 | ;pm.max_requests = 500 126 | 127 | ; The URI to view the FPM status page. If this value is not set, no URI will be 128 | ; recognized as a status page. It shows the following informations: 129 | ; pool - the name of the pool; 130 | ; process manager - static, dynamic or ondemand; 131 | ; start time - the date and time FPM has started; 132 | ; start since - number of seconds since FPM has started; 133 | ; accepted conn - the number of request accepted by the pool; 134 | ; listen queue - the number of request in the queue of pending 135 | ; connections (see backlog in listen(2)); 136 | ; max listen queue - the maximum number of requests in the queue 137 | ; of pending connections since FPM has started; 138 | ; listen queue len - the size of the socket queue of pending connections; 139 | ; idle processes - the number of idle processes; 140 | ; active processes - the number of active processes; 141 | ; total processes - the number of idle + active processes; 142 | ; max active processes - the maximum number of active processes since FPM 143 | ; has started; 144 | ; max children reached - number of times, the process limit has been reached, 145 | ; when pm tries to start more children (works only for 146 | ; pm 'dynamic' and 'ondemand'); 147 | ; Value are updated in real time. 148 | ; Example output: 149 | ; pool: www 150 | ; process manager: static 151 | ; start time: 01/Jul/2011:17:53:49 +0200 152 | ; start since: 62636 153 | ; accepted conn: 190460 154 | ; listen queue: 0 155 | ; max listen queue: 1 156 | ; listen queue len: 42 157 | ; idle processes: 4 158 | ; active processes: 11 159 | ; total processes: 15 160 | ; max active processes: 12 161 | ; max children reached: 0 162 | ; 163 | ; By default the status page output is formatted as text/plain. Passing either 164 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 165 | ; output syntax. Example: 166 | ; http://www.foo.bar/status 167 | ; http://www.foo.bar/status?json 168 | ; http://www.foo.bar/status?html 169 | ; http://www.foo.bar/status?xml 170 | ; 171 | ; By default the status page only outputs short status. Passing 'full' in the 172 | ; query string will also return status for each pool process. 173 | ; Example: 174 | ; http://www.foo.bar/status?full 175 | ; http://www.foo.bar/status?json&full 176 | ; http://www.foo.bar/status?html&full 177 | ; http://www.foo.bar/status?xml&full 178 | ; The Full status returns for each process: 179 | ; pid - the PID of the process; 180 | ; state - the state of the process (Idle, Running, ...); 181 | ; start time - the date and time the process has started; 182 | ; start since - the number of seconds since the process has started; 183 | ; requests - the number of requests the process has served; 184 | ; request duration - the duration in µs of the requests; 185 | ; request method - the request method (GET, POST, ...); 186 | ; request URI - the request URI with the query string; 187 | ; content length - the content length of the request (only with POST); 188 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 189 | ; script - the main script called (or '-' if not set); 190 | ; last request cpu - the %cpu the last request consumed 191 | ; it's always 0 if the process is not in Idle state 192 | ; because CPU calculation is done when the request 193 | ; processing has terminated; 194 | ; last request memory - the max amount of memory the last request consumed 195 | ; it's always 0 if the process is not in Idle state 196 | ; because memory calculation is done when the request 197 | ; processing has terminated; 198 | ; If the process is in Idle state, then informations are related to the 199 | ; last request the process has served. Otherwise informations are related to 200 | ; the current request being served. 201 | ; Example output: 202 | ; ************************ 203 | ; pid: 31330 204 | ; state: Running 205 | ; start time: 01/Jul/2011:17:53:49 +0200 206 | ; start since: 63087 207 | ; requests: 12808 208 | ; request duration: 1250261 209 | ; request method: GET 210 | ; request URI: /test_mem.php?N=10000 211 | ; content length: 0 212 | ; user: - 213 | ; script: /home/fat/web/docs/php/test_mem.php 214 | ; last request cpu: 0.00 215 | ; last request memory: 0 216 | ; 217 | ; Note: There is a real-time FPM status monitoring sample web page available 218 | ; It's available in: ${prefix}/share/fpm/status.html 219 | ; 220 | ; Note: The value must start with a leading slash (/). The value can be 221 | ; anything, but it may not be a good idea to use the .php extension or it 222 | ; may conflict with a real PHP file. 223 | ; Default Value: not set 224 | pm.status_path = /status 225 | 226 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 227 | ; URI will be recognized as a ping page. This could be used to test from outside 228 | ; that FPM is alive and responding, or to 229 | ; - create a graph of FPM availability (rrd or such); 230 | ; - remove a server from a group if it is not responding (load balancing); 231 | ; - trigger alerts for the operating team (24/7). 232 | ; Note: The value must start with a leading slash (/). The value can be 233 | ; anything, but it may not be a good idea to use the .php extension or it 234 | ; may conflict with a real PHP file. 235 | ; Default Value: not set 236 | ping.path = /ping 237 | 238 | ; This directive may be used to customize the response of a ping request. The 239 | ; response is formatted as text/plain with a 200 response code. 240 | ; Default Value: pong 241 | ;ping.response = pong 242 | 243 | ; The access log file 244 | ; Default: not set 245 | ;access.log = log/$pool.access.log 246 | 247 | ; The access log format. 248 | ; The following syntax is allowed 249 | ; %%: the '%' character 250 | ; %C: %CPU used by the request 251 | ; it can accept the following format: 252 | ; - %{user}C for user CPU only 253 | ; - %{system}C for system CPU only 254 | ; - %{total}C for user + system CPU (default) 255 | ; %d: time taken to serve the request 256 | ; it can accept the following format: 257 | ; - %{seconds}d (default) 258 | ; - %{miliseconds}d 259 | ; - %{mili}d 260 | ; - %{microseconds}d 261 | ; - %{micro}d 262 | ; %e: an environment variable (same as $_ENV or $_SERVER) 263 | ; it must be associated with embraces to specify the name of the env 264 | ; variable. Some exemples: 265 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 266 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 267 | ; %f: script filename 268 | ; %l: content-length of the request (for POST request only) 269 | ; %m: request method 270 | ; %M: peak of memory allocated by PHP 271 | ; it can accept the following format: 272 | ; - %{bytes}M (default) 273 | ; - %{kilobytes}M 274 | ; - %{kilo}M 275 | ; - %{megabytes}M 276 | ; - %{mega}M 277 | ; %n: pool name 278 | ; %o: output header 279 | ; it must be associated with embraces to specify the name of the header: 280 | ; - %{Content-Type}o 281 | ; - %{X-Powered-By}o 282 | ; - %{Transfert-Encoding}o 283 | ; - .... 284 | ; %p: PID of the child that serviced the request 285 | ; %P: PID of the parent of the child that serviced the request 286 | ; %q: the query string 287 | ; %Q: the '?' character if query string exists 288 | ; %r: the request URI (without the query string, see %q and %Q) 289 | ; %R: remote IP address 290 | ; %s: status (response code) 291 | ; %t: server time the request was received 292 | ; it can accept a strftime(3) format: 293 | ; %d/%b/%Y:%H:%M:%S %z (default) 294 | ; %T: time the log has been written (the request has finished) 295 | ; it can accept a strftime(3) format: 296 | ; %d/%b/%Y:%H:%M:%S %z (default) 297 | ; %u: remote user 298 | ; 299 | ; Default: "%R - %u %t \"%m %r\" %s" 300 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 301 | 302 | ; The log file for slow requests 303 | ; Default Value: not set 304 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 305 | ;slowlog = log/$pool.log.slow 306 | 307 | ; The timeout for serving a single request after which a PHP backtrace will be 308 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 309 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 310 | ; Default Value: 0 311 | ;request_slowlog_timeout = 0 312 | 313 | ; The timeout for serving a single request after which the worker process will 314 | ; be killed. This option should be used when the 'max_execution_time' ini option 315 | ; does not stop script execution for some reason. A value of '0' means 'off'. 316 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 317 | ; Default Value: 0 318 | ;request_terminate_timeout = 0 319 | 320 | ; Set open file descriptor rlimit. 321 | ; Default Value: system defined value 322 | ;rlimit_files = 1024 323 | 324 | ; Set max core size rlimit. 325 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 326 | ; Default Value: system defined value 327 | ;rlimit_core = 0 328 | 329 | ; Chroot to this directory at the start. This value must be defined as an 330 | ; absolute path. When this value is not set, chroot is not used. 331 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 332 | ; of its subdirectories. If the pool prefix is not set, the global prefix 333 | ; will be used instead. 334 | ; Note: chrooting is a great security feature and should be used whenever 335 | ; possible. However, all PHP paths will be relative to the chroot 336 | ; (error_log, sessions.save_path, ...). 337 | ; Default Value: not set 338 | ;chroot = 339 | 340 | ; Chdir to this directory at the start. 341 | ; Note: relative path can be used. 342 | ; Default Value: current directory or / when chroot 343 | chdir = / 344 | 345 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 346 | ; stderr will be redirected to /dev/null according to FastCGI specs. 347 | ; Note: on highloaded environement, this can cause some delay in the page 348 | ; process time (several ms). 349 | ; Default Value: no 350 | ;catch_workers_output = yes 351 | 352 | ; Limits the extensions of the main script FPM will allow to parse. This can 353 | ; prevent configuration mistakes on the web server side. You should only limit 354 | ; FPM to .php extensions to prevent malicious users to use other extensions to 355 | ; exectute php code. 356 | ; Note: set an empty value to allow all extensions. 357 | ; Default Value: .php 358 | ;security.limit_extensions = .php .php3 .php4 .php5 359 | 360 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 361 | ; the current environment. 362 | ; Default Value: clean env 363 | ;env[HOSTNAME] = $HOSTNAME 364 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 365 | ;env[TMP] = /tmp 366 | ;env[TMPDIR] = /tmp 367 | ;env[TEMP] = /tmp 368 | 369 | ; Additional php.ini defines, specific to this pool of workers. These settings 370 | ; overwrite the values previously defined in the php.ini. The directives are the 371 | ; same as the PHP SAPI: 372 | ; php_value/php_flag - you can set classic ini defines which can 373 | ; be overwritten from PHP call 'ini_set'. 374 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 375 | ; PHP call 'ini_set' 376 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 377 | 378 | ; Defining 'extension' will load the corresponding shared extension from 379 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 380 | ; overwrite previously defined php.ini values, but will append the new value 381 | ; instead. 382 | 383 | ; Note: path INI options can be relative and will be expanded with the prefix 384 | ; (pool, global or /usr) 385 | 386 | ; Default Value: nothing is defined by default except the values in php.ini and 387 | ; specified at startup with the -d argument 388 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 389 | ;php_flag[display_errors] = off 390 | ;php_admin_value[error_log] = /var/log/fpm-php.www.log 391 | ;php_admin_flag[log_errors] = on 392 | ;php_admin_value[memory_limit] = 32M 393 | -------------------------------------------------------------------------------- /php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN echo 'deb http://ppa.launchpad.net/ondrej/php/ubuntu trusty main' > /etc/apt/sources.list.d/ondrej-php-trusty.list 6 | RUN gpg --keyserver pool.sks-keyservers.net --recv E5267A6C 7 | RUN gpg --export --armor E5267A6C | apt-key add - 8 | 9 | # Install packages that are specific to our stack 10 | RUN apt-get update && \ 11 | apt-get install --yes \ 12 | imagemagick \ 13 | php7.0-apc \ 14 | php7.0-bcmath \ 15 | php7.0-cli \ 16 | php7.0-curl \ 17 | php7.0-gd \ 18 | php7.0-imagick \ 19 | php7.0-intl \ 20 | php7.0-ldap \ 21 | php7.0-mbstring \ 22 | php7.0-mcrypt \ 23 | php7.0-memcache \ 24 | php7.0-memcached \ 25 | php7.0-pgsql \ 26 | php7.0-mysql \ 27 | php7.0-soap \ 28 | php7.0-xdebug \ 29 | php7.0-xml \ 30 | php7.0-zip \ 31 | ruby-sass && \ 32 | rm --recursive --force /var/lib/apt/lists/* 33 | 34 | RUN phpenmod mcrypt 35 | 36 | ADD xdebug.ini /etc/php/mods-available/xdebug.ini 37 | -------------------------------------------------------------------------------- /php/xdebug.ini: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;; 2 | ; About this file ; 3 | ;;;;;;;;;;;;;;;;;;; 4 | ; 5 | ; built by G. Giunta as a verbatim copy of info from xedbug website on 2007/11/08 6 | 7 | ; You must uncomment one (and only one) line from the following to load 8 | ; the xdebug extension. 9 | zend_extension=xdebug.so 10 | ;zend_extension_ts="/usr/lib/php4/xdebug.so" 11 | ;zend_extension_ts="c:\php4\xdebug.dll" 12 | ;zend_extension="c:\php4\xdebug.dll" 13 | 14 | ; When this setting is set to on, the tracing of function calls will be enabled 15 | ; just before the script is run. This makes it possible to trace code in the 16 | ; auto_prepend_file. 17 | xdebug.auto_trace=Off 18 | 19 | ; This setting, defaulting to On, controls whether Xdebug should write the 20 | ; filename used in include(), include_once(), require() or require_once() to 21 | ; the trace files. 22 | xdebug.collect_includes=On 23 | 24 | ; This setting, defaulting to 0, controls whether Xdebug should collect the 25 | ; parameters passed to functions when a function call is recorded in either the 26 | ; function trace or the stack trace. 27 | ; The setting defaults to Off because for very large scripts it may use huge 28 | ; amounts of memory and therefore make it impossible for the huge script to run. 29 | ; You can most safely turn this setting on, but you can expect some problems in 30 | ; scripts with a lot of function calls and/or huge data structures as parameters. 31 | ; Xdebug 2 will not have this problem with increased memory usage, as it will 32 | ; never store this information in memory. Instead it will only be written to disk. 33 | ; This means that you need to have a look at the disk usage though. 34 | ; This setting can have four different values. For each of the values a different 35 | ; amount of information is shown. Below you will see what information each of the 36 | ; values provides. See also the introduction of the feature Stack Traces for a 37 | ; few screenshots. 38 | ; Value Argument Information Shown 39 | ; 0 None. 40 | ; 1 Type and number of elements (f.e. string(6), array(8)). 41 | ; 2 Type and number of elements, with a tool tip for the full information. 42 | ; 3 Full variable contents (with the limits respected as set by 43 | ; xdebug.var_display_max_children, xdebug.var_display_max_data and 44 | ; xdebug.var_display_max_depth. 45 | ; 4 Full variable contents and variable name. 46 | xdebug.collect_params=0 47 | 48 | ; This setting, defaulting to Off, controls whether Xdebug should write the 49 | ; return value of function calls to the trace files. 50 | xdebug.collect_return=On 51 | 52 | ; This setting tells Xdebug to gather information about which variables are 53 | ; used in a certain scope. This analysis can be quite slow as Xdebug has to 54 | ; reverse engineer PHP's opcode arrays. This setting will not record which 55 | ; values the different variables have, for that use xdebug.collect_params. 56 | ; This setting needs to be enabled only if you wish to use 57 | ; xdebug_get_declared_vars(). 58 | xdebug.collect_vars=Off 59 | 60 | ; If this setting is On then stacktraces will be shown by default on an error 61 | ; event. You can disable showing stacktraces from your code with xdebug_disable(). 62 | ; As this is one of the basic functions of Xdebug, it is advisable to leave this 63 | ; setting set to 'On'. 64 | xdebug.default_enable=On 65 | 66 | ; These seven settings control which data from the superglobals is shown when an 67 | ; error situation occurs. Each php.ini setting can consist of a comma seperated 68 | ; list of variables from this superglobal to dump, but make sure you do not add 69 | ; spaces in this setting. In order to dump the REMOTE_ADDR and the REQUEST_METHOD 70 | ; when an error occurs, add this setting: xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD 71 | xdebug.dump.COOKIE= 72 | xdebug.dump.FILES= 73 | xdebug.dump.GET= 74 | xdebug.dump.POST= 75 | xdebug.dump.REQUEST= 76 | xdebug.dump.SERVER= 77 | xdebug.dump.SESSION= 78 | 79 | ; Controls whether the values of the superglobals as defined by the xdebug.dump.* 80 | ; settings whould be shown or not. 81 | xdebug.dump_globals=On 82 | 83 | ; Controls whether the values of the superglobals should be dumped on all error 84 | ; situations (set to Off) or only on the first (set to On). 85 | xdebug.dump_once=On 86 | 87 | ; If you want to dump undefined values from the superglobals you should set this 88 | ; setting to On, otherwise leave it set to Off. 89 | xdebug.dump_undefined=Off 90 | 91 | ; Controls whether Xdebug should enforce 'extended_info' mode for the PHP parser; 92 | ; this allows Xdebug to do file/line breakpoints with the remote debugger. When 93 | ; tracing or profiling scripts you generally want to turn off this option as PHP's 94 | ; generated oparrays will increase with about a third of the size slowing down 95 | ; your scripts. This setting can not be set in your scripts with ini_set(), but 96 | ; only in php.ini. 97 | xdebug.extended_info=1 98 | 99 | ; Introduced in Xdebug 2.1 100 | ; This setting determines the format of the links that are made in the display 101 | ; of stack traces where file names are used. This allows IDEs to set up a 102 | ; link-protocol that makes it possible to go directly to a line and file by 103 | ; clicking on the filenames that Xdebug shows in stack traces. An example format 104 | ; might look like: myide://%f@%l 105 | ; The possible format specifiers are: 106 | ; %f the filename 107 | ; %l the line number 108 | xdebug.file_link_format= 109 | 110 | ; Controls which IDE Key Xdebug should pass on to the DBGp debugger handler. 111 | ; The default is based on environment settings. First the environment setting 112 | ; DBGP_IDEKEY is consulted, then USER and as last USERNAME. The default is set 113 | ; to the first environment variable that is found. If none could be found the 114 | ; setting has as default ''. 115 | xdebug.idekey= 116 | 117 | ; This is the base url for the links from the function traces and error message 118 | ; to the manual pages of the function from the message. It is advisable to set 119 | ; this setting to use the closest mirror. 120 | xdebug.manual_url=http://www.php.net 121 | 122 | ; Controls the protection mechanism for infinite recursion protection. The value 123 | ; of this setting is the maximum level of nested functions that are allowed before 124 | ; the script will be aborted. 125 | xdebug.max_nesting_level=512 126 | 127 | ; Introduced in Xdebug 2.1 128 | ; By default Xdebug overloads var_dump() with its own improved version for displaying 129 | ; variables when the html_errors php.ini setting is set to 1. In case you do not 130 | ; want that, you can set this setting to 0, but check first if it's not smarter 131 | ; to turn off html_errors. 132 | xdebug.overload_var_dump=On 133 | 134 | ; When this setting is set to 1, profiler files will not be overwritten when a 135 | ; new request would map to the same file (depnding on the xdebug.profiler_output_name setting. 136 | ; Instead the file will be appended to with the new profile. 137 | xdebug.profiler_append=0 138 | 139 | ; Enables Xdebug's profiler which creates files in the profile output directory. 140 | ; Those files can be read by KCacheGrind to visualize your data. This setting 141 | ; can not be set in your script with ini_set(). 142 | xdebug.profiler_enable=0 143 | 144 | ; When this setting is set to 1, you can trigger the generation of profiler 145 | ; files by using the XDEBUG_PROFILE GET/POST parameter. This will then write 146 | ; the profiler data to defined directory. 147 | xdebug.profiler_enable_trigger=1 148 | 149 | ; The directory where the profiler output will be written to, make sure that the 150 | ; user who the PHP will be running as has write permissions to that directory. 151 | ; This setting can not be set in your script with ini_set(). 152 | xdebug.profiler_output_dir=/tmp 153 | 154 | ; This setting determines the name of the file that is used to dump traces into. 155 | ; The setting specifies the format with format specifiers, very similar to sprintf() 156 | ; and strftime(). There are several format specifiers that can be used to format 157 | ; the file name. 158 | ; See the xdebug.trace_output_name documentation for the supported specifiers. 159 | xdebug.profiler_output_name=cachegrind.out.%p 160 | 161 | ; Normally you need to use a specific HTTP GET/POST variable to start remote debugging. 162 | ; When this setting is set to 'On' Xdebug will always attempt to start a remote 163 | ; debugging session and try to connect to a client, even if the GET/POST/COOKIE 164 | ; variable was not present. 165 | xdebug.remote_autostart=On 166 | 167 | ; This switch controls whether Xdebug should try to contact a debug client which 168 | ; is listening on the host and port as set with the settings xdebug.remote_host 169 | ; and xdebug.remote_port. If a connection can not be established the script will 170 | ; just continue as if this setting was Off. 171 | xdebug.remote_enable=On 172 | 173 | ; Can be either 'php3' which selects the old PHP 3 style debugger output, 'gdb' 174 | ; which enables the GDB like debugger interface or 'dbgp' - the brand new debugger 175 | ; protocol. The DBGp protocol is more widely supported by clients. See more 176 | ; information in the introduction for Remote Debugging. 177 | xdebug.remote_handler=dbgp 178 | 179 | ; Selects the host where the debug client is running, you can either use a host 180 | ; name or an IP address. 181 | xdebug.remote_host=172.17.0.1 182 | 183 | ; If set to a value, it is used as filename to a file to which all remote debugger 184 | ; communications are logged. The file is always opened in append-mode, and will 185 | ; therefore not be overwritten by default. There is no concurrency protection 186 | ; available. 187 | xdebug.remote_log=/tmp/xdebug.log 188 | 189 | ; Selects when a debug connection is initiated. This setting can have two different values: 190 | ; req Xdebug will try to connect to the debug client as soon as the script starts. 191 | ; hit Xdebug will only try to connect to the debug client as soon as an error condition occurs. 192 | xdebug.remote_mode=req 193 | 194 | ; The port to which Xdebug tries to connect on the remote host. Port 9000 is the 195 | ; default for both the client and the bundled debugclient. As many clients use 196 | ; this port number, it is best to leave this setting unchanged. 197 | xdebug.remote_port=9000 198 | 199 | ; When this setting is set to 1, Xdebug will show a stack trace whenever an 200 | ; exception is raised - even if this exception is actually caught. 201 | xdebug.show_exception_trace=0 202 | 203 | ; When this setting is set to something != 0 Xdebug's generated stack dumps in 204 | ; error situations will also show all variables in the top-most scope. Beware 205 | ; that this might generate a lot of information, and is therefore turned off by default. 206 | xdebug.show_local_vars=0 207 | 208 | ; When this setting is set to something != 0 Xdebug's human-readable generated 209 | ; trace files will show the difference in memory usage between function calls. 210 | ; If Xdebug is configured to generate computer-readable trace files then they 211 | ; will always show this information. 212 | xdebug.show_mem_delta=0 213 | 214 | ; The format of the trace file. 215 | ; 0 shows a human readable indented trace file with: time index, memory usage, 216 | ; memory delta (if the setting xdebug.show_mem_delta is enabled), level, 217 | ; function name, function parameters (if the setting xdebug.collect_params 218 | ; is enabled, filename and line number. 219 | ; 1 writes a computer readable format which has two different records. There 220 | ; are different records for entering a stack frame, and leaving a stack frame 221 | xdebug.trace_format=0 222 | 223 | ; When set to '1' the trace files will be appended to, instead of being overwritten 224 | ; in subsequent requests. 225 | xdebug.trace_options=0 226 | 227 | ; The directory where the tracing files will be written to, make sure that the 228 | ; user who the PHP will be running as has write permissions to that directory. 229 | xdebug.trace_output_dir=/tmp 230 | 231 | ; This setting determines the name of the file that is used to dump traces into. 232 | ; The setting specifies the format with format specifiers, very similar to 233 | ; sprintf() and strftime(). There are several format specifiers that can be used 234 | ; to format the file name. The '.xt' extension is always added automatically. 235 | ;The possible format specifiers are: 236 | ; %c crc32 of the current working directory trace.%c trace.1258863198.xt 237 | ; %p pid trace.%p trace.5174.xt 238 | ; %r random number trace.%r trace.072db0.xt 239 | ; %s script name cachegrind.out.%s cachegrind.out._home_httpd_html_test_xdebug_test_php 240 | ; %t timestamp (seconds) trace.%t trace.1179434742.xt 241 | ; %u timestamp (microseconds) trace.%u trace.1179434749_642382.xt 242 | ; %H $_SERVER['HTTP_HOST'] trace.%H trace.kossu.xt 243 | ; %R $_SERVER['REQUEST_URI'] trace.%R trace._test_xdebug_test_php_var=1_var2=2.xt 244 | ; %S session_id (from $_COOKIE if set) trace.%S trace.c70c1ec2375af58f74b390bbdd2a679d.xt 245 | ; %% literal % trace.%% trace.%%.xt 246 | xdebug.trace_output_name=trace.%c 247 | 248 | ; Controls the amount of array children and object's properties are shown when 249 | ; variables are displayed with either xdebug_var_dump(), xdebug.show_local_vars 250 | ; or through Function Traces. This setting does not have any influence on the 251 | ; number of children that is send to the client through the Remote Debugging feature. 252 | xdebug.var_display_max_children=128 253 | 254 | ; Controls the maximum string length that is shown when variables are displayed 255 | ; with either xdebug_var_dump(), xdebug.show_local_vars or through Function Traces. 256 | ; This setting does not have any influence on the amount of data that is send to 257 | ; the client through the Remote Debugging feature. 258 | xdebug.var_display_max_data=512 259 | -------------------------------------------------------------------------------- /postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && \ 6 | apt-get install --yes \ 7 | postgresql-9.3 \ 8 | postgresql-client-9.3 \ 9 | postgresql-common \ 10 | postgresql-contrib-9.3 \ 11 | curl &&\ 12 | rm --recursive --force /var/lib/apt/lists/* \ 13 | && curl --output /usr/local/bin/gosu --show-error --location "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ 14 | && chmod +x /usr/local/bin/gosu \ 15 | && apt-get purge -y --auto-remove curl 16 | 17 | RUN apt-get update && apt-get install --yes locales &&\ 18 | rm --recursive --force /var/lib/apt/lists/* && \ 19 | localedef --inputfile=en_US --force --charmap=UTF-8 --alias-file /usr/share/locale/locale.alias en_US.UTF-8 20 | 21 | ENV LANG en_US.utf8 22 | RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf 23 | RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf 24 | 25 | RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql 26 | 27 | ENV PATH /usr/lib/postgresql/9.3/bin:$PATH 28 | ENV PGDATA /var/lib/postgresql/data 29 | 30 | COPY entrypoint.sh / 31 | 32 | ENTRYPOINT ["/entrypoint.sh"] 33 | 34 | EXPOSE 5432 35 | 36 | CMD ["postgres" ] 37 | -------------------------------------------------------------------------------- /postgres/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ "$1" = 'postgres' ]; then 5 | chown -R postgres "$PGDATA" 6 | 7 | chmod g+s /run/postgresql 8 | chown -R postgres:postgres /run/postgresql 9 | 10 | if [ -z "$(ls -A "$PGDATA")" ]; then 11 | gosu postgres initdb 12 | 13 | sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf 14 | 15 | # check password first so we can ouptut the warning before postgres 16 | # messes it up 17 | if [ "$POSTGRES_PASSWORD" ]; then 18 | pass="PASSWORD '$POSTGRES_PASSWORD'" 19 | authMethod=md5 20 | else 21 | # The - option suppresses leading tabs but *not* spaces. :) 22 | cat >&2 <<-'EOWARN' 23 | **************************************************** 24 | WARNING: No password has been set for the database. 25 | This will allow anyone with access to the 26 | Postgres port to access your database. In 27 | Docker's default configuration, this is 28 | effectively any other container on the same 29 | system. 30 | 31 | Use "-e POSTGRES_PASSWORD=password" to set 32 | it in "docker run". 33 | **************************************************** 34 | EOWARN 35 | 36 | pass= 37 | authMethod=trust 38 | fi 39 | 40 | : ${POSTGRES_USER:=postgres} 41 | : ${POSTGRES_DB:=$POSTGRES_USER} 42 | 43 | if [ "$POSTGRES_DB" != 'postgres' ]; then 44 | gosu postgres postgres --single -jE <<-EOSQL 45 | CREATE DATABASE "$POSTGRES_DB" ; 46 | EOSQL 47 | echo 48 | fi 49 | 50 | if [ "$POSTGRES_USER" = 'postgres' ]; then 51 | op='ALTER' 52 | else 53 | op='CREATE' 54 | fi 55 | 56 | gosu postgres postgres --single -jE <<-EOSQL 57 | $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; 58 | EOSQL 59 | echo 60 | 61 | { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf 62 | 63 | if [ -d /docker-entrypoint-initdb.d ]; then 64 | for f in /docker-entrypoint-initdb.d/*.sh; do 65 | [ -f "$f" ] && . "$f" 66 | done 67 | fi 68 | fi 69 | 70 | exec gosu postgres "$@" 71 | fi 72 | 73 | exec "$@" 74 | 75 | -------------------------------------------------------------------------------- /sample_symfony_app/bashrc.docker: -------------------------------------------------------------------------------- 1 | cd /srv 2 | -------------------------------------------------------------------------------- /sample_symfony_app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "greg0ire/sample_symfony_app", 3 | "description": "Dummy app to test docker", 4 | "require": { 5 | "swiftmailer/swiftmailer": "^5.4", 6 | "videlalvaro/php-amqplib": "^2.5" 7 | }, 8 | "authors": [ 9 | { 10 | "name": "Grégoire Paris", 11 | "email": "postmaster@greg0ire.fr" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_symfony_app/docker-compose.env.dist: -------------------------------------------------------------------------------- 1 | ../dockeronify/templates/default/src/docker-compose.env.dist -------------------------------------------------------------------------------- /sample_symfony_app/docker-compose.yml: -------------------------------------------------------------------------------- 1 | ../dockeronify/templates/default/src/docker-compose.yml -------------------------------------------------------------------------------- /sample_symfony_app/docker/conf: -------------------------------------------------------------------------------- 1 | ../../dockeronify/templates/default/src/docker/conf -------------------------------------------------------------------------------- /sample_symfony_app/web/app.php: -------------------------------------------------------------------------------- 1 | I am a sample symfony app, in production mode! Here is some php: 2 | 7 | I am a sample symfony app, in development mode! Here is some php: 8 | 9 |
10 | Now, let us try to access the database. 11 | query('SELECT NOW();'); 13 | $time = $statement->fetchObject()->now; 14 | ;?> 15 | Here is the time, right from the database: 16 | addServer('memcached'); 19 | ?> 20 |
21 | And now let us try to get memcache's status (0 is bad) : getServerStatus('memcached'); 22 | 23 | $transport = Swift_SmtpTransport::newInstance('mailer', 25); 24 | $mailer = Swift_Mailer::newInstance($transport); 25 | $message = Swift_Message::newInstance('Mail sent from the app container') 26 | ->setFrom(array('awesome@dev.org' => 'John Doe')) 27 | ->setTo(array('everyone@on-earth.com', 'other@domain.org' => 'A name')) 28 | ->setBody('Here is the body of the email.'); 29 | $mailer->send($message); 30 | ?> 31 |
32 | A mail was just sent. Check your mail! 33 | 34 |
35 | Ok now let us try to publish a message on rabbitmq! 36 | channel(); 40 | $channel->queue_declare('hello', false, false, false, false); 41 | 42 | $msg = new AMQPMessage('Hello World!'); 43 | $channel->basic_publish($msg, '', 'hello'); 44 | $channel->close(); 45 | $connection->close(); 46 | ?> 47 | Go check the administration interface 48 | -------------------------------------------------------------------------------- /sample_symfony_app/web/static-resource.html: -------------------------------------------------------------------------------- 1 | This is a static resource. 2 | --------------------------------------------------------------------------------