[drupal-devel] Cache sid

Julian Bond julian_bond at voidstar.com
Tue Mar 1 18:42:25 UTC 2005


Dries Buytaert <dries at buytaert.net> Tue, 1 Mar 2005 18:35:22
>Julian Bond wrote:
>> I have a test drupal 4.51 at http://localhost/bikeweb
>>  So in conf.php I have
>> $base_url = "http://localhost/bikeweb";
>>  In bootstrap.inc function page_set_cache()
>> cached pages are saved at
>> $base_url . request_uri()
>>  and Apache is reporting via function request_uri()
>> $_SERVER['REQUEST_URI'] = '/bikeweb/'
>>  So the cached page gets set in the cache table with a cid of
>> http://localhost/bikeweb/bikeweb/
>> if the cache has to be rebuilt, I then start getting assorted errors 
>>because the path is now wrong.
>>  This doesn't look right to me although it will only fail on 
>>installations that are not in the root of the url.
>
>I can reproduce this on Drupal HEAD.  Both page_cache_get() and 
>page_cache_set() use the "$base_url . request_uri()" construct.
>So while this isn't right, it shouldn't impact performance.
>
>What errors do you get?
>
>Maybe we should use url($_GET['q']) instead?  We'd have to move url() 
>to bootstrap.inc though.  Test and patch?

I'm getting an error in a module I was writing/testing
Call to undefined function: drupal_set_html_head()

Hmmm. Maybe I shouldn't be calling functions in common.inc during the 
module_init hook.

I was trying to add a style sheet and a javascript file to the <head> of 
every page using quicktags_init() as an example.

-- 
Julian Bond Email&MSM: julian.bond at voidstar.com
Webmaster:                 http://www.ecademy.com/
Personal WebLog:          http://www.voidstar.com/
M: +44 (0)77 5907 2173      T: +44 (0)192 0412 433
S: callto://julian.bond/



More information about the drupal-devel mailing list