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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

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

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

home.pl & 2.3.3 & Fatal error: Class 'Debug' not found


Go to End


2801 Views

Avatar
Jarek

Community Member, 30 Posts

19 November 2009 at 3:23am

Hello

According to this post http://www.silverstripe.org/archive/show/64989?showPost=129965&start=8 and other forum posts default silverstripe installation doesn't work on home.pl (polish hosting). One of messages is "Fatal error: Class 'Debug' not found.....".

Solution (for version 2.3.3) is to make this changes:

1. Controller.php->redirect()

add

if (substr($url, 0, 1) == '/') {
$url = 'http://' . $_SERVER['HTTP_HOST'] . $url;
}

before

$this->response->redirect($url, $code);

2. Core.php

change constant (by adding ."/.."):

define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME']))."/..", DIRECTORY_SEPARATOR));

3. Director.php->direct()

Comment last parameter - for POST calls (on home.pl) function @file_get_contents('php://input') doesn't work

$req = new HTTPRequest(
(isset($_SERVER['X-HTTP-Method-Override'])) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'],
$url,
$_GET,
array_merge((array)$_POST, (array)$_FILES),
'' /*@file_get_contents('php://input')*/
);

Last change modifies function by setting last parameter to null. Does anybody know it can cause any problems with page?