4621 Posts in 1397 Topics by 1392 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1833 Views |
-
home.pl & 2.3.3 & Fatal error: Class 'Debug' not found

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?
| 1833 Views | ||
|
Page:
1
|
Go to Top |

