Drupal is designed to be entered from a file in the site’s root directory, via index.php or cron.php or xmlrpc.php, etc. But since chatroomread.php is called directly and it‘s in chatroom directory, $base_url is getting set relative to the chatroomread.php file when it should be relative to the root of the Drupal install.
In order to get chatroom to work with the way $base_url is calculated, we’ll need to set that variable before conf_init() is called. This patch should fix things.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | chatroomread.php-160068.patch | 934 bytes | darren oh |
| #7 | chatroom-bootstrap.patch | 4.14 KB | johnalbin |
| #2 | base-url_0.patch | 3.47 KB | johnalbin |
| base-url.patch | 512 bytes | johnalbin |
Comments
Comment #1
darren ohDrupal unsets globals during start-up. This problem cannot be fixed with a patch to the module.
Comment #2
johnalbinnever say never.
Comment #3
darren ohStill won't work. See http://api.drupal.org/api/5/function/drupal_bootstrap:
Comment #4
johnalbin$phases is static. So when you array_shift the $current_phase off the $phases stack, that phase is never run again.
Comment #5
darren ohThis is a general Drupal bug. The fix is in issue 159854.
Comment #6
keesje commentedEasy workaround: http://drupal.org/node/166072
Comment #7
johnalbinKees’s workaround fixes the issue because setting $cookie_domain means that Drupal’s call to
session_name()will use $cookie_domain instead of $base_url. It’s a good fix, but would require special install instructions for chatroom.I’ve tested the following patch and it fixes the issue without requiring the admin to set $cookie_domain.
Comment #8
francoud commentedI also tried this patch. It works good with I.E. (6). Doesnt work - for me, at least - with Firefox... The $cookie_domain workarounds works for both.
Comment #9
darren ohAccepted this patch (CVS commit 81934, since the core maintainers won't accept a fix.
Comment #10
(not verified) commentedComment #11
darren ohCommitted the wrong patch. Updated patch attached.
Comment #12
darren ohFixed in CVS commit 84030.
Comment #13
(not verified) commentedComment #14
toceguera commentedPlease Excuse my ignorance on this procedure. But how exactly am I supposed to use this patch. Do I copy and paste somewhere? Do I make a new file with it? TIA
//// Please disreagrd this comment as I figured it out and I already have the patched version ///
Comment #15
darren ohThis patch has already been applied in the latest release.