├── .github ├── dependabot.yml └── workflows │ └── CI.yml ├── .gitignore ├── .idea ├── docker-osticket.iml ├── encodings.xml ├── modules.xml ├── scopes │ └── scope_settings.xml └── vcs.xml ├── Dockerfile ├── LICENSE ├── README.md ├── docker-compose.yml ├── image-version ├── root ├── etc │ ├── default │ │ └── msmtp │ ├── nginx │ │ └── nginx.conf │ └── service │ │ ├── cron │ │ └── run │ │ ├── nginx │ │ └── run │ │ └── php-fpm │ │ └── run ├── sbin │ └── start └── usr │ └── local │ ├── etc │ └── php │ │ ├── conf.d │ │ └── php-osticket.ini │ │ └── php.ini │ └── src │ └── osticket │ └── setup │ └── install.php └── utils └── verify-plugin.php /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | schedule: 5 | - cron: '30 2 * * *' 6 | push: 7 | 8 | env: 9 | IMAGE_NAME: devinsolutions/osticket 10 | 11 | jobs: 12 | image: 13 | runs-on: ubuntu-20.04 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Load image version 17 | run: 'echo "IMAGE_VERSION=$(cat image-version)" >> $GITHUB_ENV' 18 | - name: Generate image tags 19 | id: meta 20 | uses: docker/metadata-action@v5 21 | with: 22 | images: ${{ env.IMAGE_NAME }} 23 | flavor: | 24 | latest=${{ github.ref_name == 'master' }} 25 | tags: | 26 | type=semver,pattern={{version}},value=${{ env.IMAGE_VERSION }} 27 | type=semver,pattern={{major}}.{{minor}},value=${{ env.IMAGE_VERSION }} 28 | type=semver,pattern={{major}},value=${{ env.IMAGE_VERSION }} 29 | - name: Login to DockerHub 30 | if: github.ref_name == 'master' 31 | uses: docker/login-action@v3 32 | with: 33 | username: ${{ secrets.DOCKERHUB_USERNAME }} 34 | password: ${{ secrets.DOCKERHUB_TOKEN }} 35 | - name: Build the image 36 | uses: docker/build-push-action@v5 37 | with: 38 | pull: true 39 | push: ${{ github.ref_name == 'master' }} 40 | tags: ${{ steps.meta.outputs.tags }} 41 | cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest 42 | cache-to: type=inline 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore user specific IDEA settings 2 | .idea/ 3 | -------------------------------------------------------------------------------- /.idea/docker-osticket.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1.3 2 | 3 | FROM php:8.1-fpm-alpine3.16 4 | RUN set -ex; \ 5 | \ 6 | export CFLAGS="${PHP_CFLAGS:?}"; \ 7 | export CPPFLAGS="${PHP_CPPFLAGS:?}"; \ 8 | export LDFLAGS="${PHP_LDFLAGS:?} -Wl,--strip-all"; \ 9 | \ 10 | # Runtime dependencies 11 | apk add --no-cache \ 12 | c-client \ 13 | icu \ 14 | libintl \ 15 | libpng \ 16 | libzip \ 17 | msmtp \ 18 | nginx \ 19 | openldap \ 20 | runit \ 21 | ; \ 22 | \ 23 | # Build dependencies 24 | apk add --no-cache --virtual .build-deps \ 25 | ${PHPIZE_DEPS} \ 26 | gettext-dev \ 27 | icu-dev \ 28 | imap-dev \ 29 | libpng-dev \ 30 | libzip-dev \ 31 | openldap-dev \ 32 | ; \ 33 | \ 34 | # Install PHP extensions 35 | docker-php-ext-configure imap --with-imap-ssl; \ 36 | docker-php-ext-install -j "$(nproc)" \ 37 | gd \ 38 | gettext \ 39 | imap \ 40 | intl \ 41 | ldap \ 42 | mysqli \ 43 | sockets \ 44 | zip \ 45 | ; \ 46 | pecl install apcu; \ 47 | docker-php-ext-enable \ 48 | apcu \ 49 | opcache \ 50 | ; \ 51 | \ 52 | # Create msmtp log 53 | touch /var/log/msmtp.log; \ 54 | chown www-data:www-data /var/log/msmtp.log; \ 55 | \ 56 | # Create data dir 57 | mkdir /var/lib/osticket; \ 58 | \ 59 | # Clean up 60 | apk del .build-deps; \ 61 | rm -rf /tmp/pear /var/cache/apk/* 62 | # DO NOT FORGET TO CHECK THE LANGUAGE PACK DOWNLOAD URL BELOW 63 | # DO NOT FORGET TO UPDATE "image-version" FILE 64 | ENV OSTICKET_VERSION=1.17.5 \ 65 | OSTICKET_SHA256SUM=a9d64b67008c64ae2009ee8abda7354c34ff4486666f931d3012988dd6538bc9 66 | RUN --mount=type=bind,source=utils/verify-plugin.php,target=/tmp/verify-plugin.php,readonly \ 67 | \ 68 | set -ex; \ 69 | \ 70 | wget -q -O osTicket.zip https://github.com/osTicket/osTicket/releases/download/\ 71 | v${OSTICKET_VERSION}/osTicket-v${OSTICKET_VERSION}.zip; \ 72 | echo "${OSTICKET_SHA256SUM} osTicket.zip" | sha256sum -c; \ 73 | unzip osTicket.zip 'upload/*'; \ 74 | rm osTicket.zip; \ 75 | mkdir /usr/local/src; \ 76 | mv upload /usr/local/src/osticket; \ 77 | # Hard link the sources to the public directory 78 | cp -al /usr/local/src/osticket/. /var/www/html; \ 79 | # Hide setup 80 | rm -r /var/www/html/setup; \ 81 | \ 82 | cd /var/www/html; \ 83 | \ 84 | for lang in bg bn bs ca cs da de el es_AR es_ES es_MX et eu fa fi fr gl he hi hr hu id is it \ 85 | ja ka km ko lt lv mk mn ms nl no pl pt_BR pt_PT ro ru sk sl sq sr sr_CS sv_SE sw th tr uk \ 86 | ur_IN ur_PK vi zh_CN zh_TW; do \ 87 | # This URL is the same as what is used by the official osTicket Downloads page. This URL is 88 | # used even for minor versions >= 14. 89 | wget -q -O /var/www/html/include/i18n/${lang}.phar \ 90 | https://s3.amazonaws.com/downloads.osticket.com/lang/1.14.x/${lang}.phar; \ 91 | php /tmp/verify-plugin.php "/var/www/html/include/i18n/${lang}.phar"; \ 92 | done 93 | RUN set -ex; \ 94 | \ 95 | for plugin in audit auth-2fa auth-ldap auth-oauth2 auth-passthru auth-password-policy \ 96 | storage-fs storage-s3; do \ 97 | wget -q -O /var/www/html/include/plugins/${plugin}.phar \ 98 | https://s3.amazonaws.com/downloads.osticket.com/plugin/${plugin}.phar; \ 99 | done; \ 100 | # This checks `.phar` integrity (authenticity check is not supported - see 101 | # https://github.com/osTicket/osTicket/issues/6376). 102 | for phar in /var/www/html/include/plugins/*.phar; do \ 103 | # The following PHP code throws an exception and returns non-zero if .phar can't be loaded 104 | # (e.g. due to a checksum mismatch) 105 | php -r "new Phar(\"${phar}\");"; \ 106 | done 107 | ENV OSTICKET_SLACK_VERSION=de1d9a276a64520eea6e6368e609a0f4c4829d96 \ 108 | OSTICKET_SLACK_SHA256SUM=8d06500fd5b8a589a5f7103c242160086ca1696a5b93d0e3767119a54059532b 109 | RUN set -ex; \ 110 | \ 111 | wget -q -O osTicket-slack-plugin.tar.gz https://github.com/devinsolutions/\ 112 | osTicket-slack-plugin/archive/${OSTICKET_SLACK_VERSION}.tar.gz; \ 113 | echo "${OSTICKET_SLACK_SHA256SUM} osTicket-slack-plugin.tar.gz" | sha256sum -c; \ 114 | tar -xzf osTicket-slack-plugin.tar.gz -C /var/www/html/include/plugins --strip-components 1 \ 115 | osTicket-slack-plugin-${OSTICKET_SLACK_VERSION}/slack; \ 116 | rm osTicket-slack-plugin.tar.gz 117 | COPY root / 118 | CMD ["start"] 119 | STOPSIGNAL SIGTERM 120 | EXPOSE 80 121 | HEALTHCHECK CMD curl -fIsS http://localhost/ || exit 1 122 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Petter Helset 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 | docker-osticket 2 | =============== 3 | 4 | # Introduction 5 | 6 | Docker image for running version 1.17 of [osTicket](http://osticket.com/). 7 | 8 | **Important! If upgrading from images <1.17.0, read the upgrade instructions below, as images 1.17.0 9 | and later have plugin-related breaking changes.** 10 | 11 | This image has been created from the original docker-osticket image by 12 | [Petter A. Helset](mailto:petter@helset.eu). 13 | 14 | It has a few modifications: 15 | 16 | * Documentation added, hurray! 17 | * Base OS image fixed to Alpine Linux 18 | * AJAX issues fixed that made original image unusable 19 | * Now designed to work with a linked [MySQL](https://registry.hub.docker.com/u/library/mysql/) 20 | docker container. 21 | * Automates configuration file & database installation 22 | * EMail support 23 | 24 | osTicket is being served by [nginx](http://wiki.nginx.org/Main) using 25 | [PHP-FPM](http://php-fpm.org/) with PHP 8.1. 26 | PHP [mail](http://php.net/manual/en/function.mail.php) function is configured to use 27 | [msmtp](http://msmtp.sourceforge.net/) to send out-going messages. 28 | 29 | # Quick Start 30 | 31 | Ensure you have a MySQL 5 container running that osTicket can use to store its data. 32 | 33 | ```bash 34 | docker run -d \ 35 | -e MYSQL_ROOT_PASSWORD=secret \ 36 | -e MYSQL_USER=osticket \ 37 | -e MYSQL_PASSWORD=secret \ 38 | -e MYSQL_DATABASE=osticket \ 39 | --name osticket_mysql\ 40 | mysql:5 41 | ``` 42 | 43 | Now run this image and link the MySQL container. 44 | 45 | ```bash 46 | docker run -d --name osticket --link osticket_mysql:mysql -p 8080:80 devinsolutions/osticket 47 | ``` 48 | 49 | Wait for the installation to complete then browse to your osTicket staff control panel at 50 | `http://localhost:8080/scp/`. Login with default admin user & password: 51 | 52 | * username: **ostadmin** 53 | * password: **Admin1** 54 | 55 | Now configure as required. If you are intending on using this image in production, please make sure 56 | you change the passwords above and read the rest of this documentation! 57 | 58 | Note (1): If you want to change the environmental database variables on the osTicket image to run, 59 | you can do it as follows. 60 | 61 | ```bash 62 | docker run -d \ 63 | -e MYSQL_ROOT_PASSWORD=new_root_password \ 64 | -e MYSQL_USER=new_root_user \ 65 | -e MYSQL_PASSWORD=new_secret \ 66 | -e MYSQL_DATABASE=osticket \ 67 | --link osticket_mysql:mysql \ 68 | --name osticket\ 69 | -p 8080:80 \ 70 | devinsolutions/osticket 71 | ``` 72 | 73 | Note (2): osTicket automatically redirects `http://localhost:8080/scp` to `http://localhost/scp/`. 74 | Either serve this on port 80 or don't omit the trailing slash after `scp/`! 75 | 76 | # Upgrading 77 | 78 | ## Upgrading from image tag 1.16.3 or earlier 79 | 80 | There are breaking changes in images tagged 1.17.0 and later, related to how plugins are shipped. 81 | When upgrading from image tag 1.16.3 or earlier, and plugins are used on the installation, manual 82 | intervention may be required. 83 | 84 | Breaking changes are: 85 | 86 | - Plugins `auth-oauth` and `auth-cas` are no longer included in this image. Plugin `auth-oauth` was 87 | superseded by a new plugin `auth-oauth2`. 88 | - Plugins are no longer installed as directories. Instead, they are installed as `.phar` archives. 89 | 90 | Manual upgrade steps: 91 | 92 | 1. As a precaution (as before any upgrade), perform a full DB backup. 93 | 2. If you are using one of the auth plugins that are no longer available in this image, and want to 94 | migrate to `auth-oauth2`: 95 | 96 | - Before upgrading, create a temporary user with Admin privileges that can authenticate via 97 | username/password. 98 | - If you can remove the old plugin now, do so. If that's not possible, we will remove it later, 99 | but those steps are more difficult. 100 | - Switch to tag 1.17.x 101 | - Log in, and run the osTicket upgrader. 102 | - Set up the `auth-oauth2` plugin. 103 | - If you haven't removed the old plugin previously, let's do so now. Since it is not present in 104 | the image, it will show as "(defunct — missing)". Attempting to remove it will lead to Error 105 | 500, as the removal process requires the plugin to be present. We will have to remove it from 106 | the DB manually. 107 | 108 | - Open a shell to `MariaDB` / `MySQL` osTicket database. 109 | - List contents of the `ost_plugin` table (`SELECT * FROM ost_plugin;`). 110 | - Delete the missing plugin: `DELETE FROM ost_plugin WHERE id=;` (replace `` with the 111 | one corresponding to the plugin to be removed). 112 | 113 | 3. Switch to tag 1.17.x (if you skipped step 2). 114 | 4. If you are using any of `audit` `auth-2fa` `auth-ldap` `auth-passthru` `auth-password-policy` 115 | `storage-fs` or `storage-s3` plugins: 116 | 117 | - These are no longer installed as folders but are installed as `.phar`s. We need to update 118 | osTicket database so that entry in the plugins table points to the new location. 119 | - Open a shell to `MariaDB` / `MySQL` osTicket database. 120 | - List contents of the `ost_plugin` table (`SELECT * FROM ost_plugin;`) 121 | - If any of the plugins mentioned above are installed, for each one do: 122 | `UPDATE ost_plugin SET install_path=".phar", isphar=1 WHERE id=;` 123 | (replace `` and `` by values from `install_path` and `id` columns. For 124 | example, for plugin installed as `id` 3, with install path `plugins/auth-passthru`, the 125 | `UPDATE` statement will be 126 | `UPDATE ost_plugin SET install_path="plugins/auth-passthru.phar", isphar=1 WHERE id=3;`) 127 | 128 | 5. Run the osTicket upgrader (if you skipped step 2). 129 | 130 | Note: If you upgraded to 1.17.x and can't log in (because auth plugins no longer work and you have 131 | not yet created a user that can log in with username/password), and you have not yet run osTicket 132 | upgrader (this image does not run it automatically, it has to be run manually after the first Admin 133 | login), it is should be safe to roll back to 1.16.3. 134 | 135 | # MySQL connection 136 | 137 | The recommended connection method is to link your MySQL container to this image with the alias name 138 | `mysql`. However, if you are using an external MySQL server then you can specify the connection 139 | details using environmental variables. 140 | 141 | osTicket requires that the MySQL connection specifies a user with full permissions to the specified 142 | database. This is required for the automatic database installation. 143 | 144 | The osTicket configuration file is re-created from the template every time the container is 145 | started. This ensures the MySQL connection details are always kept up to date automatically in case 146 | of any changes. 147 | 148 | ## Linked container Settings 149 | 150 | There are no mandatory settings required when you link your MySQL container with the alias `mysql` 151 | as per the quick start example. 152 | 153 | ## External MySQL connection settings 154 | 155 | The following environmental variables should be set when connecting to an external MySQL server. 156 | 157 | `MYSQL_HOST` 158 | 159 | The host name or IP address of the MySQL host to connect to. This is not required when you link a 160 | container with the alias `mysql`. This must be provided if not using a linked container. 161 | 162 | `MYSQL_PASSWORD` 163 | 164 | The password for the specified user used when connecting to the MySQL server. By default will use 165 | the environmental variable `MYSQL_PASSWORD` from the linked MySQL container if this is not 166 | explicitly specified. This must be provided if not using a linked container. 167 | 168 | `MYSQL_PREFIX` 169 | 170 | The table prefix for this installation. Unlikely you will need to change this as customisable table 171 | prefixes are designed for shared hosting with only a single MySQL database available. Defaults to 172 | 'ost_'. 173 | 174 | `MYSQL_DATABASE` 175 | 176 | The name of the database to connect to. Defaults to 'osticket'. 177 | 178 | `MYSQL_USER` 179 | 180 | The user name to use when connecting to the MySQL server. Defaults to 'osticket'. 181 | 182 | # Mail Configuration 183 | 184 | The image does not run a MTA. Although one could be installed quite easily, getting the setup so 185 | that external mail servers will accept mail from your host & domain is not trivial due to anti-spam 186 | measures. This is additionally difficult to do from ephemeral docker containers that run in a cloud 187 | where the host may change etc. 188 | 189 | Hence this image supports osTicket sending of mail by sending directly to designated a SMTP server. 190 | However, you must provide the relevant SMTP settings through environmental variables before this 191 | will function. 192 | 193 | To automatically collect email from an external IMAP or POP3 account, configure the settings for 194 | the relevant email address in your admin control panel as normal (Admin Panel -> Emails). 195 | 196 | ## SMTP Settings 197 | 198 | `SMTP_HOST` 199 | 200 | The host name (or IP address) of the SMTP server to send all outgoing mail through. Defaults to 201 | 'localhost'. 202 | 203 | `SMTP_PORT` 204 | 205 | The TCP port to connect to on the server. Defaults to '25'. Usually one of 25, 465 or 587. 206 | 207 | `SMTP_FROM` 208 | 209 | The envelope from address to use when sending email (note that is not the same as the From: 210 | header). This must be provided for sending mail to function. However, if not specified, this will 211 | default to the value of `SMTP_USER` if this is provided. 212 | 213 | `SMTP_TLS` 214 | 215 | Boolean (1 or 0) value indicating if TLS should be used to create a secure connection to the 216 | server. Defaults to true. 217 | 218 | `SMTP_TLS_CERTS` 219 | 220 | If TLS is in use, indicates file containing root certificates used to verify server certificate. 221 | Defaults to system installed ca certificates list. This would normally only need changed if you are 222 | using your own certificate authority or are connecting to a server with a self signed certificate. 223 | 224 | `SMTP_USER` 225 | 226 | The user identity to use for SMTP authentication. Specifying a value here will enable SMTP 227 | authentication. This will also be used for the `SMTP_FROM` value if this is not explicitly 228 | specified. Defaults to no value. 229 | 230 | `SMTP_PASSWORD` 231 | 232 | The password associated with the user for SMTP authentication. Defaults to no value. 233 | 234 | ## IMAP/POP3 Settings 235 | 236 | `CRON_INTERVAL` 237 | 238 | Specifies how often (in minutes) that osTicket cron script should be ran to check for incoming 239 | emails. Defaults to 5 minutes. Set to 0 to disable running of cron script. Note that this works in 240 | conjuction with the email check interval specified in the admin control panel, you need to specify 241 | both to the value you'd like! 242 | 243 | # Environmental Variables 244 | 245 | `INSTALL_SECRET` 246 | 247 | Secret string value for osTicket installation. A random value is generated on start-up and 248 | persisted in `/var/lib/osticket/secret.txt` if this is not provided. 249 | 250 | *If using in production you should specify this so that re-creating the container does not cause 251 | your installation secret to be lost!* 252 | 253 | `INSTALL_CONFIG` 254 | 255 | If you require a configuration file for osTicket with custom content then you should create one and 256 | mount it in your container as a volume. The placeholders for the MySQL connection must be retained 257 | as these will be populated automatically when the container starts. Set this environmental variable 258 | to the fully qualified file name of your custom configuration. If not specified, the default 259 | osTicket sample configuration file is used. 260 | 261 | `INSTALL_EMAIL` 262 | 263 | Helpdesk email account. This is placed in the configuration file as well as the DB during 264 | installation. Defaults to 'helpdesk@example.com' 265 | 266 | `INSTALL_URL` 267 | 268 | The full URL of the osTicket installation that will be set in the DB during installation. 269 | This should be set to match the public facing URL of your osTicket site. 270 | For example: `https://help.example.com/osticket`. Defaults to `http://localhost:8080/`. 271 | 272 | This has no effect if the database has already been installed. In this case, you should change the 273 | Helpdesk URL in *System Settings and Preferences* in the admin control panel. 274 | 275 | ## Database Installation Only 276 | 277 | The remaining environmental variables can be used as a convenience to provide defaults during the 278 | automated database installation but most of these settings can be changed through the admin panel 279 | if required. These are only used when creating the initial database. 280 | 281 | `INSTALL_NAME` 282 | 283 | The name of the helpdesk to create if installing. Defaults to "My Helpdesk". 284 | 285 | `ADMIN_FIRSTNAME` 286 | 287 | First name of automatically created administrative user. Defaults to 'Admin'. 288 | 289 | `ADMIN_LASTNAME` 290 | 291 | Last name of automatically created administrative user. Defaults to 'User'. 292 | 293 | `ADMIN_EMAIL` 294 | 295 | Email address of automatically created administrative user. Defaults to 'admin@example.com'. 296 | 297 | `ADMIN_USERNAME` 298 | 299 | User name to use for automatically created administrative user. Defaults to 'ostadmin'. 300 | 301 | `ADMIN_PASSWORD` 302 | 303 | Password to use for automatically created administrative user. Defaults to 'Admin1'. 304 | 305 | # Modifications 306 | 307 | This image was put together relatively quickly and could probably be improved to meet other use 308 | cases. 309 | 310 | Please feel free to open an issue if you have any changes you would like to see. All pull requests 311 | are also appreciated! 312 | 313 | # License 314 | 315 | This image and source code is made available under the MIT licence. See the LICENSE file for 316 | details. 317 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | mysql: 4 | image: mysql:5.7 5 | environment: 6 | MYSQL_ROOT_PASSWORD: secret 7 | MYSQL_DATABASE: osticket 8 | MYSQL_USER: osticket 9 | MYSQL_PASSWORD: secret 10 | osticket: 11 | image: devinsolutions/osticket:latest 12 | environment: 13 | MYSQL_HOST: mysql 14 | MYSQL_DATABASE: osticket 15 | MYSQL_USER: osticket 16 | MYSQL_PASSWORD: secret 17 | ports: 18 | - 8080:80 19 | restart: on-failure 20 | -------------------------------------------------------------------------------- /image-version: -------------------------------------------------------------------------------- 1 | 1.17.5 2 | -------------------------------------------------------------------------------- /root/etc/default/msmtp: -------------------------------------------------------------------------------- 1 | # msmtp configuration template 2 | # 3 | # This is populated and saved as /etc/msmtp when image starts 4 | # 5 | 6 | # Default settings 7 | defaults 8 | logfile /var/log/msmtp.log 9 | 10 | # OSTicket account 11 | account osticket 12 | protocol smtp 13 | host %SMTP_HOSTNAME% 14 | tls %SMTP_TLS% 15 | tls_trust_file %SMTP_TLS_CERTS% 16 | port %SMTP_PORT% 17 | auth %SMTP_AUTH% 18 | user %SMTP_USER% 19 | password %SMTP_PASS% 20 | from %SMTP_FROM% 21 | 22 | # If you don't use the '-a' parameter in your command line, the default account will be used. 23 | account default: osticket 24 | -------------------------------------------------------------------------------- /root/etc/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | 4 | events { 5 | worker_connections 1024; 6 | } 7 | 8 | http { 9 | include mime.types; 10 | default_type application/octet-stream; 11 | 12 | sendfile on; 13 | keepalive_timeout 2; 14 | client_max_body_size 100m; 15 | 16 | server_tokens off; 17 | 18 | server { 19 | listen 80; 20 | server_name localhost; 21 | 22 | add_header X-Content-Type-Options nosniff always; 23 | add_header X-XSS-Protection "1; mode=block" always; 24 | 25 | root /var/www/html; 26 | index index.html index.htm index.php; 27 | 28 | access_log /var/log/nginx/osticket-access.log; 29 | error_log /var/log/nginx/osticket-error.log error; 30 | 31 | charset utf-8; 32 | 33 | set $path_info ""; 34 | 35 | location ~ /include { 36 | deny all; 37 | return 403; 38 | } 39 | 40 | if ($request_uri ~ "^/api(/[^\?]+)") { 41 | set $path_info $1; 42 | } 43 | 44 | location /api { 45 | try_files $uri $uri/ /api/http.php?$query_string; 46 | } 47 | 48 | if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") { 49 | set $path_info $1; 50 | } 51 | 52 | location ~ ^/scp/ajax.php/.*$ { 53 | try_files $uri $uri/ /scp/ajax.php?$query_string; 54 | } 55 | 56 | if ($request_uri ~ "^/ajax.php(/[^\?]+)") { 57 | set $path_info $1; 58 | } 59 | 60 | location ~ ^/ajax.php/.*$ { 61 | try_files $uri $uri/ /ajax.php?$query_string; 62 | } 63 | 64 | location / { 65 | try_files $uri $uri/ index.php; 66 | } 67 | 68 | location = /favicon.ico { log_not_found off; access_log off; } 69 | location = /robots.txt { access_log off; log_not_found off; } 70 | 71 | # Deny .htaccess file access 72 | location ~ /\.ht { 73 | deny all; 74 | } 75 | 76 | location ~ \.php$ { 77 | try_files $uri = 404; 78 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 79 | include fastcgi_params; 80 | fastcgi_index index.php; 81 | fastcgi_param LARA_ENV local; # Environment variable for Laravel 82 | fastcgi_param PATH_INFO $path_info; 83 | fastcgi_pass 127.0.0.1:9000; 84 | } 85 | } 86 | } 87 | 88 | daemon off; 89 | -------------------------------------------------------------------------------- /root/etc/service/cron/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec crond -fL /var/log/cron.log 4 | -------------------------------------------------------------------------------- /root/etc/service/nginx/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec nginx 4 | -------------------------------------------------------------------------------- /root/etc/service/php-fpm/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec php-fpm -c $PHP_INI_DIR -y /usr/local/etc/php-fpm.conf 4 | -------------------------------------------------------------------------------- /root/sbin/start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) Campbell Software Solutions 2015 3 | set -e 4 | 5 | cat < tags as PHP source which should be processed as such. It is 188 | ; generally recommended that should be used and that this feature 189 | ; should be disabled, as enabling it may result in issues when generating XML 190 | ; documents, however this remains supported for backward compatibility reasons. 191 | ; Note that this directive does not control the would work. 323 | ; http://php.net/syntax-highlighting 324 | ;highlight.string = #DD0000 325 | ;highlight.comment = #FF9900 326 | ;highlight.keyword = #007700 327 | ;highlight.default = #0000BB 328 | ;highlight.html = #000000 329 | 330 | ; If enabled, the request will be allowed to complete even if the user aborts 331 | ; the request. Consider enabling it if executing long requests, which may end up 332 | ; being interrupted by the user or a browser timing out. PHP's default behavior 333 | ; is to disable this feature. 334 | ; http://php.net/ignore-user-abort 335 | ;ignore_user_abort = On 336 | 337 | ; Determines the size of the realpath cache to be used by PHP. This value should 338 | ; be increased on systems where PHP opens many files to reflect the quantity of 339 | ; the file operations performed. 340 | ; http://php.net/realpath-cache-size 341 | ;realpath_cache_size = 4096k 342 | 343 | ; Duration of time, in seconds for which to cache realpath information for a given 344 | ; file or directory. For systems with rarely changing files, consider increasing this 345 | ; value. 346 | ; http://php.net/realpath-cache-ttl 347 | ;realpath_cache_ttl = 120 348 | 349 | ; Enables or disables the circular reference collector. 350 | ; http://php.net/zend.enable-gc 351 | zend.enable_gc = On 352 | 353 | ; If enabled, scripts may be written in encodings that are incompatible with 354 | ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such 355 | ; encodings. To use this feature, mbstring extension must be enabled. 356 | ; Default: Off 357 | ;zend.multibyte = Off 358 | 359 | ; Allows to set the default encoding for the scripts. This value will be used 360 | ; unless "declare(encoding=...)" directive appears at the top of the script. 361 | ; Only affects if zend.multibyte is set. 362 | ; Default: "" 363 | ;zend.script_encoding = 364 | 365 | ;;;;;;;;;;;;;;;;; 366 | ; Miscellaneous ; 367 | ;;;;;;;;;;;;;;;;; 368 | 369 | ; Decides whether PHP may expose the fact that it is installed on the server 370 | ; (e.g. by adding its signature to the Web server header). It is no security 371 | ; threat in any way, but it makes it possible to determine whether you use PHP 372 | ; on your server or not. 373 | ; http://php.net/expose-php 374 | expose_php = On 375 | 376 | ;;;;;;;;;;;;;;;;;;; 377 | ; Resource Limits ; 378 | ;;;;;;;;;;;;;;;;;;; 379 | 380 | ; Maximum execution time of each script, in seconds 381 | ; http://php.net/max-execution-time 382 | ; Note: This directive is hardcoded to 0 for the CLI SAPI 383 | max_execution_time = 30 384 | 385 | ; Maximum amount of time each script may spend parsing request data. It's a good 386 | ; idea to limit this time on productions servers in order to eliminate unexpectedly 387 | ; long running scripts. 388 | ; Note: This directive is hardcoded to -1 for the CLI SAPI 389 | ; Default Value: -1 (Unlimited) 390 | ; Development Value: 60 (60 seconds) 391 | ; Production Value: 60 (60 seconds) 392 | ; http://php.net/max-input-time 393 | max_input_time = 60 394 | 395 | ; Maximum input variable nesting level 396 | ; http://php.net/max-input-nesting-level 397 | ;max_input_nesting_level = 64 398 | 399 | ; How many GET/POST/COOKIE input variables may be accepted 400 | ; max_input_vars = 1000 401 | 402 | ; Maximum amount of memory a script may consume (128MB) 403 | ; http://php.net/memory-limit 404 | memory_limit = 128M 405 | 406 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 407 | ; Error handling and logging ; 408 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 409 | 410 | ; This directive informs PHP of which errors, warnings and notices you would like 411 | ; it to take action for. The recommended way of setting values for this 412 | ; directive is through the use of the error level constants and bitwise 413 | ; operators. The error level constants are below here for convenience as well as 414 | ; some common settings and their meanings. 415 | ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT 416 | ; those related to E_NOTICE and E_STRICT, which together cover best practices and 417 | ; recommended coding standards in PHP. For performance reasons, this is the 418 | ; recommend error reporting setting. Your production server shouldn't be wasting 419 | ; resources complaining about best practices and coding standards. That's what 420 | ; development servers and development settings are for. 421 | ; Note: The php.ini-development file has this setting as E_ALL. This 422 | ; means it pretty much reports everything which is exactly what you want during 423 | ; development and early testing. 424 | ; 425 | ; Error Level Constants: 426 | ; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) 427 | ; E_ERROR - fatal run-time errors 428 | ; E_RECOVERABLE_ERROR - almost fatal run-time errors 429 | ; E_WARNING - run-time warnings (non-fatal errors) 430 | ; E_PARSE - compile-time parse errors 431 | ; E_NOTICE - run-time notices (these are warnings which often result 432 | ; from a bug in your code, but it's possible that it was 433 | ; intentional (e.g., using an uninitialized variable and 434 | ; relying on the fact it is automatically initialized to an 435 | ; empty string) 436 | ; E_STRICT - run-time notices, enable to have PHP suggest changes 437 | ; to your code which will ensure the best interoperability 438 | ; and forward compatibility of your code 439 | ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup 440 | ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's 441 | ; initial startup 442 | ; E_COMPILE_ERROR - fatal compile-time errors 443 | ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) 444 | ; E_USER_ERROR - user-generated error message 445 | ; E_USER_WARNING - user-generated warning message 446 | ; E_USER_NOTICE - user-generated notice message 447 | ; E_DEPRECATED - warn about code that will not work in future versions 448 | ; of PHP 449 | ; E_USER_DEPRECATED - user-generated deprecation warnings 450 | ; 451 | ; Common Values: 452 | ; E_ALL (Show all errors, warnings and notices including coding standards.) 453 | ; E_ALL & ~E_NOTICE (Show all errors, except for notices) 454 | ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) 455 | ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) 456 | ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED 457 | ; Development Value: E_ALL 458 | ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT 459 | ; http://php.net/error-reporting 460 | error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT 461 | 462 | ; This directive controls whether or not and where PHP will output errors, 463 | ; notices and warnings too. Error output is very useful during development, but 464 | ; it could be very dangerous in production environments. Depending on the code 465 | ; which is triggering the error, sensitive information could potentially leak 466 | ; out of your application such as database usernames and passwords or worse. 467 | ; For production environments, we recommend logging errors rather than 468 | ; sending them to STDOUT. 469 | ; Possible Values: 470 | ; Off = Do not display any errors 471 | ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) 472 | ; On or stdout = Display errors to STDOUT 473 | ; Default Value: On 474 | ; Development Value: On 475 | ; Production Value: Off 476 | ; http://php.net/display-errors 477 | display_errors = Off 478 | 479 | ; The display of errors which occur during PHP's startup sequence are handled 480 | ; separately from display_errors. PHP's default behavior is to suppress those 481 | ; errors from clients. Turning the display of startup errors on can be useful in 482 | ; debugging configuration problems. We strongly recommend you 483 | ; set this to 'off' for production servers. 484 | ; Default Value: Off 485 | ; Development Value: On 486 | ; Production Value: Off 487 | ; http://php.net/display-startup-errors 488 | display_startup_errors = Off 489 | 490 | ; Besides displaying errors, PHP can also log errors to locations such as a 491 | ; server-specific log, STDERR, or a location specified by the error_log 492 | ; directive found below. While errors should not be displayed on productions 493 | ; servers they should still be monitored and logging is a great way to do that. 494 | ; Default Value: Off 495 | ; Development Value: On 496 | ; Production Value: On 497 | ; http://php.net/log-errors 498 | log_errors = On 499 | 500 | ; Set maximum length of log_errors. In error_log information about the source is 501 | ; added. The default is 1024 and 0 allows to not apply any maximum length at all. 502 | ; http://php.net/log-errors-max-len 503 | log_errors_max_len = 1024 504 | 505 | ; Do not log repeated messages. Repeated errors must occur in same file on same 506 | ; line unless ignore_repeated_source is set true. 507 | ; http://php.net/ignore-repeated-errors 508 | ignore_repeated_errors = Off 509 | 510 | ; Ignore source of message when ignoring repeated messages. When this setting 511 | ; is On you will not log errors with repeated messages from different files or 512 | ; source lines. 513 | ; http://php.net/ignore-repeated-source 514 | ignore_repeated_source = Off 515 | 516 | ; If this parameter is set to Off, then memory leaks will not be shown (on 517 | ; stdout or in the log). This has only effect in a debug compile, and if 518 | ; error reporting includes E_WARNING in the allowed list 519 | ; http://php.net/report-memleaks 520 | report_memleaks = On 521 | 522 | ; This setting is on by default. 523 | ;report_zend_debug = 0 524 | 525 | ; Store the last error/warning message in $php_errormsg (boolean). Setting this value 526 | ; to On can assist in debugging and is appropriate for development servers. It should 527 | ; however be disabled on production servers. 528 | ; Default Value: Off 529 | ; Development Value: On 530 | ; Production Value: Off 531 | ; http://php.net/track-errors 532 | track_errors = Off 533 | 534 | ; Turn off normal error reporting and emit XML-RPC error XML 535 | ; http://php.net/xmlrpc-errors 536 | ;xmlrpc_errors = 0 537 | 538 | ; An XML-RPC faultCode 539 | ;xmlrpc_error_number = 0 540 | 541 | ; When PHP displays or logs an error, it has the capability of formatting the 542 | ; error message as HTML for easier reading. This directive controls whether 543 | ; the error message is formatted as HTML or not. 544 | ; Note: This directive is hardcoded to Off for the CLI SAPI 545 | ; Default Value: On 546 | ; Development Value: On 547 | ; Production value: On 548 | ; http://php.net/html-errors 549 | html_errors = On 550 | 551 | ; If html_errors is set to On *and* docref_root is not empty, then PHP 552 | ; produces clickable error messages that direct to a page describing the error 553 | ; or function causing the error in detail. 554 | ; You can download a copy of the PHP manual from http://php.net/docs 555 | ; and change docref_root to the base URL of your local copy including the 556 | ; leading '/'. You must also specify the file extension being used including 557 | ; the dot. PHP's default behavior is to leave these settings empty, in which 558 | ; case no links to documentation are generated. 559 | ; Note: Never use this feature for production boxes. 560 | ; http://php.net/docref-root 561 | ; Examples 562 | ;docref_root = "/phpmanual/" 563 | 564 | ; http://php.net/docref-ext 565 | ;docref_ext = .html 566 | 567 | ; String to output before an error message. PHP's default behavior is to leave 568 | ; this setting blank. 569 | ; http://php.net/error-prepend-string 570 | ; Example: 571 | ;error_prepend_string = "" 572 | 573 | ; String to output after an error message. PHP's default behavior is to leave 574 | ; this setting blank. 575 | ; http://php.net/error-append-string 576 | ; Example: 577 | ;error_append_string = "" 578 | 579 | ; Log errors to specified file. PHP's default behavior is to leave this value 580 | ; empty. 581 | ; http://php.net/error-log 582 | ; Example: 583 | error_log = /var/log/php/error.log 584 | 585 | ;windows.show_crt_warning 586 | ; Default value: 0 587 | ; Development value: 0 588 | ; Production value: 0 589 | 590 | ;;;;;;;;;;;;;;;;; 591 | ; Data Handling ; 592 | ;;;;;;;;;;;;;;;;; 593 | 594 | ; The separator used in PHP generated URLs to separate arguments. 595 | ; PHP's default setting is "&". 596 | ; http://php.net/arg-separator.output 597 | ; Example: 598 | ;arg_separator.output = "&" 599 | 600 | ; List of separator(s) used by PHP to parse input URLs into variables. 601 | ; PHP's default setting is "&". 602 | ; NOTE: Every character in this directive is considered as separator! 603 | ; http://php.net/arg-separator.input 604 | ; Example: 605 | ;arg_separator.input = ";&" 606 | 607 | ; This directive determines which super global arrays are registered when PHP 608 | ; starts up. G,P,C,E & S are abbreviations for the following respective super 609 | ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty 610 | ; paid for the registration of these arrays and because ENV is not as commonly 611 | ; used as the others, ENV is not recommended on productions servers. You 612 | ; can still get access to the environment variables through getenv() should you 613 | ; need to. 614 | ; Default Value: "EGPCS" 615 | ; Development Value: "GPCS" 616 | ; Production Value: "GPCS"; 617 | ; http://php.net/variables-order 618 | variables_order = "GPCS" 619 | 620 | ; This directive determines which super global data (G,P & C) should be 621 | ; registered into the super global array REQUEST. If so, it also determines 622 | ; the order in which that data is registered. The values for this directive 623 | ; are specified in the same manner as the variables_order directive, 624 | ; EXCEPT one. Leaving this value empty will cause PHP to use the value set 625 | ; in the variables_order directive. It does not mean it will leave the super 626 | ; globals array REQUEST empty. 627 | ; Default Value: None 628 | ; Development Value: "GP" 629 | ; Production Value: "GP" 630 | ; http://php.net/request-order 631 | request_order = "GP" 632 | 633 | ; This directive determines whether PHP registers $argv & $argc each time it 634 | ; runs. $argv contains an array of all the arguments passed to PHP when a script 635 | ; is invoked. $argc contains an integer representing the number of arguments 636 | ; that were passed when the script was invoked. These arrays are extremely 637 | ; useful when running scripts from the command line. When this directive is 638 | ; enabled, registering these variables consumes CPU cycles and memory each time 639 | ; a script is executed. For performance reasons, this feature should be disabled 640 | ; on production servers. 641 | ; Note: This directive is hardcoded to On for the CLI SAPI 642 | ; Default Value: On 643 | ; Development Value: Off 644 | ; Production Value: Off 645 | ; http://php.net/register-argc-argv 646 | register_argc_argv = Off 647 | 648 | ; When enabled, the ENV, REQUEST and SERVER variables are created when they're 649 | ; first used (Just In Time) instead of when the script starts. If these 650 | ; variables are not used within a script, having this directive on will result 651 | ; in a performance gain. The PHP directive register_argc_argv must be disabled 652 | ; for this directive to have any affect. 653 | ; http://php.net/auto-globals-jit 654 | auto_globals_jit = On 655 | 656 | ; Whether PHP will read the POST data. 657 | ; This option is enabled by default. 658 | ; Most likely, you won't want to disable this option globally. It causes $_POST 659 | ; and $_FILES to always be empty; the only way you will be able to read the 660 | ; POST data will be through the php://input stream wrapper. This can be useful 661 | ; to proxy requests or to process the POST data in a memory efficient fashion. 662 | ; http://php.net/enable-post-data-reading 663 | ;enable_post_data_reading = Off 664 | 665 | ; Maximum size of POST data that PHP will accept. 666 | ; Its value may be 0 to disable the limit. It is ignored if POST data reading 667 | ; is disabled through enable_post_data_reading. 668 | ; http://php.net/post-max-size 669 | post_max_size = 8M 670 | 671 | ; Automatically add files before PHP document. 672 | ; http://php.net/auto-prepend-file 673 | auto_prepend_file = 674 | 675 | ; Automatically add files after PHP document. 676 | ; http://php.net/auto-append-file 677 | auto_append_file = 678 | 679 | ; By default, PHP will output a media type using the Content-Type header. To 680 | ; disable this, simply set it to be empty. 681 | ; 682 | ; PHP's built-in default media type is set to text/html. 683 | ; http://php.net/default-mimetype 684 | default_mimetype = "text/html" 685 | 686 | ; PHP's default character set is set to UTF-8. 687 | ; http://php.net/default-charset 688 | default_charset = "UTF-8" 689 | 690 | ; PHP internal character encoding is set to empty. 691 | ; If empty, default_charset is used. 692 | ; http://php.net/internal-encoding 693 | ;internal_encoding = 694 | 695 | ; PHP input character encoding is set to empty. 696 | ; If empty, default_charset is used. 697 | ; http://php.net/input-encoding 698 | ;input_encoding = 699 | 700 | ; PHP output character encoding is set to empty. 701 | ; If empty, default_charset is used. 702 | ; See also output_buffer. 703 | ; http://php.net/output-encoding 704 | ;output_encoding = 705 | 706 | ;;;;;;;;;;;;;;;;;;;;;;;;; 707 | ; Paths and Directories ; 708 | ;;;;;;;;;;;;;;;;;;;;;;;;; 709 | 710 | ; UNIX: "/path1:/path2" 711 | ;include_path = ".:/php/includes" 712 | ; 713 | ; Windows: "\path1;\path2" 714 | ;include_path = ".;c:\php\includes" 715 | ; 716 | ; PHP's default setting for include_path is ".;/path/to/php/pear" 717 | ; http://php.net/include-path 718 | 719 | ; The root of the PHP pages, used only if nonempty. 720 | ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root 721 | ; if you are running php as a CGI under any web server (other than IIS) 722 | ; see documentation for security issues. The alternate is to use the 723 | ; cgi.force_redirect configuration below 724 | ; http://php.net/doc-root 725 | doc_root = 726 | 727 | ; The directory under which PHP opens the script using /~username used only 728 | ; if nonempty. 729 | ; http://php.net/user-dir 730 | user_dir = 731 | 732 | ; Directory in which the loadable extensions (modules) reside. 733 | ; http://php.net/extension-dir 734 | ; extension_dir = "./" 735 | ; On windows: 736 | ; extension_dir = "ext" 737 | 738 | ; Directory where the temporary files should be placed. 739 | ; Defaults to the system default (see sys_get_temp_dir) 740 | ; sys_temp_dir = "/tmp" 741 | 742 | ; Whether or not to enable the dl() function. The dl() function does NOT work 743 | ; properly in multithreaded servers, such as IIS or Zeus, and is automatically 744 | ; disabled on them. 745 | ; http://php.net/enable-dl 746 | enable_dl = Off 747 | 748 | ; cgi.force_redirect is necessary to provide security running PHP as a CGI under 749 | ; most web servers. Left undefined, PHP turns this on by default. You can 750 | ; turn it off here AT YOUR OWN RISK 751 | ; **You CAN safely turn this off for IIS, in fact, you MUST.** 752 | ; http://php.net/cgi.force-redirect 753 | ;cgi.force_redirect = 1 754 | 755 | ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with 756 | ; every request. PHP's default behavior is to disable this feature. 757 | ;cgi.nph = 1 758 | 759 | ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape 760 | ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP 761 | ; will look for to know it is OK to continue execution. Setting this variable MAY 762 | ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. 763 | ; http://php.net/cgi.redirect-status-env 764 | ;cgi.redirect_status_env = 765 | 766 | ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's 767 | ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok 768 | ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting 769 | ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting 770 | ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts 771 | ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. 772 | ; http://php.net/cgi.fix-pathinfo 773 | ;cgi.fix_pathinfo=1 774 | 775 | ; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside 776 | ; of the web tree and people will not be able to circumvent .htaccess security. 777 | ; http://php.net/cgi.dicard-path 778 | ;cgi.discard_path=1 779 | 780 | ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate 781 | ; security tokens of the calling client. This allows IIS to define the 782 | ; security context that the request runs under. mod_fastcgi under Apache 783 | ; does not currently support this feature (03/17/2002) 784 | ; Set to 1 if running under IIS. Default is zero. 785 | ; http://php.net/fastcgi.impersonate 786 | ;fastcgi.impersonate = 1 787 | 788 | ; Disable logging through FastCGI connection. PHP's default behavior is to enable 789 | ; this feature. 790 | ;fastcgi.logging = 0 791 | 792 | ; cgi.rfc2616_headers configuration option tells PHP what type of headers to 793 | ; use when sending HTTP response code. If set to 0, PHP sends Status: header that 794 | ; is supported by Apache. When this option is set to 1, PHP will send 795 | ; RFC2616 compliant header. 796 | ; Default is zero. 797 | ; http://php.net/cgi.rfc2616-headers 798 | ;cgi.rfc2616_headers = 0 799 | 800 | ; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! 801 | ; (shebang) at the top of the running script. This line might be needed if the 802 | ; script support running both as stand-alone script and via PHP CGI<. PHP in CGI 803 | ; mode skips this line and ignores its content if this directive is turned on. 804 | ; http://php.net/cgi.check-shebang-line 805 | ;cgi.check_shebang_line=1 806 | 807 | ;;;;;;;;;;;;;;;; 808 | ; File Uploads ; 809 | ;;;;;;;;;;;;;;;; 810 | 811 | ; Whether to allow HTTP file uploads. 812 | ; http://php.net/file-uploads 813 | file_uploads = On 814 | 815 | ; Temporary directory for HTTP uploaded files (will use system default if not 816 | ; specified). 817 | ; http://php.net/upload-tmp-dir 818 | ;upload_tmp_dir = 819 | 820 | ; Maximum allowed size for uploaded files. 821 | ; http://php.net/upload-max-filesize 822 | upload_max_filesize = 2M 823 | 824 | ; Maximum number of files that can be uploaded via a single request 825 | max_file_uploads = 20 826 | 827 | ;;;;;;;;;;;;;;;;;; 828 | ; Fopen wrappers ; 829 | ;;;;;;;;;;;;;;;;;; 830 | 831 | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. 832 | ; http://php.net/allow-url-fopen 833 | allow_url_fopen = On 834 | 835 | ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. 836 | ; http://php.net/allow-url-include 837 | allow_url_include = Off 838 | 839 | ; Define the anonymous ftp password (your email address). PHP's default setting 840 | ; for this is empty. 841 | ; http://php.net/from 842 | ;from="john@doe.com" 843 | 844 | ; Define the User-Agent string. PHP's default setting for this is empty. 845 | ; http://php.net/user-agent 846 | ;user_agent="PHP" 847 | 848 | ; Default timeout for socket based streams (seconds) 849 | ; http://php.net/default-socket-timeout 850 | default_socket_timeout = 60 851 | 852 | ; If your scripts have to deal with files from Macintosh systems, 853 | ; or you are running on a Mac and need to deal with files from 854 | ; unix or win32 systems, setting this flag will cause PHP to 855 | ; automatically detect the EOL character in those files so that 856 | ; fgets() and file() will work regardless of the source of the file. 857 | ; http://php.net/auto-detect-line-endings 858 | ;auto_detect_line_endings = Off 859 | 860 | ;;;;;;;;;;;;;;;;;;;;;; 861 | ; Dynamic Extensions ; 862 | ;;;;;;;;;;;;;;;;;;;;;; 863 | 864 | ; If you wish to have an extension loaded automatically, use the following 865 | ; syntax: 866 | ; 867 | ; extension=modulename.extension 868 | ; 869 | ; For example, on Windows: 870 | ; 871 | ; extension=mysqli.dll 872 | ; 873 | ; ... or under UNIX: 874 | ; 875 | ; extension=mysqli.so 876 | ; 877 | ; ... or with a path: 878 | ; 879 | ; extension=/path/to/extension/mysqli.so 880 | ; 881 | ; If you only provide the name of the extension, PHP will look for it in its 882 | ; default extension directory. 883 | ; 884 | ; Windows Extensions 885 | ; Note that ODBC support is built in, so no dll is needed for it. 886 | ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+) 887 | ; extension folders as well as the separate PECL DLL download (PHP 5+). 888 | ; Be sure to appropriately set the extension_dir directive. 889 | ; 890 | ;extension=php_bz2.dll 891 | ;extension=php_curl.dll 892 | ;extension=php_fileinfo.dll 893 | ;extension=php_ftp.dll 894 | ;extension=php_gd2.dll 895 | ;extension=php_gettext.dll 896 | ;extension=php_gmp.dll 897 | ;extension=php_intl.dll 898 | ;extension=php_imap.dll 899 | ;extension=php_interbase.dll 900 | ;extension=php_ldap.dll 901 | ;extension=php_mbstring.dll 902 | ;extension=php_exif.dll ; Must be after mbstring as it depends on it 903 | ;extension=php_mysqli.dll 904 | ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client 905 | ;extension=php_openssl.dll 906 | ;extension=php_pdo_firebird.dll 907 | ;extension=php_pdo_mysql.dll 908 | ;extension=php_pdo_oci.dll 909 | ;extension=php_pdo_odbc.dll 910 | ;extension=php_pdo_pgsql.dll 911 | ;extension=php_pdo_sqlite.dll 912 | ;extension=php_pgsql.dll 913 | ;extension=php_shmop.dll 914 | 915 | ; The MIBS data available in the PHP distribution must be installed. 916 | ; See http://www.php.net/manual/en/snmp.installation.php 917 | ;extension=php_snmp.dll 918 | 919 | ;extension=php_soap.dll 920 | ;extension=php_sockets.dll 921 | ;extension=php_sqlite3.dll 922 | ;extension=php_tidy.dll 923 | ;extension=php_xmlrpc.dll 924 | ;extension=php_xsl.dll 925 | 926 | ;;;;;;;;;;;;;;;;;;; 927 | ; Module Settings ; 928 | ;;;;;;;;;;;;;;;;;;; 929 | 930 | [CLI Server] 931 | ; Whether the CLI web server uses ANSI color coding in its terminal output. 932 | cli_server.color = On 933 | 934 | [Date] 935 | ; Defines the default timezone used by the date functions 936 | ; http://php.net/date.timezone 937 | ;date.timezone = 938 | 939 | ; http://php.net/date.default-latitude 940 | ;date.default_latitude = 31.7667 941 | 942 | ; http://php.net/date.default-longitude 943 | ;date.default_longitude = 35.2333 944 | 945 | ; http://php.net/date.sunrise-zenith 946 | ;date.sunrise_zenith = 90.583333 947 | 948 | ; http://php.net/date.sunset-zenith 949 | ;date.sunset_zenith = 90.583333 950 | 951 | [filter] 952 | ; http://php.net/filter.default 953 | ;filter.default = unsafe_raw 954 | 955 | ; http://php.net/filter.default-flags 956 | ;filter.default_flags = 957 | 958 | [iconv] 959 | ; Use of this INI entry is deprecated, use global input_encoding instead. 960 | ; If empty, default_charset or input_encoding or iconv.input_encoding is used. 961 | ; The precedence is: default_charset < intput_encoding < iconv.input_encoding 962 | ;iconv.input_encoding = 963 | 964 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 965 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 966 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 967 | ;iconv.internal_encoding = 968 | 969 | ; Use of this INI entry is deprecated, use global output_encoding instead. 970 | ; If empty, default_charset or output_encoding or iconv.output_encoding is used. 971 | ; The precedence is: default_charset < output_encoding < iconv.output_encoding 972 | ; To use an output encoding conversion, iconv's output handler must be set 973 | ; otherwise output encoding conversion cannot be performed. 974 | ;iconv.output_encoding = 975 | 976 | [intl] 977 | ;intl.default_locale = 978 | ; This directive allows you to produce PHP errors when some error 979 | ; happens within intl functions. The value is the level of the error produced. 980 | ; Default is 0, which does not produce any errors. 981 | ;intl.error_level = E_WARNING 982 | ;intl.use_exceptions = 0 983 | 984 | [sqlite3] 985 | ;sqlite3.extension_dir = 986 | 987 | [Pcre] 988 | ;PCRE library backtracking limit. 989 | ; http://php.net/pcre.backtrack-limit 990 | ;pcre.backtrack_limit=100000 991 | 992 | ;PCRE library recursion limit. 993 | ;Please note that if you set this value to a high number you may consume all 994 | ;the available process stack and eventually crash PHP (due to reaching the 995 | ;stack size limit imposed by the Operating System). 996 | ; http://php.net/pcre.recursion-limit 997 | ;pcre.recursion_limit=100000 998 | 999 | ;Enables or disables JIT compilation of patterns. This requires the PCRE 1000 | ;library to be compiled with JIT support. 1001 | ;pcre.jit=1 1002 | 1003 | [Pdo] 1004 | ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" 1005 | ; http://php.net/pdo-odbc.connection-pooling 1006 | ;pdo_odbc.connection_pooling=strict 1007 | 1008 | ;pdo_odbc.db2_instance_name 1009 | 1010 | [Pdo_mysql] 1011 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 1012 | ; http://php.net/pdo_mysql.cache_size 1013 | pdo_mysql.cache_size = 2000 1014 | 1015 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1016 | ; MySQL defaults. 1017 | ; http://php.net/pdo_mysql.default-socket 1018 | pdo_mysql.default_socket= 1019 | 1020 | [Phar] 1021 | ; http://php.net/phar.readonly 1022 | ;phar.readonly = On 1023 | 1024 | ; http://php.net/phar.require-hash 1025 | ;phar.require_hash = On 1026 | 1027 | ;phar.cache_list = 1028 | 1029 | [mail function] 1030 | ; For Win32 only. 1031 | ; http://php.net/smtp 1032 | SMTP = localhost 1033 | ; http://php.net/smtp-port 1034 | smtp_port = 25 1035 | 1036 | ; For Win32 only. 1037 | ; http://php.net/sendmail-from 1038 | ;sendmail_from = me@example.com 1039 | 1040 | ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). 1041 | ; http://php.net/sendmail-path 1042 | ;sendmail_path = 1043 | 1044 | ; Force the addition of the specified parameters to be passed as extra parameters 1045 | ; to the sendmail binary. These parameters will always replace the value of 1046 | ; the 5th parameter to mail(). 1047 | ;mail.force_extra_parameters = 1048 | 1049 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename 1050 | mail.add_x_header = On 1051 | 1052 | ; The path to a log file that will log all mail() calls. Log entries include 1053 | ; the full path of the script, line number, To address and headers. 1054 | ;mail.log = 1055 | ; Log mail to syslog (Event Log on Windows). 1056 | ;mail.log = syslog 1057 | 1058 | [ODBC] 1059 | ; http://php.net/odbc.default-db 1060 | ;odbc.default_db = Not yet implemented 1061 | 1062 | ; http://php.net/odbc.default-user 1063 | ;odbc.default_user = Not yet implemented 1064 | 1065 | ; http://php.net/odbc.default-pw 1066 | ;odbc.default_pw = Not yet implemented 1067 | 1068 | ; Controls the ODBC cursor model. 1069 | ; Default: SQL_CURSOR_STATIC (default). 1070 | ;odbc.default_cursortype 1071 | 1072 | ; Allow or prevent persistent links. 1073 | ; http://php.net/odbc.allow-persistent 1074 | odbc.allow_persistent = On 1075 | 1076 | ; Check that a connection is still valid before reuse. 1077 | ; http://php.net/odbc.check-persistent 1078 | odbc.check_persistent = On 1079 | 1080 | ; Maximum number of persistent links. -1 means no limit. 1081 | ; http://php.net/odbc.max-persistent 1082 | odbc.max_persistent = -1 1083 | 1084 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1085 | ; http://php.net/odbc.max-links 1086 | odbc.max_links = -1 1087 | 1088 | ; Handling of LONG fields. Returns number of bytes to variables. 0 means 1089 | ; passthru. 1090 | ; http://php.net/odbc.defaultlrl 1091 | odbc.defaultlrl = 4096 1092 | 1093 | ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. 1094 | ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation 1095 | ; of odbc.defaultlrl and odbc.defaultbinmode 1096 | ; http://php.net/odbc.defaultbinmode 1097 | odbc.defaultbinmode = 1 1098 | 1099 | ;birdstep.max_links = -1 1100 | 1101 | [Interbase] 1102 | ; Allow or prevent persistent links. 1103 | ibase.allow_persistent = 1 1104 | 1105 | ; Maximum number of persistent links. -1 means no limit. 1106 | ibase.max_persistent = -1 1107 | 1108 | ; Maximum number of links (persistent + non-persistent). -1 means no limit. 1109 | ibase.max_links = -1 1110 | 1111 | ; Default database name for ibase_connect(). 1112 | ;ibase.default_db = 1113 | 1114 | ; Default username for ibase_connect(). 1115 | ;ibase.default_user = 1116 | 1117 | ; Default password for ibase_connect(). 1118 | ;ibase.default_password = 1119 | 1120 | ; Default charset for ibase_connect(). 1121 | ;ibase.default_charset = 1122 | 1123 | ; Default timestamp format. 1124 | ibase.timestampformat = "%Y-%m-%d %H:%M:%S" 1125 | 1126 | ; Default date format. 1127 | ibase.dateformat = "%Y-%m-%d" 1128 | 1129 | ; Default time format. 1130 | ibase.timeformat = "%H:%M:%S" 1131 | 1132 | [MySQLi] 1133 | 1134 | ; Maximum number of persistent links. -1 means no limit. 1135 | ; http://php.net/mysqli.max-persistent 1136 | mysqli.max_persistent = -1 1137 | 1138 | ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements 1139 | ; http://php.net/mysqli.allow_local_infile 1140 | ;mysqli.allow_local_infile = On 1141 | 1142 | ; Allow or prevent persistent links. 1143 | ; http://php.net/mysqli.allow-persistent 1144 | mysqli.allow_persistent = On 1145 | 1146 | ; Maximum number of links. -1 means no limit. 1147 | ; http://php.net/mysqli.max-links 1148 | mysqli.max_links = -1 1149 | 1150 | ; If mysqlnd is used: Number of cache slots for the internal result set cache 1151 | ; http://php.net/mysqli.cache_size 1152 | mysqli.cache_size = 2000 1153 | 1154 | ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use 1155 | ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the 1156 | ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look 1157 | ; at MYSQL_PORT. 1158 | ; http://php.net/mysqli.default-port 1159 | mysqli.default_port = 3306 1160 | 1161 | ; Default socket name for local MySQL connects. If empty, uses the built-in 1162 | ; MySQL defaults. 1163 | ; http://php.net/mysqli.default-socket 1164 | mysqli.default_socket = 1165 | 1166 | ; Default host for mysql_connect() (doesn't apply in safe mode). 1167 | ; http://php.net/mysqli.default-host 1168 | mysqli.default_host = 1169 | 1170 | ; Default user for mysql_connect() (doesn't apply in safe mode). 1171 | ; http://php.net/mysqli.default-user 1172 | mysqli.default_user = 1173 | 1174 | ; Default password for mysqli_connect() (doesn't apply in safe mode). 1175 | ; Note that this is generally a *bad* idea to store passwords in this file. 1176 | ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") 1177 | ; and reveal this password! And of course, any users with read access to this 1178 | ; file will be able to reveal the password as well. 1179 | ; http://php.net/mysqli.default-pw 1180 | mysqli.default_pw = 1181 | 1182 | ; Allow or prevent reconnect 1183 | mysqli.reconnect = Off 1184 | 1185 | [mysqlnd] 1186 | ; Enable / Disable collection of general statistics by mysqlnd which can be 1187 | ; used to tune and monitor MySQL operations. 1188 | ; http://php.net/mysqlnd.collect_statistics 1189 | mysqlnd.collect_statistics = On 1190 | 1191 | ; Enable / Disable collection of memory usage statistics by mysqlnd which can be 1192 | ; used to tune and monitor MySQL operations. 1193 | ; http://php.net/mysqlnd.collect_memory_statistics 1194 | mysqlnd.collect_memory_statistics = Off 1195 | 1196 | ; Records communication from all extensions using mysqlnd to the specified log 1197 | ; file. 1198 | ; http://php.net/mysqlnd.debug 1199 | ;mysqlnd.debug = 1200 | 1201 | ; Defines which queries will be logged. 1202 | ; http://php.net/mysqlnd.log_mask 1203 | ;mysqlnd.log_mask = 0 1204 | 1205 | ; Default size of the mysqlnd memory pool, which is used by result sets. 1206 | ; http://php.net/mysqlnd.mempool_default_size 1207 | ;mysqlnd.mempool_default_size = 16000 1208 | 1209 | ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. 1210 | ; http://php.net/mysqlnd.net_cmd_buffer_size 1211 | ;mysqlnd.net_cmd_buffer_size = 2048 1212 | 1213 | ; Size of a pre-allocated buffer used for reading data sent by the server in 1214 | ; bytes. 1215 | ; http://php.net/mysqlnd.net_read_buffer_size 1216 | ;mysqlnd.net_read_buffer_size = 32768 1217 | 1218 | ; Timeout for network requests in seconds. 1219 | ; http://php.net/mysqlnd.net_read_timeout 1220 | ;mysqlnd.net_read_timeout = 31536000 1221 | 1222 | ; SHA-256 Authentication Plugin related. File with the MySQL server public RSA 1223 | ; key. 1224 | ; http://php.net/mysqlnd.sha256_server_public_key 1225 | ;mysqlnd.sha256_server_public_key = 1226 | 1227 | [OCI8] 1228 | 1229 | ; Connection: Enables privileged connections using external 1230 | ; credentials (OCI_SYSOPER, OCI_SYSDBA) 1231 | ; http://php.net/oci8.privileged-connect 1232 | ;oci8.privileged_connect = Off 1233 | 1234 | ; Connection: The maximum number of persistent OCI8 connections per 1235 | ; process. Using -1 means no limit. 1236 | ; http://php.net/oci8.max-persistent 1237 | ;oci8.max_persistent = -1 1238 | 1239 | ; Connection: The maximum number of seconds a process is allowed to 1240 | ; maintain an idle persistent connection. Using -1 means idle 1241 | ; persistent connections will be maintained forever. 1242 | ; http://php.net/oci8.persistent-timeout 1243 | ;oci8.persistent_timeout = -1 1244 | 1245 | ; Connection: The number of seconds that must pass before issuing a 1246 | ; ping during oci_pconnect() to check the connection validity. When 1247 | ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables 1248 | ; pings completely. 1249 | ; http://php.net/oci8.ping-interval 1250 | ;oci8.ping_interval = 60 1251 | 1252 | ; Connection: Set this to a user chosen connection class to be used 1253 | ; for all pooled server requests with Oracle 11g Database Resident 1254 | ; Connection Pooling (DRCP). To use DRCP, this value should be set to 1255 | ; the same string for all web servers running the same application, 1256 | ; the database pool must be configured, and the connection string must 1257 | ; specify to use a pooled server. 1258 | ;oci8.connection_class = 1259 | 1260 | ; High Availability: Using On lets PHP receive Fast Application 1261 | ; Notification (FAN) events generated when a database node fails. The 1262 | ; database must also be configured to post FAN events. 1263 | ;oci8.events = Off 1264 | 1265 | ; Tuning: This option enables statement caching, and specifies how 1266 | ; many statements to cache. Using 0 disables statement caching. 1267 | ; http://php.net/oci8.statement-cache-size 1268 | ;oci8.statement_cache_size = 20 1269 | 1270 | ; Tuning: Enables statement prefetching and sets the default number of 1271 | ; rows that will be fetched automatically after statement execution. 1272 | ; http://php.net/oci8.default-prefetch 1273 | ;oci8.default_prefetch = 100 1274 | 1275 | ; Compatibility. Using On means oci_close() will not close 1276 | ; oci_connect() and oci_new_connect() connections. 1277 | ; http://php.net/oci8.old-oci-close-semantics 1278 | ;oci8.old_oci_close_semantics = Off 1279 | 1280 | [PostgreSQL] 1281 | ; Allow or prevent persistent links. 1282 | ; http://php.net/pgsql.allow-persistent 1283 | pgsql.allow_persistent = On 1284 | 1285 | ; Detect broken persistent links always with pg_pconnect(). 1286 | ; Auto reset feature requires a little overheads. 1287 | ; http://php.net/pgsql.auto-reset-persistent 1288 | pgsql.auto_reset_persistent = Off 1289 | 1290 | ; Maximum number of persistent links. -1 means no limit. 1291 | ; http://php.net/pgsql.max-persistent 1292 | pgsql.max_persistent = -1 1293 | 1294 | ; Maximum number of links (persistent+non persistent). -1 means no limit. 1295 | ; http://php.net/pgsql.max-links 1296 | pgsql.max_links = -1 1297 | 1298 | ; Ignore PostgreSQL backends Notice message or not. 1299 | ; Notice message logging require a little overheads. 1300 | ; http://php.net/pgsql.ignore-notice 1301 | pgsql.ignore_notice = 0 1302 | 1303 | ; Log PostgreSQL backends Notice message or not. 1304 | ; Unless pgsql.ignore_notice=0, module cannot log notice message. 1305 | ; http://php.net/pgsql.log-notice 1306 | pgsql.log_notice = 0 1307 | 1308 | [bcmath] 1309 | ; Number of decimal digits for all bcmath functions. 1310 | ; http://php.net/bcmath.scale 1311 | bcmath.scale = 0 1312 | 1313 | [browscap] 1314 | ; http://php.net/browscap 1315 | ;browscap = extra/browscap.ini 1316 | 1317 | [Session] 1318 | ; Handler used to store/retrieve data. 1319 | ; http://php.net/session.save-handler 1320 | session.save_handler = files 1321 | 1322 | ; Argument passed to save_handler. In the case of files, this is the path 1323 | ; where data files are stored. Note: Windows users have to change this 1324 | ; variable in order to use PHP's session functions. 1325 | ; 1326 | ; The path can be defined as: 1327 | ; 1328 | ; session.save_path = "N;/path" 1329 | ; 1330 | ; where N is an integer. Instead of storing all the session files in 1331 | ; /path, what this will do is use subdirectories N-levels deep, and 1332 | ; store the session data in those directories. This is useful if 1333 | ; your OS has problems with many files in one directory, and is 1334 | ; a more efficient layout for servers that handle many sessions. 1335 | ; 1336 | ; NOTE 1: PHP will not create this directory structure automatically. 1337 | ; You can use the script in the ext/session dir for that purpose. 1338 | ; NOTE 2: See the section on garbage collection below if you choose to 1339 | ; use subdirectories for session storage 1340 | ; 1341 | ; The file storage module creates files using mode 600 by default. 1342 | ; You can change that by using 1343 | ; 1344 | ; session.save_path = "N;MODE;/path" 1345 | ; 1346 | ; where MODE is the octal representation of the mode. Note that this 1347 | ; does not overwrite the process's umask. 1348 | ; http://php.net/session.save-path 1349 | ;session.save_path = "/tmp" 1350 | 1351 | ; Whether to use strict session mode. 1352 | ; Strict session mode does not accept uninitialized session ID and regenerate 1353 | ; session ID if browser sends uninitialized session ID. Strict mode protects 1354 | ; applications from session fixation via session adoption vulnerability. It is 1355 | ; disabled by default for maximum compatibility, but enabling it is encouraged. 1356 | ; https://wiki.php.net/rfc/strict_sessions 1357 | session.use_strict_mode = 0 1358 | 1359 | ; Whether to use cookies. 1360 | ; http://php.net/session.use-cookies 1361 | session.use_cookies = 1 1362 | 1363 | ; http://php.net/session.cookie-secure 1364 | ;session.cookie_secure = 1365 | 1366 | ; This option forces PHP to fetch and use a cookie for storing and maintaining 1367 | ; the session id. We encourage this operation as it's very helpful in combating 1368 | ; session hijacking when not specifying and managing your own session id. It is 1369 | ; not the be-all and end-all of session hijacking defense, but it's a good start. 1370 | ; http://php.net/session.use-only-cookies 1371 | session.use_only_cookies = 1 1372 | 1373 | ; Name of the session (used as cookie name). 1374 | ; http://php.net/session.name 1375 | session.name = PHPSESSID 1376 | 1377 | ; Initialize session on request startup. 1378 | ; http://php.net/session.auto-start 1379 | session.auto_start = 0 1380 | 1381 | ; Lifetime in seconds of cookie or, if 0, until browser is restarted. 1382 | ; http://php.net/session.cookie-lifetime 1383 | session.cookie_lifetime = 0 1384 | 1385 | ; The path for which the cookie is valid. 1386 | ; http://php.net/session.cookie-path 1387 | session.cookie_path = / 1388 | 1389 | ; The domain for which the cookie is valid. 1390 | ; http://php.net/session.cookie-domain 1391 | session.cookie_domain = 1392 | 1393 | ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. 1394 | ; http://php.net/session.cookie-httponly 1395 | session.cookie_httponly = 1396 | 1397 | ; Handler used to serialize data. php is the standard serializer of PHP. 1398 | ; http://php.net/session.serialize-handler 1399 | session.serialize_handler = php 1400 | 1401 | ; Defines the probability that the 'garbage collection' process is started 1402 | ; on every session initialization. The probability is calculated by using 1403 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator 1404 | ; and gc_divisor is the denominator in the equation. Setting this value to 1 1405 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1406 | ; the gc will run on any give request. 1407 | ; Default Value: 1 1408 | ; Development Value: 1 1409 | ; Production Value: 1 1410 | ; http://php.net/session.gc-probability 1411 | session.gc_probability = 1 1412 | 1413 | ; Defines the probability that the 'garbage collection' process is started on every 1414 | ; session initialization. The probability is calculated by using the following equation: 1415 | ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and 1416 | ; session.gc_divisor is the denominator in the equation. Setting this value to 1 1417 | ; when the session.gc_divisor value is 100 will give you approximately a 1% chance 1418 | ; the gc will run on any give request. Increasing this value to 1000 will give you 1419 | ; a 0.1% chance the gc will run on any give request. For high volume production servers, 1420 | ; this is a more efficient approach. 1421 | ; Default Value: 100 1422 | ; Development Value: 1000 1423 | ; Production Value: 1000 1424 | ; http://php.net/session.gc-divisor 1425 | session.gc_divisor = 1000 1426 | 1427 | ; After this number of seconds, stored data will be seen as 'garbage' and 1428 | ; cleaned up by the garbage collection process. 1429 | ; http://php.net/session.gc-maxlifetime 1430 | session.gc_maxlifetime = 1440 1431 | 1432 | ; NOTE: If you are using the subdirectory option for storing session files 1433 | ; (see session.save_path above), then garbage collection does *not* 1434 | ; happen automatically. You will need to do your own garbage 1435 | ; collection through a shell script, cron entry, or some other method. 1436 | ; For example, the following script would is the equivalent of 1437 | ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): 1438 | ; find /path/to/sessions -cmin +24 -type f | xargs rm 1439 | 1440 | ; Check HTTP Referer to invalidate externally stored URLs containing ids. 1441 | ; HTTP_REFERER has to contain this substring for the session to be 1442 | ; considered as valid. 1443 | ; http://php.net/session.referer-check 1444 | session.referer_check = 1445 | 1446 | ; Set to {nocache,private,public,} to determine HTTP caching aspects 1447 | ; or leave this empty to avoid sending anti-caching headers. 1448 | ; http://php.net/session.cache-limiter 1449 | session.cache_limiter = nocache 1450 | 1451 | ; Document expires after n minutes. 1452 | ; http://php.net/session.cache-expire 1453 | session.cache_expire = 180 1454 | 1455 | ; trans sid support is disabled by default. 1456 | ; Use of trans sid may risk your users' security. 1457 | ; Use this option with caution. 1458 | ; - User may send URL contains active session ID 1459 | ; to other person via. email/irc/etc. 1460 | ; - URL that contains active session ID may be stored 1461 | ; in publicly accessible computer. 1462 | ; - User may access your site with the same session ID 1463 | ; always using URL stored in browser's history or bookmarks. 1464 | ; http://php.net/session.use-trans-sid 1465 | session.use_trans_sid = 0 1466 | 1467 | ; Set session ID character length. This value could be between 22 to 256. 1468 | ; Shorter length than default is supported only for compatibility reason. 1469 | ; Users should use 32 or more chars. 1470 | ; http://php.net/session.sid-length 1471 | ; Default Value: 32 1472 | ; Development Value: 26 1473 | ; Production Value: 26 1474 | session.sid_length = 26 1475 | 1476 | ; The URL rewriter will look for URLs in a defined set of HTML tags. 1477 | ;
is special; if you include them here, the rewriter will 1478 | ; add a hidden field with the info which is otherwise appended 1479 | ; to URLs. tag's action attribute URL will not be modified 1480 | ; unless it is specified. 1481 | ; Note that all valid entries require a "=", even if no value follows. 1482 | ; Default Value: "a=href,area=href,frame=src,form=" 1483 | ; Development Value: "a=href,area=href,frame=src,form=" 1484 | ; Production Value: "a=href,area=href,frame=src,form=" 1485 | ; http://php.net/url-rewriter.tags 1486 | session.trans_sid_tags = "a=href,area=href,frame=src,form=" 1487 | 1488 | ; URL rewriter does not rewrite absolute URLs by default. 1489 | ; To enable rewrites for absolute pathes, target hosts must be specified 1490 | ; at RUNTIME. i.e. use ini_set() 1491 | ; tags is special. PHP will check action attribute's URL regardless 1492 | ; of session.trans_sid_tags setting. 1493 | ; If no host is defined, HTTP_HOST will be used for allowed host. 1494 | ; Example value: php.net,www.php.net,wiki.php.net 1495 | ; Use "," for multiple hosts. No spaces are allowed. 1496 | ; Default Value: "" 1497 | ; Development Value: "" 1498 | ; Production Value: "" 1499 | ;session.trans_sid_hosts="" 1500 | 1501 | ; Define how many bits are stored in each character when converting 1502 | ; the binary hash data to something readable. 1503 | ; Possible values: 1504 | ; 4 (4 bits: 0-9, a-f) 1505 | ; 5 (5 bits: 0-9, a-v) 1506 | ; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") 1507 | ; Default Value: 4 1508 | ; Development Value: 5 1509 | ; Production Value: 5 1510 | ; http://php.net/session.hash-bits-per-character 1511 | session.sid_bits_per_character = 5 1512 | 1513 | ; Enable upload progress tracking in $_SESSION 1514 | ; Default Value: On 1515 | ; Development Value: On 1516 | ; Production Value: On 1517 | ; http://php.net/session.upload-progress.enabled 1518 | ;session.upload_progress.enabled = On 1519 | 1520 | ; Cleanup the progress information as soon as all POST data has been read 1521 | ; (i.e. upload completed). 1522 | ; Default Value: On 1523 | ; Development Value: On 1524 | ; Production Value: On 1525 | ; http://php.net/session.upload-progress.cleanup 1526 | ;session.upload_progress.cleanup = On 1527 | 1528 | ; A prefix used for the upload progress key in $_SESSION 1529 | ; Default Value: "upload_progress_" 1530 | ; Development Value: "upload_progress_" 1531 | ; Production Value: "upload_progress_" 1532 | ; http://php.net/session.upload-progress.prefix 1533 | ;session.upload_progress.prefix = "upload_progress_" 1534 | 1535 | ; The index name (concatenated with the prefix) in $_SESSION 1536 | ; containing the upload progress information 1537 | ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" 1538 | ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" 1539 | ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" 1540 | ; http://php.net/session.upload-progress.name 1541 | ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" 1542 | 1543 | ; How frequently the upload progress should be updated. 1544 | ; Given either in percentages (per-file), or in bytes 1545 | ; Default Value: "1%" 1546 | ; Development Value: "1%" 1547 | ; Production Value: "1%" 1548 | ; http://php.net/session.upload-progress.freq 1549 | ;session.upload_progress.freq = "1%" 1550 | 1551 | ; The minimum delay between updates, in seconds 1552 | ; Default Value: 1 1553 | ; Development Value: 1 1554 | ; Production Value: 1 1555 | ; http://php.net/session.upload-progress.min-freq 1556 | ;session.upload_progress.min_freq = "1" 1557 | 1558 | ; Only write session data when session data is changed. Enabled by default. 1559 | ; http://php.net/session.lazy-write 1560 | ;session.lazy_write = On 1561 | 1562 | [Assertion] 1563 | ; Switch whether to compile assertions at all (to have no overhead at run-time) 1564 | ; -1: Do not compile at all 1565 | ; 0: Jump over assertion at run-time 1566 | ; 1: Execute assertions 1567 | ; 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) 1568 | ; Default Value: 1 1569 | ; Development Value: 1 1570 | ; Production Value: -1 1571 | ; http://php.net/zend.assertions 1572 | zend.assertions = -1 1573 | 1574 | ; Assert(expr); active by default. 1575 | ; http://php.net/assert.active 1576 | ;assert.active = On 1577 | 1578 | ; Throw an AssertationException on failed assertions 1579 | ; http://php.net/assert.exception 1580 | ;assert.exception = On 1581 | 1582 | ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) 1583 | ; http://php.net/assert.warning 1584 | ;assert.warning = On 1585 | 1586 | ; Don't bail out by default. 1587 | ; http://php.net/assert.bail 1588 | ;assert.bail = Off 1589 | 1590 | ; User-function to be called if an assertion fails. 1591 | ; http://php.net/assert.callback 1592 | ;assert.callback = 0 1593 | 1594 | ; Eval the expression with current error_reporting(). Set to true if you want 1595 | ; error_reporting(0) around the eval(). 1596 | ; http://php.net/assert.quiet-eval 1597 | ;assert.quiet_eval = 0 1598 | 1599 | [COM] 1600 | ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs 1601 | ; http://php.net/com.typelib-file 1602 | ;com.typelib_file = 1603 | 1604 | ; allow Distributed-COM calls 1605 | ; http://php.net/com.allow-dcom 1606 | ;com.allow_dcom = true 1607 | 1608 | ; autoregister constants of a components typlib on com_load() 1609 | ; http://php.net/com.autoregister-typelib 1610 | ;com.autoregister_typelib = true 1611 | 1612 | ; register constants casesensitive 1613 | ; http://php.net/com.autoregister-casesensitive 1614 | ;com.autoregister_casesensitive = false 1615 | 1616 | ; show warnings on duplicate constant registrations 1617 | ; http://php.net/com.autoregister-verbose 1618 | ;com.autoregister_verbose = true 1619 | 1620 | ; The default character set code-page to use when passing strings to and from COM objects. 1621 | ; Default: system ANSI code page 1622 | ;com.code_page= 1623 | 1624 | [mbstring] 1625 | ; language for internal character representation. 1626 | ; This affects mb_send_mail() and mbstring.detect_order. 1627 | ; http://php.net/mbstring.language 1628 | ;mbstring.language = Japanese 1629 | 1630 | ; Use of this INI entry is deprecated, use global internal_encoding instead. 1631 | ; internal/script encoding. 1632 | ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) 1633 | ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. 1634 | ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding 1635 | ;mbstring.internal_encoding = 1636 | 1637 | ; Use of this INI entry is deprecated, use global input_encoding instead. 1638 | ; http input encoding. 1639 | ; mbstring.encoding_traslation = On is needed to use this setting. 1640 | ; If empty, default_charset or input_encoding or mbstring.input is used. 1641 | ; The precedence is: default_charset < intput_encoding < mbsting.http_input 1642 | ; http://php.net/mbstring.http-input 1643 | ;mbstring.http_input = 1644 | 1645 | ; Use of this INI entry is deprecated, use global output_encoding instead. 1646 | ; http output encoding. 1647 | ; mb_output_handler must be registered as output buffer to function. 1648 | ; If empty, default_charset or output_encoding or mbstring.http_output is used. 1649 | ; The precedence is: default_charset < output_encoding < mbstring.http_output 1650 | ; To use an output encoding conversion, mbstring's output handler must be set 1651 | ; otherwise output encoding conversion cannot be performed. 1652 | ; http://php.net/mbstring.http-output 1653 | ;mbstring.http_output = 1654 | 1655 | ; enable automatic encoding translation according to 1656 | ; mbstring.internal_encoding setting. Input chars are 1657 | ; converted to internal encoding by setting this to On. 1658 | ; Note: Do _not_ use automatic encoding translation for 1659 | ; portable libs/applications. 1660 | ; http://php.net/mbstring.encoding-translation 1661 | ;mbstring.encoding_translation = Off 1662 | 1663 | ; automatic encoding detection order. 1664 | ; "auto" detect order is changed according to mbstring.language 1665 | ; http://php.net/mbstring.detect-order 1666 | ;mbstring.detect_order = auto 1667 | 1668 | ; substitute_character used when character cannot be converted 1669 | ; one from another 1670 | ; http://php.net/mbstring.substitute-character 1671 | ;mbstring.substitute_character = none 1672 | 1673 | ; overload(replace) single byte functions by mbstring functions. 1674 | ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), 1675 | ; etc. Possible values are 0,1,2,4 or combination of them. 1676 | ; For example, 7 for overload everything. 1677 | ; 0: No overload 1678 | ; 1: Overload mail() function 1679 | ; 2: Overload str*() functions 1680 | ; 4: Overload ereg*() functions 1681 | ; http://php.net/mbstring.func-overload 1682 | ;mbstring.func_overload = 0 1683 | 1684 | ; enable strict encoding detection. 1685 | ; Default: Off 1686 | ;mbstring.strict_detection = On 1687 | 1688 | ; This directive specifies the regex pattern of content types for which mb_output_handler() 1689 | ; is activated. 1690 | ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) 1691 | ;mbstring.http_output_conv_mimetype= 1692 | 1693 | [gd] 1694 | ; Tell the jpeg decode to ignore warnings and try to create 1695 | ; a gd image. The warning will then be displayed as notices 1696 | ; disabled by default 1697 | ; http://php.net/gd.jpeg-ignore-warning 1698 | ;gd.jpeg_ignore_warning = 1 1699 | 1700 | [exif] 1701 | ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. 1702 | ; With mbstring support this will automatically be converted into the encoding 1703 | ; given by corresponding encode setting. When empty mbstring.internal_encoding 1704 | ; is used. For the decode settings you can distinguish between motorola and 1705 | ; intel byte order. A decode setting cannot be empty. 1706 | ; http://php.net/exif.encode-unicode 1707 | ;exif.encode_unicode = ISO-8859-15 1708 | 1709 | ; http://php.net/exif.decode-unicode-motorola 1710 | ;exif.decode_unicode_motorola = UCS-2BE 1711 | 1712 | ; http://php.net/exif.decode-unicode-intel 1713 | ;exif.decode_unicode_intel = UCS-2LE 1714 | 1715 | ; http://php.net/exif.encode-jis 1716 | ;exif.encode_jis = 1717 | 1718 | ; http://php.net/exif.decode-jis-motorola 1719 | ;exif.decode_jis_motorola = JIS 1720 | 1721 | ; http://php.net/exif.decode-jis-intel 1722 | ;exif.decode_jis_intel = JIS 1723 | 1724 | [Tidy] 1725 | ; The path to a default tidy configuration file to use when using tidy 1726 | ; http://php.net/tidy.default-config 1727 | ;tidy.default_config = /usr/local/lib/php/default.tcfg 1728 | 1729 | ; Should tidy clean and repair output automatically? 1730 | ; WARNING: Do not use this option if you are generating non-html content 1731 | ; such as dynamic images 1732 | ; http://php.net/tidy.clean-output 1733 | tidy.clean_output = Off 1734 | 1735 | [soap] 1736 | ; Enables or disables WSDL caching feature. 1737 | ; http://php.net/soap.wsdl-cache-enabled 1738 | soap.wsdl_cache_enabled=1 1739 | 1740 | ; Sets the directory name where SOAP extension will put cache files. 1741 | ; http://php.net/soap.wsdl-cache-dir 1742 | soap.wsdl_cache_dir="/tmp" 1743 | 1744 | ; (time to live) Sets the number of second while cached file will be used 1745 | ; instead of original one. 1746 | ; http://php.net/soap.wsdl-cache-ttl 1747 | soap.wsdl_cache_ttl=86400 1748 | 1749 | ; Sets the size of the cache limit. (Max. number of WSDL files to cache) 1750 | soap.wsdl_cache_limit = 5 1751 | 1752 | [sysvshm] 1753 | ; A default size of the shared memory segment 1754 | ;sysvshm.init_mem = 10000 1755 | 1756 | [ldap] 1757 | ; Sets the maximum number of open links or -1 for unlimited. 1758 | ldap.max_links = -1 1759 | 1760 | [dba] 1761 | ;dba.default_handler= 1762 | 1763 | [opcache] 1764 | ; Determines if Zend OPCache is enabled 1765 | ;opcache.enable=1 1766 | 1767 | ; Determines if Zend OPCache is enabled for the CLI version of PHP 1768 | ;opcache.enable_cli=1 1769 | 1770 | ; The OPcache shared memory storage size. 1771 | ;opcache.memory_consumption=128 1772 | 1773 | ; The amount of memory for interned strings in Mbytes. 1774 | ;opcache.interned_strings_buffer=8 1775 | 1776 | ; The maximum number of keys (scripts) in the OPcache hash table. 1777 | ; Only numbers between 200 and 100000 are allowed. 1778 | ;opcache.max_accelerated_files=10000 1779 | 1780 | ; The maximum percentage of "wasted" memory until a restart is scheduled. 1781 | ;opcache.max_wasted_percentage=5 1782 | 1783 | ; When this directive is enabled, the OPcache appends the current working 1784 | ; directory to the script key, thus eliminating possible collisions between 1785 | ; files with the same name (basename). Disabling the directive improves 1786 | ; performance, but may break existing applications. 1787 | ;opcache.use_cwd=1 1788 | 1789 | ; When disabled, you must reset the OPcache manually or restart the 1790 | ; webserver for changes to the filesystem to take effect. 1791 | ;opcache.validate_timestamps=1 1792 | 1793 | ; How often (in seconds) to check file timestamps for changes to the shared 1794 | ; memory storage allocation. ("1" means validate once per second, but only 1795 | ; once per request. "0" means always validate) 1796 | ;opcache.revalidate_freq=2 1797 | 1798 | ; Enables or disables file search in include_path optimization 1799 | ;opcache.revalidate_path=0 1800 | 1801 | ; If disabled, all PHPDoc comments are dropped from the code to reduce the 1802 | ; size of the optimized code. 1803 | ;opcache.save_comments=1 1804 | 1805 | ; If enabled, a fast shutdown sequence is used for the accelerated code 1806 | ; Depending on the used Memory Manager this may cause some incompatibilities. 1807 | ;opcache.fast_shutdown=0 1808 | 1809 | ; Allow file existence override (file_exists, etc.) performance feature. 1810 | ;opcache.enable_file_override=0 1811 | 1812 | ; A bitmask, where each bit enables or disables the appropriate OPcache 1813 | ; passes 1814 | ;opcache.optimization_level=0xffffffff 1815 | 1816 | ;opcache.inherited_hack=1 1817 | ;opcache.dups_fix=0 1818 | 1819 | ; The location of the OPcache blacklist file (wildcards allowed). 1820 | ; Each OPcache blacklist file is a text file that holds the names of files 1821 | ; that should not be accelerated. The file format is to add each filename 1822 | ; to a new line. The filename may be a full path or just a file prefix 1823 | ; (i.e., /var/www/x blacklists all the files and directories in /var/www 1824 | ; that start with 'x'). Line starting with a ; are ignored (comments). 1825 | ;opcache.blacklist_filename= 1826 | 1827 | ; Allows exclusion of large files from being cached. By default all files 1828 | ; are cached. 1829 | ;opcache.max_file_size=0 1830 | 1831 | ; Check the cache checksum each N requests. 1832 | ; The default value of "0" means that the checks are disabled. 1833 | ;opcache.consistency_checks=0 1834 | 1835 | ; How long to wait (in seconds) for a scheduled restart to begin if the cache 1836 | ; is not being accessed. 1837 | ;opcache.force_restart_timeout=180 1838 | 1839 | ; OPcache error_log file name. Empty string assumes "stderr". 1840 | ;opcache.error_log= 1841 | 1842 | ; All OPcache errors go to the Web server log. 1843 | ; By default, only fatal errors (level 0) or errors (level 1) are logged. 1844 | ; You can also enable warnings (level 2), info messages (level 3) or 1845 | ; debug messages (level 4). 1846 | ;opcache.log_verbosity_level=1 1847 | 1848 | ; Preferred Shared Memory back-end. Leave empty and let the system decide. 1849 | ;opcache.preferred_memory_model= 1850 | 1851 | ; Protect the shared memory from unexpected writing during script execution. 1852 | ; Useful for internal debugging only. 1853 | ;opcache.protect_memory=0 1854 | 1855 | ; Allows calling OPcache API functions only from PHP scripts which path is 1856 | ; started from specified string. The default "" means no restriction 1857 | ;opcache.restrict_api= 1858 | 1859 | ; Mapping base of shared memory segments (for Windows only). All the PHP 1860 | ; processes have to map shared memory into the same address space. This 1861 | ; directive allows to manually fix the "Unable to reattach to base address" 1862 | ; errors. 1863 | ;opcache.mmap_base= 1864 | 1865 | ; Enables and sets the second level cache directory. 1866 | ; It should improve performance when SHM memory is full, at server restart or 1867 | ; SHM reset. The default "" disables file based caching. 1868 | ;opcache.file_cache= 1869 | 1870 | ; Enables or disables opcode caching in shared memory. 1871 | ;opcache.file_cache_only=0 1872 | 1873 | ; Enables or disables checksum validation when script loaded from file cache. 1874 | ;opcache.file_cache_consistency_checks=1 1875 | 1876 | ; Implies opcache.file_cache_only=1 for a certain process that failed to 1877 | ; reattach to the shared memory (for Windows only). Explicitly enabled file 1878 | ; cache is required. 1879 | ;opcache.file_cache_fallback=1 1880 | 1881 | ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. 1882 | ; This should improve performance, but requires appropriate OS configuration. 1883 | ;opcache.huge_code_pages=1 1884 | 1885 | ; Validate cached file permissions. 1886 | ;opcache.validate_permission=0 1887 | 1888 | ; Prevent name collisions in chroot'ed environment. 1889 | ;opcache.validate_root=0 1890 | 1891 | [curl] 1892 | ; A default value for the CURLOPT_CAINFO option. This is required to be an 1893 | ; absolute path. 1894 | ;curl.cainfo = 1895 | 1896 | [openssl] 1897 | ; The location of a Certificate Authority (CA) file on the local filesystem 1898 | ; to use when verifying the identity of SSL/TLS peers. Most users should 1899 | ; not specify a value for this directive as PHP will attempt to use the 1900 | ; OS-managed cert stores in its absence. If specified, this value may still 1901 | ; be overridden on a per-stream basis via the "cafile" SSL stream context 1902 | ; option. 1903 | ;openssl.cafile= 1904 | 1905 | ; If openssl.cafile is not specified or if the CA file is not found, the 1906 | ; directory pointed to by openssl.capath is searched for a suitable 1907 | ; certificate. This value must be a correctly hashed certificate directory. 1908 | ; Most users should not specify a value for this directive as PHP will 1909 | ; attempt to use the OS-managed cert stores in its absence. If specified, 1910 | ; this value may still be overridden on a per-stream basis via the "capath" 1911 | ; SSL stream context option. 1912 | ;openssl.capath= 1913 | 1914 | ; Local Variables: 1915 | ; tab-width: 4 1916 | ; End: 1917 | -------------------------------------------------------------------------------- /root/usr/local/src/osticket/setup/install.php: -------------------------------------------------------------------------------- 1 | getenv("INSTALL_NAME") ?: 'My Helpdesk', 10 | 'email' => getenv("INSTALL_EMAIL") ?: 'helpdesk@example.com', 11 | 'url' => getenv("INSTALL_URL") ?: 'http://localhost:8080/', 12 | 13 | 'fname' => getenv("ADMIN_FIRSTNAME") ?: 'Admin', 14 | 'lname' => getenv("ADMIN_LASTNAME") ?: 'User', 15 | 'admin_email' => getenv("ADMIN_EMAIL") ?: 'admin@example.com', 16 | 'username' => getenv("ADMIN_USERNAME") ?: 'ostadmin', 17 | 'passwd' => getenv("ADMIN_PASSWORD") ?: 'Admin1', 18 | 'passwd2' => getenv("ADMIN_PASSWORD") ?: 'Admin1', 19 | 20 | 'prefix' => getenv("MYSQL_PREFIX") ?: 'ost_', 21 | 'dbhost' => getenv("MYSQL_HOST") ?: 'mysql', 22 | 'dbname' => getenv("MYSQL_DATABASE") ?: 'osticket', 23 | 'dbuser' => getenv("MYSQL_USER") ?: 'osticket', 24 | 'dbpass' => getenv("MYSQL_PASSWORD") ?: getenv("MYSQL_ENV_MYSQL_PASSWORD"), 25 | 26 | 'smtp_host' => getenv("SMTP_HOST") ?: 'localhost', 27 | 'smtp_port' => getenv("SMTP_PORT") ?: 25, 28 | 'smtp_from' => getenv("SMTP_FROM"), 29 | 'smtp_tls' => getenv("SMTP_TLS"), 30 | 'smtp_tls_certs' => getenv("SMTP_TLS_CERTS") ?: '/etc/ssl/certs/ca-certificates.crt', 31 | 'smtp_user' => getenv("SMTP_USER"), 32 | 'smtp_pass' => getenv("SMTP_PASSWORD"), 33 | 34 | 'cron_interval' => getenv("CRON_INTERVAL") ?: 5, 35 | 36 | 'siri' => getenv("INSTALL_SECRET"), 37 | 'config' => getenv("INSTALL_CONFIG") ?: '/var/www/html/include/ost-sampleconfig.php' 38 | ); 39 | 40 | //Script settings 41 | define('CONNECTION_TIMEOUT_SEC', 180); 42 | 43 | function err( $msg) { 44 | fwrite(STDERR, "$msg\n"); 45 | exit(1); 46 | } 47 | 48 | function boolToOnOff($v) { 49 | return ((boolean) $v) ? 'on' : 'off'; 50 | } 51 | 52 | function convertStrToBool($varName, $default) { 53 | global $vars; 54 | if ($vars[$varName] != '') { 55 | return $vars[$varName] == '1'; 56 | } 57 | return $default; 58 | } 59 | 60 | // Override Helpdesk URL. Only applied during database installation. 61 | define("URL",$vars['url']); 62 | 63 | //Require files (must be done before any output to avoid session start warnings) 64 | chdir("/usr/local/src/osticket/setup"); 65 | require "/usr/local/src/osticket/setup/setup.inc.php"; 66 | require_once INC_DIR.'class.installer.php'; 67 | 68 | 69 | /************************* Mail Configuration *******************************************/ 70 | define('MAIL_CONFIG_FILE','/etc/msmtp'); 71 | 72 | echo "Configuring mail settings\n"; 73 | if (!$mailConfig = file_get_contents('/etc/default/msmtp')) { 74 | err("Failed to load mail configuration file"); 75 | }; 76 | $mailConfig = str_replace('%SMTP_HOSTNAME%', $vars['smtp_host'], $mailConfig); 77 | $mailConfig = str_replace('%SMTP_PORT%', $vars['smtp_port'], $mailConfig); 78 | $v = !empty($vars['smtp_from']) ? $vars['smtp_from'] : $vars['smtp_user']; 79 | $mailConfig = str_replace('%SMTP_FROM%', $v, $mailConfig); 80 | $mailConfig = str_replace('%SMTP_USER%', $vars['smtp_user'], $mailConfig); 81 | $mailConfig = str_replace('%SMTP_PASS%', $vars['smtp_pass'], $mailConfig); 82 | $mailConfig = str_replace('%SMTP_TLS_CERTS%', $vars['smtp_tls_certs'], $mailConfig); 83 | 84 | $mailConfig = str_replace('%SMTP_TLS%', boolToOnOff(convertStrToBool('smtp_tls',true)), $mailConfig); 85 | $mailConfig = str_replace('%SMTP_AUTH%', boolToOnOff($vars['smtp_user'] != ''), $mailConfig); 86 | 87 | if (!file_put_contents(MAIL_CONFIG_FILE, $mailConfig) || !chown(MAIL_CONFIG_FILE,'www-data') 88 | || !chgrp(MAIL_CONFIG_FILE,'www-data') || !chmod(MAIL_CONFIG_FILE,0600)) { 89 | err("Failed to write mail configuration file"); 90 | } 91 | 92 | //Cron interval - enable or disable 93 | define('CRON_JOB_FILE','/var/spool/cron/crontabs/www-data'); 94 | 95 | $interval = (int)$vars['cron_interval']; 96 | if ($interval > 0) { 97 | echo "OSTicket cron job is set to run every {$interval} minutes\n"; 98 | $cron = "*/{$interval} * * * * /usr/local/bin/php -c /usr/local/etc/php/php.ini /var/www/html/api/cron.php\n"; 99 | file_put_contents(CRON_JOB_FILE, $cron); 100 | } else { 101 | echo "OSTicket cron job is disabled\n"; 102 | unlink(CRON_JOB_FILE); 103 | } 104 | 105 | /************************* OSTicket Installation *******************************************/ 106 | 107 | //Create installer class 108 | define('OSTICKET_CONFIGFILE','/var/www/html/include/ost-config.php'); 109 | $installer = new Installer(OSTICKET_CONFIGFILE); //Installer instance. 110 | 111 | //Determine if using linked container 112 | $linked = (boolean)getenv("MYSQL_ENV_MYSQL_PASSWORD"); 113 | 114 | if (!$linked) { 115 | echo "Using external MySQL connection\n"; 116 | 117 | //Check mandatory connection settings provided 118 | if (!getenv("MYSQL_HOST")) { 119 | err('Missing required environmental variable MYSQL_HOST'); 120 | } 121 | if (!getenv("MYSQL_PASSWORD")) { 122 | err('Missing required environmental variable: MYSQL_PASSWORD'); 123 | } 124 | } else { 125 | echo "Using linked MySQL container\n"; 126 | } 127 | 128 | //Wait for database connection 129 | echo "Waiting for database TCP connection to become available...\n"; 130 | $s = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); 131 | $t = 0; 132 | while (!@socket_connect($s,$vars['dbhost'],3306) && $t < CONNECTION_TIMEOUT_SEC) { 133 | $t++; 134 | if (($t % 15) == 0) { 135 | echo "Waited for $t seconds...\n"; 136 | } 137 | sleep(1); 138 | } 139 | if ($t >= CONNECTION_TIMEOUT_SEC) { 140 | err("Timed out waiting for database TCP connection"); 141 | } 142 | 143 | //Check database installation status 144 | $db_installed = false; 145 | echo "Connecting to database mysql://${vars['dbuser']}@${vars['dbhost']}/${vars['dbname']}\n"; 146 | if (!db_connect($vars['dbhost'],$vars['dbuser'],$vars['dbpass'])) 147 | err(sprintf(__('Unable to connect to MySQL server: %s'), db_connect_error())); 148 | elseif(explode('.', db_version()) < explode('.', $installer->getMySQLVersion())) 149 | err(sprintf(__('osTicket requires MySQL %s or later!'),$installer->getMySQLVersion())); 150 | elseif(!db_select_database($vars['dbname']) && !db_create_database($vars['dbname'])) { 151 | err("Database doesn't exist"); 152 | } elseif(!db_select_database($vars['dbname'])) { 153 | err('Unable to select the database'); 154 | } else { 155 | $sql = 'SELECT * FROM `'.$vars['prefix'].'config` LIMIT 1'; 156 | if(db_query($sql, false)) { 157 | $db_installed = true; 158 | echo "Database already installed\n"; 159 | } 160 | } 161 | 162 | //Create secret if not set by env var and not previously stored 163 | DEFINE('SECRET_FILE','/var/lib/osticket/secret.txt'); 164 | if (!$vars['siri']) { 165 | if (file_exists(SECRET_FILE)) { 166 | echo "Loading installation secret\n"; 167 | $vars['siri'] = file_get_contents(SECRET_FILE); 168 | } else { 169 | echo "Generating new installation secret and saving\n"; 170 | //Note that this randomly generated value is not intended to secure production sites! 171 | $vars['siri'] = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_="), 0, 32); 172 | file_put_contents(SECRET_FILE, $vars['siri']); 173 | } 174 | } else { 175 | echo "Using installation secret from INSTALL_SECRET environmental variable\n"; 176 | } 177 | 178 | //Always rewrite config file in case MySQL details changed (e.g. ip address) 179 | echo "Updating configuration file\n"; 180 | if (!$configFile = file_get_contents($vars['config'])) { 181 | err("Failed to load configuration file: {$vars['config']}"); 182 | }; 183 | $configFile= str_replace("define('OSTINSTALLED',FALSE);","define('OSTINSTALLED',TRUE);",$configFile); 184 | $configFile= str_replace('%ADMIN-EMAIL',$vars['admin_email'],$configFile); 185 | $configFile= str_replace('%CONFIG-DBHOST',$vars['dbhost'],$configFile); 186 | $configFile= str_replace('%CONFIG-DBNAME',$vars['dbname'],$configFile); 187 | $configFile= str_replace('%CONFIG-DBUSER',$vars['dbuser'],$configFile); 188 | $configFile= str_replace('%CONFIG-DBPASS',$vars['dbpass'],$configFile); 189 | $configFile= str_replace('%CONFIG-PREFIX',$vars['prefix'],$configFile); 190 | $configFile= str_replace('%CONFIG-SIRI',$vars['siri'],$configFile); 191 | 192 | if (!file_put_contents($installer->getConfigFile(), $configFile)) { 193 | err("Failed to write configuration file"); 194 | } 195 | 196 | //Perform database installation if required 197 | if (!$db_installed) { 198 | echo "Installing database. Please wait...\n"; 199 | if (!$installer->install($vars)) { 200 | $errors=$installer->getErrors(); 201 | echo "Database installation failed. Errors:\n"; 202 | foreach($errors as $e) { 203 | echo " $e\n"; 204 | } 205 | exit(1); 206 | } else { 207 | echo "Database installation successful\n"; 208 | } 209 | } 210 | 211 | ?> 212 | -------------------------------------------------------------------------------- /utils/verify-plugin.php: -------------------------------------------------------------------------------- 1 |