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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Two problems after moving a site


Reply


4 Posts   1093 Views

Avatar
juneallison

Community Member, 108 Posts

1 September 2011 at 10:35am

Hi,

I had no trouble moving SS to my demo server. Everything worked fine. I just moved it to the real server and switched the DNS to this server. This has resulted in two problems.

1. /~hostingusername/ is being inserted into all of my links. When I installed SS I did use their preview url http://previewurl.com/~hostingusername/install.php ...The front end seemingly looks fine except /~hostingusername/ is being inserted into my url. I checked the database, I checked the config files and I checked the htaccess file and am not finding any instance of /~hostingusername/ ...The new hosting is with Arvixe. Two reps have told me this will go away when propagation is complete. One rep said its not necessarily related.

2. I can't login to the admin or at least not easily. I checked the remember me box, got to a "sign in as a different user" screen, I went back to the login screen again, and then went to the admin url and was able to see everything. I talked to my host and they confirmed that the php session data folder was writeable.

Any suggestions on either of these problems would be great.

Thank you!

Avatar
martimiz

Forum Moderator, 1106 Posts

1 September 2011 at 11:18pm

This sounds like SilverStripe cache issue - did you do a /?flush=1 after you switched from the preview url to the official one?

Avatar
juneallison

Community Member, 108 Posts

2 September 2011 at 12:09am

Thanks for the suggestion. I just did a /?flush=1 and a /?flush=all ...no luck. The hostingusername still gets inserted into the url and I still can't login properly.

On a related note how does SS get and/or store the base url?

Any additional suggestions would be great.

Thanks!

Avatar
Willr

Forum Moderator, 5513 Posts

3 September 2011 at 8:50pm

On a related note how does SS get and/or store the base url?

do a print_r($_SERVER) (anywhere in your code). I think you could find your ~username is still in something like the REQUEST_URI. You can manually set the base url in your _config.php file:

Director::setBaseURL('yoursite.com');

Then SS will use that and not try and smartly work it out from the _SERVER variables.