Upgrading from 4.1 to 4.2

The procedure to upgrade from 4.1 to 4.2 is the same as used in upgrading from 4.0 to 4.1. You need to unpack the drupal_4.2.tar.gz package into a directory in /var/www/ and then point your browser to that script and follow its simple instructions. Of course it wasn't quite that simple.



First make sure that you back up your original database. What I did then was create a new database and then insert the old database into the new database. This was to minimise my downtime if I had to change back.



$mysqldump -u root -p --opt drupal_4.1 > drupal4.1.sql

$mysqladmin -u root -p create drupal4-2

$mysql -u root -p drupal4-2 &#060 drupal4.1.sql



Now then you have to set up the conf.php file in the new directory to point to the new database.



In order to run the script you have to be logged in as the user that has uid 1 in the users table in the drupal database. Now I was already logged in as user and I tried logging out and got an error message back. So i switched back to the old database and logged out. I then switched back to the new database and logged in as the user that had uid 1 but got an access denied error. I then had to switch back to the old database and log out again. I then switched back to the new database and then logged in as a user. Then in the database changed the uid of the current user with uid one that didn't work to an unused id and then changed the uid of the user I was logged in as to 1. I then pointed my browser to mywebsite.com/update.php and then when I clicked on the "update to 4.2 link" the script ran through without any problems.



Now I then had some issues with clean urls and internal links that I had created using the format from earlier drupal versions The procedure to upgrade from 4.1 to 4.2 is the same as used in upgrading from 4.0 to 4.1. You need to unpack the drupal_4.2.tar.gz package into a directory in /var/www/ and then point your browser to that script and follow its simple instructions. Of course it wasn't quite that simple.



First make sure that you back up your original database. What I did then was create a new database and then insert the old database into the new database. This was to minimise my downtime if I had to change back.



$mysqldump -u root -p --opt drupal_4.1 > drupal4.1.sql

$mysqladmin -u root -p create drupal4-2

$mysql -u root -p drupal4-2 &#060 drupal4.1.sql



Now then you have to set up the conf.php file in the new directory to point to the new database.



In order to run the script you have to be logged in as the user that has uid 1 in the users table in the drupal database. Now I was already logged in as user and I tried logging out and got an error message back. So i switched back to the old database and logged out. I then switched back to the new database and logged in as the user that had uid 1 but got an access denied error. I then had to switch back to the old database and log out again. I then switched back to the new database and then logged in as a user. Then in the database changed the uid of the current user with uid one that didn't work to an unused id and then changed the uid of the user I was logged in as to 1. I then pointed my browser to mywebsite.com/update.php and then when I clicked on the "update to 4.2 link" the script ran through without any problems.



Now I then had some issues with clean urls and internal links that I had created using the format from earlier drupal versions "[[ link|test ]]". The format had changed to "[link|test]". This didn't appear to break older links as they were now in html format but what broke them was by enabling clean urls the pages that the internal links were pointing to wouldn't work. I then had to go through the site and fix these manually. I will run an automatic link checker, such as xenu against the site to identify all these links for me.