BUG Incredible FAX installer

bullet2392

New Member
Joined
Dec 3, 2013
Messages
6
Reaction score
2
Hi, I found a bug in Incredible FAX installer when running it second times.
Symptoms are that: blank pages on avantfax webpages and in /var/log/httpd/error_log we can found this:
Code:
FROM /var/log/httpd/error_log
[Fri Dec 04 12:00:28 2015] [error] [client x.x.x.x] PHP Fatal error:  SQL Query: MDB2 Error: no such table::_doQuery: [Error message: Could not execute statement]\n
[Last executed query: SELECT * FROM UserAccount WHERE username = 'maint']\n[Native code: 1146]\n[Native message: Table 'avantfax.UserAccount' doesn't exist]\n in /var/www
/html/avantfax/includes/SQL.php on line 149
This happens because during installer avantfax database are dropped, but avantfax user still exists and this is problematic for avantfax installer:

Code:
FROM rh-install.sh
echo "### Testing root access for MySQL"
userexists=`mysql --user=root --password=$ROOTMYSQLPWD -sNe "select count(*) existe from user where User = '$USER'" mysql`
  if [ "$userexists" -eq "0" ]; then
  echo "### Creating $USER account with password $PASS for DB $DB"
  mysql --user=root --password=$ROOTMYSQLPWD -e "GRANT ALL PRIVILEGES ON $DB.* TO '$USER'@'localhost' IDENTIFIED BY \"$PASS\"" mysql

  echo "### Importing schema"
  mysql --user=$USER --password=$PASS $DB < create_tables.sql
  else
Indeed only when $user (avantfax) doesn't exists then installer will import the mysql schema, otherwise DB will created, but remain empty.
Solution is very simple: delete the avantfax user with that command (or better )
Code:
 mysql --user=root --password=passw0rd -D mysql -e "delete user from user where user = 'avantfax'"
It will be nice to add this directly during the incrediblefax installer.
I hope that this could help someone :)
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top