I just attempted to upgrade 6.10 to 6.11 on my OS X test/dev system and, well, it failed in a rather interesting way.

My test install is at http://localhost/~me/drupal and I can access the front page just fine at that URL.

Attempting to follow any links from the front page fails with a 404 stating that "The requested URL /Users/me/Sites/drupal/index.php was not found on this server." Note that the request is being redirected to http://localhost/(the physical location of the file in my filesystem) - I didn't catch that detail until I looked in the apache error log and saw that it was trying to find the file /Library/WebServer/Documents/Users/me/Sites/drupal/index.php.

This issue apparently exists somewhere outside of drupal itself, as I have completely wiped out both my drupal directory and my drupal database, re-created them from my drupal-6.10 tarball and a pre-upgrade-attempt database backup, and the issue persists despite this.

How do I go about recovering from this condition?

Comments

dadderley’s picture

Is there a .htaccess in the root of your upgraded site? Not having one will cause the sort of problems that you refer to,
It will be an invisible file on your mac. Look at this directory with your ftp application and have it set up so it can see invisible files.

Dave Sherohman’s picture

Yes, .htaccess is present:

$ ls -la ~/Sites/drupal/
total 400
drwxr-xr-x   24 dervish  dervish    816 Feb 25 22:10 ./
drwxr-xr-x   17 dervish  dervish    578 Apr 30 16:08 ../
-rw-r--r--    1 dervish  dervish   3837 Dec 10 21:04 .htaccess
...
Grimnir’s picture

I had the same problem on one of my sites which is hosted on GoDaddy.

I found that by uncommenting the line "# RewriteBase /" in the .htaccess file, it fixed the problem.

I hope this works for you.

Dave Sherohman’s picture

That didn't quite do the trick, but making the line

RewriteBase /~me/drupal

got it working again, so now I can go back to working out the upgrade.

I have a vague recollection that I made this same change when I was first installing drupal, so apparently the problem was caused by the upgrade including the original .htaccess and reverting to a fresh copy from the 6.10 tarball didn't work because it had the original .htaccess as well. Is there a recommended procedure for preserving this kind of change? (The standard "don't hack core" doesn't really apply here, since a .htaccess placed anywhere outside of core wouldn't be read by apache.)

In any case, though, thanks for pointing out RewriteBase and getting me headed in the right direction!