I have a “one-page site” customized and working fine on my PC.
I have uploaded it to my webserver and I got the following error message:
Fatal error: Call to a member function get() on a non-object in (…)/system/src/Grav/Common/Debugger.php:31
Any idea of something I did wrong?
Also I’m not sure if I should modify “home: alias: ‘/home’” in system.yaml. I tried to, but it didn’t help.
That call is one to get configuration, which appears to be missing somehow. Are you sure you uploaded all the files to your server? Do you have an option to upload a zip file and extract on your server? That might be a safer way, else you should try reuploading the files again.
Hi,
thanks for your answer.
I tried several times to upload the files again, but the result was the same.
I have just compared the grav object on the local and the distant site.
They are the same (except for the paths) till the [uri] element (between [debugger] and [task] elements:
Hmm… The fact that it worked on your local, but the same site is having trouble on your hosted server combined with this internal server error message means that something in your .htaccess or PHP configuration is causing it.
on my PC: PHP 5.4.12 Windows
on my server: PHP 5.4.33 Linux
My server provider is “Webou Pro” (Belgium) using OVH hosting.
The actual error message (in the log folder):
[2014-10-15 20-44-14] Fatal error: Call to a member function get() on a non-object in /<my path>/system/src/Grav/Common/Debugger.php:31 @ http://<my url>/ @@ exception-2014-10-19-20-42-21-8c437038e0ef1896af1b30346fd91f60.html
I have no idea what could cause this as task should just have POST or GET variable, uri should be either closure or object and fatal error should be impossible as $grav[‘config’] should have been set when the error happens.
Have you tried clearing cache or clean installation in your server?
Also by clearing cache, Matias means the CLI command: bin/grav clear-cache as that resets a flag to clear memory-based cache as well as any file caches