Poisonal
Pass it along a thing worth keeping

CMSD Brings Back 31 Laid-Off Teachers Following Agreement Celebrating District's Newfound Commitment to Reversibility

The Cleveland Metropolitan School District announced an agreement this week to rehire 31 teachers who had been laid off, a decision the district framed as a demonstration of its responsiveness to community concern and a vindication of the layoff process itself. District officials said the rehires proved that the initial cuts were not permanent, a distinction they suggested carried moral weight, though none of the 31 were guaranteed that future rounds would be similarly reversible. The agreement came after months of parent and union pressure and was described by the district as evidence that the system works, provided you are willing to spend months requesting that it work.

4 months ago • 8 min read
✓Checklist
Your Progress0/8
1

Disable display_errors in php.ini

Turn off the display_errors directive to prevent sensitive error messages from reaching users in production. Set `display_errors = Off` in your php.ini configuration file. This stops stack traces, database credentials, and file paths from leaking to attackers.

▼
💡
TipRestart PHP-FPM or your web server after modifying php.ini for changes to take effect.
2

Set environment to production in .env

Configure your application environment to `APP_ENV=production` in the .env file. This disables debug mode, suppresses verbose logging, and ensures caching strategies activate. Most frameworks treat production mode as the signal to harden security defaults.

▼
💡
TipNever commit .env files to version control—use .env.example as a template instead.
3

Remove composer.json from public web root

Delete or move composer.json and composer.lock outside the web-accessible directory. These files expose your project's dependency graph and package versions, allowing attackers to target known vulnerabilities in specific library versions.

▼
💡
TipKeep composer files in the parent directory above your public/ or web/ folder.
4

Configure OPcache preloading

Enable OPcache preloading to compile and cache PHP scripts at startup, reducing latency on every request. Set `opcache.preload` in php.ini to point to a preload script that requires your most-used classes. This improves response time without runtime compilation overhead.

▼
💡
TipPreload scripts must be written carefully—syntax errors in preloaded files will crash the server.
5

Enable HTTPS and enforce security headers

Configure SSL/TLS certificates and set strict security headers like `Strict-Transport-Security`, `X-Content-Type-Options`, and `X-Frame-Options`. These headers prevent man-in-the-middle attacks, MIME sniffing, and clickjacking. Force all traffic through HTTPS using 301 redirects.

▼
💡
TipUse tools like Mozilla SSL Configuration Generator to create production-grade server configs.
6

Set appropriate file and directory permissions

Restrict filesystem permissions so only the web server user can read application code and write to temp directories. Set files to `644` and directories to `755`, then apply more restrictive permissions to sensitive folders like config, storage, and vendor directories. This limits damage if a process is compromised.

▼
💡
TipUse `find` and `chmod` in bulk, but test on a staging server first to avoid locking yourself out.
7

Configure error logging to file

Redirect error logs to a private location outside the web root using `error_log` in php.ini. Log to a file that only administrators can read, never to stdout or the public directory. This preserves debugging information for developers while hiding details from users and attackers.

▼
💡
TipSet up log rotation to prevent disk space exhaustion from accumulated error logs.
8

Disable dangerous PHP functions

Use the `disable_functions` directive in php.ini to block functions like `exec()`, `system()`, `shell_exec()`, and `passthru()`. These functions let attackers run arbitrary system commands if your application code is exploited. Disable only functions your application doesn't actually need.

▼
💡
TipTest thoroughly after disabling functions—third-party libraries may silently fail if they rely on disabled calls.
Receipt
PRODUCTION
auditing server resource consumption
database query overhead420ms
uncached twig template compilation180ms
redundant composer autoloader scans95ms
internal function call stack depth38 levels
garbage collection pause12ms
session serialization overhead8ms
ini_get() polling for settings4ms
waiting for nothing to happen2ms
why are you still reading−43ms
time travel not yet supported
maybe try [[golang]]?
— still shipping on production deadline
scratchpad notes during architecture review
  • Stop writing custom frameworks; use the standard library for once.
    (adults need to feel professional too)
  • Accept that php refuses to die no matter how many medium articles you publish
  • Admit laravel turned a script kiddie utility belt into enterprise architecture
  • Stop adding dependency injection containers to simple crud apps
  • Delete the custom ORM you spent three weekends building
  • Check if composer actually needs seventy nested dependencies for a string helper
  • Deploy the monolith and go home before five pm
Mateus Silva
Principal Engineer who has rewritten the same backend four times

Let me be perfectly clear: PHP is not dead, and that terrifies people who spent $200,000 on a bootcamp learning Rust. I know this because I attended a conference last month where a very smart person with a very impressive title told me that microservices are the only path forward, and when I asked him how many of them he'd actually deployed to production, he said 'well, theoretically.' Theoretically! Here sits PHP, unfashionable and utterly relentless, powering somewhere between 76 and 90 percent of the web—depending on which metrics you believe—while the thought leadership class spends another quarter arguing about whether TypeScript deserves a semicolon.

The thing about PHP is that it commits the cardinal sin of being useful without being interesting. It doesn't make you sound smart at dinner parties. It doesn't come with a manifesto or a charismatic creator with a YouTube following. You cannot write a Medium post called 'I Tried PHP for a Week and It Changed My Life' because nobody has ever felt that way about PHP. They've felt relief. They've felt 'oh, this actually works.' They've shipped e-commerce sites, content management systems, and the underpinnings of half the internet on machines that cost less than a standing desk. But rapture? Never. And yet here it persists, unglamorous and uncanceled, because web applications need to exist in the real world, where servers have limited RAM and deadlines are measured in days, not quarters.

I once watched an engineer argue that Node.js any language without static typing was fundamentally unserious. His startup failed six months later because he spent so much time debating architectural purity that he forgot to actually ship. Meanwhile, a PHP developer I know—the kind who uses cPanel and thinks about databases the way normal people think about databases—just handed a paying customer their fifth new feature in as many weeks. He had no hot takes. He had no design patterns to defend. He had exactly one folder structure, and it worked.

The internet runs on boring tools, and boring tools run on the people willing to use them without needing to feel heroic about it. PHP will still be here in ten years because it does what it says, costs nothing, and doesn't require you to understand async/await to make money with it. The languages of tomorrow will come and go. The frameworks will have their moment and fade. But somewhere, quietly, a developer will be maintaining a PHP application that processes real transactions, serves real users, and makes real profit. And no one will write a blog post about it. And it will be fine.

Principle · Software Architecture
Legacy systems survive because the cost of replacing them exceeds the cost of maintaining them.

Organizations rationally choose to keep aging technology running when rewriting it would consume more money, time, and risk than incremental fixes. This economic reality, not technical merit, is why decades-old systems remain in production at banks, governments, and enterprises. The switching cost becomes a moat.

When a legacy system becomes a security liability or blocks a critical business opportunity, replacement costs can drop below maintenance costs, forcing modernization despite sunk investment.

— Eric S. Raymond, "The Cathedral and the Bazaar", 1997

The Script-to-System Journey
article id
6716
target type
fe_component
chat target type
article_component
chat target id
81585
created at
2026-07-27T12:48:47.000000Z
updated at
2026-07-27T12:48:47.000000Z
content id
333456
related content
  • {"id":28325,"type":"concept","title":"Structural Budget Deficits in Public School Districts"}
Before and After: A Real Migration
article id
6716
target type
fe_component
chat target type
article_component
chat target id
81586
created at
2026-07-27T12:48:49.000000Z
updated at
2026-07-27T12:48:49.000000Z
content id
333457
related content

    Twelve Saves And A Mistake

    Twelve Saves And A Mistake

    More from Cleveland Metro