Conversation
The homepage Quick Start Docker snippet has the same ext-intl bug already fixed in installation.md (cakephp#8322), plus two more bugs: `php bin/cake server` silently no-ops instead of starting a server, and the missing pdo_mysql extension turns the welcome page's DB check into a hard 500 instead of a graceful checklist item. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Following the Docker quickstart in docs/en/index.md exactly as written fails
in three separate ways:
docker run -it --rm -v $(pwd):/app composer create-project ...failsduring dependency resolution:
Once a project exists,
docker run ... php:8.2-cli php bin/cake server -H 0.0.0.0doesn't start a server at all. It exits immediately with noerror, having printed nothing useful.
Even after fixing both of the above, loading the welcome page returns a 500 (Cake\Database\Exception\MissingExtensionException) instead of
the "green checkmarks" page the docs promise.
Why
The bare
composerDocker image doesn't bundle theintlextension,which cakephp/cakephp requires. This is the same bug already reported in
Can't init CakePHP with Docker solution -
requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.#8319 and fixed in Fix Docker quickstart: install intl before composer create-project #8322 — but that fix only toucheddocs/en/installation.md, not this homepage copy of the same instructions,
so it was missed here.
bin/cakeis a plain POSIX shell script (#!/usr/bin/env sh), not apolyglot PHP file. Running
php bin/cake ...makes PHP treat the wholescript as literal HTML output (no
<?phptag), print its source, andexit 0. It needs to invoke
bin/cake.php, the actual PHP entry point.The scaffolded app's default config/app_local.php points at MySQL, and
php:8.2-clihas nopdo_mysql. Without it, CakePHP's driver checkthrows before the welcome page can render its normal pass/fail checklist,
producing a full error page instead of a graceful "problem" row.
Solution
Apply the same install-before-run pattern from #8322 to both Docker commands
on this page: run Composer inside a
php:8.2-cliimage withintlinstalled rather than the bare
composerimage, installintlandpdo_mysqlbefore starting the dev server, and callbin/cake.phpinsteadof
bin/cake.Verified end to end on this patch:
errors (vendor/, bin/cake.php present)
tmp/logs writable, and DebugKit all green; only the (expected, unrelated)
"no MySQL server running" DB check is red