Download & Extend

CVS: Problem with functions url() and form()

Project:Drupal core
Version:x.y.z
Component:Base system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

NT4, Win2k, XP, IIS will not accept an HTTP POST without a filename in the URL. The sever returns a 403 (Method not allowed) error.

Also; passing parameters using GET without a filename results in default behaviour of the page.

Note:
I got it working by adding $PHP_SELF in place of $base_url but I know that this would break CLEAN URL's

Comments

#1

I think you mean '405' error instead of 403. I've seen these too.

I have fixed this using URL Replacer: http://www.pstruh.cz/help/urlrepl/library.htm, which is a free ISAPI filter. The only pattern I have configured in URL Replacer is

        /?          /index.php?

If you want to enable clean URLs, use the folowing pattern instead (note that the '41'below can be any virtual directory you want. I am unable to get this to work with Drupal running in the home directory of a site).

       41/             41/index.php?q=

One known problem with the above pattern is that it performs replacements even on requests to existing directories like 'misc'. this causes images not to load and admin pages to look bad.

#2

Well - I see that the HTML filter mangled the form() sample code; so here it is again:

function form($form, $method = "post", $action = 0, $options = 0) {
global $PHP_SELF;
  return "&ltform id=\"func_form\" action=\"".($action ? $action : $PHP_SELF.htmlentities(request_uri())) ."\" method=\"$method\"". ($options ? " $options" : "") ."&gt\n$form&lt/form&gt\n";
}

Fix the form tag and you're ready to test

#3

#4

I submitted patch today to Dries which fixes this.

#5

fixed with today's commit. closed.

nobody click here