Re: squirrelmail 1.4.x and roundrobin haproxy

Paul Lesniewski <[email protected]> Fri, 28 Feb 2014 23:45:27 -0800
Newsgroups gmane.mail.squirrelmail.internationalization
Message-ID <CAHog1145nAWUpU-Uyiog5y3Fxdw5CksJ3rqWHX=wyoSXvb8Esw@mail.gmail.com>
Wrong email list.  Please post any more general requests to the
squirrelmail-users mailing list.

On Fri, Feb 28, 2014 at 10:39 PM, Josef Karliak <[email protected]> wrote:
>    Hi there,
>    I run haproxy for web server apache2, loadbalancing works good but
> Squirrelmail don't. But it is not an error of the SM - just haproxy is
> balancing between two servers, I go to login page (presume it is on
> server #1) and after I send my login and password haproxy send it to
> server #2, that do not have my credentials -> "You must be logged in
> to access this page."
>    If I shutdown one of the web servers, all is all right.
>    So there is a question ? Did I missed something of the settings of
> HAPROXY for Squirrelmail ?

You need to have PHP store its session data in a database so that both
instances can access the same user sessions.  There should be plenty
of examples and howto documents on the web to help you.  Depending how
you set this up, you may or may not also need to make use of this
information from SquirrelMail's src/login.php:

/**
 * Allow administrators to define custom session handlers
 * for SquirrelMail without needing to change anything in
 * php.ini (application-level).
 *
 * In config_local.php, admin needs to put:
 *
 *     $custom_session_handlers = array(
 *         'my_open_handler',
 *         'my_close_handler',
 *         'my_read_handler',
 *         'my_write_handler',
 *         'my_destroy_handler',
 *         'my_gc_handler',
 *     );
 *     session_module_name('user');
 *     session_set_save_handler(
 *         $custom_session_handlers[0],
 *         $custom_session_handlers[1],
 *         $custom_session_handlers[2],
 *         $custom_session_handlers[3],
 *         $custom_session_handlers[4],
 *         $custom_session_handlers[5]
 *     );

-- 
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
Statistics for translations: http://l10n-stats.squirrelmail.org/
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n