Random logout problem with domain but not with ip address

recently user reported logout from website randomly specific on post data to server
i check it and when i use domain address of website if must login on every post data
but on accessing website with ip address there is no such problems

Hi @molavy,

If session_check_ip setting in config.inc.php is On, try turning it Off.

Otherwise, try changing session_cookie_name to something else (also in config.inc.php). If your user has a cookie conflicting with the one OJS is trying to set (e.g. one with the same name but a different path), this will resolve the conflict. Note that any users who are logged in will have to restart their sessions after you make this change.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher , session_check_ip was off, i changed session_cookie_name with no success.
there is 8 ojs website , and all of them has this issue

Hi @molavy,

Try specifying a cookie_path; it’s possible that OJS is not detecting it correctly. If that doesn’t work, send me a URL to one of the installs and I’ll see if I can spot the problem.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher
i checked php.ini
there is cookie_path already there:
; The path for which the cookie is valid.
; http://php.net/session.cookie-path
session.cookie_path = /

Hi @molavy,

Unfortunately that server appears to be having problems – it’s timing out most of the time for me – but your cookies look OK at a glance. Have you tried a different browser (such as Firefox or Chrome instead of IE)? Also try deleting cookies in your browser, in case a change in configuration has resulted e.g. conflicting cookies.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher
please login and try post some data
you well see that you logout on each form submit

Hi @molavy,

Your system appears to be occasionally redirecting to http://[domain]//[path] – note the double-slashes. Check your config.inc.php to see what base_url settings you’re using. Also check any rewriting configuration, if you have any.Other than that, it appears to work for me (using Firefox).

Regards,
Alec Smecher
Public Knowledge Project Team

i check that , but i can’t find any problems in config.inc.php , there is no // there .

Hi @molavy,

Do you have any trailing slashes?

Regards,
Alec Smecher
Public Knowledge Project Team

there is base_url=“http://journals.bmsu.ac.ir/jabr
i ask about this problem on ##php and #httpd irc channel
both said me seems that is related to framework

@asmecher, i waiting for solutions about this problem

Hi @molavy,

This isn’t something I’ve seen before and it’s difficult to debug remotely, unfortunately. Have you made any modifications to the system? Are you using any unusual configuration directives e.g. in your Apache or .htaccess configurations?

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher there is no any modification on ojs
there is no .htaccess in ojs or apache root directory
i use just one alias like this
Alias /jabr .home/journal/www/jabr
in /etc/apache/vhosts/jabr.conf

and all other journals are like this in vhost

i don’t have access to dns and others because they set by network group in university
can any configuration in network or routers or… cause this?

Hi @molavy,

Can you put a phpinfo script into place on your server and PM me its URL? I’d like to have a look at how your server is presenting information to PHP. The script should contain…

<?php phpinfo(); ?>

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher
that was related to network firewall and network team fix this problem.
thanks for your patient and responses