[dev] session_start and Registry::importConfig order

Serge Chernyavsky serg.remote at gmail.com
Mon Nov 23 19:38:58 UTC 2009


Hi All,

I had to make vhosts setup based on domain parts of userId and got an 
'chicken and egg' issue - it turned out that Registry constructor runs 
importConfig() before session_start() so in several particular cases 
Horde::loadConfiguration() never gets userId from the $_SESSION.

My workaround (which lacks knowledge of Horde internals and testing) is 
to re-run loadConfiguration('conf.php', 'conf', 'horde') after 
session_start() and set _confCache properly.

So my (silly?) questions are: is there any reason to run importConfig 
before starting the session? And what about session.auto_start in this case?


Regards,
Serge


More information about the dev mailing list