diff --git a/.dockerignore b/.dockerignore index be89180..ecd9b70 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,6 +9,10 @@ !docker/nginx.conf.template !docker/health.txt !moodle/ +!moodle/.docker/ +!moodle/.docker/php/ +!moodle/.docker/php/runtime-policy.json +!moodle/.docker/php/check-runtime.php !moodle/.config/ !moodle/.config/php/ !moodle/.config/php/mooship.ini diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a2d73ed..04fef3b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - moodle: ["4.5", "5.3"] + moodle: ["4.3", "4.5", "5.3"] db: [postgres, mysql] env: SLUG: e2e @@ -47,6 +47,11 @@ jobs: --db-type "${{ matrix.db }}" --moodle-version "${{ matrix.moodle }}" --profile small --smtp-host "${gateway}:1025" --smtp-secure none --noreply-email "noreply@${DOMAIN}" + - name: Verify the actual PHP security baseline + run: | + actual=$(docker exec "${SLUG}_php" php -r 'echo PHP_VERSION;') + python3 -B lib/runtime_policy.py check-runtime "${{ matrix.moodle }}" "$actual" + - name: Login page through nginxproxy run: | curl --fail --silent --show-error --max-time 60 "http://${DOMAIN}/login/index.php" -o login.html diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 1590a0d..884cd45 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -37,7 +37,7 @@ jobs: docker build --target web --tag shellharbor/mooship:dev-moodle4.5.15-nginx . - name: PHP syntax run: | - for file in docker/*.php; do + for file in docker/*.php moodle/.docker/php/check-runtime.php; do docker run --rm --read-only --network none --volume "$PWD/$file:/check.php:ro" shellharbor/mooship:dev-moodle4.5.15-php8.3 php -l /check.php done - name: Validate both Compose examples diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9fe054b..868dbcc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -26,7 +26,7 @@ jobs: MOOSHIP_DOCKER_TESTS: '1' MOOSHIP_HTTP_INTEGRATION: '1' MOOSHIP_PROXY_INTEGRATION: '1' - MOOSHIP_TEST_PHP_IMAGE: php:8.4-fpm-alpine + MOOSHIP_TEST_PHP_IMAGE: php:8.4.27-fpm-alpine PYTHONPATH: tests COMPONENT: ${{ matrix.component }} steps: @@ -38,7 +38,7 @@ jobs: case "$COMPONENT" in postgres) images=(postgres:17-alpine) ;; mysql) images=(mysql:8.4) ;; - http) images=(nginx:1.29.1-alpine php:8.4-fpm-alpine python:3.12-alpine httpd:2.4-alpine alpine/openssl:latest) ;; + http) images=(nginx:1.29.1-alpine php:8.4.27-fpm-alpine python:3.12-alpine httpd:2.4-alpine alpine/openssl:latest) ;; proxy) images=(nginx:1.29.1-alpine) ;; *) exit 1 ;; esac diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b315ee..9445c90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,21 @@ After every task with file changes, briefly record what changed and why: features, fixes, internal work, dependencies, documentation, and AI-KIT. Keep new entries under `Unreleased` until a release is confirmed; use verified dates and versions. Tasks without file changes need no entry. +## [1.2.1] - 2026-10-28 + +- Record the non-negotiable PHP/Moodle runtime baseline in project instructions, the public skill, context, continuity profile and ADR-0007 so future changes preserve the security policy. + +- Fix PHP 8.2 database-probe diagnostics when PHP reads source from stdin: write to `php://stderr` because CLI stream constants may be absent. Preserve expected failure/partial-state exit codes and cover the lowest supported patched runtime. + +- Enforce per-branch PHP security floors (8.2.35, 8.3.36, 8.4.27, 8.5.12) for CVE-2026-109618/CVE-2026-109619 and Moodle 4.3+ compatibility; remove PHP 7.4/8.0/8.1 templates, pin patched bases, and guard builds/startup/activation/restore against unsafe runtimes. Require policy-aware toolkits from the Python CLI, extend boundary/lifecycle/image tests and E2E coverage, and document migration plus obsolete 1.2.0 artifacts. Release version 1.2.1 with matching image/package/toolkit metadata. + +- Finalize security-release installation instructions and record successful six-case E2E, image tests and required CI before the owner-approved publication. + ## Unreleased ### AI-KIT + - 2026-10-15: require image impact assessment for behavior, dependency and configuration changes, synchronized runtime/build assets, and affected image rebuilds with relevant tests. Added a verified build-input map and reporting rules to the runtime guide and synchronized public/local AI instructions so host and standalone changes are assessed together without unnecessary rebuilds or implied publication. - 2026-10-15: synchronized the isolated host-preflight branch/PR, local verification evidence, E2E run identity and separate Dependency Graph limitation in project context, navigation and the local continuity profile without merging the earlier image work. @@ -41,6 +52,8 @@ After every task with file changes, briefly record what changed and why: feature ### Project + + - 2026-10-28: require LF checkout for standalone Docker assets and verify nginx's actual Docker HEALTHCHECK independently of DB availability. Windows CRLF conversion made the original locally published nginx health payload fail; canonical Git LF export is required for corrected image packaging. - 2026-10-28: published GitHub release v1.2.0 and mooship 1.2.0 on PyPI through Trusted Publishing; verified a fresh public package install and real checksummed toolkit installation. Merged PRs #11/#6 after successful CI/E2E, corrected main's Go-specific required checks with owner approval, and synchronized verified publication/security facts in local continuity documents. Published and verified the PHP image and corrected nginx-r1 companion in Docker Hub; the original nginx tag is superseded after reproducing its Windows CRLF health defect. - 2026-10-28: enabled repository Dependabot alerts/Dependency Graph and verified Dependency Review now passes. Added strict release tag-to-checkout verification and a Docker Hub overwrite guard; configured the user-confirmed PyPI pending publisher and GitHub environment/variable for tokenless publication. diff --git a/Dockerfile b/Dockerfile index 391d585..55c8189 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,15 @@ -ARG PHP_IMAGE=php:8.3-fpm-bookworm@sha256:f768bd9142444f6126a690697b028c23f30878c3b628a7c355dfce75e29cc045 +ARG PHP_IMAGE=php:8.3.36-fpm-bookworm@sha256:a1a4f6f48c2e27f4974ea21459ca6c483bd3d4fbe18579ae61571a78bbe59fff ARG NGINX_IMAGE=nginx:1.31.0-alpine@sha256:2f07d83bf561b506400dc183b1b2003803e39efbd22451f848adaba14d28c7c7 ARG MOODLE_VERSION=4.5.15 ARG MOODLE_COMMIT=0a694ba9b8b4183bf7a45094cfa7211030db3192 ARG MOODLE_SHA256=19d8ab675769cd631b733c63914d1e318acad575763c75ef7e7e238f4180ed70 FROM ${PHP_IMAGE} AS extensions +ARG MOODLE_VERSION ARG REDIS_VERSION=6.3.0 -RUN apt-get update && apt-get install -y --no-install-recommends \ +COPY moodle/.docker/php/runtime-policy.json moodle/.docker/php/check-runtime.php /opt/mooship/ +RUN php /opt/mooship/check-runtime.php "${MOODLE_VERSION}" \ + && apt-get update && apt-get install -y --no-install-recommends \ libicu-dev libpq-dev libzip-dev libpng-dev libjpeg62-turbo-dev \ libfreetype6-dev libonig-dev libxml2-dev libwebp-dev \ && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ @@ -19,7 +22,9 @@ FROM ${PHP_IMAGE} AS source ARG MOODLE_VERSION ARG MOODLE_COMMIT ARG MOODLE_SHA256 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \ +COPY moodle/.docker/php/runtime-policy.json moodle/.docker/php/check-runtime.php /opt/mooship/ +RUN php /opt/mooship/check-runtime.php "${MOODLE_VERSION}" \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \ && mkdir -p /opt/moodle /opt/mooship \ && test -n "${MOODLE_SHA256}" \ && curl --fail --location --retry 3 --output /tmp/moodle.tar.gz \ @@ -59,6 +64,7 @@ FROM ${PHP_IMAGE} AS app ARG MOODLE_VERSION ARG MOOSHIP_VERSION=dev ARG VCS_REF=unknown +COPY --from=source /opt/mooship/runtime-policy.json /opt/mooship/check-runtime.php /opt/mooship/ LABEL org.opencontainers.image.title="Mooship Moodle runtime" \ org.opencontainers.image.source="https://github.com/shellharbor/mooship" \ org.opencontainers.image.version="${MOOSHIP_VERSION}-moodle${MOODLE_VERSION}-php8.3" \ diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index 9a7f330..0d0103a 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -5,7 +5,7 @@ Last verified: 2026-10-28. Sources: the user's instructions, local Git metadata, ## Project overview - **Mooship** automates Moodle installation on Ubuntu with Docker Compose and a shared reverse proxy. -- Git origin is shellharbor/mooship. Local main and origin/main contain release commit `82a658205bfdeaaa68026f924db2305bd7976b29`, tagged `v1.2.0`. GitHub confirmed v1.2.0 as the latest published release on 2026-10-28; PRs #11 and #6 are merged. Earlier primary baseline: cddc89b (v1.1.2 commit subject). +- Git origin is shellharbor/mooship. At the preceding publication, main contained release commit `82a658205bfdeaaa68026f924db2305bd7976b29`, tagged `v1.2.0`. GitHub confirmed v1.2.0 as the latest published release on 2026-10-28; PRs #11 and #6 are merged. Earlier primary baseline: cddc89b (v1.1.2 commit subject). - Workflows: creating a site, activation/deactivation, explicit removal, full backups, and restoration into an unused directory. - Project language: English throughout documentation, code comments, CLI help, prompts, log/error messages, configuration templates, examples, and local agent instructions. Keep future additions in English, as requested by the user. - Chat language: Russian, according to the user's current language policy; project artifacts shown in chat retain English. @@ -13,6 +13,15 @@ Last verified: 2026-10-28. Sources: the user's instructions, local Git metadata, - Public AI entry point: root `SKILL.md` (`name: mooship`) covers development, review, server operations, invariants, and validation without requiring AI-KIT. It is tracked, and README links to it for GitHub readers and normal clones. The existing `.claude/skills/deploy-moodle/SKILL.md` delegates to it but remains local and ignored, as do `.agents/` and `ai-kit/`. No global installation. The local `ai-kit/SKILLS.md` registers the public entry point. - Published documentation includes the already tracked `PROJECT_CONTEXT.md`, `WIKI.md`, and `BOOTSTRAP_PROMPT.md` despite their ignore patterns. Optional local AI-KIT resources are named as code paths rather than public Markdown links. The documentation gate validates targets against tracked and pending non-ignored files, so local-only resources cannot hide broken links in a clean checkout. +## Mandatory runtime security baseline (2026-10-28) + +- Owner instruction: PHP branch floors are **8.2.35 / 8.3.36 / 8.4.27 / 8.5.12**; prohibit PHP 8.1 and older and Moodle below **4.3**, including 4.3 itself in allowed versions. Official PHP changelog and AWS bulletin 2026-143 confirm CVE-2026-109618/CVE-2026-109619 patch levels. Earlier stack entries below are historical and do not permit obsolete runtimes. +- Canonical policy: `moodle/.docker/php/runtime-policy.json`; host selection and actual-version checks: `lib/runtime_policy.py`; image build/startup guard: `moodle/.docker/php/check-runtime.php`. Moodle 4.3 allows PHP 8.2; 4.4/4.5 allow 8.2/8.3; 5.0/5.1 allow 8.2/8.3/8.4; 5.2/5.3 allow 8.3/8.4. PHP 8.5 has no verified Moodle pair; unknown branches and prereleases fail closed. +- Host PHP 8.2/8.3/8.4 templates now use digest-pinned patched Bookworm bases. PHP 7.4/8.0/8.1 Dockerfiles and INI files are removed. Root app/web builds use patched PHP 8.3.36 for runtime/source. Activation and restore validate saved versions against actual source `version.php`, rebuild, then probe actual PHP before site startup or DB import; diagnosis/backup/removal remain available for migration. Host cron uses a Compose command to preserve the guarded image entrypoint. The Python adapter rejects pre-policy toolkits for deploy/activate/restore. +- Owner approved merging PR #14 with a one-time administrative review bypass and publishing security version **1.2.1** on 2026-10-28. Release/package references: [GitHub](https://github.com/shellharbor/mooship/releases/tag/v1.2.1), [PyPI](https://pypi.org/project/mooship/1.2.1/); image tags: `1.2.1-moodle4.5.15-php8.3` and `1.2.1-moodle4.5.15-nginx`. Registry digests and publication verification belong in the release record; VERSION alone does not establish publication. Existing Docker/PyPI/native 1.2.0 artifacts predate the policy and must not be used for new deployments. Existing installations/data are not automatically modified. Read `docs/RUNTIME_POLICY.md` and ADR-0007 for migration and maintenance. +- This task affects host PHP/cron templates and both standalone targets. Local app/web rebuilds complete on PHP 8.3.36; actual PHP 8.2.35 host-startup tests accept initial Moodle 4.3/4.3.0 and reject older/incompatible source. A second real PHP 8.2 stdin regression verifies the database probe's fixed stderr path and expected error exit. Independent security review findings (cron bypass, stale source metadata, inclusive 4.3 normalization) are resolved. Candidate validation and publication boundaries are tracked in [PR #14](https://github.com/shellharbor/mooship/pull/14). +- E2E now includes Moodle 4.3/4.5/5.3 x PostgreSQL/MySQL (six cases). Initial run 40711524928 passed all four 4.5/5.3 cases and installed both 4.3 sites, but the PHP 8.2 native-state fixture exposed missing CLI stream constants when PHP reads from stdin. `lib/check-database.php` now uses `php://stderr`; corrected run [40714114550](https://github.com/shellharbor/mooship/actions/runs/40714114550) passed all six cases at security source 531c341. All 26 PR checks and seven local real image tests passed (494.881 seconds); 144 Linux regressions passed with 19 opt-in skips. Helper coverage is 94% (runtime_policy.py 100%). Subsequent publication preparation changes documentation only; require exact-release-commit CI through the release gate. + ## Verified stack - Bash and Python 3.8+ (standard library); Ubuntu 20.04+, root, Docker Engine, and the Compose plugin. @@ -28,7 +37,7 @@ Last verified: 2026-10-28. Sources: the user's instructions, local Git metadata, ## Standalone Moodle runtime (2026-10-15) -- Published Docker Hub pair (2026-10-28), Linux amd64: `1.2.0-moodle4.5.15-php8.3` and corrected `1.2.0-moodle4.5.15-nginx-r1` under shellharbor/mooship. App digest: `shellharbor/mooship@sha256:70387b904527873f32f948eae36e23c4b0f2d48864a4a831b4e457e82810fe77`; web digest: `shellharbor/mooship@sha256:4a37ae5202bea0569cc5eae4adf5e43f6cf21eaaaa1b08d23cf7125737da63f8`. Both use the unchanged v1.2.0 source at 82a6582. Original nginx tag is superseded: Windows CRLF conversion broke its exact Docker health probe. Corrected nginx-r1 is exported from Git with core.autocrlf=false. CLI login as shellharbor resolved the earlier insufficient_scope failures. +- Historical 1.2.0 Docker Hub pair (2026-10-28), Linux amd64: `1.2.0-moodle4.5.15-php8.3` and corrected `1.2.0-moodle4.5.15-nginx-r1` under shellharbor/mooship. App digest: `shellharbor/mooship@sha256:70387b904527873f32f948eae36e23c4b0f2d48864a4a831b4e457e82810fe77`; web digest: `shellharbor/mooship@sha256:4a37ae5202bea0569cc5eae4adf5e43f6cf21eaaaa1b08d23cf7125737da63f8`. Both use the unchanged v1.2.0 source at 82a6582. Original nginx tag is superseded: Windows CRLF conversion broke its exact Docker health probe. Corrected nginx-r1 is exported from Git with core.autocrlf=false. CLI login as shellharbor resolved the earlier insufficient_scope failures. - Moodle 4.5.15 is pinned to commit `0a694ba9b8b4183bf7a45094cfa7211030db3192` and archive SHA-256; PHP 8.3 Bookworm and nginx 1.31.0 Alpine bases are digest-pinned. Both images contain the same immutable source. Moodle and dependency licenses remain bundled; wrapper code remains MIT. - UID/GID 1000; writable `/var/moodledata` and `/tmp`, read-only roots, no capabilities/Docker socket/source mount required. Credentials use environment or absolute `_FILE` secrets; only the install workload receives the admin secret. Commands: `fpm`, explicit locked `install`, `cron`, `cron-once`, `check`, and passthrough `php ...`. Normal startup does not migrate schemas and refuses an absent/mismatching installed version. - `docker/compose.yml` plus the chosen `compose.postgres.yml` or `compose.mysql.yml` overlay supplies PostgreSQL 17/MySQL 8.4 and a separate scheduler. Only nginx publishes HTTP, on loopback 8080 by default. Runtime settings/secrets, backup/upgrade differences from the host toolkit and later publication commands are in `docs/DOCKER.md` (ADR-0004). diff --git a/README.md b/README.md index 5c94f00..1b1a7a1 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ Automated Moodle deployment on Ubuntu. Chosen GitHub repository: [shellharbor/mo `deploy-moodle.sh` deploys Moodle on an Ubuntu server with a single command. It creates an isolated Docker project (PHP-FPM, nginx, PostgreSQL or MySQL, Redis, cron, certbot), installs Moodle through the CLI, connects the site to the shared `nginxproxy` reverse proxy, and obtains a Let's Encrypt certificate. Companion scripts schedule full backups and check the health of every site. -The PHP version is selected automatically based on the Moodle version. Passwords, database names, and available ports are generated unless supplied explicitly. +Moodle 4.3+ is required. PHP 8.1 and older are prohibited; minimum patches are 8.2.35, 8.3.36, 8.4.27 and 8.5.12, subject to Moodle compatibility. See the enforced [runtime security policy](docs/RUNTIME_POLICY.md). The PHP branch is selected automatically based on the Moodle version. Passwords, database names, and available ports are generated unless supplied explicitly. -For a portable application image, see the [standalone Moodle Docker guide](docs/DOCKER.md) and [Docker Hub](https://hub.docker.com/r/shellharbor/mooship). Mooship 1.2.0 provides Moodle 4.5.15/PHP 8.3 and the corrected `nginx-r1` companion, with separate PostgreSQL/MySQL and persistent data. Compose examples, Kubernetes manifests and installation tests are included. The host installer below is an independent deployment option. Bundled Moodle retains its GPL license. +For a portable application image, see the [standalone Moodle Docker guide](docs/DOCKER.md) and [Docker Hub](https://hub.docker.com/r/shellharbor/mooship). The updated source builds Moodle 4.5.15/PHP 8.3.36 and matching nginx, with separate PostgreSQL/MySQL and persistent data. Use the matching `1.2.1-moodle4.5.15-php8.3` and `1.2.1-moodle4.5.15-nginx` tags. Version 1.2.0 predates the security floor. Compose examples, Kubernetes manifests and installation tests are included. The host installer below is an independent deployment option. Bundled Moodle retains its GPL license. -The [Python CLI](docs/PYTHON.md) provides a dependency-free `mooship` command for verified toolkit installation and the existing deployment, lifecycle, backup/restore and diagnostics scripts. Install the published package with `pipx install mooship==1.2.0`. See [release publication](docs/RELEASING.md) for Docker Hub and PyPI setup and verification. +The [Python CLI](docs/PYTHON.md) provides a dependency-free `mooship` command for verified toolkit installation and the existing deployment, lifecycle, backup/restore and diagnostics scripts. Install the security release with `pipx install mooship==1.2.1`. Upgrade both the Python CLI and native toolkit; 1.2.0 predates the runtime policy. See [release publication](docs/RELEASING.md) for Docker Hub and PyPI setup and verification. Deployment validates ports and service readiness before publishing a site. For native databases, `--db-host HOST` selects the container-reachable address (default `host.docker.internal` with Linux host-gateway mapping). See [preflight, native database access, and readiness](docs/PREFLIGHT.md) for requirements and checks. @@ -252,8 +252,8 @@ Source: `parse_args` and the script's `--help` text. Unknown arguments cause an | Argument | Default | Description | |---|---|---| -| `--moodle-version X.Y[.Z]` | `4.5` | Moodle release, downloaded as the GitHub tag `v`. `X.Y` selects the newest stable `X.Y.Z` release of that branch at deployment time (`git ls-remote`; beta/rc tags are ignored), for example `4.5` → 4.5.15 in October 2026. `X.Y.Z` installs exactly that release. Supports 3.9 … 5.x, including 5.1+ with the `public/` directory (see [Moodle 5.1+](#moodle-51-public-directory)) | -| `--php-version X.Y` | based on Moodle version | 7.4 or 8.0–8.4, written as `8.2` or `82` (see [PHP selection](#php-selection)) | +| `--moodle-version X.Y[.Z]` | `4.5` | Moodle release, downloaded as the GitHub tag `v`. `X.Y` selects the newest stable `X.Y.Z` release of that branch at deployment time (`git ls-remote`; beta/rc tags are ignored), for example `4.5` → 4.5.15 in October 2026. `X.Y.Z` installs exactly that release. Supports verified branches 4.3–5.3, including 5.1+ with the `public/` directory (see [Moodle 5.1+](#moodle-51-public-directory)) | +| `--php-version X.Y` | based on Moodle version | A compatible patched 8.2, 8.3 or 8.4 branch, written as `8.2` or `82` (see [PHP selection](#php-selection)); legacy and incompatible branches are rejected | | `--moodle-admin-user USER` | `admin` | Administrator username | | `--moodle-admin-email EMAIL` | `@` | Administrator email; use a mailbox that exists, because Moodle sends password resets and notifications to it | | `--moodle-admin-password PASS` | generated (15 characters) | Administrator password | @@ -359,37 +359,30 @@ It does not check whether the Moodle tag exists (failure occurs during download) ## PHP selection -Without `--php-version`, `select_php_version_for_moodle` selects PHP using the Moodle version's `MAJOR.MINOR`: +The installer validates the requested Moodle branch and PHP pair before creating resources. Moodle **4.3 is the minimum**, including 4.3. Unknown branches fail closed. -| Moodle | PHP (automatic) | Compatibility (from script comments) | +| Moodle | Default PHP | Allowed PHP branches after the security floor | |---|---|---| -| 3.9.x | 7.4 | 7.2–7.4 | -| 3.11.x | 8.0 | 7.3–8.0 | -| 4.0.x | 8.0 | 7.3–8.0 | -| 4.1.x | 8.1 | 7.4–8.1 | -| 4.2.x, 4.3.x, 4.4.x | 8.2 | 8.0/8.1–8.2 | -| 4.5.x | 8.3 | 8.1–8.3 | -| 5.x and later (MAJOR ≥ 5), including 5.1+ | 8.4 | 8.2–8.4 (5.3: 8.3–8.4) | -| Any other version (3.10, 3.8 and earlier…) | 8.3 + warning | Set `--php-version` manually: 7.4 is suitable for 3.10 | +| 4.3.x | 8.2 | 8.2 | +| 4.4.x | 8.2 | 8.2, 8.3 | +| 4.5.x | 8.3 | 8.2, 8.3 | +| 5.0.x, 5.1.x | 8.4 | 8.2, 8.3, 8.4 | +| 5.2.x, 5.3.x | 8.4 | 8.3, 8.4 | ### Manual selection -`--php-version 8.2` and `--php-version 82` are equivalent: the dot is removed, and the script looks for `php82.Dockerfile` and `php82.ini`. The script does not verify compatibility between the chosen PHP and Moodle versions. Incompatible versions cause installation to fail during Moodle's environment check. +`--php-version 8.2` and `--php-version 82` are equivalent. The installer rejects incompatible Moodle/PHP pairs before deployment. Patch-qualified overrides and unverified branches are rejected. -### Available versions +### Minimum patch versions -A version is available only when the template contains **both** a Dockerfile (`moodle/.docker/php/`) **and** an ini file (`moodle/.config/php/`): - -| PHP | Dockerfile | ini | Available | -|---|---|---|---| -| 7.4 | yes | yes | yes | -| 8.0 | yes | yes | yes | -| 8.1 | yes | yes | yes | -| 8.2 | yes | yes | yes | -| 8.3 | yes | yes | yes | -| 8.4 | yes | yes | yes | +| PHP | Minimum patch | Host template | +|---|---|---| +| 8.2 | 8.2.35 | `php82.Dockerfile` / `php82.ini` | +| 8.3 | 8.3.36 | `php83.Dockerfile` / `php83.ini` | +| 8.4 | 8.4.27 | `php84.Dockerfile` / `php84.ini` | +| 8.5 | 8.5.12 | No verified Moodle pair; unavailable | -For an unavailable version, the script stops **before deployment**, reporting a missing PHP Dockerfile or ini file, for example `…/moodle/.docker/php/php72.Dockerfile`. +PHP 8.1 and older are prohibited and their templates have been removed. Host bases are pinned by patch and digest. Builds and startup check the actual PHP version; activation and restore probe it before starting services or importing a database. See [runtime policy and migration](docs/RUNTIME_POLICY.md) for CVEs, canonical policy, compatibility sources and existing installations. ### PHP settings in the template @@ -776,11 +769,11 @@ sudo bash /opt/mooship/deploy-moodle.sh \ sudo bash /opt/mooship/deploy-moodle.sh \ --slug school \ --domain school.example.com \ - --moodle-version 4.4.0 \ - --php-version 8.1 \ + --moodle-version 4.5.15 \ + --php-version 8.2 \ --db-type postgres \ --ssl-email admin@example.com -# Result: Moodle 4.4.0 on PHP 8.1 instead of automatic 8.2 (also accepts --php-version 81) +# Result: Moodle 4.5.15 on patched PHP 8.2 instead of automatic 8.3 (also accepts --php-version 82) ``` ### 5. A custom administrator @@ -1006,16 +999,17 @@ The exit code follows the Nagios convention (0 OK, 1 WARNING, 2 CRITICAL), so th 1. Enable maintenance mode: `maintenance.php --enable`. 2. Back up the database and files (see above). -3. Replace the code in `public_html/` with the new version, **preserving `config.php`** and third-party plugins. -4. Run `docker compose run --rm permissions`. -5. Run `upgrade.php --non-interactive`. -6. Disable maintenance mode: `maintenance.php --disable`. +3. Verify the target Moodle/PHP pair against the [runtime policy](docs/RUNTIME_POLICY.md), then replace the code in `public_html/`, **preserving `config.php`** and third-party plugins. +4. Update `MOODLE_VERSION` in `.env` to the exact stable source release. Activation and restore reject source/metadata disagreement, including after manual upgrades. +5. Run `docker compose run --rm permissions`. +6. Run `upgrade.php --non-interactive`. +7. Disable maintenance mode: `maintenance.php --disable`. If the new Moodle version needs a different PHP version: 1. Change `phpXX.Dockerfile` and `phpXX.ini` for the `php` and `cron` services in the project's `docker-compose.yml`. -2. Run `docker compose up -d --build php cron`. -3. Update `PHP_VERSION` in `.env` to keep the recorded version consistent. +2. Update `PHP_VERSION` in `.env` before rebuilding, and copy the current patched Dockerfile plus runtime policy/guard/entrypoint into the site's PHP build context. +3. Run `docker compose build --pull php cron`, verify the actual PHP patch, then restart through the updated activation script and check readiness. Keep cron's loop as a Compose `command` so the guarded image entrypoint runs. When upgrading from Moodle 5.0 or earlier to 5.1+, change the nginx document root after replacing the code; the script does this only for fresh deployments. @@ -1185,7 +1179,7 @@ With `--endpoint URL`, the script sends a PUT request after SSL issuance, using ### The script immediately stops with a PHP error -A missing PHP Dockerfile or ini error means that version is absent from the template. Choose 7.4 or 8.0–8.4. Deployment has not created project files at this stage. +Select Moodle 4.3+ and a compatible patched PHP 8.2–8.4 branch from the [selection table](#php-selection). Old PHP, incompatible pairs and unknown branches are rejected before deployment. A missing Dockerfile/INI means the toolkit is incomplete; update the entire toolkit rather than adding an obsolete template. ### Moodle download failed; check the version (404) @@ -1333,7 +1327,7 @@ Current projects pass the client address to PHP (see [How it works](#how-it-work - Explicitly supplied ports are not checked for availability. Automatic checks use currently listening sockets only, so a stopped project's ports may be assigned to a new project. - Redis and database ports are published only on `127.0.0.1` (see [Security](#security)). - **Redis** stores sessions; Moodle's application cache (MUC) is not configured automatically (see [Optional additions](#optional-additions-to-configphp)). -- **Database images are fixed:** `postgres:17-alpine` and `mysql:8.4` (Moodle 5.3 requires PostgreSQL 17+ or MySQL 8.4+). Dependabot keeps these tested branches; major database changes require migration and backup/restore validation. Existing projects retain their saved image configuration: never attach a MySQL 9.x or PostgreSQL 18 data directory to an older database image. Template changes apply to new projects. Compatibility with older Moodle versions (3.9–4.0) is not guaranteed. +- **Database images are fixed:** `postgres:17-alpine` and `mysql:8.4` (Moodle 5.3 requires PostgreSQL 17+ or MySQL 8.4+). Dependabot keeps these tested branches; major database changes require migration and backup/restore validation. Existing projects retain their saved image configuration: never attach a MySQL 9.x or PostgreSQL 18 data directory to an older database image. Template changes apply to new projects. Moodle below 4.3 is prohibited; use a currently maintained Moodle branch when possible. - **Language:** installation uses `en` only; install language packs afterwards. - **Backups pause the site** for the snapshot, including scheduled ones. - **Backups** require space for a temporary project copy and the archive; restoration supports trusted Mooship v1 archives created by the project. @@ -1356,7 +1350,7 @@ Real HTTP/HTTPS checks are opt-in and use synthetic files through two nginx laye MOOSHIP_HTTP_INTEGRATION=1 python3 -B -m unittest discover -s tests -p test_http_roundtrip.py -v ``` -Docker must be running, and `nginx:1.29.1-alpine`, `python:3.12-alpine`, `httpd:2.4-alpine`, `alpine/openssl:latest`, and `php:8.4-fpm` must already be available locally. `MOOSHIP_TEST_PHP_IMAGE` may select another PHP-FPM image, for example `php:8.4-fpm-alpine`. The suite also checks the Moodle router fallback, X-Sendfile, the client address seen by PHP, the HTTPS redirect, and that a stopped project does not stop the proxy. +Docker must be running, and `nginx:1.29.1-alpine`, `python:3.12-alpine`, `httpd:2.4-alpine`, `alpine/openssl:latest`, and `php:8.4.27-fpm` must already be available locally. `MOOSHIP_TEST_PHP_IMAGE` may select another PHP-FPM image, for example `php:8.4.27-fpm-alpine`. The suite also checks the Moodle router fallback, X-Sendfile, the client address seen by PHP, the HTTPS redirect, and that a stopped project does not stop the proxy. Proxy lifecycle checks cover multiple sites, disabled entries, exact slug matching, repeat operations, and the last site's deactivation/reactivation. To validate the edited files with Docker Compose and verify actual proxy network/volume detachment while a neighboring site remains available: diff --git a/SKILL.md b/SKILL.md index c886c2f..4b50fad 100644 --- a/SKILL.md +++ b/SKILL.md @@ -52,6 +52,8 @@ Prefer existing shared helpers over new inline parsers. When editing generated c - **New installations:** reject occupied project directories and leftover resources. `nginxproxy` is a reserved slug. Keep resolved paths under `/var/www`, reject project-directory symlinks, and match slugs exactly: an operation on `lms` must not affect `lms2`. - **Native databases:** do not reuse existing databases/users or drop them based only on a name. Removal requires a matching `.mooship-native-database` ownership marker. Failed creation or an older project without that marker does not establish ownership. +- **Mandatory runtime baseline:** never permit PHP below 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 for its branch, PHP 8.1 or older, or Moodle below 4.3 (4.3 is included). Use the shared policy and verified Moodle compatibility; PHP 8.5 currently has no allowed Moodle pair. Reject unknown branches; verify actual PHP at build/startup and before activation/restore, and actual Moodle source against saved metadata. Preserve cron's guarded entrypoint. Never bypass the guards or use the obsolete 1.2.0 PHP image for new deployments. Update policy, pinned bases, tests, docs and images together; see [runtime security policy](docs/RUNTIME_POLICY.md). + - **Deployment gates:** validate ports before creating resources; exempt the selected native DB listener from free-port checks. Native `--db-host` controls the application's route to the locally managed DB. Preserve PHP-side TCP/authentication probes, bounded service waits, refusal to initialize unknown/partial DB states, nginx reload after document-root changes, and cron startup after installation/restore. See `docs/PREFLIGHT.md`. - **Database branches:** keep templates and integration checks on the tested branches documented in `docs/CI.md`. A branch change requires coordinated data-volume, migration, and backup/restore validation. Updating a template never authorizes downgrading an existing project's database files. - **Host installer secrets:** preserve `umask 077`, mode `600` for `.env`, `config.php`, and archives, and localhost-only database, Redis, and PHP-FPM publications. Use the existing environment parser rather than executing `.env` as shell code. The standalone image's baked `config.php` contains no secrets; mounted secret files must be readable by UID 1000. Never print credentials or private certificate material in reports; endpoints receiving secrets require HTTPS. diff --git a/VERSION b/VERSION index 26aaba0..6085e94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.0 +1.2.1 diff --git a/WIKI.md b/WIKI.md index 8495fa8..7dabdca 100644 --- a/WIKI.md +++ b/WIKI.md @@ -4,10 +4,13 @@ Project knowledge map. Public links target files included in the repository. Opt ## Getting started -- [Mooship v1.2.0 release and native toolkit assets](https://github.com/shellharbor/mooship/releases/tag/v1.2.0) -- [Published Python CLI on PyPI](https://pypi.org/project/mooship/1.2.0/) +Read the [mandatory runtime policy](docs/RUNTIME_POLICY.md) before deployment. Use 1.2.1 or newer; 1.2.0 artifacts predate its PHP security floors. Verify publication through the release/package/registry links. + +- [Mooship v1.2.1 security release and native toolkit assets](https://github.com/shellharbor/mooship/releases/tag/v1.2.1) +- [Published Python CLI on PyPI](https://pypi.org/project/mooship/1.2.1/) - [README and operations guide](README.md) - [Standalone Moodle images, Compose, Kubernetes, and Docker Hub](docs/DOCKER.md) +- [Mandatory PHP/Moodle security policy and existing-site migration](docs/RUNTIME_POLICY.md) - [Image impact assessment, synchronization, rebuilds, and checks](docs/DOCKER.md#keeping-images-in-sync) - [Python CLI, pip/pipx installation, and PyPI](docs/PYTHON.md) - [Release publication and account setup](docs/RELEASING.md) @@ -34,6 +37,7 @@ These local resources are not distributed with the repository. Use them when pro - [Python CLI and release distribution decision](docs/adr/0006-python-cli-and-release-distribution.md) - [Deployment preflight and readiness decision](docs/adr/0005-deployment-preflight.md) +- [Shared runtime security baseline decision](docs/adr/0007-runtime-security-baseline.md) - [Changelog](CHANGELOG.md) ## Mooship diff --git a/activate.sh b/activate.sh index f1b4662..5b46b26 100644 --- a/activate.sh +++ b/activate.sh @@ -63,6 +63,13 @@ start_project_containers() { info "Starting containers for project ${SLUG}..." cd "${PROJECT_DIR}" || error "Cannot enter ${PROJECT_DIR}" + local services + services=$(docker compose config --services) + if grep -qx php <<< "$services"; then + mooship_require_project_runtime + docker compose build --pull php cron || error "Could not build patched PHP images" + mooship_verify_project_php || error "PHP security verification failed before activation" + fi if docker compose up -d --build; then info "Project ${SLUG} containers started" else diff --git a/deploy-moodle.sh b/deploy-moodle.sh index 25277d7..71aa198 100644 --- a/deploy-moodle.sh +++ b/deploy-moodle.sh @@ -28,7 +28,7 @@ umask 077 # Moodle: # --moodle-version X.Y[.Z] Moodle release (GitHub tag vX.Y.Z); X.Y selects the newest # X.Y.Z release (default 4.5) -# --php-version X.Y PHP version: 7.4, 8.0–8.4 (defaults according to Moodle version) +# --php-version X.Y PHP branch: 8.2, 8.3 or 8.4 (patched security baseline) (defaults according to Moodle version) # --moodle-admin-user USER Administrator login (default admin) # --moodle-admin-password PASS Administrator password (generated if omitted) # --moodle-admin-email EMAIL Administrator email (default @) @@ -463,6 +463,8 @@ parse_args() { error "Invalid Moodle version format: ${MOODLE_VERSION}. Expected X.Y or X.Y.Z (for example: 4.5 or 4.5.15)" fi + mooship_runtime_selection "$MOODLE_VERSION" "$PHP_VERSION" >/dev/null || error "Prohibited Moodle/PHP version" + # --- Generate a Redis password if omitted --- if [[ -z "$REDIS_PASSWORD" ]]; then REDIS_PASSWORD=$(generate_random_password) @@ -723,55 +725,11 @@ resolve_moodle_version() { # ==================== Select the PHP version for Moodle ============== select_php_version_for_moodle() { - if [[ -n "$PHP_VERSION" ]]; then - info "Using the specified PHP version: ${PHP_VERSION}" - else - info "Selecting a compatible PHP version for Moodle ${MOODLE_VERSION}..." - - local MOODLE_MAJOR - local MOODLE_MINOR - MOODLE_MAJOR=$(echo "$MOODLE_VERSION" | cut -d'.' -f1) - MOODLE_MINOR=$(echo "$MOODLE_VERSION" | cut -d'.' -f2) - - # Moodle 3.9: PHP 7.2-7.4 (recommend 7.4) - if [[ "$MOODLE_MAJOR" -eq 3 && "$MOODLE_MINOR" -eq 9 ]]; then - PHP_VERSION="7.4" - # Moodle 3.11: PHP 7.3-8.0 (recommend 8.0) - elif [[ "$MOODLE_MAJOR" -eq 3 && "$MOODLE_MINOR" -eq 11 ]]; then - PHP_VERSION="8.0" - # Moodle 4.0: PHP 7.3-8.0 (recommend 8.0) - elif [[ "$MOODLE_MAJOR" -eq 4 && "$MOODLE_MINOR" -eq 0 ]]; then - PHP_VERSION="8.0" - # Moodle 4.1: PHP 7.4-8.1 (recommend 8.1) - elif [[ "$MOODLE_MAJOR" -eq 4 && "$MOODLE_MINOR" -eq 1 ]]; then - PHP_VERSION="8.1" - # Moodle 4.2-4.4: PHP 8.0/8.1-8.2 (recommend 8.2) - elif [[ "$MOODLE_MAJOR" -eq 4 && "$MOODLE_MINOR" -ge 2 && "$MOODLE_MINOR" -le 4 ]]; then - PHP_VERSION="8.2" - # Moodle 4.5: PHP 8.1-8.3 (recommend 8.3) - elif [[ "$MOODLE_MAJOR" -eq 4 && "$MOODLE_MINOR" -eq 5 ]]; then - PHP_VERSION="8.3" - # Moodle 5.0-5.2: PHP 8.2-8.4; 5.3: PHP 8.3-8.4 (recommend 8.4) - elif [[ "$MOODLE_MAJOR" -ge 5 ]]; then - PHP_VERSION="8.4" - else - warn "Unknown Moodle version ${MOODLE_VERSION}, using PHP 8.3 by default" - PHP_VERSION="8.3" - fi - fi - - # Filenames omit the dot: 8.2 → 82 (php82.Dockerfile, php82.ini). - # Normalize manually specified versions too, to avoid php8.2.Dockerfile - PHP_VERSION="${PHP_VERSION//./}" - - if [[ ! -f "${TEMPLATE_DIR}/.docker/php/php${PHP_VERSION}.Dockerfile" ]]; then - error "No Dockerfile for PHP ${PHP_VERSION}: ${TEMPLATE_DIR}/.docker/php/php${PHP_VERSION}.Dockerfile" - fi - if [[ ! -f "${TEMPLATE_DIR}/.config/php/php${PHP_VERSION}.ini" ]]; then - error "No php.ini for PHP ${PHP_VERSION}: ${TEMPLATE_DIR}/.config/php/php${PHP_VERSION}.ini" - fi - - success "Selected PHP $(php_version_label) for Moodle ${MOODLE_VERSION}" + PHP_VERSION=$(mooship_runtime_selection "$MOODLE_VERSION" "$PHP_VERSION") || + error "The requested Moodle/PHP combination violates the runtime security policy" + [[ -f "${TEMPLATE_DIR}/.docker/php/php${PHP_VERSION}.Dockerfile" ]] || error "Missing patched PHP Dockerfile" + [[ -f "${TEMPLATE_DIR}/.config/php/php${PHP_VERSION}.ini" ]] || error "Missing PHP configuration" + success "Selected patched PHP $(php_version_label) for Moodle ${MOODLE_VERSION}" } # 84 → 8.4 (for display) @@ -1386,6 +1344,8 @@ build_and_start_project() { ensure_project_docker_resources info "Running: docker compose up -d --build" + docker compose build --pull php cron || error "Could not build patched PHP images" + mooship_verify_project_php || error "PHP security verification failed" if ! docker compose up -d --build php nginx redis certbot_renew; then error "Could not build/start the project. Check logs: cd ${PROJECT_DIR} && docker compose logs" fi @@ -1483,6 +1443,7 @@ install_moodle() { if ! moodle_code_present; then error "version.php not found in the Moodle ${MOODLE_VERSION} archive" fi + mooship_require_project_runtime # Moodle 5.1+: web files moved to public/ (config.php, lib/, and admin/cli remain at the root) if [[ -f "${PROJECT_DIR}/public_html/public/version.php" ]]; then diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 9ab13b2..124df82 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,6 +1,7 @@ #!/bin/sh set -eu umask 077 +php /opt/mooship/check-runtime.php "$(php -r '$v = json_decode(file_get_contents("/opt/mooship/version.json"), true); echo explode(" ", $v["release"])[0];')" if [ "$#" -eq 0 ]; then set -- fpm; fi case "$1" in --help|-h) diff --git a/docs/BACKUP.md b/docs/BACKUP.md index 6df0f8d..e88cc65 100644 --- a/docs/BACKUP.md +++ b/docs/BACKUP.md @@ -1,5 +1,7 @@ # Mooship backup and restore +Restore enforces the [runtime security policy](RUNTIME_POLICY.md): Moodle 4.3+, compatible patched PHP, actual source agreeing with saved metadata, and a PHP probe before database import/startup. Old archives are preserved for migration; they are not silently rewritten. Backup and diagnosis remain available for unsupported sites. + ## Create a backup ```bash diff --git a/docs/CI.md b/docs/CI.md index 3535c9a..d16dc06 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -14,7 +14,7 @@ Mooship separates fast regression checks, component tests, and full Moodle deplo | [CodeQL](../.github/workflows/codeql.yml) | Python and GitHub Actions security analysis | Push to `main`, PR, Wednesday, manual | | [Dependency review](../.github/workflows/dependency-review.yml) | Reject newly introduced high/critical dependency vulnerabilities reported by GitHub | PR | | [Documentation](../.github/workflows/docs.yml) | Local inline Markdown links, heading anchors, and endpoint JSON example syntax | Push to `main`, PR, manual | -| [E2E](../.github/workflows/e2e.yml) | Real Moodle 4.5/5.3 deployment with PostgreSQL/MySQL, Redis sessions, SMTP, cron, backups, schedules, and doctor | Monday, manual | +| [E2E](../.github/workflows/e2e.yml) | Real Moodle 4.3/4.5/5.3 deployment with PostgreSQL/MySQL, Redis sessions, SMTP, cron, backups, schedules, and doctor | Monday, manual | The regression matrix uses Python 3.8, 3.12, and 3.14 on Ubuntu 24.04, plus Python 3.12 on Ubuntu 22.04. Python 3.8 verifies the existing minimum runtime contract; development tools run on Python 3.12. These jobs exercise synthetic data without installing Moodle. diff --git a/docs/DOCKER.md b/docs/DOCKER.md index fc159b6..d21286f 100644 --- a/docs/DOCKER.md +++ b/docs/DOCKER.md @@ -2,15 +2,17 @@ The root Dockerfile builds a Moodle 4.5.15/PHP 8.3 runtime and a matching nginx companion published as `shellharbor/mooship`. PostgreSQL 17 or MySQL 8.4 runs separately. The existing host installer is an independent deployment option. These application images do not manage Docker or host directories. -The published 1.2.0 pair is `1.2.0-moodle4.5.15-php8.3` and `1.2.0-moodle4.5.15-nginx-r1`. Use the corrected `nginx-r1` companion: the original nginx tag contains a Windows CRLF health response that fails Docker's health check. The `dev-*` tags below identify local source builds. Runtime verification covers Linux amd64; other architectures require their own build and installation checks. +The 1.2.1 security pair is `1.2.1-moodle4.5.15-php8.3` and `1.2.1-moodle4.5.15-nginx`. The 1.2.0 pair predates the [mandatory PHP security baseline](RUNTIME_POLICY.md) and must be replaced for new installations; its historical nginx-r1 health correction does not update PHP. The `dev-*` tags identify local source builds. Runtime verification covers Linux amd64; other architectures require their own build and installation checks. ## Build and install with Compose -Run from the repository root on a Linux Docker host with Compose v2+. Docker Desktop can build/test the images; production secret-file ownership examples assume Linux. To use the published pair, export the image references and copy the configuration example: +Run from the repository root on a Linux Docker host with Compose v2+. Docker Desktop can build/test the images; production secret-file ownership examples assume Linux. Select the 1.2.1 pair and copy the configuration example: + +Use the matching versioned references below after confirming the release and registry tags. To build locally, use the alternative development-tag commands. ```bash -export MOOSHIP_APP_IMAGE=shellharbor/mooship:1.2.0-moodle4.5.15-php8.3 -export MOOSHIP_WEB_IMAGE=shellharbor/mooship:1.2.0-moodle4.5.15-nginx-r1 +export MOOSHIP_APP_IMAGE=shellharbor/mooship:1.2.1-moodle4.5.15-php8.3 +export MOOSHIP_WEB_IMAGE=shellharbor/mooship:1.2.1-moodle4.5.15-nginx cp docker/.env.example docker/.env ``` @@ -125,6 +127,7 @@ Assess image impact whenever behavior, dependencies, or configuration changes. T | Root `Dockerfile`, its downloaded Moodle source, base images or extension pins | Trace affected stages; shared Moodle code changes require matching `app` and `web` builds. Update Moodle version, commit and archive hash together. | | `docker/*.php`, app entrypoint, cron, health check, FPM settings, `moodle/.config/php/mooship.ini` | These are copied into `app`; rebuild it when these inputs change. | | `docker/nginx.conf.template`, `docker/web-entrypoint.sh`, `docker/health.txt` | These are copied into `web`; rebuild it when these inputs change. | +| `moodle/.docker/php/runtime-policy.json`, `check-runtime.php`, patched PHP bases | Shared security contract: synchronize host PHP/cron templates and standalone app/source stages, then rebuild affected targets and verify actual patch floors. The web target uses the checked source stage. | | `.dockerignore` or newly added runtime files | Verify the required inputs enter the build context and are copied into the correct target. | | Compose, Kubernetes manifests, environment examples | Usually external to the images; validate configuration and runtime compatibility. Rebuild only if image contents or their startup contract also need changes. | | Host installer, lifecycle utilities, `lib/`, other host templates, documentation | Not copied into the standalone images. Check whether the behavior also needs a corresponding runtime change; otherwise no image rebuild is needed. | diff --git a/docs/PREFLIGHT.md b/docs/PREFLIGHT.md index 189cd94..4762960 100644 --- a/docs/PREFLIGHT.md +++ b/docs/PREFLIGHT.md @@ -38,7 +38,7 @@ After Moodle code/config generation, validate and reload nginx so a newly select `tests/test_preflight.py` covers invalid/occupied/duplicate ports, native endpoint selection, secret transport, bounded health transitions and installation refusal. Opt-in `tests/test_native_preflight.py` publishes a disposable synthetic PostgreSQL/MySQL DB on a random host port and checks real PHP host-gateway access, wrong credentials, empty/partial/installed states and an unavailable endpoint. Temporary host publications are needed for this test; these are not production databases. -The full E2E matrix installs Moodle 4.5/5.3 with PostgreSQL/MySQL and then checks native routing using its built PHP image. It also checks HTTP, Redis sessions, SMTP, cron, backup retention, systemd schedules and doctor. TLS issuance is outside the synthetic HTTP runner setup. +The full E2E matrix installs Moodle 4.3/4.5/5.3 with PostgreSQL/MySQL and then checks native routing using its built PHP image. It also checks HTTP, Redis sessions, SMTP, cron, backup retention, systemd schedules and doctor. TLS issuance is outside the synthetic HTTP runner setup. The synthetic E2E domain is resolved both on the runner and inside PHP. A dedicated internal test network gives nginxproxy that DNS alias, allowing Moodle 5.3's router status check to call its own wwwroot. Production domains must resolve from their application containers. E2E checks successful router/API responses and a real 404 before the final doctor gate. diff --git a/docs/PYTHON.md b/docs/PYTHON.md index c3df14f..bf31bbf 100644 --- a/docs/PYTHON.md +++ b/docs/PYTHON.md @@ -4,10 +4,12 @@ Install Mooship through pip or pipx, then use one command for its existing Moodl ## Install the CLI -Version 1.2.0 is published on [PyPI](https://pypi.org/project/mooship/1.2.0/). A reviewed checkout can also be installed with `pipx install .` or `python -m pip install .` in a virtual environment. For the published CLI: +Mooship 1.2.1 enforces the [mandatory PHP/Moodle security policy](https://github.com/shellharbor/mooship/blob/main/docs/RUNTIME_POLICY.md). Upgrade both the CLI and native toolkit from 1.2.0. The CLI rejects deployment, activation and restore using pre-policy toolkits while retaining backup/diagnostic access. + +Get version 1.2.1 from [PyPI](https://pypi.org/project/mooship/1.2.1/). A reviewed checkout can also be installed with `pipx install .` or `python -m pip install .` in a virtual environment. For the published CLI: ```bash -pipx install mooship==1.2.0 +pipx install mooship==1.2.1 mooship --version mooship --help ``` @@ -19,14 +21,14 @@ Help and installation previews work without root. Server operations target Ubunt The CLI downloads an exact official GitHub release archive and its SHA-256 file over HTTPS, verifies the checksum, archive paths/types/limits and embedded VERSION, then installs into a new directory. Existing files/directories/symlinks are refused. A failed copy remains marked for inspection and cannot silently be reused. Checksums establish consistency with the release assets rather than an independent signature. ```bash -mooship install --version 1.2.0 --directory /opt/mooship --dry-run +mooship install --version 1.2.1 --directory /opt/mooship-1.2.1 --dry-run MOOSHIP_CLI="$(command -v mooship)" -sudo "$MOOSHIP_CLI" install --version 1.2.0 -mooship toolkit-version -sudo "$MOOSHIP_CLI" deploy -- \ +sudo "$MOOSHIP_CLI" install --version 1.2.1 --directory /opt/mooship-1.2.1 +mooship toolkit-version --directory /opt/mooship-1.2.1 +sudo "$MOOSHIP_CLI" deploy --directory /opt/mooship-1.2.1 -- \ --slug lms --domain lms.example.com --db-type postgres --ssl-email admin@example.com -sudo "$MOOSHIP_CLI" doctor -- --slug lms -sudo "$MOOSHIP_CLI" backup -- --slug lms +sudo "$MOOSHIP_CLI" doctor --directory /opt/mooship-1.2.1 -- --slug lms +sudo "$MOOSHIP_CLI" backup --directory /opt/mooship-1.2.1 -- --slug lms ``` Default directory: `/opt/mooship`; its parent must exist. Use `--directory /absolute/path` before `--` for another installation or a complete reviewed checkout containing VERSION. The CLI never escalates privileges implicitly; underlying scripts retain their root checks, confirmation prompts and operational contracts. diff --git a/docs/RELEASING.md b/docs/RELEASING.md index db4799e..d8f256c 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -2,6 +2,8 @@ Mooship 1.2.0 introduces a dependency-free Python CLI and the standalone Moodle/PHP and nginx images. The host toolkit, Python distribution and image metadata use root VERSION. A new version never changes old tags, existing installations, databases or volumes. +Security release 1.2.1 applies the [runtime security baseline](RUNTIME_POLICY.md). Before publishing, verify exact PHP patch floors, compatible Moodle versions, both rebuilt targets, lifecycle regressions and all six E2E cases. Do not republish an old immutable tag as a security fix. + ## Prepare and verify 1. Update VERSION and release documentation, keeping Docker image tags and the pinned Moodle/PHP pair consistent. Build/test the package and the affected images according to [Python](PYTHON.md) and [Docker](DOCKER.md). @@ -17,8 +19,8 @@ The Docker Hub repository is **shellharbor/mooship**. Configure repository varia The release job checks out the verified commit, builds Linux amd64 `app` and `web`, runs real Moodle installs with PostgreSQL and MySQL, then publishes: ```text -shellharbor/mooship:1.2.0-moodle4.5.15-php8.3 -shellharbor/mooship:1.2.0-moodle4.5.15-nginx +shellharbor/mooship:1.2.1-moodle4.5.15-php8.3 +shellharbor/mooship:1.2.1-moodle4.5.15-nginx ``` PHP and nginx must use the matching Moodle source. No `latest` alias or untested architecture is published. Record the resulting digests and prefer digest references in production. The [Docker guide](DOCKER.md#tests-and-later-publication) also supports a checked manual publication using an existing local Docker login; always set MOOSHIP_VERSION and VCS_REF to the release version and exact source commit. diff --git a/docs/RUNTIME_POLICY.md b/docs/RUNTIME_POLICY.md new file mode 100644 index 0000000..f2d30d5 --- /dev/null +++ b/docs/RUNTIME_POLICY.md @@ -0,0 +1,32 @@ +# Moodle and PHP security policy + +Mooship permits Moodle **4.3 or newer**, including 4.3, only on explicitly verified branches. PHP 8.1 and older are prohibited. Each permitted PHP branch must meet its own minimum patch version: + +| PHP branch | Minimum patch | Current Moodle branches permitted by Mooship | +|---|---|---| +| 8.2 | 8.2.35 | 4.3, 4.4, 4.5, 5.0, 5.1 | +| 8.3 | 8.3.36 | 4.4, 4.5, 5.0, 5.1, 5.2, 5.3 | +| 8.4 | 8.4.27 | 5.0, 5.1, 5.2, 5.3 | +| 8.5 | 8.5.12 | None verified yet; do not deploy this branch | + +The patch floors address CVE-2026-109618 and CVE-2026-109619. See the [PHP changelog](https://www.php.net/ChangeLog-8.php) and [AWS security bulletin](https://aws.amazon.com/security/security-bulletins/2026-143-aws/). The compatibility matrix follows the [official Moodle PHP policy](https://moodledev.io/general/development/policies/php) and individual release requirements. A security-patched PHP version still needs Moodle compatibility. Newer unknown branches and prereleases fail closed until reviewed. This compatibility list does not guarantee ongoing upstream support for every Moodle branch; use a maintained Moodle release and current plugins. + +## Enforcement + +- The canonical machine-readable policy is [runtime-policy.json](../moodle/.docker/php/runtime-policy.json). [runtime_policy.py](../lib/runtime_policy.py) validates installer arguments before creating resources and checks the actual PHP patch version. +- Host templates pin PHP 8.2.35, 8.3.36 and 8.4.27 by tag and digest. PHP 7.4/8.0/8.1 templates and INI files have been removed. `--php-version` selects an allowed branch (`8.2` or `82`), never an arbitrary image or patch override. +- Host PHP/cron images and the standalone image run [check-runtime.php](../moodle/.docker/php/check-runtime.php) during build and startup. It reads the real `PHP_VERSION`; environment variables cannot lower the floor. Standalone builds also validate the pinned Moodle/PHP pair, including when `PHP_IMAGE` is overridden. +- Activation rebuilds PHP/cron with `--pull` and probes actual PHP before starting the site's services. Restoration validates saved Moodle/PHP metadata before confirmation or database creation/import, then builds and probes PHP before import/startup. Both read the actual Moodle release from `public_html/version.php` or `public_html/public/version.php` as data and reject source/metadata disagreement; update `.env` after a reviewed manual upgrade. Missing metadata/source is rejected. Pure HTML sites remain supported. +- The Python adapter refuses deploy/activate/restore with toolkits that lack the policy. Backup, diagnostics, deactivation and removal remain available for migration. No command upgrades Moodle core or an existing database automatically. + +## Existing installations and published artifacts + +The published Mooship **1.2.0** PHP image and native toolkit predate this policy. Do not use them for a new installation. The 1.2.0 nginx-r1 health-check correction does not update PHP. PyPI 1.2.0 likewise does not enforce this policy. Upgrade to **1.2.1 or newer**, including both the Python CLI and native toolkit. Verify availability through the [GitHub release](https://github.com/shellharbor/mooship/releases/tag/v1.2.1), [PyPI](https://pypi.org/project/mooship/1.2.1/) and matching Docker Hub tags; a source VERSION alone is not publication evidence. + +For a standalone installation, build and test both updated targets using [the Docker guide](DOCKER.md), back up the database and data, then replace the matching PHP/nginx pair. Confirm `php -r 'echo PHP_VERSION;'` and readiness on the replacement. Upgrading PHP alone does not require or authorize a Moodle schema upgrade. + +For host-managed sites, make a verified backup first. Update the site's saved `.docker/php/` templates and policy/entrypoint files from the reviewed toolkit, and keep `.env`, the PHP Dockerfile and INI selection consistent with its Moodle branch. Build PHP and cron with `docker compose build --pull php cron`, verify the runtime, then perform a controlled restart and readiness checks. Existing backups retain their saved templates; restore refuses unsafe runtimes. Migrate unsupported Moodle versions using Moodle's supported upgrade path before activating them with this toolkit. Keep backup/diagnostic access available throughout migration. + +## Maintaining the rule + +Never lower these floors or restore PHP 8.1/older or Moodle below 4.3. For a PHP update, verify official patch releases and Moodle compatibility, update the policy plus all affected Dockerfile tags/digests, test rejection boundaries and lifecycle gates, rebuild affected PHP/cron/app/web targets, and run real runtime/installation checks. Keep documentation, AI instructions and distribution artifacts synchronized; publication is a separate step. See [ADR-0007](adr/0007-runtime-security-baseline.md). diff --git a/docs/adr/0007-runtime-security-baseline.md b/docs/adr/0007-runtime-security-baseline.md new file mode 100644 index 0000000..a557e15 --- /dev/null +++ b/docs/adr/0007-runtime-security-baseline.md @@ -0,0 +1,17 @@ +# ADR-0007: Enforce a shared Moodle/PHP security baseline + +Status: accepted, 2026-10-28. + +## Context + +CVE-2026-109618 and CVE-2026-109619 require PHP patch floors 8.2.35, 8.3.36, 8.4.27 and 8.5.12. The owner prohibits PHP 8.1 and older and Moodle below 4.3. Previously, old templates and manual PHP selection could bypass compatibility recommendations; activation and restoration reused saved runtimes. Published 1.2.0 artifacts predate these requirements. + +## Decision + +Store floors, allowed Moodle/PHP pairs and defaults in one JSON policy distributed with both the host toolkit and standalone images. Enforce selection in the installer and lifecycle operations using standard-library Python; enforce the actual PHP runtime at build and startup using PHP. Pin all host bases by patch and digest. Remove prohibited legacy templates. Reject unknown branches and incompatible pairs, including patched PHP 8.5 until Moodle supports it. Keep backup/diagnostic/deactivation/removal access available for migration. Require updated toolkit policy assets from the Python adapter for deployment, activation and restore. + +## Alternatives and consequences + +Documentation alone leaves unsafe execution paths. Floating minor tags can retain vulnerable cached runtimes. Checking only `.env` misses stale images. A flat numeric minimum would incorrectly admit PHP 8.3.35 because it is greater than 8.2.35. Per-branch floors plus probes avoid these failures; build/startup guards cover direct image use. + +Unknown future branches require an explicit policy update. Existing installations and backups need a reviewed migration and rebuild; they are not silently rewritten. The policy does not assert security support for old Moodle branches or patch downloaded Moodle core. Published immutable artifacts need a new release. Tests cover negative boundaries and lifecycle order as well as successful real installs. See [the operational policy](../RUNTIME_POLICY.md). diff --git a/examples/04-explicit-php-version.sh b/examples/04-explicit-php-version.sh index c2dc481..dfc569a 100644 --- a/examples/04-explicit-php-version.sh +++ b/examples/04-explicit-php-version.sh @@ -7,18 +7,18 @@ set -euo pipefail # Scenario: # Use a specific PHP version instead of the script's automatic selection # (for example, for compatibility with third-party plugins). -# Moodle 4.4 defaults to PHP 8.2; this example uses 8.1. +# Moodle 4.5 defaults to PHP 8.3; this example uses patched PHP 8.2. # # Result: # - project /var/www/school, site https://school.example.com -# - Moodle 4.4.0 + PHP 8.1 (image from moodle/.docker/php/php81.Dockerfile, -# settings from moodle/.config/php/php81.ini) +# - Moodle 4.5.15 + PHP 8.2 (image from moodle/.docker/php/php82.Dockerfile, +# settings from moodle/.config/php/php82.ini) # # Before running, replace: # - school / school.example.com → your slug and domain -# - 4.4.0 / 8.1 → your versions. PHP 7.4 and 8.0–8.4 are available (format: 8.1 or 81). -# The script DOES NOT check PHP/Moodle version compatibility; if they -# are incompatible, the installation environment check will fail. +# - 4.5.15 / 8.2 → your versions. Only patched PHP 8.2–8.4 are available (format: 8.2 or 82). +# The script checks PHP/Moodle version compatibility; incompatible pairs +# are rejected before creating deployment resources. # - admin@example.com → your email # # Run on the server from the mooship directory (for example, /opt/mooship): @@ -32,7 +32,7 @@ DEPLOY_DIR="${DEPLOY_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" sudo bash "$DEPLOY_DIR/deploy-moodle.sh" \ --slug school \ --domain school.example.com \ - --moodle-version 4.4.0 \ - --php-version 8.1 \ + --moodle-version 4.5.15 \ + --php-version 8.2 \ --db-type postgres \ --ssl-email admin@example.com diff --git a/examples/README.md b/examples/README.md index 10542f8..bae1569 100644 --- a/examples/README.md +++ b/examples/README.md @@ -24,7 +24,7 @@ For reinstallation, create a full backup first, then confirm `remove.sh` separat | [01-minimal-postgres.sh](01-minimal-postgres.sh) | Minimal invocation: a generated slug is added to the domain (wildcard DNS required) | `--domain` `--db-type postgres` `--ssl-email` | | [02-mysql-explicit-slug.sh](02-mysql-explicit-slug.sh) | Containerized MySQL with an explicit slug | `--slug lms` `--db-type mysql` | | [03-moodle-5-version.sh](03-moodle-5-version.sh) | The newest Moodle 5.3.x: PHP 8.4 is selected automatically, and nginx's document root switches to `public/` | `--moodle-version 5.3` | -| [04-explicit-php-version.sh](04-explicit-php-version.sh) | An explicit PHP version instead of automatic selection | `--moodle-version 4.4.0` `--php-version 8.1` | +| [04-explicit-php-version.sh](04-explicit-php-version.sh) | An explicit PHP version instead of automatic selection | `--moodle-version 4.5.15` `--php-version 8.2` | | [05-custom-admin.sh](05-custom-admin.sh) | Custom administrator username, password, and email | `--moodle-admin-user` `--moodle-admin-password` `--moodle-admin-email` | | [06-site-names.sh](06-site-names.sh) | Full and short site names | `--moodle-site-fullname` `--moodle-site-shortname` | | [07-native-postgres.sh](07-native-postgres.sh) | Host PostgreSQL instead of a container (`172.17.0.1:5432`) | `--db-native` | diff --git a/lib/check-database.php b/lib/check-database.php index 9eea36a..f1dac1c 100644 --- a/lib/check-database.php +++ b/lib/check-database.php @@ -1,5 +1,5 @@ query("SELECT value FROM mdl_config WHERE name = 'version'")->fetchColumn()) { - fwrite(STDERR, "[ERROR] The database is partially installed; investigate before retrying.\n"); + file_put_contents('php://stderr', "[ERROR] The database is partially installed; investigate before retrying.\n"); exit(4); } } elseif ($mode !== 'connect') { @@ -38,7 +38,7 @@ } } catch (Throwable $error) { // Driver exceptions can contain connection details. Report a fixed actionable message. - fwrite(STDERR, "[ERROR] Database probe failed from PHP. Check the host, port, credentials, " + file_put_contents('php://stderr', "[ERROR] Database probe failed from PHP. Check the host, port, credentials, " . "listen_addresses/pg_hba.conf (PostgreSQL), bind-address/grants (MySQL), and firewall.\n"); exit(1); } diff --git a/lib/common.sh b/lib/common.sh index ae9a1f6..a9afede 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -1,4 +1,27 @@ #!/bin/bash + +# The policy belongs to this toolkit, never to an archived project's Dockerfiles. +mooship_runtime_selection() { + python3 "$SCRIPT_DIR/lib/runtime_policy.py" select "$1" "${2:-}" +} + +mooship_require_project_runtime() { + local directory="${1:-$PROJECT_DIR}" moodle php + moodle=$(mooship_read_env "$directory/.env" MOODLE_VERSION) + php=$(mooship_read_env "$directory/.env" PHP_VERSION) + mooship_runtime_selection "$moodle" "$php" >/dev/null || + mooship_die "Project/backup runtime is prohibited or unknown; migrate to Moodle 4.3+ and patched PHP first" + python3 "$SCRIPT_DIR/lib/runtime_policy.py" check-source "$directory/public_html" "$moodle" "$php" || + mooship_die "Installed Moodle does not satisfy the runtime policy or saved metadata" +} + +mooship_verify_project_php() { + local actual moodle + actual=$(docker compose run --rm -T --no-deps --entrypoint php php -r 'echo PHP_VERSION;') || return 1 + moodle=$(mooship_read_env "$PROJECT_DIR/.env" MOODLE_VERSION) + python3 "$SCRIPT_DIR/lib/runtime_policy.py" check-runtime "$moodle" "$actual" || + mooship_die "Built PHP runtime is prohibited; rebuild with the patched Mooship templates before starting services" +} # Shared safety boundaries for Mooship's host scripts. mooship_die() { printf '[ERROR] %s\n' "$*" >&2; exit 1; } diff --git a/lib/runtime_policy.py b/lib/runtime_policy.py new file mode 100644 index 0000000..ed7da1e --- /dev/null +++ b/lib/runtime_policy.py @@ -0,0 +1,82 @@ +"""Enforce the PHP security floor and verified Moodle compatibility before deployment.""" + +import json +from pathlib import Path +import re +import sys +from typing import Any, Dict, Optional, Tuple + +POLICY_PATH = Path(__file__).resolve().parents[1] / "moodle/.docker/php/runtime-policy.json" + + +def version(value: str) -> Tuple[int, ...]: + if not re.fullmatch(r"(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:\.(?:0|[1-9][0-9]*))?", value): + raise ValueError("Use a stable numeric version: X.Y or X.Y.Z") + numbers = tuple(map(int, value.split("."))) + return numbers + (0,) * (3 - len(numbers)) + + +def select(moodle: str, php: str = "", policy: Optional[Dict[str, Any]] = None) -> str: + policy = policy or json.loads(POLICY_PATH.read_text(encoding="utf-8")) + if version(moodle) < version(policy["minimum_moodle"]): + raise ValueError("Moodle below 4.3 is prohibited by the PHP security policy") + branch = ".".join(moodle.split(".")[:2]) + if branch not in policy["moodle_php"]: + raise ValueError("Unverified Moodle branch; update the compatibility policy before deployment") + php = {"82": "8.2", "83": "8.3", "84": "8.4", "85": "8.5"}.get(php, php) + php = php or policy["default_php"][branch] + if php not in policy["minimum_php"]: + raise ValueError("PHP 8.1 and older are prohibited; select a supported X.Y branch, not a patch override") + if php not in policy["moodle_php"][branch]: + raise ValueError(f"PHP {php} is not supported by Moodle {branch}") + return php + + +def check_php(php: str, policy: Optional[Dict[str, Any]] = None) -> None: + policy = policy or json.loads(POLICY_PATH.read_text(encoding="utf-8")) + if not re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", php): + raise ValueError("Cannot verify a stable PHP patch version") + branch = ".".join(php.split(".")[:2]) + floor = policy["minimum_php"].get(branch) + if floor is None or version(php) < version(floor): + raise ValueError(f"PHP {php} is prohibited; required floors: " + ", ".join(policy["minimum_php"].values())) + + +def check_source(directory: Path, expected: str, php: str = "") -> str: + """Read official release metadata as data, without executing project PHP.""" + candidates = (directory / "public/version.php", directory / "version.php") + source = next((path for path in candidates if path.is_file() and not path.is_symlink()), None) + if source is None: + raise ValueError("Cannot verify installed Moodle: version.php is missing") + text = source.read_text(encoding="utf-8") + releases = re.findall(r"^\s*\$release\s*=\s*(['\"])([0-9]+\.[0-9]+(?:\.[0-9]+)?)(?:[ \t][^'\"\r\n]*)?\1\s*;", text, re.MULTILINE) + if len(releases) != 1: + raise ValueError("Cannot verify a stable Moodle release from version.php") + actual = releases[0][1] + select(actual, php) + if version(actual) != version(expected): + raise ValueError(f"Moodle source/metadata mismatch: source {actual}, .env {expected}; review the upgrade before startup") + return actual + + +def main() -> int: + try: + if len(sys.argv) == 3 and sys.argv[1] == "check-php": + check_php(sys.argv[2]) + elif len(sys.argv) == 4 and sys.argv[1] == "check-runtime": + check_php(sys.argv[3]) + select(sys.argv[2], ".".join(sys.argv[3].split(".")[:2])) + elif len(sys.argv) in (3, 4) and sys.argv[1] == "select": + print(select(sys.argv[2], sys.argv[3] if len(sys.argv) == 4 else "").replace(".", "")) + elif len(sys.argv) in (4, 5) and sys.argv[1] == "check-source": + check_source(Path(sys.argv[2]), sys.argv[3], sys.argv[4] if len(sys.argv) == 5 else "") + else: + raise ValueError("Usage: runtime_policy.py select MOODLE [PHP] | check-php X.Y.Z | check-runtime MOODLE X.Y.Z") + except (ValueError, OSError, KeyError) as error: + print(f"[ERROR] {error}", file=sys.stderr) + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/moodle/.config/php/php74.ini b/moodle/.config/php/php74.ini deleted file mode 100644 index edea972..0000000 --- a/moodle/.config/php/php74.ini +++ /dev/null @@ -1,1947 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (usually C:\windows) -; See the PHP docs for more specific information. -; http://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; http://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it is -; much more verbose when it comes to errors. We recommend using the -; development version only in development environments, as errors shown to -; application users can inadvertently leak otherwise secure information. - -; This is the php.ini-production INI file. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: Off -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.sid_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to an empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; Note: if open_basedir is set, the cache is disabled -; http://php.net/realpath-cache-size -;realpath_cache_size = 4096k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -; Default: "" -;zend.script_encoding = - -; Allows to include or exclude arguments from stack traces generated for exceptions. -; In production, it is recommended to turn this setting on to prohibit the output -; of sensitive information in stack traces -; Default: Off -zend.exception_ignore_args = On - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = On - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 60 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -max_input_vars = 5000 - -; Maximum amount of memory a script may consume -; http://php.net/memory-limit -memory_limit = 128M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it is automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; For production environments, we recommend logging errors rather than -; sending them to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. We strongly recommend you -; set this to 'off' for production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This is only effective in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; This directive is DEPRECATED. -; Default Value: Off -; Development Value: Off -; Production Value: Off -; http://php.net/track-errors -;track_errors = Off - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; http://php.net/html-errors -;html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on Windows). -;error_log = syslog - -; The syslog ident is a string which is prepended to every message logged -; to syslog. Only used when error_log is set to syslog. -;syslog.ident = php - -; The syslog facility is used to specify what type of program is logging -; the message. Only used when error_log is set to syslog. -;syslog.facility = user - -; Set this to disable filtering control characters (the default). -; Some loggers only accept NVT-ASCII, others accept anything that's not -; control characters. If your logger accepts everything, then no filtering -; is needed at all. -; Allowed values are: -; ascii (all printable ASCII characters and NL) -; no-ctrl (all characters except control characters) -; all (all characters) -; raw (like "all", but messages are not split at newlines) -; http://php.net/syslog.filter -;syslog.filter = ascii - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P & C) should be -; registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive -; are specified in the same manner as the variables_order directive, -; EXCEPT one. Leaving this value empty will cause PHP to use the value set -; in the variables_order directive. It does not mean it will leave the super -; globals array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any effect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -post_max_size = 8M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a media type using the Content-Type header. To -; disable this, simply set it to be empty. -; -; PHP's built-in default media type is set to text/html. -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to UTF-8. -; http://php.net/default-charset -default_charset = "UTF-8" - -; PHP internal character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/internal-encoding -;internal_encoding = - -; PHP input character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/input-encoding -;input_encoding = - -; PHP output character encoding is set to empty. -; If empty, default_charset is used. -; See also output_buffer. -; http://php.net/output-encoding -;output_encoding = - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -;extension_dir = "./" -; On windows: -;extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -;sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside -; of the web tree and people will not be able to circumvent .htaccess security. -;cgi.discard_path=1 - -; FastCGI under IIS supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If set to 0, PHP sends Status: header that -; is supported by Apache. When this option is set to 1, PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! -; (shebang) at the top of the running script. This line might be needed if the -; script support running both as stand-alone script and via PHP CGI<. PHP in CGI -; mode skips this line and ignores its content if this directive is turned on. -; http://php.net/cgi.check-shebang-line -;cgi.check_shebang_line=1 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename -; -; For example: -; -; extension=mysqli -; -; When the extension library to load is not located in the default extension -; directory, You may specify an absolute path to the library file: -; -; extension=/path/to/extension/mysqli.so -; -; Note : The syntax used in previous PHP versions ('extension=.so' and -; 'extension='php_.dll') is supported for legacy reasons and may be -; deprecated in a future PHP major version. So, when it is possible, please -; move to the new ('extension=) syntax. -; -; Notes for Windows environments : -; -; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) -; extension folders as well as the separate PECL DLL download (PHP 5+). -; Be sure to appropriately set the extension_dir directive. -; -;extension=bz2 -;extension=curl -;extension=ffi -;extension=ftp -;extension=fileinfo -;extension=gd2 -;extension=gettext -;extension=gmp -;extension=intl -;extension=imap -;extension=ldap -;extension=mbstring -;extension=exif ; Must be after mbstring as it depends on it -;extension=mysqli -;extension=oci8_12c ; Use with Oracle Database 12c Instant Client -;extension=odbc -;extension=openssl -;extension=pdo_firebird -;extension=pdo_mysql -;extension=pdo_oci -;extension=pdo_odbc -;extension=pdo_pgsql -;extension=pdo_sqlite -;extension=pgsql -;extension=shmop - -; The MIBS data available in the PHP distribution must be installed. -; See http://www.php.net/manual/en/snmp.installation.php -;extension=snmp - -;extension=soap -;extension=sockets -;extension=sodium -;extension=sqlite3 -;extension=tidy -;extension=xmlrpc -;extension=xsl - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -;date.timezone = - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -; Use of this INI entry is deprecated, use global input_encoding instead. -; If empty, default_charset or input_encoding or iconv.input_encoding is used. -; The precedence is: default_charset < input_encoding < iconv.input_encoding -;iconv.input_encoding = - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;iconv.internal_encoding = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; If empty, default_charset or output_encoding or iconv.output_encoding is used. -; The precedence is: default_charset < output_encoding < iconv.output_encoding -; To use an output encoding conversion, iconv's output handler must be set -; otherwise output encoding conversion cannot be performed. -;iconv.output_encoding = - -[imap] -; rsh/ssh logins are disabled by default. Use this INI entry if you want to -; enable them. Note that the IMAP library does not filter mailbox names before -; passing them to rsh/ssh command, thus passing untrusted data to this function -; with rsh/ssh enabled is insecure. -;imap.enable_insecure_rsh=0 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING -;intl.use_exceptions = 0 - -[sqlite3] -; Directory pointing to SQLite3 extensions -; http://php.net/sqlite3.extension-dir -;sqlite3.extension_dir = - -; SQLite defensive mode flag (only available from SQLite 3.26+) -; When the defensive flag is enabled, language features that allow ordinary -; SQL to deliberately corrupt the database file are disabled. This forbids -; writing directly to the schema, shadow tables (eg. FTS data tables), or -; the sqlite_dbpage virtual table. -; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html -; (for older SQLite versions, this flag has no use) -;sqlite3.defensive = 1 - -[Pcre] -; PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -; PCRE library recursion limit. -; Please note that if you set this value to a high number you may consume all -; the available process stack and eventually crash PHP (due to reaching the -; stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -; Enables or disables JIT compilation of patterns. This requires the PCRE -; library to be compiled with JIT support. -;pcre.jit=1 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Win32 only. -; http://php.net/smtp -SMTP = localhost -; http://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; http://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(). -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = Off - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog (Event Log on Windows). -;mail.log = syslog - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysqli_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysqli_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_memory_statistics = Off - -; Records communication from all extensions using mysqlnd to the specified log -; file. -; http://php.net/mysqlnd.debug -;mysqlnd.debug = - -; Defines which queries will be logged. -;mysqlnd.log_mask = 0 - -; Default size of the mysqlnd memory pool, which is used by result sets. -;mysqlnd.mempool_default_size = 16000 - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -;mysqlnd.net_read_buffer_size = 32768 - -; Timeout for network requests in seconds. -;mysqlnd.net_read_timeout = 31536000 - -; SHA-256 Authentication Plugin related. File with the MySQL server public RSA -; key. -;mysqlnd.sha256_server_public_key = - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; http://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; http://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; http://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; http://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; http://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; http://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; http://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if -; your OS has problems with many files in one directory, and is -; a more efficient layout for servers that handle many sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path -;session.save_path = "/tmp" - -; Whether to use strict session mode. -; Strict session mode does not accept an uninitialized session ID, and -; regenerates the session ID if the browser sends an uninitialized session ID. -; Strict mode protects applications from session fixation via a session adoption -; vulnerability. It is disabled by default for maximum compatibility, but -; enabling it is encouraged. -; https://wiki.php.net/rfc/strict_sessions -session.use_strict_mode = 0 - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the be-all and end-all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it -; inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) -; Current valid values are "Strict", "Lax" or "None". When using "None", -; make sure to include the quotes, as `none` is interpreted like `false` in ini files. -; https://tools.ietf.org/html/draft-west-first-party-cookies-07 -session.cookie_samesite = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; For high volume production servers, using a value of 1000 is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script is the equivalent of setting -; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users' security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Set session ID character length. This value could be between 22 to 256. -; Shorter length than default is supported only for compatibility reason. -; Users should use 32 or more chars. -; http://php.net/session.sid-length -; Default Value: 32 -; Development Value: 26 -; Production Value: 26 -session.sid_length = 26 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -;
is special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. tag's action attribute URL will not be modified -; unless it is specified. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=" -; Development Value: "a=href,area=href,frame=src,form=" -; Production Value: "a=href,area=href,frame=src,form=" -; http://php.net/url-rewriter.tags -session.trans_sid_tags = "a=href,area=href,frame=src,form=" - -; URL rewriter does not rewrite absolute URLs by default. -; To enable rewrites for absolute paths, target hosts must be specified -; at RUNTIME. i.e. use ini_set() -; tags is special. PHP will check action attribute's URL regardless -; of session.trans_sid_tags setting. -; If no host is defined, HTTP_HOST will be used for allowed host. -; Example value: php.net,www.php.net,wiki.php.net -; Use "," for multiple hosts. No spaces are allowed. -; Default Value: "" -; Development Value: "" -; Production Value: "" -;session.trans_sid_hosts="" - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.sid_bits_per_character = 5 - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -; Only write session data when session data is changed. Enabled by default. -; http://php.net/session.lazy-write -;session.lazy_write = On - -[Assertion] -; Switch whether to compile assertions at all (to have no overhead at run-time) -; -1: Do not compile at all -; 0: Jump over assertion at run-time -; 1: Execute assertions -; 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) -; Default Value: 1 -; Development Value: 1 -; Production Value: -1 -; http://php.net/zend.assertions -zend.assertions = -1 - -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Throw an AssertionError on failed assertions -; http://php.net/assert.exception -;assert.exception = On - -; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a component's typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -[mbstring] -; language for internal character representation. -; This affects mb_send_mail() and mbstring.detect_order. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; internal/script encoding. -; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;mbstring.internal_encoding = - -; Use of this INI entry is deprecated, use global input_encoding instead. -; http input encoding. -; mbstring.encoding_translation = On is needed to use this setting. -; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < input_encoding < mbstring.http_input -; http://php.net/mbstring.http-input -;mbstring.http_input = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; http output encoding. -; mb_output_handler must be registered as output buffer to function. -; If empty, default_charset or output_encoding or mbstring.http_output is used. -; The precedence is: default_charset < output_encoding < mbstring.http_output -; To use an output encoding conversion, mbstring's output handler must be set -; otherwise output encoding conversion cannot be performed. -; http://php.net/mbstring.http-output -;mbstring.http_output = - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; "auto" detect order is changed according to mbstring.language -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -; Default: Off -;mbstring.strict_detection = On - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -; This directive specifies maximum stack depth for mbstring regular expressions. It is similar -; to the pcre.recursion_limit for PCRE. -; Default: 100000 -;mbstring.regex_stack_limit=100000 - -; This directive specifies maximum retry count for mbstring regular expressions. It is similar -; to the pcre.backtrack_limit for PCRE. -; Default: 1000000 -;mbstring.regex_retry_limit=1000000 - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 1 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -;opcache.enable=1 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -;opcache.memory_consumption=128 - -; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=8 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 1000000 are allowed. -;opcache.max_accelerated_files=10000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0x7FFFBFFF - -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Mapping base of shared memory segments (for Windows only). All the PHP -; processes have to map shared memory into the same address space. This -; directive allows to manually fix the "Unable to reattach to base address" -; errors. -;opcache.mmap_base= - -; Facilitates multiple OPcache instances per user (for Windows only). All PHP -; processes with the same cache ID and user share an OPcache instance. -;opcache.cache_id= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Implies opcache.file_cache_only=1 for a certain process that failed to -; reattach to the shared memory (for Windows only). Explicitly enabled file -; cache is required. -;opcache.file_cache_fallback=1 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -;opcache.huge_code_pages=1 - -; Validate cached file permissions. -;opcache.validate_permission=0 - -; Prevent name collisions in chroot'ed environment. -;opcache.validate_root=0 - -; If specified, it produces opcode dumps for debugging different stages of -; optimizations. -;opcache.opt_debug_level=0 - -; Specifies a PHP script that is going to be compiled and executed at server -; start-up. -; http://php.net/opcache.preload -;opcache.preload= - -; Preloading code as root is not allowed for security reasons. This directive -; facilitates to let the preloading to be run as another user. -; http://php.net/opcache.preload_user -;opcache.preload_user= - -; Prevents caching files that are less than this number of seconds old. It -; protects from caching of incompletely updated files. In case all file updates -; on your site are atomic, you may increase performance by setting it to "0". -;opcache.file_update_protection=2 - -; Absolute path used to store shared lockfiles (for *nix only). -;opcache.lockfile_path=/tmp - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -[openssl] -; The location of a Certificate Authority (CA) file on the local filesystem -; to use when verifying the identity of SSL/TLS peers. Most users should -; not specify a value for this directive as PHP will attempt to use the -; OS-managed cert stores in its absence. If specified, this value may still -; be overridden on a per-stream basis via the "cafile" SSL stream context -; option. -;openssl.cafile= - -; If openssl.cafile is not specified or if the CA file is not found, the -; directory pointed to by openssl.capath is searched for a suitable -; certificate. This value must be a correctly hashed certificate directory. -; Most users should not specify a value for this directive as PHP will -; attempt to use the OS-managed cert stores in its absence. If specified, -; this value may still be overridden on a per-stream basis via the "capath" -; SSL stream context option. -;openssl.capath= - -[ffi] -; FFI API restriction. Possible values: -; "preload" - enabled in CLI scripts and preloaded files (default) -; "false" - always disabled -; "true" - always enabled -;ffi.enable=preload - -; List of headers files to preload, wildcard patterns allowed. -;ffi.preload= diff --git a/moodle/.config/php/php80.ini b/moodle/.config/php/php80.ini deleted file mode 100644 index 98d3c58..0000000 --- a/moodle/.config/php/php80.ini +++ /dev/null @@ -1,1946 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (usually C:\windows) -; See the PHP docs for more specific information. -; http://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; http://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it is -; much more verbose when it comes to errors. We recommend using the -; development version only in development environments, as errors shown to -; application users can inadvertently leak otherwise secure information. - -; This is the php.ini-production INI file. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; - -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.sid_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -; zend.exception_ignore_args -; Default Value: Off -; Development Value: Off -; Production Value: On - -; zend.exception_string_param_max_len -; Default Value: 15 -; Development Value: 15 -; Production Value: 0 - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to an empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; Note: if open_basedir is set, the cache is disabled -; http://php.net/realpath-cache-size -;realpath_cache_size = 4096k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -;zend.script_encoding = - -; Allows to include or exclude arguments from stack traces generated for exceptions. -; In production, it is recommended to turn this setting on to prohibit the output -; of sensitive information in stack traces -; Default Value: Off -; Development Value: Off -; Production Value: On -zend.exception_ignore_args = On - -; Allows setting the maximum string length in an argument of a stringified stack trace -; to a value between 0 and 1000000. -; This has no effect when zend.exception_ignore_args is enabled. -; Default Value: 15 -; Development Value: 15 -; Production Value: 0 -; In production, it is recommended to set this to 0 to reduce the output -; of sensitive information in stack traces. -zend.exception_string_param_max_len = 0 - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = On - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 60 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -max_input_vars = 5000 - -; Maximum amount of memory a script may consume -; http://php.net/memory-limit -memory_limit = 128M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it is automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; For production environments, we recommend logging errors rather than -; sending them to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. We strongly recommend you set this to 'off' -; for production servers to avoid leaking configuration details. -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This is only effective in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is off by default. -;report_zend_debug = 0 - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; http://php.net/html-errors -;html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on Windows). -;error_log = syslog - -; The syslog ident is a string which is prepended to every message logged -; to syslog. Only used when error_log is set to syslog. -;syslog.ident = php - -; The syslog facility is used to specify what type of program is logging -; the message. Only used when error_log is set to syslog. -;syslog.facility = user - -; Set this to disable filtering control characters (the default). -; Some loggers only accept NVT-ASCII, others accept anything that's not -; control characters. If your logger accepts everything, then no filtering -; is needed at all. -; Allowed values are: -; ascii (all printable ASCII characters and NL) -; no-ctrl (all characters except control characters) -; all (all characters) -; raw (like "all", but messages are not split at newlines) -; http://php.net/syslog.filter -;syslog.filter = ascii - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P & C) should be -; registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive -; are specified in the same manner as the variables_order directive, -; EXCEPT one. Leaving this value empty will cause PHP to use the value set -; in the variables_order directive. It does not mean it will leave the super -; globals array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any effect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -post_max_size = 8M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a media type using the Content-Type header. To -; disable this, simply set it to be empty. -; -; PHP's built-in default media type is set to text/html. -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to UTF-8. -; http://php.net/default-charset -default_charset = "UTF-8" - -; PHP internal character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/internal-encoding -;internal_encoding = - -; PHP input character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/input-encoding -;input_encoding = - -; PHP output character encoding is set to empty. -; If empty, default_charset is used. -; See also output_buffer. -; http://php.net/output-encoding -;output_encoding = - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -;extension_dir = "./" -; On windows: -;extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -;sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside -; of the web tree and people will not be able to circumvent .htaccess security. -;cgi.discard_path=1 - -; FastCGI under IIS supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If set to 0, PHP sends Status: header that -; is supported by Apache. When this option is set to 1, PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! -; (shebang) at the top of the running script. This line might be needed if the -; script support running both as stand-alone script and via PHP CGI<. PHP in CGI -; mode skips this line and ignores its content if this directive is turned on. -; http://php.net/cgi.check-shebang-line -;cgi.check_shebang_line=1 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename -; -; For example: -; -; extension=mysqli -; -; When the extension library to load is not located in the default extension -; directory, You may specify an absolute path to the library file: -; -; extension=/path/to/extension/mysqli.so -; -; Note : The syntax used in previous PHP versions ('extension=.so' and -; 'extension='php_.dll') is supported for legacy reasons and may be -; deprecated in a future PHP major version. So, when it is possible, please -; move to the new ('extension=) syntax. -; -; Notes for Windows environments : -; -; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) -; extension folders as well as the separate PECL DLL download (PHP 5+). -; Be sure to appropriately set the extension_dir directive. -; -;extension=bz2 -;extension=curl -;extension=ffi -;extension=ftp -;extension=fileinfo -;extension=gd -;extension=gettext -;extension=gmp -;extension=intl -;extension=imap -;extension=ldap -;extension=mbstring -;extension=exif ; Must be after mbstring as it depends on it -;extension=mysqli -;extension=oci8_12c ; Use with Oracle Database 12c Instant Client -;extension=oci8_19 ; Use with Oracle Database 19 Instant Client -;extension=odbc -;extension=openssl -;extension=pdo_firebird -;extension=pdo_mysql -;extension=pdo_oci -;extension=pdo_odbc -;extension=pdo_pgsql -;extension=pdo_sqlite -;extension=pgsql -;extension=shmop - -; The MIBS data available in the PHP distribution must be installed. -; See http://www.php.net/manual/en/snmp.installation.php -;extension=snmp - -;extension=soap -;extension=sockets -;extension=sodium -;extension=sqlite3 -;extension=tidy -;extension=xsl - -;zend_extension=opcache - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -;date.timezone = - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.833333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.833333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -; Use of this INI entry is deprecated, use global input_encoding instead. -; If empty, default_charset or input_encoding or iconv.input_encoding is used. -; The precedence is: default_charset < input_encoding < iconv.input_encoding -;iconv.input_encoding = - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;iconv.internal_encoding = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; If empty, default_charset or output_encoding or iconv.output_encoding is used. -; The precedence is: default_charset < output_encoding < iconv.output_encoding -; To use an output encoding conversion, iconv's output handler must be set -; otherwise output encoding conversion cannot be performed. -;iconv.output_encoding = - -[imap] -; rsh/ssh logins are disabled by default. Use this INI entry if you want to -; enable them. Note that the IMAP library does not filter mailbox names before -; passing them to rsh/ssh command, thus passing untrusted data to this function -; with rsh/ssh enabled is insecure. -;imap.enable_insecure_rsh=0 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING -;intl.use_exceptions = 0 - -[sqlite3] -; Directory pointing to SQLite3 extensions -; http://php.net/sqlite3.extension-dir -;sqlite3.extension_dir = - -; SQLite defensive mode flag (only available from SQLite 3.26+) -; When the defensive flag is enabled, language features that allow ordinary -; SQL to deliberately corrupt the database file are disabled. This forbids -; writing directly to the schema, shadow tables (eg. FTS data tables), or -; the sqlite_dbpage virtual table. -; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html -; (for older SQLite versions, this flag has no use) -;sqlite3.defensive = 1 - -[Pcre] -; PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -; PCRE library recursion limit. -; Please note that if you set this value to a high number you may consume all -; the available process stack and eventually crash PHP (due to reaching the -; stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -; Enables or disables JIT compilation of patterns. This requires the PCRE -; library to be compiled with JIT support. -;pcre.jit=1 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -[Pdo_mysql] -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Win32 only. -; http://php.net/smtp -SMTP = localhost -; http://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; http://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(). -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = Off - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog (Event Log on Windows). -;mail.log = syslog - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysqli_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysqli_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_memory_statistics = Off - -; Records communication from all extensions using mysqlnd to the specified log -; file. -; http://php.net/mysqlnd.debug -;mysqlnd.debug = - -; Defines which queries will be logged. -;mysqlnd.log_mask = 0 - -; Default size of the mysqlnd memory pool, which is used by result sets. -;mysqlnd.mempool_default_size = 16000 - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -;mysqlnd.net_read_buffer_size = 32768 - -; Timeout for network requests in seconds. -;mysqlnd.net_read_timeout = 31536000 - -; SHA-256 Authentication Plugin related. File with the MySQL server public RSA -; key. -;mysqlnd.sha256_server_public_key = - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; http://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; http://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; http://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; http://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; http://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; http://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; http://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if -; your OS has problems with many files in one directory, and is -; a more efficient layout for servers that handle many sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path -;session.save_path = "/tmp" - -; Whether to use strict session mode. -; Strict session mode does not accept an uninitialized session ID, and -; regenerates the session ID if the browser sends an uninitialized session ID. -; Strict mode protects applications from session fixation via a session adoption -; vulnerability. It is disabled by default for maximum compatibility, but -; enabling it is encouraged. -; https://wiki.php.net/rfc/strict_sessions -session.use_strict_mode = 0 - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the be-all and end-all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it -; inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) -; Current valid values are "Strict", "Lax" or "None". When using "None", -; make sure to include the quotes, as `none` is interpreted like `false` in ini files. -; https://tools.ietf.org/html/draft-west-first-party-cookies-07 -session.cookie_samesite = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; For high volume production servers, using a value of 1000 is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script is the equivalent of setting -; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users' security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Set session ID character length. This value could be between 22 to 256. -; Shorter length than default is supported only for compatibility reason. -; Users should use 32 or more chars. -; http://php.net/session.sid-length -; Default Value: 32 -; Development Value: 26 -; Production Value: 26 -session.sid_length = 26 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; is special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. tag's action attribute URL will not be modified -; unless it is specified. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=" -; Development Value: "a=href,area=href,frame=src,form=" -; Production Value: "a=href,area=href,frame=src,form=" -; http://php.net/url-rewriter.tags -session.trans_sid_tags = "a=href,area=href,frame=src,form=" - -; URL rewriter does not rewrite absolute URLs by default. -; To enable rewrites for absolute paths, target hosts must be specified -; at RUNTIME. i.e. use ini_set() -; tags is special. PHP will check action attribute's URL regardless -; of session.trans_sid_tags setting. -; If no host is defined, HTTP_HOST will be used for allowed host. -; Example value: php.net,www.php.net,wiki.php.net -; Use "," for multiple hosts. No spaces are allowed. -; Default Value: "" -; Development Value: "" -; Production Value: "" -;session.trans_sid_hosts="" - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.sid_bits_per_character = 5 - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -; Only write session data when session data is changed. Enabled by default. -; http://php.net/session.lazy-write -;session.lazy_write = On - -[Assertion] -; Switch whether to compile assertions at all (to have no overhead at run-time) -; -1: Do not compile at all -; 0: Jump over assertion at run-time -; 1: Execute assertions -; 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) -; Default Value: 1 -; Development Value: 1 -; Production Value: -1 -; http://php.net/zend.assertions -zend.assertions = -1 - -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Throw an AssertionError on failed assertions -; http://php.net/assert.exception -;assert.exception = On - -; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a component's typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -; The version of the .NET framework to use. The value of the setting are the first three parts -; of the framework's version number, separated by dots, and prefixed with "v", e.g. "v4.0.30319". -;com.dotnet_version= - -[mbstring] -; language for internal character representation. -; This affects mb_send_mail() and mbstring.detect_order. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; internal/script encoding. -; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;mbstring.internal_encoding = - -; Use of this INI entry is deprecated, use global input_encoding instead. -; http input encoding. -; mbstring.encoding_translation = On is needed to use this setting. -; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < input_encoding < mbstring.http_input -; http://php.net/mbstring.http-input -;mbstring.http_input = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; http output encoding. -; mb_output_handler must be registered as output buffer to function. -; If empty, default_charset or output_encoding or mbstring.http_output is used. -; The precedence is: default_charset < output_encoding < mbstring.http_output -; To use an output encoding conversion, mbstring's output handler must be set -; otherwise output encoding conversion cannot be performed. -; http://php.net/mbstring.http-output -;mbstring.http_output = - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; "auto" detect order is changed according to mbstring.language -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; Enable strict encoding detection. -;mbstring.strict_detection = Off - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetypes=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetypes= - -; This directive specifies maximum stack depth for mbstring regular expressions. It is similar -; to the pcre.recursion_limit for PCRE. -;mbstring.regex_stack_limit=100000 - -; This directive specifies maximum retry count for mbstring regular expressions. It is similar -; to the pcre.backtrack_limit for PCRE. -;mbstring.regex_retry_limit=1000000 - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 1 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -;opcache.enable=1 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -;opcache.memory_consumption=128 - -; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=8 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 1000000 are allowed. -;opcache.max_accelerated_files=10000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; If enabled, compilation warnings (including notices and deprecations) will -; be recorded and replayed each time a file is included. Otherwise, compilation -; warnings will only be emitted when the file is first cached. -;opcache.record_warnings=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0x7FFFBFFF - -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Mapping base of shared memory segments (for Windows only). All the PHP -; processes have to map shared memory into the same address space. This -; directive allows to manually fix the "Unable to reattach to base address" -; errors. -;opcache.mmap_base= - -; Facilitates multiple OPcache instances per user (for Windows only). All PHP -; processes with the same cache ID and user share an OPcache instance. -;opcache.cache_id= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Implies opcache.file_cache_only=1 for a certain process that failed to -; reattach to the shared memory (for Windows only). Explicitly enabled file -; cache is required. -;opcache.file_cache_fallback=1 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -;opcache.huge_code_pages=1 - -; Validate cached file permissions. -;opcache.validate_permission=0 - -; Prevent name collisions in chroot'ed environment. -;opcache.validate_root=0 - -; If specified, it produces opcode dumps for debugging different stages of -; optimizations. -;opcache.opt_debug_level=0 - -; Specifies a PHP script that is going to be compiled and executed at server -; start-up. -; http://php.net/opcache.preload -;opcache.preload= - -; Preloading code as root is not allowed for security reasons. This directive -; facilitates to let the preloading to be run as another user. -; http://php.net/opcache.preload_user -;opcache.preload_user= - -; Prevents caching files that are less than this number of seconds old. It -; protects from caching of incompletely updated files. In case all file updates -; on your site are atomic, you may increase performance by setting it to "0". -;opcache.file_update_protection=2 - -; Absolute path used to store shared lockfiles (for *nix only). -;opcache.lockfile_path=/tmp - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -[openssl] -; The location of a Certificate Authority (CA) file on the local filesystem -; to use when verifying the identity of SSL/TLS peers. Most users should -; not specify a value for this directive as PHP will attempt to use the -; OS-managed cert stores in its absence. If specified, this value may still -; be overridden on a per-stream basis via the "cafile" SSL stream context -; option. -;openssl.cafile= - -; If openssl.cafile is not specified or if the CA file is not found, the -; directory pointed to by openssl.capath is searched for a suitable -; certificate. This value must be a correctly hashed certificate directory. -; Most users should not specify a value for this directive as PHP will -; attempt to use the OS-managed cert stores in its absence. If specified, -; this value may still be overridden on a per-stream basis via the "capath" -; SSL stream context option. -;openssl.capath= - -[ffi] -; FFI API restriction. Possible values: -; "preload" - enabled in CLI scripts and preloaded files (default) -; "false" - always disabled -; "true" - always enabled -;ffi.enable=preload - -; List of headers files to preload, wildcard patterns allowed. -;ffi.preload= diff --git a/moodle/.config/php/php81.ini b/moodle/.config/php/php81.ini deleted file mode 100644 index 4494d4b..0000000 --- a/moodle/.config/php/php81.ini +++ /dev/null @@ -1,1965 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;; -; About php.ini ; -;;;;;;;;;;;;;;;;;;; -; PHP's initialization file, generally called php.ini, is responsible for -; configuring many of the aspects of PHP's behavior. - -; PHP attempts to find and load this configuration from a number of locations. -; The following is a summary of its search order: -; 1. SAPI module specific location. -; 2. The PHPRC environment variable. (As of PHP 5.2.0) -; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) -; 4. Current working directory (except CLI) -; 5. The web server's directory (for SAPI modules), or directory of PHP -; (otherwise in Windows) -; 6. The directory from the --with-config-file-path compile time option, or the -; Windows directory (usually C:\windows) -; See the PHP docs for more specific information. -; https://php.net/configuration.file - -; The syntax of the file is extremely simple. Whitespace and lines -; beginning with a semicolon are silently ignored (as you probably guessed). -; Section headers (e.g. [Foo]) are also silently ignored, even though -; they might mean something in the future. - -; Directives following the section heading [PATH=/www/mysite] only -; apply to PHP files in the /www/mysite directory. Directives -; following the section heading [HOST=www.example.com] only apply to -; PHP files served from www.example.com. Directives set in these -; special sections cannot be overridden by user-defined INI files or -; at runtime. Currently, [PATH=] and [HOST=] sections only work under -; CGI/FastCGI. -; https://php.net/ini.sections - -; Directives are specified using the following syntax: -; directive = value -; Directive names are *case sensitive* - foo=bar is different from FOO=bar. -; Directives are variables used to configure PHP or PHP extensions. -; There is no name validation. If PHP can't find an expected -; directive because it is not set or is mistyped, a default value will be used. - -; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one -; of the INI constants (On, Off, True, False, Yes, No and None) or an expression -; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a -; previously set variable or directive (e.g. ${foo}) - -; Expressions in the INI file are limited to bitwise operators and parentheses: -; | bitwise OR -; ^ bitwise XOR -; & bitwise AND -; ~ bitwise NOT -; ! boolean NOT - -; Boolean flags can be turned on using the values 1, On, True or Yes. -; They can be turned off using the values 0, Off, False or No. - -; An empty string can be denoted by simply not writing anything after the equal -; sign, or by using the None keyword: - -; foo = ; sets foo to an empty string -; foo = None ; sets foo to an empty string -; foo = "None" ; sets foo to the string 'None' - -; If you use constants in your value, and these constants belong to a -; dynamically loaded extension (either a PHP extension or a Zend extension), -; you may only use these constants *after* the line that loads the extension. - -;;;;;;;;;;;;;;;;;;; -; About this file ; -;;;;;;;;;;;;;;;;;;; -; PHP comes packaged with two INI files. One that is recommended to be used -; in production environments and one that is recommended to be used in -; development environments. - -; php.ini-production contains settings which hold security, performance and -; best practices at its core. But please be aware, these settings may break -; compatibility with older or less security conscience applications. We -; recommending using the production ini in production and testing environments. - -; php.ini-development is very similar to its production variant, except it is -; much more verbose when it comes to errors. We recommend using the -; development version only in development environments, as errors shown to -; application users can inadvertently leak otherwise secure information. - -; This is the php.ini-production INI file. - -;;;;;;;;;;;;;;;;;;; -; Quick Reference ; -;;;;;;;;;;;;;;;;;;; - -; The following are all the settings which are different in either the production -; or development versions of the INIs with respect to PHP's default behavior. -; Please see the actual settings later in the document for more details as to why -; we recommend these changes in PHP's behavior. - -; display_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; display_startup_errors -; Default Value: On -; Development Value: On -; Production Value: Off - -; error_reporting -; Default Value: E_ALL -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT - -; log_errors -; Default Value: Off -; Development Value: On -; Production Value: On - -; max_input_time -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) - -; output_buffering -; Default Value: Off -; Development Value: 4096 -; Production Value: 4096 - -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - -; request_order -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" - -; session.gc_divisor -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 - -; session.sid_bits_per_character -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 - -; short_open_tag -; Default Value: On -; Development Value: Off -; Production Value: Off - -; variables_order -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS" - -; zend.exception_ignore_args -; Default Value: Off -; Development Value: Off -; Production Value: On - -; zend.exception_string_param_max_len -; Default Value: 15 -; Development Value: 15 -; Production Value: 0 - -;;;;;;;;;;;;;;;;;;;; -; php.ini Options ; -;;;;;;;;;;;;;;;;;;;; -; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" -;user_ini.filename = ".user.ini" - -; To disable this feature set this option to an empty value -;user_ini.filename = - -; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) -;user_ini.cache_ttl = 300 - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; https://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the would work. -; https://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; https://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; Note: if open_basedir is set, the cache is disabled -; https://php.net/realpath-cache-size -;realpath_cache_size = 4096k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; https://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 - -; Enables or disables the circular reference collector. -; https://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -;zend.script_encoding = - -; Allows to include or exclude arguments from stack traces generated for exceptions. -; In production, it is recommended to turn this setting on to prohibit the output -; of sensitive information in stack traces -; Default Value: Off -; Development Value: Off -; Production Value: On -zend.exception_ignore_args = On - -; Allows setting the maximum string length in an argument of a stringified stack trace -; to a value between 0 and 1000000. -; This has no effect when zend.exception_ignore_args is enabled. -; Default Value: 15 -; Development Value: 15 -; Production Value: 0 -; In production, it is recommended to set this to 0 to reduce the output -; of sensitive information in stack traces. -zend.exception_string_param_max_len = 0 - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; https://php.net/expose-php -expose_php = On - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; https://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 30 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; https://php.net/max-input-time -max_input_time = 60 - -; Maximum input variable nesting level -; https://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -max_input_vars = 5000 - -; How many multipart body parts (combined input variable and file uploads) may -; be accepted. -; Default Value: -1 (Sum of max_input_vars and max_file_uploads) -;max_multipart_body_parts = 1500 - -; Maximum amount of memory a script may consume -; https://php.net/memory-limit -memory_limit = 128M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it is automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL -; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; https://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; For production environments, we recommend logging errors rather than -; sending them to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; https://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. We strongly recommend you set this to 'off' -; for production servers to avoid leaking configuration details. -; Default Value: On -; Development Value: On -; Production Value: Off -; https://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; https://php.net/log-errors -log_errors = On - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; https://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; https://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This is only effective in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; https://php.net/report-memleaks -report_memleaks = On - -; This setting is off by default. -;report_zend_debug = 0 - -; Turn off normal error reporting and emit XML-RPC error XML -; https://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; https://php.net/html-errors -;html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from https://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; https://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; https://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; https://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; https://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; https://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog (Event Log on Windows). -;error_log = syslog - -; The syslog ident is a string which is prepended to every message logged -; to syslog. Only used when error_log is set to syslog. -;syslog.ident = php - -; The syslog facility is used to specify what type of program is logging -; the message. Only used when error_log is set to syslog. -;syslog.facility = user - -; Set this to disable filtering control characters (the default). -; Some loggers only accept NVT-ASCII, others accept anything that's not -; control characters. If your logger accepts everything, then no filtering -; is needed at all. -; Allowed values are: -; ascii (all printable ASCII characters and NL) -; no-ctrl (all characters except control characters) -; all (all characters) -; raw (like "all", but messages are not split at newlines) -; https://php.net/syslog.filter -;syslog.filter = ascii - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; https://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; https://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; https://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P & C) should be -; registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive -; are specified in the same manner as the variables_order directive, -; EXCEPT one. Leaving this value empty will cause PHP to use the value set -; in the variables_order directive. It does not mean it will leave the super -; globals array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; https://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; https://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any effect. -; https://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; https://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; https://php.net/post-max-size -post_max_size = 8M - -; Automatically add files before PHP document. -; https://php.net/auto-prepend-file -auto_prepend_file = - -; Automatically add files after PHP document. -; https://php.net/auto-append-file -auto_append_file = - -; By default, PHP will output a media type using the Content-Type header. To -; disable this, simply set it to be empty. -; -; PHP's built-in default media type is set to text/html. -; https://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to UTF-8. -; https://php.net/default-charset -default_charset = "UTF-8" - -; PHP internal character encoding is set to empty. -; If empty, default_charset is used. -; https://php.net/internal-encoding -;internal_encoding = - -; PHP input character encoding is set to empty. -; If empty, default_charset is used. -; https://php.net/input-encoding -;input_encoding = - -; PHP output character encoding is set to empty. -; If empty, default_charset is used. -; See also output_buffer. -; https://php.net/output-encoding -;output_encoding = - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; https://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; https://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; https://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; https://php.net/extension-dir -;extension_dir = "./" -; On windows: -;extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -;sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; https://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; https://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; https://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; https://php.net/cgi.fix-pathinfo -;cgi.fix_pathinfo=1 - -; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside -; of the web tree and people will not be able to circumvent .htaccess security. -;cgi.discard_path=1 - -; FastCGI under IIS supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; https://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If set to 0, PHP sends Status: header that -; is supported by Apache. When this option is set to 1, PHP will send -; RFC2616 compliant header. -; Default is zero. -; https://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! -; (shebang) at the top of the running script. This line might be needed if the -; script support running both as stand-alone script and via PHP CGI<. PHP in CGI -; mode skips this line and ignores its content if this directive is turned on. -; https://php.net/cgi.check-shebang-line -;cgi.check_shebang_line=1 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; https://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; https://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; https://php.net/upload-max-filesize -upload_max_filesize = 2M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; https://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like https:// or ftp://) as files. -; https://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; https://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; https://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; https://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; https://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename -; -; For example: -; -; extension=mysqli -; -; When the extension library to load is not located in the default extension -; directory, You may specify an absolute path to the library file: -; -; extension=/path/to/extension/mysqli.so -; -; Note : The syntax used in previous PHP versions ('extension=.so' and -; 'extension='php_.dll') is supported for legacy reasons and may be -; deprecated in a future PHP major version. So, when it is possible, please -; move to the new ('extension=) syntax. -; -; Notes for Windows environments : -; -; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) -; extension folders as well as the separate PECL DLL download (PHP 5+). -; Be sure to appropriately set the extension_dir directive. -; -;extension=bz2 - -; The ldap extension must be before curl if OpenSSL 1.0.2 and OpenLDAP is used -; otherwise it results in segfault when unloading after using SASL. -; See https://github.com/php/php-src/issues/8620 for more info. -;extension=ldap - -;extension=curl -;extension=ffi -;extension=ftp -;extension=fileinfo -;extension=gd -;extension=gettext -;extension=gmp -;extension=intl -;extension=imap -;extension=mbstring -;extension=exif ; Must be after mbstring as it depends on it -;extension=mysqli -;extension=oci8_12c ; Use with Oracle Database 12c Instant Client -;extension=oci8_19 ; Use with Oracle Database 19 Instant Client -;extension=odbc -;extension=openssl -;extension=pdo_firebird -;extension=pdo_mysql -;extension=pdo_oci -;extension=pdo_odbc -;extension=pdo_pgsql -;extension=pdo_sqlite -;extension=pgsql -;extension=shmop - -; The MIBS data available in the PHP distribution must be installed. -; See https://www.php.net/manual/en/snmp.installation.php -;extension=snmp - -;extension=soap -;extension=sockets -;extension=sodium -;extension=sqlite3 -;extension=tidy -;extension=xsl - -;zend_extension=opcache - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; https://php.net/date.timezone -;date.timezone = - -; https://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; https://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; https://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.833333 - -; https://php.net/date.sunset-zenith -;date.sunset_zenith = 90.833333 - -[filter] -; https://php.net/filter.default -;filter.default = unsafe_raw - -; https://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -; Use of this INI entry is deprecated, use global input_encoding instead. -; If empty, default_charset or input_encoding or iconv.input_encoding is used. -; The precedence is: default_charset < input_encoding < iconv.input_encoding -;iconv.input_encoding = - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;iconv.internal_encoding = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; If empty, default_charset or output_encoding or iconv.output_encoding is used. -; The precedence is: default_charset < output_encoding < iconv.output_encoding -; To use an output encoding conversion, iconv's output handler must be set -; otherwise output encoding conversion cannot be performed. -;iconv.output_encoding = - -[imap] -; rsh/ssh logins are disabled by default. Use this INI entry if you want to -; enable them. Note that the IMAP library does not filter mailbox names before -; passing them to rsh/ssh command, thus passing untrusted data to this function -; with rsh/ssh enabled is insecure. -;imap.enable_insecure_rsh=0 - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING -;intl.use_exceptions = 0 - -[sqlite3] -; Directory pointing to SQLite3 extensions -; https://php.net/sqlite3.extension-dir -;sqlite3.extension_dir = - -; SQLite defensive mode flag (only available from SQLite 3.26+) -; When the defensive flag is enabled, language features that allow ordinary -; SQL to deliberately corrupt the database file are disabled. This forbids -; writing directly to the schema, shadow tables (eg. FTS data tables), or -; the sqlite_dbpage virtual table. -; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html -; (for older SQLite versions, this flag has no use) -;sqlite3.defensive = 1 - -[Pcre] -; PCRE library backtracking limit. -; https://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -; PCRE library recursion limit. -; Please note that if you set this value to a high number you may consume all -; the available process stack and eventually crash PHP (due to reaching the -; stack size limit imposed by the Operating System). -; https://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -; Enables or disables JIT compilation of patterns. This requires the PCRE -; library to be compiled with JIT support. -;pcre.jit=1 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; https://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -[Pdo_mysql] -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -pdo_mysql.default_socket= - -[Phar] -; https://php.net/phar.readonly -;phar.readonly = On - -; https://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Win32 only. -; https://php.net/smtp -SMTP = localhost -; https://php.net/smtp-port -smtp_port = 25 - -; For Win32 only. -; https://php.net/sendmail-from -;sendmail_from = me@example.com - -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; https://php.net/sendmail-path -;sendmail_path = - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(). -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = Off - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog (Event Log on Windows). -;mail.log = syslog - -[ODBC] -; https://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; https://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; https://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; https://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; https://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; https://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; https://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; https://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; https://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; https://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; https://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; It allows the user to specify a folder where files that can be sent via LOAD DATA -; LOCAL can exist. It is ignored if mysqli.allow_local_infile is enabled. -;mysqli.local_infile_directory = - -; Allow or prevent persistent links. -; https://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; https://php.net/mysqli.max-links -mysqli.max_links = -1 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; https://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; https://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysqli_connect() (doesn't apply in safe mode). -; https://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysqli_connect() (doesn't apply in safe mode). -; https://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; https://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -; If this option is enabled, closing a persistent connection will rollback -; any pending transactions of this connection, before it is put back -; into the persistent connection pool. -;mysqli.rollback_on_cached_plink = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -mysqlnd.collect_memory_statistics = Off - -; Records communication from all extensions using mysqlnd to the specified log -; file. -; https://php.net/mysqlnd.debug -;mysqlnd.debug = - -; Defines which queries will be logged. -;mysqlnd.log_mask = 0 - -; Default size of the mysqlnd memory pool, which is used by result sets. -;mysqlnd.mempool_default_size = 16000 - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -;mysqlnd.net_read_buffer_size = 32768 - -; Timeout for network requests in seconds. -;mysqlnd.net_read_timeout = 31536000 - -; SHA-256 Authentication Plugin related. File with the MySQL server public RSA -; key. -;mysqlnd.sha256_server_public_key = - -[OCI8] - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; https://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; https://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; https://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; https://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle 11g Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; https://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables statement prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; https://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; https://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off - -[PostgreSQL] -; Allow or prevent persistent links. -; https://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; https://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; https://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; https://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; https://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; https://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[bcmath] -; Number of decimal digits for all bcmath functions. -; https://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; https://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; https://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if -; your OS has problems with many files in one directory, and is -; a more efficient layout for servers that handle many sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; https://php.net/session.save-path -;session.save_path = "/tmp" - -; Whether to use strict session mode. -; Strict session mode does not accept an uninitialized session ID, and -; regenerates the session ID if the browser sends an uninitialized session ID. -; Strict mode protects applications from session fixation via a session adoption -; vulnerability. It is disabled by default for maximum compatibility, but -; enabling it is encouraged. -; https://wiki.php.net/rfc/strict_sessions -session.use_strict_mode = 0 - -; Whether to use cookies. -; https://php.net/session.use-cookies -session.use_cookies = 1 - -; https://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the be-all and end-all of session hijacking defense, but it's a good start. -; https://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; https://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; https://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; https://php.net/session.cookie-lifetime -session.cookie_lifetime = 0 - -; The path for which the cookie is valid. -; https://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; https://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it -; inaccessible to browser scripting languages such as JavaScript. -; https://php.net/session.cookie-httponly -session.cookie_httponly = - -; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) -; Current valid values are "Strict", "Lax" or "None". When using "None", -; make sure to include the quotes, as `none` is interpreted like `false` in ini files. -; https://tools.ietf.org/html/draft-west-first-party-cookies-07 -session.cookie_samesite = - -; Handler used to serialize data. php is the standard serializer of PHP. -; https://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; https://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using gc_probability/gc_divisor, -; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. -; For high volume production servers, using a value of 1000 is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; https://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; https://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 1440 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script is the equivalent of setting -; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; https://php.net/session.referer-check -session.referer_check = - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; https://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; https://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users' security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; https://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Set session ID character length. This value could be between 22 to 256. -; Shorter length than default is supported only for compatibility reason. -; Users should use 32 or more chars. -; https://php.net/session.sid-length -; Default Value: 32 -; Development Value: 26 -; Production Value: 26 -session.sid_length = 26 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; is special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. tag's action attribute URL will not be modified -; unless it is specified. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=" -; Development Value: "a=href,area=href,frame=src,form=" -; Production Value: "a=href,area=href,frame=src,form=" -; https://php.net/url-rewriter.tags -session.trans_sid_tags = "a=href,area=href,frame=src,form=" - -; URL rewriter does not rewrite absolute URLs by default. -; To enable rewrites for absolute paths, target hosts must be specified -; at RUNTIME. i.e. use ini_set() -; tags is special. PHP will check action attribute's URL regardless -; of session.trans_sid_tags setting. -; If no host is defined, HTTP_HOST will be used for allowed host. -; Example value: php.net,www.php.net,wiki.php.net -; Use "," for multiple hosts. No spaces are allowed. -; Default Value: "" -; Development Value: "" -; Production Value: "" -;session.trans_sid_hosts="" - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; https://php.net/session.hash-bits-per-character -session.sid_bits_per_character = 5 - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; https://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; https://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; https://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; https://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; https://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; https://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -; Only write session data when session data is changed. Enabled by default. -; https://php.net/session.lazy-write -;session.lazy_write = On - -[Assertion] -; Switch whether to compile assertions at all (to have no overhead at run-time) -; -1: Do not compile at all -; 0: Jump over assertion at run-time -; 1: Execute assertions -; 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) -; Default Value: 1 -; Development Value: 1 -; Production Value: -1 -; https://php.net/zend.assertions -zend.assertions = -1 - -; Assert(expr); active by default. -; https://php.net/assert.active -;assert.active = On - -; Throw an AssertionError on failed assertions -; https://php.net/assert.exception -;assert.exception = On - -; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) -; https://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; https://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; https://php.net/assert.callback -;assert.callback = 0 - -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; https://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; https://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a component's typelib on com_load() -; https://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; https://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; https://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - -; The version of the .NET framework to use. The value of the setting are the first three parts -; of the framework's version number, separated by dots, and prefixed with "v", e.g. "v4.0.30319". -;com.dotnet_version= - -[mbstring] -; language for internal character representation. -; This affects mb_send_mail() and mbstring.detect_order. -; https://php.net/mbstring.language -;mbstring.language = Japanese - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; internal/script encoding. -; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;mbstring.internal_encoding = - -; Use of this INI entry is deprecated, use global input_encoding instead. -; http input encoding. -; mbstring.encoding_translation = On is needed to use this setting. -; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < input_encoding < mbstring.http_input -; https://php.net/mbstring.http-input -;mbstring.http_input = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; http output encoding. -; mb_output_handler must be registered as output buffer to function. -; If empty, default_charset or output_encoding or mbstring.http_output is used. -; The precedence is: default_charset < output_encoding < mbstring.http_output -; To use an output encoding conversion, mbstring's output handler must be set -; otherwise output encoding conversion cannot be performed. -; https://php.net/mbstring.http-output -;mbstring.http_output = - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; https://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; "auto" detect order is changed according to mbstring.language -; https://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; https://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; Enable strict encoding detection. -;mbstring.strict_detection = Off - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetypes=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetypes= - -; This directive specifies maximum stack depth for mbstring regular expressions. It is similar -; to the pcre.recursion_limit for PCRE. -;mbstring.regex_stack_limit=100000 - -; This directive specifies maximum retry count for mbstring regular expressions. It is similar -; to the pcre.backtrack_limit for PCRE. -;mbstring.regex_retry_limit=1000000 - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; https://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 1 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; https://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; https://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; https://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; https://php.net/exif.encode-jis -;exif.encode_jis = - -; https://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; https://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; https://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; https://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; https://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; https://php.net/soap.wsdl-cache-dir -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; https://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -;opcache.enable=1 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -;opcache.memory_consumption=128 - -; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=8 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 1000000 are allowed. -;opcache.max_accelerated_files=10000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; If enabled, compilation warnings (including notices and deprecations) will -; be recorded and replayed each time a file is included. Otherwise, compilation -; warnings will only be emitted when the file is first cached. -;opcache.record_warnings=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0x7FFFBFFF - -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Mapping base of shared memory segments (for Windows only). All the PHP -; processes have to map shared memory into the same address space. This -; directive allows to manually fix the "Unable to reattach to base address" -; errors. -;opcache.mmap_base= - -; Facilitates multiple OPcache instances per user (for Windows only). All PHP -; processes with the same cache ID and user share an OPcache instance. -;opcache.cache_id= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Implies opcache.file_cache_only=1 for a certain process that failed to -; reattach to the shared memory (for Windows only). Explicitly enabled file -; cache is required. -;opcache.file_cache_fallback=1 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; Under certain circumstances (if only a single global PHP process is -; started from which all others fork), this can increase performance -; by a tiny amount because TLB misses are reduced. On the other hand, this -; delays PHP startup, increases memory usage and degrades performance -; under memory pressure - use with care. -; Requires appropriate OS configuration. -;opcache.huge_code_pages=0 - -; Validate cached file permissions. -;opcache.validate_permission=0 - -; Prevent name collisions in chroot'ed environment. -;opcache.validate_root=0 - -; If specified, it produces opcode dumps for debugging different stages of -; optimizations. -;opcache.opt_debug_level=0 - -; Specifies a PHP script that is going to be compiled and executed at server -; start-up. -; https://php.net/opcache.preload -;opcache.preload= - -; Preloading code as root is not allowed for security reasons. This directive -; facilitates to let the preloading to be run as another user. -; https://php.net/opcache.preload_user -;opcache.preload_user= - -; Prevents caching files that are less than this number of seconds old. It -; protects from caching of incompletely updated files. In case all file updates -; on your site are atomic, you may increase performance by setting it to "0". -;opcache.file_update_protection=2 - -; Absolute path used to store shared lockfiles (for *nix only). -;opcache.lockfile_path=/tmp - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -[openssl] -; The location of a Certificate Authority (CA) file on the local filesystem -; to use when verifying the identity of SSL/TLS peers. Most users should -; not specify a value for this directive as PHP will attempt to use the -; OS-managed cert stores in its absence. If specified, this value may still -; be overridden on a per-stream basis via the "cafile" SSL stream context -; option. -;openssl.cafile= - -; If openssl.cafile is not specified or if the CA file is not found, the -; directory pointed to by openssl.capath is searched for a suitable -; certificate. This value must be a correctly hashed certificate directory. -; Most users should not specify a value for this directive as PHP will -; attempt to use the OS-managed cert stores in its absence. If specified, -; this value may still be overridden on a per-stream basis via the "capath" -; SSL stream context option. -;openssl.capath= - -[ffi] -; FFI API restriction. Possible values: -; "preload" - enabled in CLI scripts and preloaded files (default) -; "false" - always disabled -; "true" - always enabled -;ffi.enable=preload - -; List of headers files to preload, wildcard patterns allowed. -;ffi.preload= diff --git a/moodle/.docker/php/check-runtime.php b/moodle/.docker/php/check-runtime.php new file mode 100644 index 0000000..3c5cce6 --- /dev/null +++ b/moodle/.docker/php/check-runtime.php @@ -0,0 +1,58 @@ +getMessage() . PHP_EOL); + exit(1); + } +} diff --git a/moodle/.docker/php/php74.Dockerfile b/moodle/.docker/php/php74.Dockerfile deleted file mode 100644 index 12bac2b..0000000 --- a/moodle/.docker/php/php74.Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -FROM php:7.4-fpm - -RUN apt update && apt install -y \ - libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ - libonig-dev libicu-dev libpq-dev libwebp-dev git \ - libxml2-dev libxslt1-dev - -RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp - -RUN docker-php-ext-install \ - mbstring \ - zip \ - exif \ - pcntl \ - ctype \ - xml \ - xmlrpc \ - intl \ - pdo \ - mysqli \ - pdo_mysql \ - pgsql \ - pdo_pgsql \ - gd \ - bcmath \ - sockets \ - soap \ - opcache - -RUN docker-php-ext-enable mysqli pdo_mysql pgsql pdo_pgsql opcache - -RUN pecl install redis apcu && \ - docker-php-ext-enable redis apcu - -RUN apt clean && rm -rf /var/lib/apt/lists/* - -RUN apt update && apt install -y \ - build-essential \ - mc nano vim \ - zip unzip libzip-dev \ - openssl wget curl libcurl4-openssl-dev net-tools \ - sendmail mailutils \ - libfreetype6-dev libpng-dev libjpeg62-turbo-dev libjpeg-dev libgd-dev \ - jpegoptim optipng pngquant gifsicle \ - locales \ - git \ - libonig-dev aspell \ - ghostscript \ - clamav \ - apache2-utils \ - libbz2-dev \ - libkrb5-dev \ - libmcrypt-dev libssl-dev \ - libreadline-dev libxslt1-dev zlib1g-dev \ - python3-dev python3-psycopg2 \ - libpq-dev libfcgi-dev libfcgi-bin \ - gnupg ca-certificates \ - htop tree jq \ - supervisor procps \ - grep sed gawk \ - telnet netcat-openbsd \ - valgrind \ - bzip2 xz-utils \ - lsof strace \ - webp libwebp-dev \ - fontconfig fonts-dejavu-core \ - libicu-dev \ - cron \ - && apt clean && rm -rf /var/lib/apt/lists/* - -RUN groupadd -g 1000 www \ - && useradd -u 1000 -ms /bin/bash -g www www \ - && chown -R www:www /var/www - -USER www - -CMD ["php-fpm"] diff --git a/moodle/.docker/php/php80.Dockerfile b/moodle/.docker/php/php80.Dockerfile deleted file mode 100644 index 6081bc9..0000000 --- a/moodle/.docker/php/php80.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -FROM php:8.0-fpm - -RUN apt update && apt install -y \ - libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ - libonig-dev libicu-dev libpq-dev libwebp-dev git \ - libxml2-dev libxslt1-dev - -RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp - -RUN docker-php-ext-install \ - mbstring \ - zip \ - exif \ - pcntl \ - ctype \ - xml \ - intl \ - pdo \ - mysqli \ - pdo_mysql \ - pgsql \ - pdo_pgsql \ - gd \ - bcmath \ - sockets \ - soap \ - opcache - -RUN docker-php-ext-enable mysqli pdo_mysql pgsql pdo_pgsql opcache - -RUN pecl install redis apcu && \ - docker-php-ext-enable redis apcu - -RUN apt clean && rm -rf /var/lib/apt/lists/* - -RUN apt update && apt install -y \ - build-essential \ - mc nano vim \ - zip unzip libzip-dev \ - openssl wget curl libcurl4-openssl-dev net-tools \ - sendmail mailutils \ - libfreetype6-dev libpng-dev libjpeg62-turbo-dev libjpeg-dev libgd-dev \ - jpegoptim optipng pngquant gifsicle \ - locales \ - git \ - libonig-dev aspell \ - ghostscript \ - clamav \ - apache2-utils \ - libbz2-dev \ - libkrb5-dev \ - libmcrypt-dev libssl-dev \ - libreadline-dev libxslt1-dev zlib1g-dev \ - python3-dev python3-psycopg2 \ - libpq-dev libfcgi-dev libfcgi-bin \ - gnupg ca-certificates \ - htop tree jq \ - supervisor procps \ - grep sed gawk \ - telnet netcat-openbsd \ - valgrind \ - bzip2 xz-utils \ - lsof strace \ - webp libwebp-dev \ - fontconfig fonts-dejavu-core \ - libicu-dev \ - cron \ - && apt clean && rm -rf /var/lib/apt/lists/* - -RUN groupadd -g 1000 www \ - && useradd -u 1000 -ms /bin/bash -g www www \ - && chown -R www:www /var/www - -USER www - -CMD ["php-fpm"] diff --git a/moodle/.docker/php/php81.Dockerfile b/moodle/.docker/php/php81.Dockerfile deleted file mode 100644 index de0994c..0000000 --- a/moodle/.docker/php/php81.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -FROM php:8.1-fpm - -RUN apt update && apt install -y \ - libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ - libonig-dev libicu-dev libpq-dev libwebp-dev git \ - libxml2-dev libxslt1-dev - -RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp - -RUN docker-php-ext-install \ - mbstring \ - zip \ - exif \ - pcntl \ - ctype \ - xml \ - intl \ - pdo \ - mysqli \ - pdo_mysql \ - pgsql \ - pdo_pgsql \ - gd \ - bcmath \ - sockets \ - soap \ - opcache - -RUN docker-php-ext-enable mysqli pdo_mysql pgsql pdo_pgsql opcache - -RUN pecl install redis apcu && \ - docker-php-ext-enable redis apcu - -RUN apt clean && rm -rf /var/lib/apt/lists/* - -RUN apt update && apt install -y \ - build-essential \ - mc nano vim \ - zip unzip libzip-dev \ - openssl wget curl libcurl4-openssl-dev net-tools \ - sendmail mailutils \ - libfreetype6-dev libpng-dev libjpeg62-turbo-dev libjpeg-dev libgd-dev \ - jpegoptim optipng pngquant gifsicle \ - locales \ - git \ - libonig-dev aspell \ - ghostscript \ - clamav \ - apache2-utils \ - libbz2-dev \ - libkrb5-dev \ - libmcrypt-dev libssl-dev \ - libreadline-dev libxslt1-dev zlib1g-dev \ - python3-dev python3-psycopg2 \ - libpq-dev libfcgi-dev libfcgi-bin \ - gnupg ca-certificates \ - htop tree jq \ - supervisor procps \ - grep sed gawk \ - telnet netcat-openbsd \ - valgrind \ - bzip2 xz-utils \ - lsof strace \ - webp libwebp-dev \ - fontconfig fonts-dejavu-core \ - libicu-dev \ - cron \ - && apt clean && rm -rf /var/lib/apt/lists/* - -RUN groupadd -g 1000 www \ - && useradd -u 1000 -ms /bin/bash -g www www \ - && chown -R www:www /var/www - -USER www - -CMD ["php-fpm"] diff --git a/moodle/.docker/php/php82.Dockerfile b/moodle/.docker/php/php82.Dockerfile index 59e50ae..65243a9 100644 --- a/moodle/.docker/php/php82.Dockerfile +++ b/moodle/.docker/php/php82.Dockerfile @@ -1,4 +1,8 @@ -FROM php:8.2-fpm +FROM php:8.2.35-fpm-bookworm@sha256:4d81f8b24a4b9cbe263093d5e2fbaa49647b1290193488b936f08355933a5060 + +COPY runtime-policy.json check-runtime.php /opt/mooship/ +RUN php /opt/mooship/check-runtime.php +COPY --chmod=755 runtime-entrypoint.sh /usr/local/bin/mooship-runtime-entrypoint RUN apt update && apt install -y \ libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ @@ -73,4 +77,5 @@ RUN groupadd -g 1000 www \ USER www +ENTRYPOINT ["mooship-runtime-entrypoint"] CMD ["php-fpm"] diff --git a/moodle/.docker/php/php83.Dockerfile b/moodle/.docker/php/php83.Dockerfile index 9752309..dc01bf7 100644 --- a/moodle/.docker/php/php83.Dockerfile +++ b/moodle/.docker/php/php83.Dockerfile @@ -1,4 +1,8 @@ -FROM php:8.3-fpm +FROM php:8.3.36-fpm-bookworm@sha256:a1a4f6f48c2e27f4974ea21459ca6c483bd3d4fbe18579ae61571a78bbe59fff + +COPY runtime-policy.json check-runtime.php /opt/mooship/ +RUN php /opt/mooship/check-runtime.php +COPY --chmod=755 runtime-entrypoint.sh /usr/local/bin/mooship-runtime-entrypoint RUN apt update && apt install -y \ libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ @@ -73,4 +77,5 @@ RUN groupadd -g 1000 www \ USER www +ENTRYPOINT ["mooship-runtime-entrypoint"] CMD ["php-fpm"] diff --git a/moodle/.docker/php/php84.Dockerfile b/moodle/.docker/php/php84.Dockerfile index eec2e3e..619eec5 100644 --- a/moodle/.docker/php/php84.Dockerfile +++ b/moodle/.docker/php/php84.Dockerfile @@ -1,4 +1,8 @@ -FROM php:8.4-fpm +FROM php:8.4.27-fpm-bookworm@sha256:1b6bb4f3d32dfbcd1e159d7bd47caa8852507f61666db7731d73f34acec781b6 + +COPY runtime-policy.json check-runtime.php /opt/mooship/ +RUN php /opt/mooship/check-runtime.php +COPY --chmod=755 runtime-entrypoint.sh /usr/local/bin/mooship-runtime-entrypoint RUN apt update && apt install -y \ libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ @@ -73,4 +77,5 @@ RUN groupadd -g 1000 www \ USER www +ENTRYPOINT ["mooship-runtime-entrypoint"] CMD ["php-fpm"] diff --git a/moodle/.docker/php/runtime-entrypoint.sh b/moodle/.docker/php/runtime-entrypoint.sh new file mode 100644 index 0000000..86f69d3 --- /dev/null +++ b/moodle/.docker/php/runtime-entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -eu +php /opt/mooship/check-runtime.php +if [ -f /var/www/html/public/version.php ] || [ -f /var/www/html/version.php ]; then + php /opt/mooship/check-runtime.php --source /var/www/html +fi +exec docker-php-entrypoint "$@" diff --git a/moodle/.docker/php/runtime-policy.json b/moodle/.docker/php/runtime-policy.json new file mode 100644 index 0000000..3c58469 --- /dev/null +++ b/moodle/.docker/php/runtime-policy.json @@ -0,0 +1,22 @@ +{ + "minimum_moodle": "4.3.0", + "minimum_php": { + "8.2": "8.2.35", + "8.3": "8.3.36", + "8.4": "8.4.27", + "8.5": "8.5.12" + }, + "moodle_php": { + "4.3": ["8.2"], + "4.4": ["8.2", "8.3"], + "4.5": ["8.2", "8.3"], + "5.0": ["8.2", "8.3", "8.4"], + "5.1": ["8.2", "8.3", "8.4"], + "5.2": ["8.3", "8.4"], + "5.3": ["8.3", "8.4"] + }, + "default_php": { + "4.3": "8.2", "4.4": "8.2", "4.5": "8.3", + "5.0": "8.4", "5.1": "8.4", "5.2": "8.4", "5.3": "8.4" + } +} diff --git a/moodle/docker-compose.yml b/moodle/docker-compose.yml index eb9d62b..cf16445 100644 --- a/moodle/docker-compose.yml +++ b/moodle/docker-compose.yml @@ -213,7 +213,7 @@ services: - ./.config/php/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini:ro - ./.config/php/mooship.ini:/usr/local/etc/php/conf.d/zz-mooship.ini:ro # Run Moodle cron every minute (the image uses Debian and runs as www; crond/crontab are unsuitable here) - entrypoint: > + command: > sh -c "while true; do php /var/www/html/admin/cli/cron.php > /dev/null sleep 60 diff --git a/restore.sh b/restore.sh index 5fada30..9518b9d 100644 --- a/restore.sh +++ b/restore.sh @@ -58,6 +58,7 @@ restore_main() ( printf -v "$key" '%s' "$(mooship_read_env "$stage/project/.env" "$key")" done DOMAIN="$SITE_HOST" + mooship_require_project_runtime "$stage/project" # Archives created before HTTP support default to their original HTTPS behavior. case "${SITE_SCHEME:-https}" in http) OBTAIN_SSL=false ;; @@ -95,7 +96,8 @@ restore_main() ( create_native_database ensure_project_docker_resources docker compose config --quiet - docker compose build php nginx cron + docker compose build --pull php nginx cron + mooship_verify_project_php || error "PHP security verification failed before database import" if [[ "$DB_NATIVE" != true ]]; then docker compose up -d db mooship_wait_database || error "The database is not ready for restore" diff --git a/src/mooship/cli.py b/src/mooship/cli.py index 549b448..19cdaac 100644 --- a/src/mooship/cli.py +++ b/src/mooship/cli.py @@ -41,13 +41,16 @@ def require_linux() -> None: raise ValueError("Run installation and server operations on the target Linux server over SSH") -def toolkit_root(directory: str) -> Path: +def toolkit_root(directory: str, require_policy: bool = True) -> Path: root = absolute_path(directory) if (root / ".mooship-installing").exists(): raise ValueError("Toolkit installation is incomplete; inspect it before use") if not (root / "VERSION").is_file(): raise ValueError("Toolkit is missing; run 'mooship install' or select --directory") release_version((root / "VERSION").read_text(encoding="ascii").strip()) + if require_policy and (not (root / "lib/runtime_policy.py").is_file() + or not (root / "moodle/.docker/php/runtime-policy.json").is_file()): + raise ValueError("Toolkit predates the mandatory PHP security policy; install an updated release") return root @@ -65,7 +68,7 @@ def main(argv: list[str] | None = None) -> int: print(f"Installed Mooship {version} into {destination}") return 0 arguments = args.arguments[1:] if args.arguments[:1] == ["--"] else args.arguments - root = toolkit_root(args.directory) + root = toolkit_root(args.directory, require_policy=args.command in ("deploy", "activate", "restore")) if args.command == "toolkit-version": if arguments: raise ValueError("toolkit-version does not accept backend arguments") diff --git a/src/mooship/install.py b/src/mooship/install.py index 0a0dc40..2a3dfa3 100644 --- a/src/mooship/install.py +++ b/src/mooship/install.py @@ -19,7 +19,9 @@ REQUIRED_FILES = ("VERSION", "deploy-moodle.sh", "backup.sh", "restore.sh", "doctor.sh", "schedule-backup.sh", "activate.sh", "deactivate.sh", "remove.sh", "list-projects.sh", "lib/common.sh", "lib/state.py", "lib/web.py", - "lib/proxy.py", "moodle/docker-compose.yml", "nginxproxy/nginx.conf") + "lib/proxy.py", "lib/runtime_policy.py", "moodle/.docker/php/runtime-policy.json", + "moodle/.docker/php/check-runtime.php", "moodle/.docker/php/runtime-entrypoint.sh", + "moodle/docker-compose.yml", "nginxproxy/nginx.conf") def release_version(value: str) -> str: diff --git a/tests/test_http_roundtrip.py b/tests/test_http_roundtrip.py index 53dc5ee..8ad9913 100644 --- a/tests/test_http_roundtrip.py +++ b/tests/test_http_roundtrip.py @@ -154,7 +154,11 @@ def prepare(self, https=False, basic_auth=False, public=False, legacy_root_at_st (self.directory / "acme", "/var/www/certbot"), (self.directory / ".htpasswd", "/etc/nginx/.htpasswd"), (certificates, "/etc/letsencrypt")] - self.start(self.slug + "_php", os.environ.get("MOOSHIP_TEST_PHP_IMAGE", "php:8.4-fpm"), + php_image = os.environ.get("MOOSHIP_TEST_PHP_IMAGE", "php:8.4.27-fpm") + from test_runtime_policy import POLICY + POLICY.check_php(self.docker("run", "--rm", "--pull", "never", "--read-only", "--network", "none", + "--entrypoint", "php", php_image, "-r", "echo PHP_VERSION;")) + self.start(self.slug + "_php", php_image, ["php-fpm", "--fpm-config", "/fixtures/php-fpm.conf", "--nodaemonize"], common) self.start(self.slug + "_nginx", "nginx:1.29.1-alpine", ["nginx", "-g", "daemon off;"], diff --git a/tests/test_native_preflight.py b/tests/test_native_preflight.py index 28ca676..39128dc 100644 --- a/tests/test_native_preflight.py +++ b/tests/test_native_preflight.py @@ -20,6 +20,11 @@ def docker(*args, timeout=120, input_text=None): class NativePreflightTests(unittest.TestCase): def test_php_authenticates_via_host_gateway_and_refuses_failures(self): image = os.environ["MOOSHIP_PREFLIGHT_PHP_IMAGE"] + from test_runtime_policy import POLICY + actual = docker("run", "--rm", "--read-only", "--network", "none", "--entrypoint", "php", + image, "-r", "echo PHP_VERSION;") + self.assertEqual(actual.returncode, 0, actual.stderr) + POLICY.check_php(actual.stdout.strip()) engine = os.environ.get("MOOSHIP_PREFLIGHT_DB", "postgres") name = "mooship-native-probe-" + uuid.uuid4().hex[:12] password = "Synthetic_" + uuid.uuid4().hex @@ -73,7 +78,8 @@ def probe(mode="connect", secret=password): "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -umoodle -Dmoodle -e \"$1\"") result = docker("exec", name, "sh", "-c", command, "sh", sql) self.assertEqual(result.returncode, 0, result.stderr) - self.assertEqual(probe("installed").returncode, expected) + result = probe("installed") + self.assertEqual(result.returncode, expected, result.stdout + result.stderr) self.assertEqual(docker("stop", "--time", "20", name).returncode, 0) # Docker's host proxy may accept TCP even after its backend stops. self.assertNotEqual(probe().returncode, 0) diff --git a/tests/test_python_cli.py b/tests/test_python_cli.py index 5dc42ed..0148ed6 100644 --- a/tests/test_python_cli.py +++ b/tests/test_python_cli.py @@ -203,6 +203,10 @@ def test_native_forwarding_keeps_metacharacters_separate_and_private(self): root = Path(directory) (root / "VERSION").write_text("1.2.0", encoding="ascii") for command, filename in cli.COMMANDS.items(): + (root / "lib").mkdir(exist_ok=True) + (root / "lib/runtime_policy.py").touch() + (root / "moodle/.docker/php").mkdir(parents=True, exist_ok=True) + (root / "moodle/.docker/php/runtime-policy.json").write_text("{}", encoding="ascii") (root / filename).write_text("#!/bin/bash\n", encoding="ascii") with self.subTest(command=command), patch.object(cli.sys, "platform", "linux"), \ patch.object(cli.shutil, "which", return_value="/bin/bash"), \ @@ -216,6 +220,18 @@ def test_native_forwarding_keeps_metacharacters_separate_and_private(self): ]) self.assertEqual(output + errors, "") + def test_legacy_toolkits_cannot_deploy_activate_or_restore_but_remain_readable(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + (root / "VERSION").write_text("1.2.0", encoding="ascii") + for command in ("deploy", "activate", "restore"): + with self.subTest(command=command), patch.object(cli.os, "execvp") as execute: + status, _, errors = self.call([command, "--directory", directory]) + self.assertEqual(status, 1) + self.assertIn("mandatory PHP security policy", errors) + execute.assert_not_called() + self.assertEqual(cli.toolkit_root(directory, require_policy=False), root) + def test_partial_and_missing_toolkits_are_refused(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) @@ -237,7 +253,7 @@ def test_server_operations_explain_unsupported_platform(self): with tempfile.TemporaryDirectory() as directory: (Path(directory) / "VERSION").write_text("1.2.0", encoding="ascii") with patch.object(cli.sys, "platform", "win32"): - status, _, error = self.call(["deploy", "--directory", directory]) + status, _, error = self.call(["doctor", "--directory", directory]) self.assertEqual(status, 1) self.assertIn("Linux server over SSH", error) diff --git a/tests/test_runtime_image.py b/tests/test_runtime_image.py index 3a88ca7..08df33f 100644 --- a/tests/test_runtime_image.py +++ b/tests/test_runtime_image.py @@ -13,12 +13,13 @@ APP_IMAGE = os.environ.get("MOOSHIP_APP_IMAGE", "shellharbor/mooship:dev-moodle4.5.15-php8.3") WEB_IMAGE = os.environ.get("MOOSHIP_WEB_IMAGE", "shellharbor/mooship:dev-moodle4.5.15-nginx") +PHP82_IMAGE = "php:8.2.35-fpm-bookworm@sha256:4d81f8b24a4b9cbe263093d5e2fbaa49647b1290193488b936f08355933a5060" -def docker(*args, timeout=120): +def docker(*args, timeout=120, input_text=None): return subprocess.run( ["docker", *args], capture_output=True, text=True, encoding="utf-8", - errors="replace", timeout=timeout, check=False, + errors="replace", timeout=timeout, check=False, input=input_text, ) @@ -27,6 +28,10 @@ class RuntimeImageTests(unittest.TestCase): def setUp(self): for image in (APP_IMAGE, WEB_IMAGE, "postgres:17-alpine", "mysql:8.4"): self.assert_ok(docker("image", "inspect", image)) + from test_runtime_policy import POLICY + actual = docker("run", "--rm", "--read-only", "--network", "none", "--entrypoint", "php", + APP_IMAGE, "-r", "echo PHP_VERSION;") + POLICY.check_php(self.assert_ok(actual).strip()) self.prefix = "mooship-image-" + uuid.uuid4().hex[:12] self.containers = [] self.volumes = [] @@ -91,6 +96,80 @@ def test_web_liveness_is_healthy_without_a_database(self): time.sleep(2) self.fail("nginx Docker HEALTHCHECK did not become healthy: " + self.assert_ok(docker("logs", name))) + def test_php_guard_enforces_every_patch_floor_and_actual_moodle_compatibility(self): + code = r''' +require '/opt/mooship/check-runtime.php'; +$policy = json_decode(file_get_contents('/opt/mooship/runtime-policy.json'), true, 512, JSON_THROW_ON_ERROR); +$floors = ['8.2' => 35, '8.3' => 36, '8.4' => 27, '8.5' => 12]; +$accepted = []; +$rejected = []; +foreach ($floors as $branch => $patch) { + foreach ([$patch, $patch + 1] as $safe) { + mooship_check_php_version("$branch.$safe", $policy); + $accepted[] = "$branch.$safe"; + } + $rejected[] = $branch . '.' . ($patch - 1); +} +foreach (array_merge($rejected, ['7.4.99', '8.0.99', '8.1.99', '8.3.36RC1', '8.6.0', '8.3']) as $unsafe) { + try { + mooship_check_php_version($unsafe, $policy); + throw new LogicException('Guard accepted prohibited PHP: ' . $unsafe); + } catch (RuntimeException $expected) { + // The guard rejects the synthetic version; the test itself runs on patched PHP. + } +} +mooship_check_runtime('4.5.15'); +mooship_check_moodle_version('4.3', '8.2', $policy); +mooship_check_moodle_version('4.3.0', '8.2', $policy); +foreach ($policy['moodle_php'] as $moodle => $branches) { + foreach ($branches as $php) { + mooship_check_moodle_version($moodle, $php, $policy); + } +} +foreach (['4.2.99', '4.3', '6.0', '4.5-rc1'] as $moodle) { + try { + mooship_check_runtime($moodle); + throw new LogicException('Guard accepted incompatible Moodle: ' . $moodle); + } catch (RuntimeException $expected) { + } +} +echo json_encode(['actual' => PHP_VERSION, 'accepted' => $accepted]); +''' + _, result = self.run_container("php-policy", APP_IMAGE, ["php", "-r", code], + options=["--read-only", "--env", "PHP_VERSION=8.1.99"]) + response = json.loads(self.assert_ok(result)) + self.assertEqual(response["actual"].split(".")[:2], ["8", "3"]) + self.assertEqual(len(response["accepted"]), 8) + + def test_host_startup_accepts_initial_moodle43_on_patched_php82_and_rejects_other_sources(self): + self.assert_ok(docker("pull", PHP82_IMAGE, timeout=300)) + policy = Path(__file__).resolve().parents[1] / "moodle/.docker/php" + with tempfile.TemporaryDirectory(prefix="mooship-moodle-floor-") as temporary: + source = Path(temporary) + for release, allowed in (("4.3", True), ("4.3.0", True), ("4.2.99", False), ("5.3", False)): + with self.subTest(release=release): + (source / "version.php").write_text("> "$TEST_DIR/activation.log" + case "$*" in + 'compose config --services') printf 'php\\ncron\\nnginx\\n' ;; + 'compose run --rm -T --no-deps --entrypoint php php -r echo PHP_VERSION;') printf '%s' "$actual" ;; + esac +} +start_project_containers +''', source="activate.sh") + self.assertNotEqual(result.returncode, 0) + self.assertNotIn("compose up", (self.directory / "activation.log").read_text()) + + def test_activation_builds_and_probes_before_startup_and_html_needs_no_php(self): + self.fixture() + for services in ("php\\ncron\\nnginx", "nginx"): + with self.subTest(services=services): + log = self.directory / "activation.log" + log.unlink(missing_ok=True) + result = self.bash('PROJECT_DIR="$WWW_DIR/test"; TEST_SERVICES=' + shlex.quote(services) + ''' +docker() { + printf '%s\\n' "$*" >> "$TEST_DIR/activation.log" + case "$*" in + 'compose config --services') printf '%b\\n' "$TEST_SERVICES" ;; + 'compose run --rm -T --no-deps --entrypoint php php -r echo PHP_VERSION;') printf '8.3.36' ;; + esac +} +start_project_containers +''', source="activate.sh") + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + lines = log.read_text().splitlines() + self.assertEqual(lines[-1], "compose up -d --build") + if services == "nginx": + self.assertEqual(len(lines), 2) + else: + self.assertEqual(lines[1], "compose build --pull php cron") + self.assertIn("echo PHP_VERSION;", lines[2]) diff --git a/tests/test_scripts.py b/tests/test_scripts.py index 603af66..4fa5416 100644 --- a/tests/test_scripts.py +++ b/tests/test_scripts.py @@ -41,6 +41,7 @@ def fixture(self): (self.project / "moodledata").mkdir() (self.project / "docker-compose.yml").write_text("services: {}\n", encoding="utf-8") (self.project / "public_html" / "config.php").write_text("> "$TEST_DIR/docker.log"; } +docker() { + printf '%s\\n' "$*" >> "$TEST_DIR/docker.log" + if [[ "$*" == 'compose run --rm -T --no-deps --entrypoint php php -r echo PHP_VERSION;' ]]; then + printf '8.3.36' + fi +} restore_main --slug test --archive "$TEST_DIR/site.tar.gz" <<< test -''', source="restore.sh") +'''.replace("printf '8.3.36'", "printf '" + php_runtime + "'"), source="restore.sh") + + def test_restore_rejects_old_actual_php_before_import_or_database_startup(self): + result = self.restore_protocol("http", php_runtime="8.3.35") + self.assertNotEqual(result.returncode, 0) + self.assertIn("PHP 8.3.35 is prohibited", result.stderr) + self.assertNotIn("DATABASE_IMPORTED", result.stdout) + self.assertNotIn("compose up -d", (self.directory / "docker.log").read_text()) + + def test_restore_rejects_source_metadata_mismatch_before_import_or_project_creation(self): + result = self.restore_protocol("http", moodle="5.3.0") + self.assertNotEqual(result.returncode, 0) + self.assertIn("source/metadata mismatch", result.stderr) + self.assertNotIn("DATABASE_IMPORTED", result.stdout) + self.assertFalse(self.project.exists()) + + def test_restore_rejects_old_moodle_before_project_or_database_creation(self): + result = self.restore_protocol("http", moodle="4.2.99") + self.assertNotEqual(result.returncode, 0) + self.assertIn("Moodle below 4.3", result.stderr) + self.assertNotIn("DATABASE_CREATED", result.stdout) + self.assertFalse(self.project.exists()) def test_restore_preserves_http_without_requiring_a_certificate(self): result = self.restore_protocol("http")