Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Blank Pages on my Live site.

Go to End

4 Posts   1909 Views


Community Member, 23 Posts

2 July 2007 at 8:13am

Edited: 02/07/2007 8:15am

I have a site on a remote shared hosting server. I am testing the site in a subdomain like Everything works perfectly there. I also have files on my local machine. I uploaded the files from my local machine to my public_html directory so that that the site would be available from

After uploading the files I confirmed that my _config.php is correct and tried to access the home page. No joy. There is no error, the page is just blank. I tried starting over with no success. I thought it may be because both the live version and the testing version are hitting the same database. I duplicated my database and now the live version hits dbRealData and I changed the test version so it hits dbTestData. The pages are still blank.

I think it has something to do with mod_rewrite. I changed my .htaccess rewrite rule from:

RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]


RewriteRule .* testing/sapphire/main.php?url=%1&%{QUERY_STRING} [L]

Now it displays pages, but all my URLs are similar to**testing**/home/ or some variation of that. (** for emphasis only)

Even though I'm basically routing my pages through the testing configuration, when I make changes to the live domain, it's updating the live version of the database (dbRealData)

Does anyone have any suggestions on what I could try to fix this?

[Sidebar: Does anyone know how long the forum search may be disabled? I think something like this may have been discussed before, but I can't find it]


Community Member, 231 Posts

6 July 2007 at 9:14am

The blank page is most likely due to the site being in Live mode, which will hide errors. You can set it to dev mode in your _config.php by adding the line:


You can get rid of the 'testing' in your URLs by adding this line to the _config.php:


The database updating on the live site suggests that you haven't changed the database details for the testing site?


Community Member, 23 Posts

6 July 2007 at 7:13pm

Edited: 06/07/2007 7:59pm

The first thing I did was add the line to put the site in dev mode. Then I took testing/ out of my .htaccess file. The pages still came up blank.
I double checked both _config.php files and they are not pointing to the same database. The live site is pointing to the live DB and the testing site is pinting to the testing DB.

I tried setting the staging site into dev mode by changing its _config.php but that had no effect at first. I added testing/ back to my live .htaccess file so it started using my staging files again. Then I started seeing errors.

XML Parsing Error: xml declaration not at start of external entity
Line Number 2, Column 1:

<?xml version="1.0" encoding="UTF-8"?>

I took this line out of the live and still got the error. I took it out of the testing site and the pages displayed as they had before, with /staging in the URLs. The interesting thing is that the line causing the error above was not on line 2, it is line 1 of the file. There was no blank line before it either. I don't know if that matters.

At this point I know that it is definitely using the testing site pages to display, but it's reading the live _config.php and calling the live database. I don't understand why it doesn't just use the live files for the display. To double check this again, I changed the wording of something by directly editing the live database and I changed the testing site CSS to alter the display colors. I'm definitely getting testing site display with live data.

Is _config.php the only place that references which database it should use? Originally both sites were pointing to the live data. I changed the testing site to point to a testing db, but I only changed it in _config.php.


Community Member, 94 Posts

9 July 2007 at 2:37pm

Check your php files. If they have blank lines after the final '?>', remove them.