[PR #1009] [MERGED] fix(phpmyadmin): raise PHP upload limit so SQL imports over 2MB work #16317

Closed
opened 2026-07-14 23:19:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/1009
Author: @Siumauricio
Created: 7/14/2026
Status: Merged
Merged: 7/14/2026
Merged by: @Siumauricio

Base: canaryHead: fix/phpmyadmin


📝 Commits (1)

  • 9bdbe26 fix(phpmyadmin): raise PHP upload limit so SQL imports over 2MB work

📊 Changes

2 files changed (+6 additions, -2 deletions)

View changed files

📝 blueprints/phpmyadmin/docker-compose.yml (+3 -1)
📝 blueprints/phpmyadmin/template.toml (+3 -1)

📄 Description

Problem

Issue #236 reports the phpmyadmin template failing with (screenshots in the issue):

Warning: POST Content-Length of 5412256 bytes exceeds the limit of 2097152 bytes in Unknown on line 0
phpMyAdmin - Error
session_start(): Session cannot be started after headers have already been sent

Root cause: the template does not set UPLOAD_LIMIT, so the official phpMyAdmin image keeps PHP's default post_max_size / upload_max_filesize of 2M (2097152 bytes). Any SQL import larger than 2MB is rejected by PHP before phpMyAdmin runs, and the emitted warning then breaks session_start(), producing the error page in the screenshots.

Fix

  • Add UPLOAD_LIMIT (default 512M) and MAX_EXECUTION_TIME (default 600) to the phpmyadmin service, both configurable from the template env so users can tune them from the Dokploy UI.
  • Wire the previously unused MYSQL_DATABASE env var into the compose file, replacing the hardcoded tu_base_de_datos placeholder, and default it to phpmyadmin instead of the system mysql schema.

Verification (deployed on a live Dokploy instance)

  • Deploy: done; both containers running.
  • GET / → HTTP 200, auto-login into the bundled MySQL works: <title>... / db | phpMyAdmin 5.2.1</title>.
  • Reproduced the exact failing scenario from the issue: a 5,412,256-byte multipart POST to index.php?route=/import now returns HTTP 200 with a normal phpMyAdmin page — no exceeds the limit warning and no session_start error.
  • node build-scripts/generate-meta.js --check → 476 templates validated.

Closes #236

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/1009 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@Siumauricio](https://github.com/Siumauricio) **Base:** `canary` ← **Head:** `fix/phpmyadmin` --- ### 📝 Commits (1) - [`9bdbe26`](https://github.com/Dokploy/templates/commit/9bdbe266e52cc44f76626bba26dbe38c78d1d9c6) fix(phpmyadmin): raise PHP upload limit so SQL imports over 2MB work ### 📊 Changes **2 files changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `blueprints/phpmyadmin/docker-compose.yml` (+3 -1) 📝 `blueprints/phpmyadmin/template.toml` (+3 -1) </details> ### 📄 Description ## Problem Issue #236 reports the phpmyadmin template failing with (screenshots in the issue): ``` Warning: POST Content-Length of 5412256 bytes exceeds the limit of 2097152 bytes in Unknown on line 0 phpMyAdmin - Error session_start(): Session cannot be started after headers have already been sent ``` Root cause: the template does not set `UPLOAD_LIMIT`, so the official phpMyAdmin image keeps PHP's default `post_max_size` / `upload_max_filesize` of 2M (2097152 bytes). Any SQL import larger than 2MB is rejected by PHP before phpMyAdmin runs, and the emitted warning then breaks `session_start()`, producing the error page in the screenshots. ## Fix - Add `UPLOAD_LIMIT` (default **512M**) and `MAX_EXECUTION_TIME` (default **600**) to the phpmyadmin service, both configurable from the template env so users can tune them from the Dokploy UI. - Wire the previously unused `MYSQL_DATABASE` env var into the compose file, replacing the hardcoded `tu_base_de_datos` placeholder, and default it to `phpmyadmin` instead of the system `mysql` schema. ## Verification (deployed on a live Dokploy instance) - Deploy: `done`; both containers running. - `GET /` → HTTP 200, auto-login into the bundled MySQL works: `<title>... / db | phpMyAdmin 5.2.1</title>`. - Reproduced the exact failing scenario from the issue: a **5,412,256-byte** multipart POST to `index.php?route=/import` now returns HTTP 200 with a normal phpMyAdmin page — no `exceeds the limit` warning and no `session_start` error. - `node build-scripts/generate-meta.js --check` → 476 templates validated. Closes #236 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:19:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16317