1

I want to install the site from the server locally so I can test changes before performing them.

So:

  1. I exported the database and installed it locally
  2. I downloaded all the files that were inside the site root folder and put them in a root folder locally (but with another name)
  3. I changed the parameter $db_url and $base_url

The problem is that the front page is shown correctly but when I click to go to another page from the menu it says:

[an error occurred while processing this directive] The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. [an error occurred while processing this directive]

Anyone have any idea?

NOTE: I just noticed that the url is something like this: http://localhost/root//articles/article-one

Thank you

  • have you cleared drupal cache ? – GoodSp33d Jul 23 '12 at 10:39
  • i went through command line and cleared all the cache_ tables with the truncate command. is this what you mean? – tioschi Jul 23 '12 at 10:55
  • your local server is not set up properly. is root the drupal folder ? – GoodSp33d Jul 23 '12 at 11:01
  • @kantu yes it's the name of the folder that the drupal side resides in. If i install drupal platform alone it is working properly. – tioschi Jul 23 '12 at 11:18
1

are there any custom rewrite rules in your htaccess file? when something similar happened in my case, I had RewriteBase / set in my .htaccess file from the actual deployment environment that had to be commented. Identified this by enabling a log in my local httpd.conf on how the URLs were translated with

RewriteLog "custom/folder/path"
RewriteLogLevel 9

to have a better idea of how the rules translated the URLs and where i messed up, hope this has some significance in solving the issue you are facing.

|improve this answer|||||
2

One reason for this can be 'the apache server's rewrite mod is not enabled'.

See if

localhost/sitename/index.php?q=user/login

is working.

If that is working then try enabling Clean URL (sudo a2enmod rewrite for LAMP).

Few links that can be related to the problems.

http://drupal.org/node/1186762

http://drupal.org/node/333675

|improve this answer|||||
1

Looks like you need to clear the menu cache but after an import I always clear all cache to be safe. Also try a search in your imported db for your online url..?

Also for Drupal Local dev, have a look at Dev Desktop, I used to use XAMPP then moved to WAMP and now use Dev Desktop as I pretty much soley develop Drupal now.

|improve this answer|||||
  • i cleared the cache with the truncate command. But the problem remains. what do you mean with the online url?thanks for the reply. Also i want to ask if the browser's cache is disabled then the cache of drupal has any effect? – tioschi Jul 23 '12 at 10:54
  • When you exported the Database, where was the source, if it was online I would search for the URL in your database to make sure there is nothing you need to change from domain.com to localhost etc? - also make sure you brought down the htaccess file? – WestieUK Jul 23 '12 at 14:23
1

The problem may be with the links in your site.

<a href="/awesome_page">Awesome Page</a>

If absolute links are used then this will work fine in your live site. www.mysite.com/awesome_page is valid but when you try to work with your local i.e http://localhost/drupal/front_page the link Awesome page will now actually point to http://localhost/awesome_page.
Quick work around will be to set up your local like live site. Add an entry in your hosts file like 127.0.0.1 www.mysite.local Add a virtual host entry(httpd-vhosts.conf)

<VirtualHost *:80>
    ServerName www.mysite.local
    DocumentRoot "C:/apache2.2.8/htdocs/drupal"
</VirtualHost>

restart apache server and you will be able to access http://www.mysite.local from your local server and all links will work.

|improve this answer|||||
  • i tried to make a virtual host but still throws the same message. (but that was a very good information that you gave) – tioschi Jul 23 '12 at 12:49
1

Check if .htaccess file is exists in site root folder.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.