OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Login Looping

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 3:48 pm

Hi Rich,

No problem. It's client-side, and the process for inspecting cookies will depend on your browser... For Chrome, for example, see http://support.google.com/chrome/bin/answer.py?hl=en&answer=95647.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 4:08 pm

Finally found the cookie. Was looking for something from the domain..not from Simon Frasier!

(nuked)
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 4:23 pm

Hi Alec-
This is from Chrome...

Name: OJSSID
Content: (nuked)
Domain: http://www.wmpllc.org
Path: /ojs-2.4.1/
Send for: Any kind of connection
Accessible to script: Yes
Created: Friday, March 1, 2013 6:19:54 PM
Expires: When the browsing session ends

I am getting to do all the tech things I loved to do years ago!
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 4:25 pm

Hi Rich,

Be careful posting cookie contents as well; if they move quickly that'll potentially give someone else access to your active session. I've removed the relevant contents of the cookies. The relevant cookies will come from your domain, not ours; the last one you posted is relevant. Is that the only cookie you see from your domain?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 4:44 pm

That was it under Chrome. I do remember another file starting in PHP in the same directory as the IE cookies..but it is gone.

Bottom line is if I delete the cookies, the login works fine. Not sure that helps you as I don't understand the coding it the cookie.
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 5:07 pm

Hi radjr,

I'm running out of ideas for remote debugging, unfortunately. Could you PM me with a URL and unpriveleged credentials for the journal?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 5:14 pm

Hi Alec-

PM? Please define. Do you want ssh access to the server? Or something else.

Also per the PKP Frequently asked questions file. I inserted the "echo "Importing " . $class . "<br/>\n";" in the functions.inc.php file.

The last few lines that are displayed when trying to log in are :
Importing classes.security.Role
Importing classes.journal.JournalDAO
Importing classes.journal.Journal

So, per the FAQ it is stopping at journal.Journal?

Let me know how and what you want for credentials above.
And, many thanks for your time!
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 5:34 pm

Hi Rich,

Ah -- that modification to display the import may well be causing the login/logout problem, as it's resulting in content getting displayed before the cookie code gets a chance to initialize your session. Try removing that first.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 5:36 pm

Alec-
See PM for details.

I added the debug statements as a way to debug and get you more info. The problem was happening way before the debug statement was added. Sorry.
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 5:40 pm

I have removed the statement from the functions.inc.php for your review. The problem still occurs. Deleting the cookie on the local browser solves the problem in IE and Chrome.

Cheers!
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 6:26 pm

Hi Rich,

It looks like your session.auto_start setting is on in php.ini; that prevents OJS from properly configuring the session. I suspect if you look in your error logs you'll find warnings like this one that make it a bit easier to debug than just working from the symptoms.

The session.auto_start variable is unusual to see enabled, so I wonder if it's been turned on for another application on your server. Depending on your server configuration, you may be able to override it using a .htaccess directive -- however, it's not possible to change that configuration option from within OJS, since PHP will already be initialized before any of that code is run.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 6:32 pm

Now I am confused..the php.ini file in /wmpllc.org/etc/php.ini shows the session.auto_start = 0

Are you looking at another php.ini file?

[Session]
session.bug_compat_42 = Off
session.auto_start = 0
session.cache_limiter = nocache
session.bug_compat_warn = Off
session.hash_function = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
session.name = PHPSESSID
session.use_only_cookies = 1
session.entropy_length = 0
session.serialize_handler = php
session.cookie_path = /
session.entropy_file =
session.gc_probability = 1
session.cache_expire = 180
session.gc_divisor = 1000
session.cookie_domain =
session.cookie_httponly =
session.gc_maxlifetime = 1440
session.referer_check =
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.cookie_lifetime = 0
session.use_cookies = 1
session.use_trans_sid = 0
session.hash_bits_per_character = 5
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby asmecher » Fri Mar 01, 2013 6:36 pm

Hi Rich,

Looking a Site Administration > System Information > Extended PHP Information, it shows as...
Code: Select all
Directive             Local Value   Master Value
session.auto_start    On            Off
The master value indicates your main php.ini file has it set to "off", but somewhere else (e.g. a .htaccess override) it's been enabled.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8347
Joined: Wed Aug 10, 2005 12:56 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 7:19 pm

Seems that Plesk automatically sets the Session.auto_start=1

We are trying to get it turned off as there is no other .htaccess files anywhere else on this VPS. More in a few minutes. Thanks for your help Alec.
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

Re: Login Looping

Postby radjr » Fri Mar 01, 2013 7:28 pm

Seems that there are other packages that may turn this on..and no way to turn off the local Session.auto_start. So this is not going to run this way.

All this over cookies?
radjr
 
Posts: 48
Joined: Thu Jan 17, 2013 1:19 pm

PreviousNext

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests