Local development without installing software

Hello – I like to work on the computers in my library, but now with the new update I can’t reach php -S localhost:8000 Unfortunately I can’t install software like MAMP.
Is there a workaround? I also tried php -S localhost:8000 kirby/router.php and it says

Advice for developers and administrators:
Upgrade PHP to 7.1+

Thanks in advance
Erik :sun_with_face:

Update: maybe I have to work on my live server, but that is too slow i guess.

It mean what is says: You need at least PHP 7.1+; if the computer on which you want to work doesn’t come with that PHP version installed, then it won’t work.

Having said that, maybe you can set up a mobile dev environment on an USB-Stick?

Also make sure to use the local php server inside the directory where the router.php is located. Using a path like kirby/router.php is not going to work.

php -S localhost:8000 router.php

I don’t think this will work, you would have to start up your server in the doc root of your project, not in the kirby folder?

I’m not familiar with the built-in server’s options, maybe there is an option to start it up with a particular PHP version, provided that the PHP version is installed?

Yeah depends on the setup. What I meant to say is that the router.php has to be in the same folder as the index.php

Calling the built-in server with the path to the router.php works fine for me and has worked for people here who had issues calling it without the router, which won’t work, or rather, it works, but none of the routes do. But yes, who knows what other setups complain about.

But the error message is definitely thrown by Kirby, because Kirby checks the PHP version at startup and displays the PHP fatal view when it encounters the wrong version.

1 Like

Well I’m on Windows perhaps thats my problem :wink:

The route.php is in my Kirby folder, because I’ve loaded it as submodule.

This computer here has php 5.6.30.

I’m gonna work on my live server from now on. Thanks :snail: