Dear friends,

I'm trying to use the Path Redirect in a Drupal 5.9 version but I receive this message:

Fatal error: Call to undefined function url() in /nono/modules/path_redirect/path_redirect.module on line 45

Someone know what's happen?

Comments

todd nienkerk’s picture

I also see this error very frequently in conjunction with this log warning:

Type path_redirect
Date Wednesday, August 6, 2008 - 15:12
User XXXXX
Location http://example.com/videos/my_video
Referrer http://example.com/admin/build/path-redirect
Message Redirect to node/5711 is causing an infinite loop; redirect cancelled.
Severity warning
Hostname ###.###.###.###

This happens only when Pathauto's "Update action" is set to "Create a new alias. Redirect from old alias," which is supplied by Path Redirect. Somehow, normal editing of the nodes results in adding the same path to both the URL alias and redirect tables, resulting in an infinite loop of redirecting a path to itself.

As a result, I've had to switch to a different update action. This is disappointing because I really loved this feature!

avpaderno’s picture

The function url() is present from Drupal 4.6.
I think that the only cases where you could see such an error is when some Drupal files have been deleted, or when PHP is not able to find them.

May you provide more informations? In Drupal reports, can you see any error messages showing an URL ending in function.require-once, or function.require?

todd nienkerk’s picture

@Kiam: I think the "Call to undefined function url()" error message is itself an error, as there is *no way* the url() function doesn't actually exist. I think the infinite redirect loop is causing serious problems, and the only error PHP knows to throw is "Call to undefined function url()."

There's definitely a bug, however, involving infinite redirects and the update action supplied by this module.

dgorton’s picture

Status: Active » Closed (duplicate)
skcombs’s picture

I encountered this error when my server upgraded to PHP 5.2 (I am using Drupal 5.3)

The fix was to edit my .htaccess file in the drupal installation thus:

# PHP 5, Apache 1 and 2.
#the following was added after upgrade to PHP 5.2 where drupal threw function URL undefined errors during redirect

php_value allow_url_include On

mcurry’s picture

Status: Closed (duplicate) » Active

I'm still seeing this with Path redirect 5.x-1.2 with normal caching enabled.

PHP Fatal error: Call to undefined function url() in /serverpath/html/sites/all/modules/path_redirect/path_redirect.module on line 45

Anyone else having the same problem?

mcurry’s picture

Status: Active » Closed (duplicate)

Never mind, I see now that we're supposed to use the -dev version.