php / php/php-src

Allow PHPs development server to be used in production

Open
#11,045 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.