[solved] Login issue - Multiple Installations on one Server

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

[solved] Login issue - Multiple Installations on one Server

Postby tggasser » 10:14am, Mon 26 Oct, 2009

Hello

Ive installed multiple phplist on the same server. If you logg in in one instance, youre automaticly logged in in the others too. Thats a problem!

Ive searched the web but there are no fixes for this bug (no, a htaccess is each dir is not a nice bugfix)

greez
tggasser
phpList newbie
 
Posts: 4
Joined: 10:09am, Mon 26 Oct, 2009

Re: Multiple Installations one one Server

Postby Dragonrider » 11:48am, Mon 26 Oct, 2009

Never come across this before and I've got at least two installs of phpList on the same server, plus a test one.

Does your lists/config/config.php file refer to the correct installation? 'Fraid that's all I can think of at the moment.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: Multiple Installations one one Server

Postby tggasser » 1:22pm, Mon 26 Oct, 2009

okey. now im really confused!

Yes, the three config files refere each to the correct instal dir.
Ive no ideas why that my phplist act like that
tggasser
phpList newbie
 
Posts: 4
Joined: 10:09am, Mon 26 Oct, 2009

Re: Multiple Installations one one Server

Postby Slimey » 2:32pm, Mon 26 Oct, 2009

are they all using separate databases?
Slimey
PL Nut
 
Posts: 25
Joined: 7:25pm, Wed 20 Jun, 2007

Re: Multiple Installations one one Server

Postby tggasser » 3:01pm, Mon 26 Oct, 2009

yes, all three installations are using different databases, the config giles refere to the correct database, and still my admin user is loged in in all the three phplist. Auso if i hit logout on one instance, the other two are loged off without my interaction.
tggasser
phpList newbie
 
Posts: 4
Joined: 10:09am, Mon 26 Oct, 2009

Re: Multiple Installations one one Server

Postby H2B2 » 5:00pm, Mon 26 Oct, 2009

This issue has been reported before, and apparently occurs when using the same login name across several installations on the same server:
http://mantis.phplist.com/view.php?id=15029
viewtopic.php?p=48489#48489
viewtopic.php?f=17&t=24361

An explanation and workaround solution is provided by CS:
CS wrote:The reason for this is that PHPlist stores auth information in session variables. When you access a page it only checks the login name and whether you are logged in, it does not check the installation name. However, it will only auto-log you in if the login name is the same on each installation (e.g. "admin"). Thus, the simple fix to this is to make sure you do not create any logins that are duplicated on other installations.
If you want it to also force *you* to login for each installation, you will need to change the login name for the super-admin login from "admin" to something else.
ref: viewtopic.php?p=61387#p61387


I guess that storing sessions in a database table *might* well be another simple solution. This can be achieved by enabling (remove the # comment symbol) the $SessionTableName setting in config.php:
Code: Select all
# you can store sessions in the database instead of the default place by assigning
# a tablename to this value. The table will be created and will not use any prefixes
# this only works when using mysql and only for administrator sessions
# $SessionTableName = "phplistsessions";

I haven't tested this yet, so if you decide to check this alternative solution, please let us know if it works for you.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: Multiple Installations one one Server

Postby tggasser » 8:17am, Tue 27 Oct, 2009

Thanks a lot H2B2. I Edited by config.php like u sayd, and uncommented the Session Table Name line. It works for me.
tggasser
phpList newbie
 
Posts: 4
Joined: 10:09am, Mon 26 Oct, 2009

Re: [solved] Login issue - Multiple Installations on one Server

Postby H2B2 » 2:46am, Thu 29 Oct, 2009

Good to know this solves the issue. Thanks for the feedback!
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests