Hi guys,
I know Drupal for some months now and only dealt with Drupal 6 so far.
I was asked to upgrade an old Drupal site which is still in version 4.7.11

It seems that upgrading from 4 to 6 is already a nice exercise for a Drupal beginner. But it's even getting better :
the server where the site was hosted was closing down. I just had the time to copy the files and the database.
And I don't have the admin password, (but I guess that's the smallest problem..)
The site was installed together with other sites in a multi-site installation. I only had access to the folders that concerned the site itself. I don't know if I miss some parts of the site because of that (modules that were in a folder I could not acces..)
And of course the old hoster, who was also the person that set up the drupal site some years ago, is unreachable !
A dream situation :-\

I tried to reinstall the site with Drupal 4.7.11 on my local host. But I only get the homepage all right. The links to all the other pages don't work.
I have met that problem with a Drupal 6 site, too. There the solution was to disable "Clean URLs" before exporting the database. Could that be the solution for a 4.7.11 site, too?
If yes : in my case I can't login as admin and disable the clean URL option. Is there a way to do that in phpMyAdmin directly?

I'd be thankful for any hint how to save this site. I think the owners put quite an amount of work in the content and it would be great if that would not be lost!
Cheers
Ag

Comments

gpk’s picture

To gain admin access, you can edit in the DB an entry in the {users} table (e.g. user 1) so that it has your email address, then use the "request new password" option.

You might find that tricky if you need to disable clean URLs ... each time you click on a link you will probably get "Page not found". Either edit the URL as in this example: http://www.example.com/user/password becomes http://www.example.com/?q=user/password

Or in the table {variable} look for the entry for clean_url and change its value from s:1:"1"; to s:1:"0";
Then go to the table {cache} and empty (truncate) it.

Good luck!

agnez’s picture

Thanks gpk, that helped so far.
Now I'm connected as user 1 and my links don't lead me to "Page not found".
Instead I see "access denied" on every page I go. Might that be because there are some modules selected in the database but I don't have them installed? I cant access http://www.example.com/?q=admin/modules, "access denied" there too.
Where in the database can I see which modules are needed?
nice greetings
agnez

gpk’s picture

User 1 should have permissions for everything, so getting a 403 error is a bit odd. There used to be a bug tho' that could cause a 404 to appear as a 403 or vice versa. Missing module files would not usually result in a 403 though.

But to check which modules the installation is expecting, go to the {system} table and look for modules with status = 1. The path where Drupal expects to find them should also be listed.

You might also want to look in the {watchdog} table in case there are helpful messages there.

agnez’s picture

yeay, I have now the site working under 5.21 :)
my admin access rights came back by upgrading to 5.0
Thanks for your help gpk.

But I still got some problems..

one is clean module un-installation.
This one is not available any more : http://drupal.org/project/gsitemap.
Should I simply deactivate it in the database by setting the status to 0 in the system table? But there is also a table called 'gsitemap'. I guess setting status to 0 is not assuring the clean un-installation..

For these two I did not really make an effort to install them: http://drupal.org/project/spajax & http://drupal.org/project/upload
They seemed to old, too. If I can simply set them to 0 in my database it would be easy. What do you recommend me?

I would like to have these old plugins cleaned from the database before upgrading further to Drupal 6..

An other problem is that the special characters are all busted. That was already the case in 4.7.11, but I was to busy with my lost admin rights to care about it. Is there a way to repare it?

The image galleries don't work yet and there are a lot of other things to check, find out, repair.. but that's for later.
Thanks for every useful hint

cheers
ag

gpk’s picture

re. Google Sitemap (gsitemap), it looks like you may be able to upgrade directly to its successor, XML sitemap 5.x-1.x series. http://drupal.org/node/264657. TBH though there's probably not much in the settings that's worth retaining, in which case you forcibly uninstall it you can remove the relevant row from {system}, remove gsitemap* tables from the DB, and remove gsitemap* variables from {variable}. And remove all the old files of course.

You can remove the other modules in the same way. By looking at spajax.module in the CVS repository http://drupalcode.org/viewvc/drupal/contributions/modules/spajax/spajax.... it looks as tho' there may be just a couple of variables set (status_effect, error_effect).

upload looks extremely old (Drupal 4.4) and also uses 2 variables, upload_filesize and upload_path. Provided these aren't now used by core's upload.module (I'm 99.5% sure they aren't) you could safely delete them also.

There might also me some obsolete permissions to remove if you wanted but probably not worth the bother.

agnez’s picture

Thanks a lot gpk,
with your help I managed. I have now the site running under 6.15 more or less without trouble.
I spend an awful lot of time repairing the busted characters in the database, but I got it fixed :)
Remains only to repair the problems that where already known before the upgrading. And creating an up to date look an functionality of course, but that's note making me headaches..
I learned a lot about Drupal's database, and about modules and their history.
Thanks again gpk
cu
ag

gpk’s picture

Glad you got it all working. I meant to say re. international characters, make sure you are using utf8-general-ci collation since this is what Drupal expects.

Good luck with the enhancements! & happy new year!