Cannot access web interface

Report bugs and workarounds
Post Reply
DrScarpetta
Posts: 8
Joined: 11 May 2017 14:35

Cannot access web interface

Post by DrScarpetta »

I can't log in to the normal web interface, when I do, I get an HTTP ERROR 500.

When I look in the /var/log/httpd/error_log, the last message is:

Code: Select all

[Mon May 22 12:24:29 2017] [error] [client 192.168.1.244] PHP Fatal error:  Uncaught exception 'mysqli_sql_exception' with message 'Unknown column 'login_timeout' in 'field list'' in /var/www/html/mailscanner/functions.php:1003\nStack trace:\n#0 /var/www/html/mailscanner/functions.php(1003): mysqli->query('SELECT login_ti...')\n#1 /var/www/html/mailscanner/functions.php(4783): dbquery('SELECT login_ti...')\n#2 /var/www/html/mailscanner/checklogin.php(162): updateLoginExpiry('admin')\n#3 {main}\n  thrown in /var/www/html/mailscanner/functions.php on line 1003, referer: http://mail.DomainName.org/mailscanner/login.php
I am able to use links in messages to mark senders as spam, just not able to get into the usual status display, or log in as my domain account and see "my" mail.

(Earlier today, after a restart, I was having issues with modsecurity, so I disabled it, now I am getting the error 500.)
(And I did a MySQL repair after SSH'ing in, and a restart, with no change.)
Last edited by DrScarpetta on 22 May 2017 17:12, edited 1 time in total.
DrScarpetta
Posts: 8
Joined: 11 May 2017 14:35

Re: Cannot access web interface

Post by DrScarpetta »

I ran it:

Code: Select all

MailWatch for MailScanner Database Upgrade to 1.2.3-dev

Have you done a full backup of your database? Type 'yes' to continue: yes

Testing connectivity to the database ................................. OK

Updating database schema:

 - Convert database to utf8........................................... OK

 - Drop `geoip_country` table......................................... ALREADY DROPPED
 - Drop `spamscores` table............................................ OK
 - Add autorelease table to `mailscanner` database.................... ALREADY EXIST
 - Add resetid, resetexpire and lastreset fields in `users` table..... OK

 - Fix schema for username field in `audit_log` table................. OK
 - Fix schema for id field in `blacklist` table....................... OK
 - Fix schema for username field in `users` table..................... OK
 - Fix schema for spamscore field in `users` table.................... OK
 - Fix schema for highspamscore field in `users` table................ OK
 - Fix schema for username field in `user_filters` table.............. OK
 - Fix schema for username field in `whitelist` table................. OK
 - Fix schema for username field in `audit_log` table................. OK
 - Fix schema for password field in `users` table..................... OK
 - Fix schema for fullname field in `users` table..................... OK
 - Fix schema for rule_desc field in `mcp_rules` table................ OK

 - Cleanup orphaned user_filters...................................... OK
 - Add id field and primary key to `audit_log` table.................. OK
 - Add inq_id field and primary key to `inq` table.................... OK
 - Add maillog_id field and primary key to `maillog` table............ OK
 - Add rblspamreport field to `maillog` table......................... OK
 - Add token field to `maillog` table................................. OK
 - Check for missing tokens in `maillog` table........................ DONE
   35481 token generated
 - Add mtalog_id field and primary key to `mtalog` table.............. OK
 - Add mtalog_id field and primary key to `outq` table................ OK
 - Add id field and primary key to `saved_filters` table.............. OK
 - Add mtalog_id field and primary key to `user_filters` table........ OK

 - Dropping too big index `maillog_from_idx` on table `maillog`....... OK
 - Dropping too big index `maillog_to_idx` on table `maillog`......... OK

 - Convert database to utf8mb4........................................ OK

 - Convert table `audit_log` to utf8mb4............................... OK
 - Convert table `autorelease` to utf8mb4............................. OK
 - Convert table `blacklist` to utf8mb4............................... OK
 - Convert table `inq` to utf8mb4..................................... OK
 - Convert table `maillog` to utf8mb4................................. OK
 - Convert table `mcp_rules` to utf8mb4............................... OK
 - Convert table `mtalog` to utf8mb4.................................. OK
 - Convert table `mtalog_ids` to utf8mb4.............................. OK
 - Convert table `outq` to utf8mb4.................................... OK
 - Convert table `saved_filters` to utf8mb4........................... OK
 - Convert table `sa_rules` to utf8mb4................................ OK
 - Convert table `users` to utf8mb4................................... OK
 - Convert table `user_filters` to utf8mb4............................ OK
 - Convert table `whitelist` to utf8mb4............................... OK

 - Convert table `audit_log` to InnoDB................................ OK
 - Convert table `autorelease` to InnoDB.............................. OK
 - Convert table `blacklist` to InnoDB................................ OK
 - Convert table `inq` to InnoDB...................................... OK
 - Convert table `maillog` to InnoDB.................................. OK
 - Convert table `mcp_rules` to InnoDB................................ OK
 - Convert table `mtalog` to InnoDB................................... OK
 - Convert table `mtalog_ids` to InnoDB............................... OK
 - Convert table `outq` to InnoDB..................................... OK
 - Convert table `saved_filters` to InnoDB............................ OK
 - Convert table `sa_rules` to InnoDB................................. OK
 - Convert table `users` to InnoDB.................................... OK
 - Convert table `user_filters` to InnoDB............................. OK
 - Convert table `whitelist` to InnoDB................................ OK

 - Search for missing indexes on table `maillog`...................... DONE
 - Adding missing index `maillog_from_idx` on table `maillog`......... OK
 - Adding missing index `maillog_to_idx` on table `maillog`........... OK
 - Adding missing index `timestamp_idx` on table `maillog`............ OK
 - Adding missing index `subject_idx` on table `maillog`.............. WARNING

Checking MailScanner.conf settings:

 - QuarantineWholeMessage ............................................ OK
 - QuarantineWholeMessagesAsQueueFiles ............................... OK
 - DetailedSpamReport ................................................ OK
 - IncludeScoresInSpamAssassinReport ................................. OK
 - SpamActions ....................................................... OK
 - HighScoringSpamActions ............................................ OK
 - AlwaysLookedUpLast ................................................ OK

Checking conf.php configuration entry:

 - All mandatory entries are present.................................. OK
 - All obsolete entries are already removed........................... OK
 - optional RPC_PORT ................................................. WARNING
 - optional RPC_SSL .................................................. WARNING
 - optional RPC_REMOTE_SERVER ........................................ WARNING
 - optional LDAP_BIND_PREFIX ......................................... WARNING
 - optional LDAP_BIND_SUFFIX ......................................... WARNING
 - optional EXIM_QUEUE_IN ............................................ WARNING
 - optional EXIM_QUEUE_OUT ........................................... WARNING
 - optional PWD_RESET_FROM_NAME ...................................... WARNING
 - optional PWD_RESET_FROM_ADDRESS ................................... WARNING
 - optional MAIL_SENDER .............................................. WARNING
 - optional SESSION_NAME ............................................. WARNING
 - optional USER_SELECTABLE_LANG ..................................... WARNING
 - optional MAILWATCH_SMTP_HOSTNAME .................................. WARNING
 - optional SESSION_TIMEOUT .......................................... WARNING

*** ERROR/WARNING SUMMARY ***
Table Index: MySQL version unsupported for index `subject_idx` on table `maillog`, upgrade to version >= 50604 (you have version 50505)
conf.php: optional configuration entry "RPC_PORT" is missing, needed if RPC_ONLY mode is enabled
conf.php: optional configuration entry "RPC_SSL" is missing, needed if RPC_ONLY mode is enabled
conf.php: optional configuration entry "RPC_REMOTE_SERVER" is missing, needed to show number of mails in postfix queues on remote server (RPC)
conf.php: optional configuration entry "LDAP_BIND_PREFIX" is missing, needed when using LDAP authentication
conf.php: optional configuration entry "LDAP_BIND_SUFFIX" is missing, needed when using LDAP authentication
conf.php: optional configuration entry "EXIM_QUEUE_IN" is missing, needed only if using Exim as MTA
conf.php: optional configuration entry "EXIM_QUEUE_OUT" is missing, needed only if using Exim as MTA
conf.php: optional configuration entry "PWD_RESET_FROM_NAME" is missing, needed if Password Reset feature is enabled
conf.php: optional configuration entry "PWD_RESET_FROM_ADDRESS" is missing, needed if Password Reset feature is enabled
conf.php: optional configuration entry "MAIL_SENDER" is missing, needed if you use Exim or Sendmail Queue
conf.php: optional configuration entry "SESSION_NAME" is missing, needed if experiencing session conflicts
conf.php: optional configuration entry "USER_SELECTABLE_LANG" is missing, comma separated list of codes for languages the users can use eg. "de,en,fr,it,nl,pt_br"
conf.php: optional configuration entry "MAILWATCH_SMTP_HOSTNAME" is missing, needed only if you use a remote SMTP server to send MailWatch emails
conf.php: optional configuration entry "SESSION_TIMEOUT" is missing, needed if you want to override the default session timeout
I assume the line:
Table Index: MySQL version unsupported for index `subject_idx` on table `maillog`, upgrade to version >= 50604 (you have version 50505)
is the reason I still get:

Code: Select all

[Mon May 22 13:06:34 2017] [error] [client 192.168.1.244] PHP Fatal error:  Uncaught exception 'mysqli_sql_exception' with message 'Unknown column 'login_expiry' in 'field list'' in /var/www/html/mailscanner/functions.php:1003\nStack trace:\n#0 /var/www/html/mailscanner/functions.php(1003): mysqli->query('SELECT login_ex...')\n#1 /var/www/html/mailscanner/functions.php(4824): dbquery('SELECT login_ex...')\n#2 /var/www/html/mailscanner/functions.php(308): checkLoginExpiry('admin')\n#3 /var/www/html/mailscanner/status.php(36): html_start('Recent Messages', 30, false, false)\n#4 {main}\n  thrown in /var/www/html/mailscanner/functions.php on line 1003, referer: http://mail.DomainName.org/
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Cannot access web interface

Post by shawniverson »

Oh, my bad! I pointed you to another upgrade.php. We are on a fork at the moment due to a pending PR.

Try this one instead:

Code: Select all

wget https://raw.githubusercontent.com/shawniverson/1.2.0/sessionenhance/upgrade.php
chmod u+x upgrade.php
sudo ./upgrade.php
DrScarpetta
Posts: 8
Joined: 11 May 2017 14:35

Re: Cannot access web interface

Post by DrScarpetta »

That fixed it, thank you so much!
Post Reply