Hello,

in order to upgrade safely a 4.7.6 site to 5.0 I have replicated the whole mysql database, copied all the drupal directory to another folder (cp -r -p drupal drupal_new), modified settings.php in drupal_new to point to the replicated database, pointed apache to drupal_new.

When I point the browser at mysite.net, the home page appears OK. When I click on the login button I get the login form OK.

When I enter user name and password and click login , I get

Not Found

The requested URL /user/login was not found on this server.

The server log says:

File does not exist: /var/www/html/drupal_new/user, referer: http://mysite.net/?q=user/login

After that, I discovered that, while the home page displays OK, no link from it works.. If I, for example, click on a menu entry in the home page pointing to "http://mysite.net/taxonomy/term/1", I get

Not Found

The requested URL /taxonomy/term/1 was not found on this server

and in the apache log:

File does not exist: /var/www/html/drupal_new/taxonomy, referer: http://mysite.net/

What can it be? I've found references to this same problem via google, but no real solutions or explanations, just hypotheses that it may be due to path module or .htaccess, but I haven't that module enabled and have copied the files one by one preserving permissions an so on. even the fact that the home page displays properly shows the database is OK, doesn't it?

I'm really at a loss to figure out what happened. How can just moving a directory to another name on the same server or replicating a database cause this? Please help me to figure out what's happening and to fix it!

Thank you in advance for any feedback,

O.

Comments

toemaz’s picture

Reading very quickly through your problem, you seem to have a 'clean url' issue. Try to disable them, read this http://drupal.org/node/5590

Then try to login again.

JirkaRybka’s picture

I agree that it's clean URLs.

In my opinion you copied only just normal files to your replica, and forgot to include also hidden files: Namely the file .htaccess is important to clean URLs!

cog.rusty’s picture

Yes. it looks like a Clean URLs problem. If they worked before on the same server, just make sure that you have Drupal's .htaccess file in your Drupal installation directory (or upload it again to be sure).

That cp command would not have copied files starting with a dot. These are only copied if you specify their name.

ortles’s picture

Thanks to all who posted. I have found out that adding statements to settings.php or running mysql commands at the mysql prompt as suggested at http://drupal.org/node/5590 didn't change anything. Adding this code to httpd.conf, instead:

 <Directory /var/www/example.com>
   RewriteEngine on
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

as stated at http://drupal.org/node/15365 did solve the problem, at least for me.

As a side note, hidden files _are_ copied with a "cp -r -p" command. At least on Centos 4.x servers.

Thanks again,

O.