Skip to content

Add server health check for missing PHP curl extension#261

Merged
dgershman merged 2 commits intomainfrom
feature/curl-health-check
Mar 24, 2026
Merged

Add server health check for missing PHP curl extension#261
dgershman merged 2 commits intomainfrom
feature/curl-health-check

Conversation

@dgershman
Copy link
Copy Markdown
Contributor

Summary

  • Adds server_info (PHP version, curl availability/version) to the settings API response for admin users only
  • Displays a warning notice on the settings page when the PHP curl extension is missing
  • Displays a success notice with PHP and curl version info when curl is available
  • Prevents hours of debugging slow page loads caused by WordPress falling back to PHP streams without curl

Context

We spent hours debugging why na-wt.org's events page took ~33s to load. The root cause was PHP 8.4-FPM missing the curl extension — WordPress fell back to PHP streams for outbound HTTP requests, adding ~5s per call. This was invisible to the admin.

Test plan

  • With curl enabled: settings page shows green success notice with PHP/curl versions
  • With curl disabled: settings page shows yellow warning with instructions
  • Non-admin API requests to /settings do not include server_info
  • composer test passes (514 tests)
  • npm run build succeeds
  • composer lint passes

🤖 Generated with Claude Code

dgershman and others added 2 commits March 24, 2026 14:51
Show a warning notice on the settings page when the PHP curl extension
is not installed, and a success notice with version info when it is.
The curl extension is critical for performance — without it, WordPress
falls back to PHP streams, adding ~5s per outbound HTTP request.

Server info is only exposed to admin users to avoid leaking details.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dgershman dgershman merged commit ec0e1a0 into main Mar 24, 2026
3 checks passed
@dgershman dgershman deleted the feature/curl-health-check branch March 24, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant