Jump to content

front end - back end sessions


rushy
 Share

Recommended Posts

I'm having a problem with writing data in the back end from time to time. On my front end I have a login form that authenticates a user and if login is successful certain commands are exposed in the front end, such as add, delete and rename which are not visible to guest users. I simply use the api function $user->isLoggedin() and to determine whether to show the commands or not. In the back end I have a kind of web service page that handles these commands and will only act on them if $user->isLoggedin() is also true there. I also set a $session timeout in my config.php. This works fine, if the session has timed out the command is still shown on home page but will fail in back end and will then say session timeout and refresh home page by session redirect.  BUT sometimes when session is still active a command is actioned by back end but times out.... if I try again the action then always succeeds. Any ideas what could cause this. I note that exceptions.txt log file shows SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 583 !! but I have no idea why it would "go away" and then work next time. Thanks for any pointers...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...