I have installed Drupal 6 on localhost. My system does not support Clean url's.

However Drupal 6 identifies my system as "Your server has been successfully tested to support this feature." If clean url's are disabled the system works Ok, however if enabled I go to the localhost screen of xampp.

Apache 2.2.4
MySQL 5.0.37
PHP 5.2.1 +

Comments

mdlueck’s picture

Possibly this problem / solution might help you as well:
http://drupal.org/node/165761

Clean URL's were not working with our hosting provider either. Maybe the same solution will fix your Clean URL's problem as well! ;-)

pasqualle’s picture

Yes, I can confirm that xampp default configuration (with default drupal settings) does not support Clean url's, however drupal identifies it as supported.

gábor hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

@mdlueck: Well, we are not to enable clean URL support here, but to investigate why it is reported to be working, while it is not.

The code checking the clean URLs is in system.js, and it looks for the following path on the server: var url = location.pathname +"admin/settings/clean-urls";. Unfortunately it only looks whether HTTP 200 OK was returned, and does not check the contents printed. So if the sever responds with a HTTP 200 OK response, then the clean URL check thinks this should be OK.

@gmasky and Pasqualle: can you please check manually, what your server returns when you try to access http://www.example.com/admin/settings/clean-urls (replace the domain name with your domain and path). Thanks.

gábor hojtsy’s picture

Title: Clean Urls » Installer says clean URLs are possible, but they are not

Cleaner title.

pasqualle’s picture

I can't check it now, but I am pretty sure it returns the main screen of xampp. As any other drupal page (except the drupal's index page) shows the xampp main page, when clean-url is enabled.

note: I don't use domain name, so the path for the clean url is something like this http://localhost/drupal/admin/settings/clean-url

gábor hojtsy’s picture

It is quite bizarre to return a page with 200 OK, when there was actually no page found. Anyway, it seems to be better to also check for some actual result from the system clean URL check path, so we ensure Drupal returned something, not XAMPP or some server hack.

gábor hojtsy’s picture

Doh, admin/settings/clean-urls is a real Drupal form page, so it is not ideal for JS side checking of some well defined short value. A separate checking path with a simple but well defined and distinguished result (eg. "Clean url check passed.") might be better.

gábor hojtsy’s picture

Status: Postponed (maintainer needs more info) » Active
kkaefer’s picture

StatusFileSize
new3.93 KB

Patch changes the requsted URL to /admin/settings/clean-urls/check. There is a new menu item which returns { "status": true } as JSON. We split up the AJAX handler into success/error (instead of a generic complete like it has been before). If JSON is returned (and thus the request has been successful because we got JSON!), the success handler is called, if not, the error handler is invoked.

kkaefer’s picture

Status: Active » Needs review
robloach’s picture

The patch unfortunately didn't do it......

Apache/2.2.4 (Win32), DAV/2, mod_ssl/2.2.4, OpenSSL/0.9.8e, mod_autoindex_color, PHP/5.2.2. mod_rewrite disabled.

Both the installer and /?q=admin/settings/clean-urls report "Your server has been successfully tested to support this feature.". When enabling Clean URLs, you get a page 404.

robloach’s picture

Interesting. After some more investigation, I found that it started working after I cleared the local and server cache entirely and restarted the server. Would someone else be so kind to test it out? It's working here, but it would be good to get other test environments.

pasqualle’s picture

Status: Needs review » Reviewed & tested by the community

OK, I tested the patch on the local xampp configuration, and now I see "Your system configuration does not currently support this feature. ..." at install and also on admin/settings/clean-urls page.

It seems good to me.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Looked at the code. I guess console.log(response); is leftover debug code, which should be removed. Apart from that this is IMHO RTBC, so once fixed, we can move back and commit as far as I see.

dries’s picture

+ success: function (response) {
can also become:
+ success: function () {

pasqualle’s picture

StatusFileSize
new3.96 KB

Made requested changes, and rerolled..
Tested on local xampp and also on ubuntu server. Works as expected.

robloach’s picture

Status: Needs review » Reviewed & tested by the community

Great work. Reviewed and both the installer and the Clean URLs settings page are reporting correctly now.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Wow, I thought we had this in in the previous betas. Thanks for taking up the patch and moving forward. Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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