Jump to:

4952 Posts in 14256 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » home.pl & 2.3.3 & Fatal error: Class 'Debug' not found

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

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

Page: 1
Go to End
Author Topic: 2027 Views
  • Jarek
    Avatar
    Community Member
    30 Posts

    home.pl & 2.3.3 & Fatal error: Class 'Debug' not found Link to this post

    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?

    2027 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.