Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 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 3 weeks ago · 1 replies · 173 views
3 weeks 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!

3 weeks ago

To get timely attention by the dev team, your best bet is to log an issue on the repo of Grav. That's their living room...

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 16 hours ago
0 30 16 hours ago
General · by Karmalakas, 2 days ago
2 90 2 days ago
General · by Hanns Mattes, 2 weeks ago
0 177 2 weeks ago
General · by pamtbaau, 3 weeks ago
0 280 3 weeks ago
General · by lynbor, 2 months ago
5 760 1 month ago