From ec57fbc633d878d24ae004399364708b101c653c Mon Sep 17 00:00:00 2001 From: Egor Bugaev Date: Mon, 6 Jul 2026 17:06:05 +0300 Subject: [PATCH] Document restarting PHP after deploying updates (opcache gotcha) --- README.md | 13 +++++++++++++ README.ru.md | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/README.md b/README.md index 8028017..ea2651e 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,18 @@ you are about to run, ideally against a non-critical row/user first. So if your instance is pretty big, commands like `occ files:scan` will time out and fail. - Do not use `occ maintenance:mode --on`, obvious... +## Deploying updates + +After pulling/copying new code into `nextcloud/apps/occweb/`, restart PHP so +the changes actually take effect. `occ app:disable`/`app:enable` is **not** +enough — it does not clear PHP's opcode cache, so a stale, cached version of +the code can keep running (routes silently 404ing is a typical symptom). +Restart the PHP process itself, for example: + +```bash +sudo systemctl restart php8.3-fpm # adjust to your installed PHP version +sudo systemctl restart apache2 # if PHP runs as an Apache module instead +``` + ## TODOs: See [open issues](https://github.com/Adphi/occweb/issues) diff --git a/README.ru.md b/README.ru.md index a5eed88..3d1549a 100644 --- a/README.ru.md +++ b/README.ru.md @@ -47,5 +47,19 @@ occ-команд. завершаться по таймауту с ошибкой. - Не используйте `occ maintenance:mode --on`, это очевидно... +## Обновление кода на сервере + +После того как новый код скопирован/спуллен в `nextcloud/apps/occweb/`, +обязательно перезапустите PHP, иначе изменения не применятся. `occ +app:disable`/`app:enable` **не помогает** — эта команда не сбрасывает +opcode-кэш PHP, из-за чего может продолжать работать старая закэшированная +версия кода (характерный симптом — маршруты внезапно отвечают 404). +Перезапустите сам процесс PHP, например: + +```bash +sudo systemctl restart php8.3-fpm # укажите свою версию PHP +sudo systemctl restart apache2 # если PHP работает как модуль Apache +``` + ## Планы (TODO): См. [открытые issues](https://github.com/Adphi/occweb/issues)