OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Error on settings page
- This topic is empty.
-
AuthorPosts
-
February 16, 2014 at 9:57 pm #22762
guyliorParticipantHi,
I am getting this error on the settings page (near the manual mode/operation):
“Notice: Undefined index: data in sprinklers.php on line 214”
“Notice: Undefined index: data in sprinklers.php on line 218”I am running Windows with Apache web server.
Thanks, Guy
February 17, 2014 at 5:39 am #26042
SamerKeymasterAre those the only errors in the log? Because a function is called to define $_SESSION[“data”] at the very top of sprinklers.php. Unless that function is failing and the variable was never set. Let me know if you find any other errors. Thanks!
February 17, 2014 at 4:51 pm #26043
guyliorParticipantThose are the only errors, screen shot attached.
Thanks!February 17, 2014 at 4:52 pm #26044
guyliorParticipantBTW, I can translate to Hebrew.
February 17, 2014 at 11:01 pm #26045
SamerKeymasterAny specific idea which update caused the issue? Also, see if you can find the apache error.log and check for errors there.
I added Hebrew to getlocalization so please do translate if you can, thanks!
Update: I am still unable to pinpoint this issue. If you do find any errors in the logs please let me know. Thanks
February 20, 2014 at 9:57 pm #26046
guyliorParticipantHi,
I opened the sprinklers.php and moved the $_SESSION[“data”] = start_data(); from line 14 to line 19 just after the include once and it works.
new line 19:
new code in RED.
Guy
February 21, 2014 at 4:43 am #26047
SamerKeymaster@guylior I’ll be honest, I am vaguely understanding what is going. My interpretation is the isset($_SESSION) is failing on your setup (should be true but somehow coming back false) and as a result a session_start() is fired off. Normally, that is fine since session_start resumes the session if a PHPID is sent in the cookie. However, since this is the initial load there isn’t a PHPID and it’s starting the session over. As a result, the data is gone and you get the notices. I tried moving the checks to test and would like to know if that helps. If not, I have a few other ideas.
Thanks.
February 21, 2014 at 8:00 am #26048
guyliorParticipantSeems to work now, Thanks!
February 21, 2014 at 8:18 am #26049
guyliorParticipantSorry, it is still not working.
February 21, 2014 at 4:53 pm #26050
SamerKeymasterVery odd, I guess I will merge your suggested fix but I am still bothered by why this is happening. It seems very isolated and the fix only avoids one session_start(), which makes me believe its the root of the problem. With that said, I have no good way to debug and test this, especially without error logs.
I will have your changes merged later today and hope the issue goes away permanently.
Update: I pushed this change out now. Let me know if this helps.
February 24, 2014 at 8:29 pm #26051
guyliorParticipantThe new version does not work for me at all, I can’t login.
February 25, 2014 at 6:29 am #26052
SamerKeymasterCan you please provide me with error logs. You need to locate where your apache logs are and get the relevant data out of error.log please.
Thanks!
March 2, 2014 at 2:51 am #26053
SamerKeymasterI believe this issue should be fixed now. Can you please try now and let me know.
Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Error on settings page