I then view createpage.php through my normal webbrowser, and it starts the script.

I remember then when I ran this same script on a localhost LAMP stack, in Ubuntu the GUI placed little locked padlock symbols over the files which were created by the script. I am feeling this is the problem, hence why I tried chmodding them to 755, but it didn't work.

'401 Authorization Required' means you have password protection on the URL: http://www.mysite.com/includes/footer.php

I assume that if you open this manually in your browser you would see a password prompt. Since your script is not supplying a username and password when it requests the URL using include, authorization fails.

However, it sounds very much like you should not be using a URL include here.

That's not actually the right solution though; the right solution is not to use a URL for include. Using a filesystem path like DonR showed. Using a URL in that code is almost certainly not what you mean to do.

If you use the URL to include the file, the file is executed BEFORE you include it. You don't want that, it forces your server to make a round-trip to ITSELF, wasting an open socket connection and changing the scope of the included file.

I'm going to be the third person to say this and I'm going to be very explicit because it doesn't seem like you've heard: For the third time, you are doing this wrong. This is incorrect. Do not do it like this.