PHP and Apache 2.0
For as long as Apache 2 has been stable, the PHP manual has carried this strongly worded warning:
Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.
I’ve frequently wondered why they are being so slow to support the new version —after all, Apache 2 provides a bunch of improvements over the older 1.3 and is recommended by the Apache Software Foundation as the best available version
.
I finally found the answer today in this comment buried on Slashdot. It seems that one of the key features of Apache 2 is the new threaded worker module which uses threads to serve more requests more efficiently than 1.3’s multi-process based server. While the core Zend engine of PHP is thread-safe many of the critical libraries that PHP relies on for its advanced functionality (image processing, database connectivity and so forth) are not, and are unlikely to become so any time in the future. In a threaded environment PHP is likely to suffer from all kinds of unpredictable bugs. Apache 2 can be run in traditional 1.3-style prefork mode but doing so greatly reduces its advantages over 1.3. Combined with the lack of heavy duty testing on Apache 2 and the fact that the 1.3 series will continue to be supported for a long time to come it’s clear why the PHP team are unwilling to recommend PHP and Apache 2 in a production environment.
More recent articles
- Weeknotes: Parquet in Datasette Lite, various talks, more LLM hacking - 4th June 2023
- It's infuriatingly hard to understand how closed models train on their input - 4th June 2023
- ChatGPT should include inline tips - 30th May 2023
- Lawyer cites fake cases invented by ChatGPT, judge is not amused - 27th May 2023
- llm, ttok and strip-tags - CLI tools for working with ChatGPT and other LLMs - 18th May 2023
- Delimiters won't save you from prompt injection - 11th May 2023
- Weeknotes: sqlite-utils 3.31, download-esm, Python in a sandbox - 10th May 2023
- Leaked Google document: "We Have No Moat, And Neither Does OpenAI" - 4th May 2023
- Midjourney 5.1 - 4th May 2023
- Prompt injection explained, with video, slides, and a transcript - 2nd May 2023