Skip to content
● Grav 2.2.19 and 1.7.53.8 are out with security fixes found by Anthropic's OSS Scanner: update your sites. Read more →

localhost, Windows, bin/grav server: core upgrade deletes system/router.php, and bin/grav disappears after the server is stopped

Started by Dima 5 hours ago · 0 replies · 19 views
5 hours ago

Hello!

I run a local copy of my site on Windows, and every core upgrade through the admin loses two files. It has happened every time since 2.0.22, most recently when upgrading to 2.2.22.

Environment Windows 11, NTFS, PHP 8.3.14 (CLI, ZTS, x64), Grav 2.2.XX, Admin 2

I start the server with php bin\grav server --port=8777, which itself spawns php -S 127.0.0.1:8777 system/router.php

What happens

  1. I upgrade the core from the admin. The admin reports success, but every following request, to the site and to the admin alike, fails before Grav even loads:
TXT
Warning: Unknown: Failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Failed opening required 'system/router.php' ...

system/router.php is missing from the site folder, although the update package contains it. Everything else in system/ is updated, and logs/grav.log is empty.

  1. I stop the server (Ctrl+C), and bin/grav disappears. There is nothing left to start the server with:
TXT
Could not open input file: bin\grav

The other files in bin/ (gpm, plugin, composer.phar) are updated normally.

I fix it by hand: I take both files from grav-admin-v2.2.XX.zip.

On the web host

On my web host (Apache), the same site upgrades through the admin without these errors, and everything works afterwards.

Thank you!

Suggested topics

Topic Participants Replies Views Activity
General · by pamtbaau, 4 days ago
0 83 4 days ago
General · by lynbor, 2 months ago
5 624 2 weeks ago
General · by Andy Miller, 4 weeks ago
0 327 4 weeks ago
General · by lynbor, 1 month ago
7 735 1 month ago
General · by Harry, 1 month ago
0 304 1 month ago