When I open a thread ore category than I become this error.
What can I do?
28-Mar-2016 10:38:09 Etc/GMT0] PHP Notice: Undefined variable: _SESSION in /home/u605434157/public_html/forum/sources/subs/HttpReq.class.php on line 95
[28-Mar-2016 10:38:09 Etc/GMT0] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Passed variable is not an array or object, using empty array instead' in /home/u605434157/public_html/forum/sources/subs/HttpReq.class.php:95
Stack trace:
#0 /home/u605434157/public_html/forum/sources/subs/HttpReq.class.php(95): ArrayObject->__construct(NULL, 2)
#1 /home/u605434157/public_html/forum/sources/subs/HttpReq.class.php(360): HttpReq->__construct()
#2 /home/u605434157/public_html/forum/sources/Action.controller.php(53): HttpReq::instance()
#3 /home/u605434157/public_html/forum/index.php(155): Action_Controller->__construct()
#4 {main}
thrown in /home/u605434157/public_html/forum/sources/subs/HttpReq.class.php on line 95
That file only exists on the 1.1 development branch.
I think this would imply that sources/Session.php wasn't loaded or something, because without session_start() there's no $_SESSION. Are you sure you have the very latest files and all that?
It's the scheduled tasks controller: it's initialized and run before the session is loaded and when the Action_Controller tries to use $_SESSION, it doesn't exit.
At the moment I'm not sure what the best action is. I would avoid load the session just for scheduled tasks, but seems the less messed-up for the code.
Ok thanks for reply how to fix that.
German
OK danke für die Antwort wie kann ich das Problem lösen.
I made a quick and dirty adjustment that only copied that array in httpreq if and only if session was actually started. This stopped the error cleanly but I was never sure if that was appropriate so I didn't embed it in my pull requests.
Yep, I was thinking about something similar.
It should be fine, because as far as I can see the only time it is used that way is in scheduled tasks and that don't seem to use session in any way.
It may be worth think of some other ways, but not too pressing.
@wumix is there any particular reason you use 1.1 instead of the current stable version 1.0?
Okay what is the stable download of elkarte?
1.0.6 ore 1.0.7
Oh sorry also the stable version is 1.0?
First I downloaded development version that's my failure.
I have yet download the version from the portal 1.0.6
And tray again with a fresh install.
I have found the problem!
When I mark the checkbox for
Search engine friendly URLs
Apache/Lighttpd only
This feature will work on your server.
Than come this failure.
My server can this option. Only the script will not work when I check this option.
The current stable is 1.0.7, released early today:
https://github.com/elkarte/Elkarte/releases/tag/v1.0.7
http://www.elkarte.net/community/index.php?topic=3439.0
You can download the "ElkArte_v1-0-7_install.zip" file and use it. ;)
Yeah it'll be in my next pr. Lots of stuff simply does not work without fixing it.
Indeed! xD
And pr is in.
And it starts again with me not receiving github notifications... >_>