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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Moving SS site to another server... no success


6 Posts   2150 Views


Community Member, 9 Posts

4 July 2011 at 6:32am

Edited: 04/07/2011 6:50am

Dear all

I spend 5 hours today with a friend trying to move an existing SS website to another server. We are doing that because the person who originally developed the website suggested that the reason why we couldn't update it (a dev/build?.... ruins the layout) was maybe because something was wrong with the server it is on at the moment. So we are trying another server on which we have full control.

Now we read quite a few posts on this forum and we followed the rules clearly:

* start a new/fresh SS install. That works
* create new SQL database and import the old one (data) to the new one (it works we checked with phpMyAdmin)
* copied other the modules from the old website (multiselectfield, dataobject_manager, sfwupload and syntaxhl), we also copied themes, assets and mysites.
* we updated the config.php file


global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "xxxx",
   "username" => "xxxx",
   "password" => "xxxx",
   "database" => "xxxx",
// Sites running on the following servers will be
// run in development mode. See
// for a description of what dev mode does.

// This line set's the current theme. More themes can be
// downloaded from

Object::add_extension('SiteConfig', 'CustomSiteConfig');

HtmlEditorConfig::get('cms')->setOption('convert_fonts_to_spans', false);


HtmlEditorConfig::get('cms')->insertButtonsAfter('pasteword', 'syntaxhl');
HtmlEditorConfig::get('cms')->setOption('remove_linebreaks', false);

// enable nested URLs for this site (e.g. page/sub-page/)

//Enable Search

//Make a data objects sortable (for DOM)

//Unset cache if flushing
if (isset($_GET['flush'])) {
   SS_Cache::set_cache_lifetime('any', -1, 100);

So we think we have done everything correctly. Then we have done a dev/build?flush=all and the command seemed to run correctly no error. However no matter what we do when we look at the website we seem to be loading a default HOME page not our HOME webpage ????? We just don't know why. We noticed that in the config.php file there's a CustomSiteConfig. When we put that on we can't have access to the admin section anymore. Does anyone know why ?

Anyway we are stuck and we lost 5 hours on something that seems or should be fairly simple... ???? If anyone could help us with that it would be great.

PS when we look at the LOGs we have the following message:

PHP Fatal error:
Call to a member function absoluteLink() on a non-object in /srv/www/ on line 35

Line 35 contains this: $fields->addFieldToTab("Root.Main", new LiteralField("", '<h3 style="padding-top:20px;">IPN URL: <a href="' . DataObject::get_one('IPNPage')->absoluteLink() . '">' . DataObject::get_one('IPNPage')->absoluteLink() . '<a></h3>'));

PS2: should also say that website was developed with SS 2.4.0-rc1 and that the one that we are using on the new server is 2.4.5 so can it be a version conflict problem ?



Forum Moderator, 1808 Posts

4 July 2011 at 7:56am

Edited: 04/07/2011 7:56am

Call to a member function absoluteLink() on a non-object in

relates to the "chaining" here..


which means the dataobject get returns nothing, in other words there is no row in Sitetree with the class name 'IPNPage' - I take it this is because you have taken the code, yet have an empty database? or maybe you have imported the database but the case is different... if the mysql is setup in a way YourTableNames are like that, but they mightbelikethis if it forces lowercase.


Community Member, 9 Posts

5 July 2011 at 4:24am

Thanks a lot for your answer... Unfortunately I am too sure to understand what you are suggesting;-) What I am trying to understand is if wether this error I have in the log is responsible for not loading the home page from the selected theme (a default one is loaded). When you speak about database are you talking about the SQL database (the SQL is not empty, we have imported the old one to the new one) or the database that SS builds when you do a dev/build.
Could anyone make other suggestions please ?
Thanks a lot


Forum Moderator, 1808 Posts

5 July 2011 at 4:33am

Hi Mast4as,

I am sorry that you didn't follow my answer - but I strongly suspect that this is your issue...

Please run the following SQL...

SELECT * FROM SiteTree WHERE ClassName = 'IPNPage';
SELECT * FROM SiteTree_Live WHERE ClassName = 'IPNPage';
SELECT * FROM SiteTree_versions WHERE ClassName = 'IPNPage';

this is searching for a page of the type that I think doesn't exist... I could be wrong... but...


...relies on something being returned form those SQL.

But yes all other ideas are welcome!


Community Member, 9 Posts

10 July 2011 at 10:26am

Thanks for your answer. We will look at the SQL database. Haven't done that yet. This is very frustrating situation as apparently moving a website to another seems a fairly simple task. We still can't manage to move it. We tried another technique which is to zip the content from the original file unzip it to the new server. Then update the config file with the new info about the sql database for that server, and create a new SQL database on the new server. Then we flushed it. We still can't get the page for the site. We get the default one.

Also we have this error in the log:


but we don't have a images dir in temples what we have in the original site are:

So what does it look for a directory that doesn't exist on the new server while this seems to not cause any problem in the current website ?????

Help !!!

Bruce B

Community Member, 147 Posts

11 July 2011 at 4:48pm

Moving servers - sometimes its seamless, other times its a pain in the !!!.
At least you can see the PHP errors, thats a good starting point. When you say you see a default home page, what is it you are are seeing?

Did you say you have commented out that CustomSiteConfig?