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

$_SERVER['SCRIPT_FILENAME'] missing on hosting


Reply


1347 Views

Avatar
ekersten

Community Member, 16 Posts

1 December 2009 at 4:53am

I had to deal whit a hosting that (amongst other stuff) didn't expose the mentioned variable.

The solution:

Simply put this code at the begining of sapphire/main.php

$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'];

At least that did the trick for me this time.

Hope this helps someone.