Fatal error: Call to undefined function url() in /var/www/sites/all/modules/ipAuthenticator/ipauth.module on line 42
I keep getting this error when trying to use the IP Authenticator module. Any thoughts?
Fatal error: Call to undefined function url() in /var/www/sites/all/modules/ipAuthenticator/ipauth.module on line 42
I keep getting this error when trying to use the IP Authenticator module. Any thoughts?
Comments
Comment #1
b0b commentedI did not get this error until I updated to the latest Drupal 6.16 version, then I got this error. Turning off caching fixes the error but I'd rather not have to turn off caching.
Comment #2
jhus commentedYou shouldn't have to turn off the caches, just clear them.
Simply go to Administer > Site configuration > Performance. Near the bottom of the page, you'll see a big fat button that says “Clear cached data.”
Good to go!
Comment #3
jhus commentedComment #4
b0b commentedDid that several times, still get the error.
Comment #5
jhus commentedYou sure your getting the same exact error?
Comment #6
b0b commentedYes, same exact error. Only for the IPAuthenticated user, regular login works fine.
Comment #7
dugnap commentedWe are receiving the same message: Fatal error: Call to undefined function url() in /var/www/html/sites/all/modules/ipAuthenticator/ipauth.module on line 42
I have tried clearing the cache and still get the error. Unlike b0b, if I turn off caching, I get many more errors (though this particular one goes away).
We also recently updated to Drupal 6.16.
I'm changing status to active (though I'm a newbie, so let me know if that is wrong).
Any help is greatly appreciated.
Comment #8
jhus commentedIm no expert but wile your waiting for an educated response, you could disable the module and uninstall it from drupal. Re-download it and put it back up on your site again. Just remember your current settings and re-enter them into the module after you reinstall it.
Also, make sure you disable the module then uninstall it, that way drupal will remove the tables from the database. However; if you have alot of groups/imported users or something you may not be able to do this.
Let me know what you come up with!
Comment #9
mhenning commentedTo get around this problem, I added the following lines before the call to url()
include_once './includes/common.inc';
include_once './includes/path.inc';
I don't get how url() would ever work in ipauth_boot() as at this point the boot loader hasn't included common.inc where url() is defined.
Also, on the home page $_GET["q"] isn't defined, so around line 72 I added this line:
if (!isset($_GET['q'])) $_GET['q']='';
before
if ($_GET['q'] == 'user')
otherwise that line bombs.
Not sure if I solved the root of this problem, but these fixes worked for me.
Comment #10
dugnap commentedI just wanted to say thanks. mhennings fix worked for me.
Thanks jhus for the response too.
Comment #11
twayz commentedI am having the same problem. When I disable caching it works though. I do not know where I apply the lines that mhenning proposed.
Am I supposed to apply these two lines:
include_once './includes/common.inc';
include_once './includes/path.inc';
at line 42 before the line:
url($_GET["q"], 'ipauth_no_cache='.md5(time()), NULL, TRUE);
Can someone help me out please?
Thank you!
This mod is great btw!!!
Comment #12
jhus commentedThey should generally be at the top of the code. The include_once() statement includes and evaluates the specified file during the execution of the script. Meaning you ideally want it loaded before you do anything.
Comment #13
dugnap commentedtways,
I'm copying the code around where mhenning inserted changes (which are noted in the comments as changes by saforian). I'm not a programmer, so hopefully I grabbed everything right (looks like some of the tabs gets messed up when I preview the code).
Hope this helps!