Dear all,
after my computer crashed I moved my drupal site to a different one.
I copied all the files and imported the mysql database.
The site was in maintenance mode when I made the backup,
and I'd like to login by accessing localhost/user
The page appears and I can insert my username and password
but after I click on the login button
it seems like the browser is loading something but then the user page is reloaded..
So I can't access my drupal site any more.

I think the issue might be with some Apache configurations but I'm not an expert and I don't know what to change.
From a standard apache2 installation in Ubuntu
I only changed two things:
I've added AddType application/x-httpd-php .php to the /etc/apace2/apache2.conf file
and I've modified AllowOverride from none to All in the
block of the /etc/apache2/sites-enabled/000-default file.
(and restarted apache after of course)

Can somebody please help me understanding what is wrong and make the website work again on my computer? (this website is the backup of a site that is hosted and that works just fine on the host
provider, I just want a "development" version on my computer so that I can try modules and settings before
uploading it on the host).

Thanks a lot in advance to all you guys,
any help would be greatly appreciated!

Comments

nevets’s picture

Try clearing the cache tables and sesssion table.

Also, checking settings.php and if base_url or cookie_domain where set you will need to change them.

lucacerone’s picture

Thanks for the advice,
but which are the tables that need to be cleaned??? and how can I clean them?
Thanks in advance, Luca

john_b’s picture

you might try cache clear in Performance. Going further, you might do cache clear with Drush; you might do cache clear with admin_menu or devel modules. Going all the way, you might truncate (i.e. empty not delete) tables in phpMyadmin with sessions and cache in their names.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

lucacerone’s picture

I can't access my site and it is in maintenance mode....
I can't use any module nor administration stuff...
I think I'll have to manually clean the tables in the mysql database if you think it might help...
Though I seriously think it is an Apache issue not a Drupal one...
I just don't know how to set up Apache to work good with Drupal (and clean urls)
Thanks in any case...

john_b’s picture

Maybe it is a server issue, who knows. Bet getting out of maintenance mode, and clearing caches might be a good idea and is the obvious place to start. You can do both in seconds with drush, which is a highly recommended tool you install from command line. To get out of maintenance mode with drush see http://groups.drupal.org/node/77118

However AFAIK drush cannot empty sessions table. I would just jump into phpMyadmin on the server and empty it.

These steps should take a few minutes. If the problem is still not fixed you can get into server debugging.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

john_b’s picture

Assuming mysql is running on your server. Did you create the database user & password your site uses on your new server? Db user is not included in the drupal db, must be created. as per http://drupal.org/node/776864

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

lucacerone’s picture

Hi, I've tried your advices.
First of all: yes the drupal user for mysql the database etc are correctly set.
The home page is displayed just fine as well as the pages that are available to everybody.
Like i have a page localhost/cv localhost/publications
I've used Drush to exit maintenance mode, clear the cache and have cleaned the sessions
table manually.
I'd exclude both that the problem is mysql and that is due to apache clean urls.
The problem is that whenever I try to login with my username and password
my data seem to be transmitted but then the access doesn't take place.
I don't get any error saying that the password or the username is wrong.
Simply the page is reloaded...
On my hosted version I don't have any such problem...
(and on my old computer everything worked just fine)
Do you have other advice?? (I don't even know where to check for logs to see what the problem might be)
Thanks in advance for all your help,
Cheers, Luca

john_b’s picture

don't know, sorry. you could always try resetting database user pwd :P

The log messages are in watchdog table. Not altogether easy to read off phpMyadmin.
If you install drush you can read message with command drush watchdog-show
http://drush.ws/

In your situation I would be putting up a fresh site your problem server to see if that works. It does not take long. At least that will indicate whether it is a site or a server problem, not conclusively but with a high probability.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

lucacerone’s picture

Ok when trying a fresh install I get an error because of the lack
of the gd php extension.
I'm on Ubuntu machine so I could install it by typing sudo apt-get install php5-gd
but even after restarting apache it seems it is not enabled..
Ho can I enable the gd extension???
Thanks a lot in advance,
Luca

john_b’s picture

There is a long thread on it http://drupal.org/node/134331
you probably need to enable it in php.ini and ensure the the folder where it lives is (one of) the extensions folders whose path is included in php.ini. Then restart server.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

lucacerone’s picture

I had to restart apache :p and enable the Modrewrite module...
After doing this everything is working fine :)
Thanks a lot for the help guys,
it's been really appreciated!