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:
This happens because during installer avantfax database are dropped, but avantfax user still exists and this is problematic for avantfax installer:
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 )
It will be nice to add this directly during the incrediblefax installer.
I hope that this could help someone
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
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
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'"
I hope that this could help someone