mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: pass PHP upload limits via -d flags in justfile serve recipe
php -S (built-in dev server) ignores .htaccess and .user.ini entirely. The POST Content-Length limit was still 8M from /etc/php/php.ini. Pass upload_max_filesize=512M, post_max_size=520M, memory_limit=256M, max_execution_time=300, max_input_time=300 directly on the CLI.
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -13,7 +13,7 @@
|
|||||||
- [x] **tfe.php** (public template) — handles audio (`<audio>`), video (all exts), image, PDF, "other" (download link); reads `display_label`; files already sorted by `sort_order`
|
- [x] **tfe.php** (public template) — handles audio (`<audio>`), video (all exts), image, PDF, "other" (download link); reads `display_label`; files already sorted by `sort_order`
|
||||||
- [x] **tfe.css** — styles for `.tfe-audio`, `.tfe-download-file`, `.tfe-download-link`
|
- [x] **tfe.css** — styles for `.tfe-audio`, `.tfe-download-file`, `.tfe-download-link`
|
||||||
- [x] **form.css** — styles for `.tfe-file-queue`, `.fq-item`, `.admin-file-list-item` (sortable), drag handles, label inputs, ghost class
|
- [x] **form.css** — styles for `.tfe-file-queue`, `.fq-item`, `.admin-file-list-item` (sortable), drag handles, label inputs, ghost class
|
||||||
- [x] **PHP upload limits** — `.htaccess` + `.user.ini` in `public/` with `upload_max_filesize=512M` / `post_max_size=520M`
|
- [x] **PHP upload limits** — `.htaccess` + `.user.ini` in `public/` (Apache/FPM) + `-d` flags in `justfile` serve recipe (built-in dev server ignores ini files)
|
||||||
- [x] **add.php / edit.php / partage/index.php** — use `sortable.min.js` + `file-upload-queue.js` instead of `file-preview.js`
|
- [x] **add.php / edit.php / partage/index.php** — use `sortable.min.js` + `file-upload-queue.js` instead of `file-preview.js`
|
||||||
- [x] **docs/file-uploads.md** — reference document covering accepted types, size limits, storage layout, ordering, labels, security, and source file index
|
- [x] **docs/file-uploads.md** — reference document covering accepted types, size limits, storage layout, ordering, labels, security, and source file index
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,15 @@ Landscape format recommended (4:1 ratio). Max size: **20 MB**.
|
|||||||
| Cover image | 20 MB |
|
| Cover image | 20 MB |
|
||||||
| Banner image | 20 MB |
|
| Banner image | 20 MB |
|
||||||
|
|
||||||
The PHP limits are set in `app/public/.htaccess` (Apache) and `app/public/.user.ini` (PHP-FPM / nginx). For environments that require higher limits, edit those two files.
|
The PHP limits are set in:
|
||||||
|
|
||||||
|
| File | Applies to |
|
||||||
|
|------|------------|
|
||||||
|
| `app/public/.htaccess` | Apache (`mod_php`) |
|
||||||
|
| `app/public/.user.ini` | PHP-FPM / nginx |
|
||||||
|
| `justfile` — `serve` recipe | PHP built-in dev server (`php -S` ignores both files above, so limits are passed via `-d` flags) |
|
||||||
|
|
||||||
|
For environments that require different limits, edit all three.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
9
justfile
9
justfile
@@ -13,7 +13,14 @@ setup:
|
|||||||
|
|
||||||
[group('dev')]
|
[group('dev')]
|
||||||
serve: migrate
|
serve: migrate
|
||||||
@php -S 127.0.0.1:8000 -t app/public/ app/router.php 2>&1 | stdbuf -oL grep -Ev '(Accepted|Closing|live-reload\.php|assets/|favicon)' || true
|
@php \
|
||||||
|
-d upload_max_filesize=512M \
|
||||||
|
-d post_max_size=520M \
|
||||||
|
-d memory_limit=256M \
|
||||||
|
-d max_execution_time=300 \
|
||||||
|
-d max_input_time=300 \
|
||||||
|
-S 127.0.0.1:8000 -t app/public/ app/router.php 2>&1 \
|
||||||
|
| stdbuf -oL grep -Ev '(Accepted|Closing|live-reload\.php|assets/|favicon)' || true
|
||||||
|
|
||||||
[group('dev')]
|
[group('dev')]
|
||||||
stop:
|
stop:
|
||||||
|
|||||||
Reference in New Issue
Block a user