Le 02/11/08 à 08:55, Michael Prasuhn mike@mikeyp.net a écrit :
$conf['site_offline'] = '1';
's:1:"1";' is a serialized value used to store PHP variables in a database column. It is basically short hand for, "a string whose length is 1 character(s), and contains the character 1."
Thanks, but it's not enough, because cache I guess.
I assume you have page caching turned on, and that is what you are referring to. Just to be clear, the $conf values supplied from setttings.php are *never* cached between page requests.
What I did : - site is online, I'm not loggued - I write $conf['site_offline'] = '1'; at the end of my setttings.php => site is still online on homepage (even with flushing browser cache), but is offline on another page not displayed before - conf['site_offline'] = '0'; - site is still offline until I ask for another page (node/xxx not displayed before)
if I do (directly in mysql, not in php code) TRUNCATE TABLE cache_page; just after changing $conf['site_offline'] in settings.php (and before asking any page), it works fine, so I guess that online/offline pages are cached, so just changing $conf doesn't change anything for web client, until caches are cleared.
Pb is that drupal_flush_all_caches() function isn't yet definded in settings.php, so just changing something in settings.php can't toggle the site online/offline. It's not a big pb, I will write a little mysql script to put all drupal websites online/offline, I just thought changing settings was enough.
Thanks for help anyway (I learnt something about string storage in variable table).