What PHP Version is your live server on? If your live server has a different version than the one you have now. It is recommended to install something similar to it. If the version is out of range, try installing the latest one that’s fairly close to it.
If you really don’t care about what the PHP version you are working with, then I suggest upgrading both the Ubuntu OS and PHP. First before you do anything. Back up all your work including pictures, videos, music, .etc on your Ubuntu. Save it on an external hard-drive. This is in case you screw up.
Then either download the latest version of Ubuntu from their main website or follow these steps to upgrade your Ubuntu. I suggest upgrading to Ubuntu 14.04 then upgrading once more to 15.10.
Once you have upgraded to either 14.04 or 15.10. Try un-installing PHP and Apache. And then re-installing them, Apache goes first. Once you finish that. Your PHP version should be at 5.6. Then try your PHP files again.
If the problem still persists at this point, I would like to get the full sayHelloWeb.php file. I would like to know what is in there. If it’s just a simple Hello world! message then never mind. But if it isn’t, I would like to check in case it doesn’t have download headers. This could be the cause.
I’ll look into this. The good news is that the PHP on my live server is fine and I’ve managed to more or less fix my broken website, but it would help to be able to work on it offline.
Yes. This has been on the back of my mind since early on. In my research I came upon a thread somewhere in which the person solved his PHP issues by upgrading the OS.
MUST RESIST CHANGE. MUST RESIST CHANGE. Must resist change . . .