Running Kirby 3 on PHP's built-in webserver?

I am using the PHP built-in webserver as a minimalist local environment to develop basic websites.

While this worked flawlessly in conjunction with Kirby 2, I can’t get my websites to display properly using Kirby 3 when running in this environment. (They all work just fine on the propper external webservers.)

While the websites don’t output any error, only the directly references images (i.e. assets) display, while all the content images don’t show. This affects all files that are being called via an autogenerated URL (like, f.e. “/1866674752-1548253090/image.jpg”)

I’ve included the curl, gd2 (which I’m assuming is GDlib) and mbstring extensions; the ctype extension is said to be build into the webserver as far as I’ve read.
Could this be a configuration error or is it not possible to use the PHP built-in webserver for Kirby 3 for some other reason?

You have to run Kirby with Kirby’s router

php -S localhost:8000 kirby/router.php

(We do no longer recommend using the built-in server)

Ah, I see - that works; thank you!

What DO you recommend using then, comparable to the ease of running Kirby 2 with PHP’s built-in server?

Anything that is not the built-in server :wink: If it works for you, that is fine.

For alternatives check out this post: Webserver recommendation for local development (Mac)

Personally, I’m still on Mamp, my tests with Valet/Valet+ haven’t been that successful yet and I can live with the delay it gives me on Mojave (not recommended for people in a rush).

Any specific reasons why the built-in PHP server isn’t recommended?

There are always edge cases where the built-in PHP server has issues and doesn’t work as expected. You can use it and we provide the router.php that makes it work in a standard configuration. But you might run into issues, for example with a custom folder setup.