From ddd272668732e1998bccf8252155accf4c4d1203 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 4 Jul 2026 18:12:55 +0200 Subject: [PATCH] Fix cat command using relative path for physical file lookup getFileContent() built the game1 filesystem path as a relative string with no leading slash. That only resolves correctly when PHP's cwd happens to be the project root (e.g. CLI), but under PHP-FPM/nginx the cwd is nginx's document root (public/), so file_exists() always failed for real requests even though the file existed and the in-memory virtual file list (used by ls) said it should. Use the already-injected $projectDir (%kernel.project_dir%), matching how the class already builds the session log path. Co-Authored-By: Claude Sonnet 5 --- src/Game/Service/GameResponseService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Game/Service/GameResponseService.php b/src/Game/Service/GameResponseService.php index 9c0d0f6..f868cce 100644 --- a/src/Game/Service/GameResponseService.php +++ b/src/Game/Service/GameResponseService.php @@ -893,7 +893,7 @@ class GameResponseService return $this->readVerificationFile($player, $file); } - $physicalPath = 'assets/game1/filesystem' . $file; + $physicalPath = $this->projectDir . '/assets/game1/filesystem' . $file; if (!file_exists($physicalPath)) { return ['File does not exist']; }