I wouldn't recommend upgrading mysql 4.0.25 straight to 4.1.x, because it will break your databases, the same as if you upgrade from mysql3 to mysql4.0
To upgrade it make exports of all your databases, uninstall 4.0, install 4.1 and then import your databases again (except the mysql database) for the mysql database, only import the NON duplicate mysql.db, mysql.user, mysql.host, mysql.table_priv, mysql.func, mysql.column_priv
To get a proper export of all your mysql databases (not in 1 file) put the code below into a mysql_backup.php script and run it (/usr/bin/php mysql_backup.php) Obviously edit the location you want the backup to dump the files, and change the your_password to your mysql password.
<?
print("mysql backup\n");
foreach (glob('/var/lib/mysql/*') as $fullname)
{
$database = basename($fullname);
$command = sprintf('mysqldump -a -B %s -c -v -Q > /home/backup/mysql/%s-%s.sql --password=\'your_password\'', $database, $database,
date('Ymd'));
exec($command);
print($database . ' : ' . $command . "\n\n\n");
}
?>
If you move to php-4.4.0 also remember to upgrade your mod_php to the latest, and use Zend Optimizer 2.5.10a (any other version of zend won't work with 4.4.0)