Short version = Unable to upgrade from 4.6.5 to 4.7.2 on CentOS3 with mysql-3.23.58-16 and php-4.3.2-30

Long version =

I made a copy of my site in VMware and have been trying to get it upgraded to 4.7.2 all day with no luck. It's very disappointing to a) have so many problems and b) see so many similar problems in this forum unanswered. Original site is over a year old and works as expected, VMware site copy works fine AFAICT.

Linux centos3 2.4.21-40.EL
httpd-2.0.46-56
mysql-3.23.58-16, mysql-server-3.23.58-16
php-4.3.2-30

My process has been:

1) Untar the new version
# tar xzf /root/drupal-4.7.2.tar.gz

2) Diff the .htaccess file and copy if OK or update if not
# diff drupal-4.6.5/.htaccess drupal-4.7.2/.htaccess
# vi drupal-4.7.2/.htaccess
+++ RewriteBase /portal

3) Diff the settings.php file and copy if OK or update if not
# diff drupal-4.6.5/sites/default/settings.php drupal-4.7.2/sites/default/settings.php
# vi drupal-4.7.2/sites/default/settings.php
+++ $db_url = {fixed stuff};
+++ $base_url = {fixed stuff};

4) Copy the file upload area from old to new
# Sometimes skipped this with no differences
# cp -a drupal-4.6.5/files drupal-4.7.2

5) Verify ownership and fix if necessary
# chown -R root.root drupal-4.7.2
# mkdir -m 2755 drupal-4.7.2/files # if needed, sometimes skipped
# chown -R apache.apache drupal-4.7.2/files # if needed, sometimes skipped

6) Update a symlink [1] in /var/www/html.
# rm portal && ln -s drupal-4.7.2 portal

7) Run update.php by visiting http:// {server} /portal/update.php.

8) Site gets FUBARed

Every single time, the updater fails as follows going from 4.6.x -> 4.7.x:

Drupal database update
user warning: Duplicate column name 'severity' query: ALTER TABLE watchdog ADD severity tinyint(3) unsigned NOT NULL default '0' in /var/www/html/drupal-4.7.2/includes/database.mysql.inc on line 120.

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

Reminder: don't forget to set the $access_check value at the top of update.php back to TRUE.
* main page
* administration pages

The following queries were executed
system module
Update #1
* No queries

I have already:
* Tried 4.6.5 -> 4.7.2 using the scheme it picks (129)
* Tried 4.6.5 -> 4.7.2 using scheme 128
* Tried 4.6.5 -> 4.6.8 -> 4.7.2
* Tried 4.6.5 -> 4.6.8 -> 4.7.0 -> 4.7.2
* Googled and read this forum, which as I mentioned at top was disappointing that there were so many (unsolved) problems. E.g.:
http://drupal.org/node/67468 <<< Esp. Schema version to choose for 4.6.6 to 4.7.2 update?
http://drupal.org/node/67116
http://drupal.org/node/61859
http://drupal.org/node/50162
http://drupal.org/node/40646
http://drupal.org/node/70805
http://drupal.org/node/70395
http://drupal.org/node/69204
http://drupal.org/node/57274
http://drupal.org/node/68521
http://drupal.org/node/45073
http://drupal.org/node/66723
http://drupal.org/node/66924
http://drupal.org/node/57987
http://drupal.org/node/65134
And more that were even less relevant or older...
http://drupal.org/node/69722 FAQ entry

"Schema version to choose for 4.6.6 to 4.7.2 update" (http://drupal.org/node/67468) seems especially relevant as that's what I *think* is my problem. I've been unable to figure out what the correct schema IS though. And it's very odd. On the original database, I get this:

# echo "select schema_version from system where filename = 'modules/system.module';" | mysql -u {user} -p -D Portal
ERROR 1054 at line 1: Unknown column 'schema_version' in 'field list'

On the test version I get the same error, 128, or 1 depending on where in the process I run it. That seems--bad.

Drupal has worked great for me, and previous upgrades in the 4.6.x series have been trivial. But this is seriously eroding my confidence, not to mention wasting about 1 day so far for something I expected to take about 1 hour… :-(

[1] Using the symlink avoids deleting and/or leftover cruft. Yes, I know the DB schema may change between versions, so this is not a fool-proof back-out plan. But it makes me feel better. I do better backups, and always use a test site too…

Comments

JPV’s picture

The previous subject line really said it all. php-4.3.2-30...

http://drupal.org/requirements: "As of Drupal 4.6, the CMS requires PHP version 4.3.3+ (PHP 5 is supported for the 4.6 release). Drupal 4.2 to 4.5.2 inclusive require PHP version 4.1+. Older versions of Drupal will run on PHP 4.0.6+. We recommend using the latest version of PHP 4.x."

My production machine has php-4.3.11-8.rhel3.art, but I forgot what a nightmare it was to get it working on RHEL 3 (see http://drupal.org/node/29108). I also forgot to make sure my test machine was up to spec. It wasn't. When I installed the updated PHP, the upgrade routine I described above Just Worked.

My apologies to the Drupal team for the PBCAK. Though I think it'd be nice if update.php checked for acceptable versions of PHP and the DBMS back-end (submitted as http://drupal.org/node/71759).

Unfortunately for anyone else reading this and running RHEL3/CentOS3, the PHP RPMs I used aren't there anymore. These newer ones should work, but I have not tested them:

Old (I used originally; gone):
wget http://www.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-4.3.11-8.rhel3... \
http://www.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-mbstring-4.3.1... \
http://www.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-mysql-4.3.11-8... \
http://www.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-pear-4.3.11-8....

New (proposed):
wget http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-4.4.2-3.rhel3.... \
http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-mbstring-4.4.2... \
http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-mysql-4.4.2-3.... \
http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/php-pear-4.4.2-3.r...

Note "libmysqlclient.so.14 is needed by php-mysql-4.4.2-3.rhel3.art". I think the mysql-compat below will satisfy that, but I'd hesitate to load only that without the other MySQL packages. I didn't do this since I had the older packages archived and used them instead.

Maybe (while you're at it):
wget http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/mysql-4.1.20-1.art... \
http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/mysql-server-4.1.2... \
http://3es.atomicrocketturtle.com/atomic/art/3ES/RPMS/mysql-compat-4.1.2...