[development] Hook_init issue

Scott Reynolds sdrreynolds at gmail.com
Tue Mar 16 15:52:34 UTC 2010


isn't this what a session.inc is for? There you won't have
drupal_http_request, but you could include the file (common.inc?) or you
could use curl? I brought this up here as well for bakery:
http://drupal.org/node/574084


>
> Message: 3
> Date: Mon, 15 Mar 2010 23:28:34 +0100
> From: "Daniel F. Kudwien" <news at unleashedmind.com>
> Subject: Re: [development] Hook_init issue
> To: <development at drupal.org>
> Message-ID: <00f101cac48e$d9beca00$0200a8c0 at structworks.com>
> Content-Type: text/plain;       charset="us-ascii"
>
>
> function crazyauth_boot() {
>  require_once './includes/common.inc';
>  drupal_http_request(...);
> }
>
>
> ________________________________
>
>        From: development-bounces at drupal.org
> [mailto:development-bounces at drupal.org] On Behalf Of nan wich
>        Sent: Monday, March 15, 2010 11:23 PM
>        To: development
>        Subject: [development] Hook_init issue
>
>
>        It's back to the drawing board...
>
>        I have a module that uses hook_init to check for the presence of a
> particular cookie. If it is there, then I call an external authentication
> server (this is mandatory at this customer). This all works fine until...
>
>        We turn page caching on and all of a sudden, no more hook_init.
> Okay, read the fine print and it says that's what is supposed to happen.
>
>        So I switched to hook_boot. Well, apparently is does excute, but the
> drupal_http_request in the authentication function says there is no such
> animal.
>
>        We would really like to turn caching on, but we must have this
> authentication check too. For the moment we can turn caching off, but one
> week into the site and we are already taxing the server with traffic.
>
>        Options?
>
>
>        Nancy E. Wichmann, PMP
>
>        Injustice anywhere is a threat to justice everywhere. -- Dr. Martin
> L. King, Jr.
>
> --
Scott Reynolds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100316/b165e44e/attachment.html 


More information about the development mailing list