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

Staticpublisher is looping pages to install.php


Reply


4 Posts   611 Views

Avatar
otherjohn

Community Member, 125 Posts

5 August 2010 at 7:35am

Hi all,
I have a successful install of SS working on my site (and it has been for a while). But recently I wanted to check out the staticpublisher so I followed the instructions on http://doc.silverstripe.org/staticpublisher and did all steps.
But now the site redirects to install.php page in an infinite loop.

Any ideas on what is going on?

Avatar
otherjohn

Community Member, 125 Posts

8 August 2010 at 3:13am

Edited: 08/08/2010 3:54am

any ideas??

Also, thought I should mention:
Site is on SS 2.4.0
and CMS and Sapphire folders are Symbolic Links.

Another clue is that it works with 2.3 .htaccess instead of the RewriteRule .* sapphire/static-main.php?url=%1&%{QUERY_STRING} [L]

Avatar
otherjohn

Community Member, 125 Posts

8 August 2010 at 4:08am

SOLVED:

Ok I found out what the problem. Since I was setup for multisite using Symbolic Links to the CMS and Sapphire folder, I needed to change
line 38ish in static-main.php from
define('BASE_PATH', rtrim(dirname(dirname(__FILE__))), DIRECTORY_SEPARATOR);
to
define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTORY_SEPARATOR));

Avatar
banal

Community Member, 901 Posts

8 August 2010 at 11:14am

Read here for a solution that will allow symlinked folders without the need of hacking core files: http://www.silverstripe.org/general-questions/show/251650?start=56#post289221

I guess that should work with static-publisher as well?