Allow PHPs development server to be used in production
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
It would be good if we could use PHPs built-in server for smaller website deployments, rather than having to use nginx, apache, caddy, swoole, amp, react php, etc.
Ideally, for development I can do php -S 0.0.0.0:8443 --dev -t public/index.php --tls-cert letsencrypt.crt --tls-key letsencrypt.key --http2
And then for development, I can do php -S 0.0.0.0:8443 --prod -t public/index.php --tls-cert localhost.crt --tls-key localhost.key --http2
And then in php file:
<?php
if (isset($DEV)) {
error_reporting(E_ALL);
}
Or something to that effect
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PHP's built-in server entry point invoked with php -S and the production, TLS, HTTP/2, and development-mode requirements described in the issue. Clarify the supported behavior and scope before identifying implementation and test locations; done should be a documented, tested production-capable server design rather than only command-line examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100