I was recently at a job interview exam for a junior web development position.
One of the questions was: After you update your server, your website isn’t showing up any pages, just showing a blank screen, no errors.
Suggest what could cause this?
What would be the process to find the cause of the problem?
And how would you fix it?
I wasn’t sure how to answer this question and was quite stuck on it.
Could anyone describe an answer for me on this or can anyone point me to a website that describes how to deal with this problem?
It’s a very vague question – I highly suspect it was designed just to see how you think and test your knowledge.
The only plausible cause of a pure blank page is just simply not having any file contents read from the requested location.
This in turn can be either due to simply having a blank file (0 bytes), or having a mismatched configuration redirecting the request to another, blank (yet existing hence no errors) location. An erroneously written .htaccess could do that in Apache, for example.
An alternative could be, if it’s a server-side script such as PHP, that the server either isn’t parsing it properly, or it isn’t printing to the page, meaning there is no data to write to the client. If errors are turned off (so as not to bewilder a customer), then they won’t display either, leaving a blank page.