First off, it's best to backup your mysql database, local_config.php and fax files.

# mkdir ~/faxbackup
# cd /var/www/avantfax
# mysqldump --user=avantfax --password=d58fe49 avantfax > ~/faxbackup/db_backup.sql
# cp -ru includes/local_config.php faxes/ ~/faxbackup

Upgrading AvantFAX 3.x

The procedure is similar to upgrading the AvantFAX 2.x series. There is also a new script called upgrade.sh that will make sure you don't have any old lingering files laying around.

# cd avantfax-3.x.x/
# ./upgrade.sh
# cd avantfax-3.x.x/
# rsync -rvu avantfax/ /var/www/avantfax/

You must apply all database updates between your old version of AvantFAX and the new version.

For example, if you're upgrading from AvantFAX 3.0.5 to 3.3.0, you must apply the following:

# mysql -uavantfax -pd58fe49 avantfax < db-update-306.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-307.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-311.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-315.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-316.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-320.sql
# mysql -uavantfax -pd58fe49 avantfax < db-update-330.sql

As of AvantFAX 3.0.7

The HylaFAX modem configuration is as follows:

# vim /var/spool/hylafax/etc/config.ttyS1
## AvantFAX configuration
FaxrcvdCmd:     bin/faxrcvd.php
DynamicConfig:  bin/dynconf.php
UseJobTSI:      true
# vim /var/spool/hylafax/etc/config
## AvantFAX configuration
NotifyCmd:      bin/notify.php

NOTE: If you're upgrading from a previous version of AvantFAX 3.x, you'll need to symlink the dynconf.php to your HylaFAX bin directory:

ln -s /var/www/avantfax/includes/dynconf.php /var/spool/hylafax/bin/dynconf.php

Upgrading from AvantFAX 2.x to 3.x

Here is a summary of changes:

  • Optical character recognition support (using Tesseract) for improved keyword searching
  • Download your AvantFAX Archive and Database easily from the Admin Control Panel
  • Inbound fax notifications include thumbnail of the fax
  • Import FAX numbers in vCard format
  • Inbox pruning script
  • Improved email support library
  • Database abstraction
  • Theme support
  • Improved AJAX functionality
  • Improved fax queue management
  • Blacklisting support
  • Improved accessibility
  • Improved XHTML and CSS
  • Initial account is 'admin' and can log into both User and Admin areas
  • All email addresses in the contacts area are now global in preparation for the inclusion of LDAP support
  • Inbox refreshes only when there's a new fax or a fax has been archived (checks via AJAX every 30 seconds)
  • Modem status in the Inbox is updated via AJAX

Read the "upgrading-from-2.x" file for detailed instructions. You will need to execute the "upgrade-from-2.3.sh" script to perform the upgrade.

Upgrading to AvantFAX 2.3.x

If you're upgrading from a recent version of AvantFAX, you may be able to simply replace the modified files with their new ones. The files will be named in the CHANGELOG file. Every time, be sure to copy over the db_connect.php file in order to update the version number.

However, if you want to automate this a little, you can try to use rsync to update the new files. Be sure to back up everything first.

$ rsync -rvu ~/avantfax-2.X.X/avantfax/ /var/www/avantfax/

NOTE: If config.php was replaced, check the CHANGELOG file for details.

If the database must be updated, for example, with version 2.1.8, use the following the command:

$ mysql -uavantfax -pd58fe49 avantfax < db-update-218.sql

After upgrading to AvantFAX 2.2.3, you will need to setup the Outbox support. Start by installing the 'expect' package (yum/apt-get/emerge) and then run the following commands.

# /usr/sbin/faxadduser -f newhosts -a pwd apache
# /usr/sbin/faxdeluser localhost
# /usr/sbin/faxdeluser
# echo >> newhosts
# cat /var/spool/hylafax/etc/hosts.hfaxd >> newhosts
# cat newhosts > /var/spool/hylafax/etc/hosts.hfaxd

As of AvantFAX 2.3.0, JobFmt in /etc/hylafax/hyla.conf should read as follows:

JobFmt: "%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s"