初步評估

.user.ini points auto_prepend_file to a missing file: HTTP 500 after a move

配方 20261106-userini-auto-prepend-missing · 最新一跑 2026-11-06 · 首次發布 2026-11-09 · 更新 2026-11-09 · Forum case

站主看到什麼

After the site was moved to another host, every page including the login page returned HTTP 500. The host error log showed "PHP Fatal error: Failed opening required '.../wordfence-waf.php'". A plain file (/license.txt) still returned 200.

出處(公開論壇帖): https://wordpress.org/support/?p=17075291

測試環境與弄壞後看到什麼

測試站:WordPress 7.1、PHP 8.3。下表是照配方弄壞之後,首頁與登入頁回的 HTTP 狀態。

主機環境首頁登入頁備註
Apache + PHP-FPM500—/license.txt returned 200. The login page status was not recorded in these runs.

每一跑的結局

日期(UTC)主機環境連線模式結局維修站版本備註
2026-11-06Apache + PHP-FPMSSHNot recovered2.1.434The re-check did not pass, and the system issued the automatic recovery-fee refund (payment is simulated in the lab).
2026-11-06Apache + PHP-FPMSSHDeclined at the pre-payment check2.1.434The pre-payment check timed out.
2026-11-06Apache + PHP-FPMSSHRecovered2.1.435
2026-11-06Apache + PHP-FPMFTPCase did not complete2.1.434Copying the site over FTP stalled and the case did not reach the health check.
2026-11-06Apache + PHP-FPMFTPDeclined at the pre-payment check2.1.434The pre-payment check timed out.
2026-11-06Apache + PHP-FPMFTPRecovered2.1.435The FTP server offered explicit TLS and the product used it.

缺口與修在哪一版

結局不是修好的跑次,都在這裡:改了什麼、修在哪一版、重跑的日期與結局。

發現日主機環境連線模式改了什麼修在哪一版重跑
2026-11-06Apache + PHP-FPMSSHThe recovery removed the broken setting on the copy, but the copy's PHP kept the old setting cached and the re-check failed. The copy now reloads PHP after the change.2.1.4352026-11-06 · Recovered
2026-11-06Apache + PHP-FPMSSHThe pre-payment check timed out on this setup; it no longer does.2.1.4352026-11-06 · Recovered
2026-11-06Apache + PHP-FPMFTPCopying the site over FTP stalled and the case did not reach the health check. The copy step no longer stalls on this setup.2.1.4352026-11-06 · Recovered
2026-11-06Apache + PHP-FPMFTPOver plain FTP, passive-mode replies were dropped between the recovery station and the test server, and the pre-payment check timed out. The product now uses explicit TLS when the server offers it. The re-test was run after the test server was set to offer TLS; plain FTP on this path has not been re處理中—

對到的故障項目

補充

On this setup PHP-FPM re-reads .user.ini on a cache interval, so a change to that file takes effect after a delay rather than on the next request.

這些是我們測試主機上、某一版、某一天的紀錄,不是對任何網站結果的承諾;其他主機、PHP 與 WordPress 版本的結果可能不同。

初步評估 →