Unable to Login

From TNG_Wiki
Jump to navigation Jump to search

The following was taken from the TNG Forum in answer to a scenario where the user was not able to login.

I've been having trouble with my genealogy program--specifically, TNG doesn't recognize my attempts to log in. I asked the program's author for help and he sent the following:

"...PHP is not saving the "session" file like TNG is expecting. The session file helps TNG remember from one page to the next that your login was successful. Without it, you go to the next page, but then TNG can't see that you're logged in, so you get sent back where you came from with no indication of what happened. Sometimes the browser gets caught in an infinite loop."

"Contact your host and tell them that you need your PHP scripts to be able to save session files. Sometimes they can just flip a switch, other times they'll give you some code to implement. If that's what they do, you can put it in your customconfig.php file."

The following is based on a more recent issue in the TNG Forum where I helped isolate the problem.

Symptoms of Session Path problem

Symptoms of a session path problem are

  • login on the public side returns the home page with no indication of a login
  • Your session is expired message is returned on a login attempt from the Admin login screen.

Confirming the problem

To confirm that your unable to login problem is caused by not being able to create the session because of a session path issue, you can:

  • download the following tmp.zip file
  • extract the tmp.php file from the zip file
  • FTP upload the extracted tmp.php to your TNG folder on your hosting service
  • run the tmp.php file

If it does not return a sessPath name, such as sessPath: /tmp but rather displays the variable sessPath: /var/php_sessions then you should contact your hosting service as indicated below. The tmp.php script was copied from the PHP Manual on Sessions functions


It appears that some hosting service now provide a php.ini for each account. It further appears that the default session.save_path is commented out with a semi-colon so it appears as follows in the php.ini

;session.save_path = "/tmp"

Solution is to contact your hosting service to find out what you need to do to get sessions saved. In some cases it requires that you update the php.ini script used for the account to remove the comment and specify a valid path for the account. In other cases, it requires the hosting service to update the php.ini file.