Hi,

Thanks for this great module.
Im getting this error when im using the cache. If i disable the cache, then theres no problems.
Using RedHat ES 5
PHP 5.1.6
Apache 2.2.3
Newest version of Drupal and the CAS module.

Regards,
Tonny

[Mon Sep 10 08:49:34 2007] [error] [client 130.226.199.103] PHP Notice: Undefined index: q in /var/www/html/stream/mod
ules/cas/cas.module on line 568
[Mon Sep 10 08:49:34 2007] [error] [client 130.226.199.103] PHP Fatal error: Call to undefined function base_path() in
/var/www/html/stream/modules/cas/cas.module on line 576
[Mon Sep 10 08:49:36 2007] [error] [client 130.226.199.103] PHP Notice: Undefined index: q in /var/www/html/stream/mod
ules/cas/cas.module on line 568
[Mon Sep 10 08:49:36 2007] [error] [client 130.226.199.103] PHP Fatal error: Call to undefined function base_path() in
/var/www/html/stream/modules/cas/cas.module on line 576
[Mon Sep 10 08:49:45 2007] [error] [client 130.226.199.103] PHP Notice: Undefined index: q in /var/www/html/stream/mod
ules/cas/cas.module on line 568
[Mon Sep 10 08:49:45 2007] [error] [client 130.226.199.103] PHP Fatal error: Call to undefined function base_path() in
/var/www/html/stream/modules/cas/cas.module on line 576
[Mon Sep 10 08:49:45 2007] [error] [client 130.226.199.103] PHP Notice: Undefined index: q in /var/www/html/stream/mod
ules/cas/cas.module on line 568
[Mon Sep 10 08:49:45 2007] [error] [client 130.226.199.103] PHP Fatal error: Call to undefined function base_path() in
/var/www/html/stream/modules/cas/cas.module on line 576

Comments

jrbeeman’s picture

base_path() is a core Drupal method. I know it's an obvious question, but are you using the module in the context of Drupal? If so, is there any more information you could give us about your installation? Specific version of Drupal, version of the CAS module, etc.

tonnyl’s picture

Here is some more information about the CAS and drupal version. The server is currently behind a firewall, so you cant access it.

Do you know if theres a problem with the DNS name, if it can cause this error?

cas 5.x-2.2

Drupal 5.2
Configuration file Protected
Cron maintenance tasks Last run 12 min 16 sec ago
You can run cron manually.
Database schema Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.28 compatible)
Module update status Up to date
MySQL database 5.0.22
PHP 5.1.6
Unicode library PHP Mbstring Extension
Web server Apache/2.2.3 (Red Hat)

metzlerd’s picture

Assigned: Unassigned » metzlerd

I don't think its dns. It appears that certain functions are in include files that aren't being included when caching is avialable. I ran into this problem with arg, and now it appears base_path is also an issue. I'm going to post a question on the developer list when I get home to try and find out what the best strategy for fixing this is. Then I'll set up a site with caching enabled and give it a shot.

For now leave caching off, and rest assured that there's so much caching going on in drupal even with caching set to off, that you're site will survive :)

Dave

zostay’s picture

We ran into this problem in combination with URL aliasing, I think. The front page to our site does not require login: "/intro". However, I needed to add "node/1234" which "intro" was aliased to the exclusions list to keep from running into base_path() complaints.

zostay’s picture

Perhaps it would be a good idea to add a form_alter hook that modifies the Performance form to let administrators know of the problem. I've had to remind one of my administrators twice not to turn caching on.

qphrenqp’s picture

Hello,

I also have this problem when activating the cache of my drupal installation.

Problem lies in _cas_force_login function (cas.module file, line 576) called by cas_init. This function calls base_path() to check if this is a cron call. But, in case of cache activation, (see file boostrap.inc, line 908) hook_init of modules are called *before* include of common.inc where base_path() function lies.

So I solved the problem by changing (on line 576 of cas.module) base_path() to $GLOBALS['base_path'], which is the value returned by the base_path() function (file common.inc, line 1373)

Hope that helps...

metzlerd’s picture

Would recommend anyone experiencing this problem examine the 5.x.3.0-beta release at

http://drupal.org/node/78967/release

It's not exactly the fix purposed, but I'd like to know if this solves the problem.

Dave

metzlerd’s picture

Version: 5.x-2.2 » 5.x-3.0
Status: Active » Fixed

Fixed in latest release

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.