php 503 Service Unavailable error and code displaying as text in browser
10:13 15 Nov 2025

I have weird behaviour in a newly created domain running php 7.4

  1. Any webpage with a .php extension returns a "503 Service Unavailable error", regardless of content and whether or not it contains any actual php code

  2. Any webpage with a .html extension and identical content display correctly, except....

  3. Any php content on a .html page works for just the first few characters and then displays in the browser as plain text. For example , displays as hello'; ?>

There were issues when the domain was created by my hosting service as php 5.6 was initially installed before being changed. Could some incorrect reference to the wrong php version have remained in place? My hosting service seem to be struggling themselves to get to the bottom of it. Before anyone suggests, , which would be helpful of course doesn't work.

php http-status-code-503