Blank pages

Web hosting, FTP/database access, mirror services and hosted blogs
Post Reply
strider1974
Posts: 3
Joined: Sun Nov 15, 2009 11:39 pm
Location: Sydney

Blank pages

Post by strider1974 » Sun Nov 15, 2009 11:50 pm

I have created a web site using PHP and tested it using XAMPP on my PC

When I uploaded the pages they now appear as only blank pages.

Any ideas what I am doing wrong?

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Blank pages

Post by Dazzled » Mon Nov 16, 2009 6:50 am

Lots of possibilities, but PHP errors or calls for something unsupported come to mind. The server doesn't feed server script error messages to an online browser. Here is a short file you could upload and name phpinfo.php for example which will tell your browser the PHP version, settings and facilities available.

Code: Select all

<?php
  phpinfo();
?>
(Details at http://php.net/manual/en/function.phpinfo.php. You can also put this inside your html file, and it works on most browsers, but produces duplicated html statement errors if you go looking)

You should get an idea of what is wrong if you save the source downloaded by the browser (or by a downloader like wget), as it is the markup coding the server created from your script. What is missing is where the trouble lies.

strider1974
Posts: 3
Joined: Sun Nov 15, 2009 11:39 pm
Location: Sydney

Re: Blank pages

Post by strider1974 » Mon Nov 16, 2009 12:22 pm

Thank you for the response Dazzled.

Since this was for an assignment that was due I ended up using a free web hosting service I found.

This service is less secure and so it had error reporting switched on. In the end I found the cause was the line

<?xml version="1.0" encoding="iso-8859-1"?> which was in my header. Once I removed this all was fine

JeremyP
Posts: 159
Joined: Wed Dec 13, 2006 2:22 pm
Location: Newcastle NSW

Re: Blank pages

Post by JeremyP » Tue Nov 17, 2009 7:53 am

strider1974 wrote:
This service is less secure and so it had error reporting switched on. In the end I found the cause was the line

<?xml version="1.0" encoding="iso-8859-1"?> which was in my header. Once I removed this all was fine
Actually you do get access to error and access logs via webstats eg. http://www.yourdomain.com/webstats and you use the login details provided.

Apart from giving you just webstats it also provides with you with detailed logs of who (such as user agent information, IPs, etc) access the site and also errors that are encountered if any.

In future you can check /webstats/logs

Post Reply