OpenSprinkler Forums OpenSprinkler Mobile and Web App Error on settings page

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #22762

    guylior
    Participant

    Hi,

    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

    #26042

    Samer
    Keymaster

    Are 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!

    #26043

    guylior
    Participant

    Those are the only errors, screen shot attached.
    Thanks!

    #26044

    guylior
    Participant

    BTW, I can translate to Hebrew.

    #26045

    Samer
    Keymaster

    Any 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

    #26046

    guylior
    Participant

    Hi,

    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

    #26047

    Samer
    Keymaster

    @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.

    #26048

    guylior
    Participant

    Seems to work now, Thanks!

    #26049

    guylior
    Participant

    Sorry, it is still not working.

    #26050

    Samer
    Keymaster

    Very 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.

    #26051

    guylior
    Participant

    The new version does not work for me at all, I can’t login.

    #26052

    Samer
    Keymaster

    Can 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!

    #26053

    Samer
    Keymaster

    I believe this issue should be fixed now. Can you please try now and let me know.

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Mobile and Web App Error on settings page