Upgrade from 1.4.10 to 1.6.1 dtatbase not available
Brought to you by:
jberanek
After upgrading to 1.6.1 from 1.4.10, get Fatal error: unfortunately the database is not available at the moment. When we run mrbs, headers are therejust no room info.
Errors:
Uncaught exception 'MRBS\DBException' in /srv/www/htdocs/booking/lib/MRBS/DB.php at line 67 could not find driver SQL: Params: #0 /srv/www/htdocs/booking/lib/MRBS/DBFactory.php(25): MRBS\DB->__construct('localhost', 'mrbs', 'kaplanlab', 'mrbs', false, 3306) #1 /srv/www/htdocs/booking/dbsys.inc(40): MRBS\DBFactory::create('mysql', 'localhost', 'mrbs', 'kaplanlab', 'mrbs', false, NULL) #2 /srv/www/htdocs/booking/dbsys.inc(74): MRBS\db() #3 /srv/www/htdocs/booking/defaultincludes.inc(29): require_once('/srv/www/htdocs...') #4 /srv/www/htdocs/booking/index.php(9): require('/srv/www/htdocs...') #5 {main} MRBS GET: Array ( ) MRBS POST: Array ( )
It looks like you haven't got the PDO MySQL driver enabled. You need to (or ask your hosting company to) edit your php.ini file and uncomment the lines:
for Linux servers:
for Windows servers:
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Thank you.
The PDO extension might also be provided by an OS package on Linux, e.g. "php-pdo" on RHEL/CentOS
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Now I get :
Meeting Room Booking System
The database needs to be upgraded. Please backup your database before proceeding.
Upgrading to database version: 36
Fatal error: unfortunately the database is not available at the moment.
View Day:
Sep 08 | Sep 09 | Sep 10 | Sep 11 | Sep 12 | Sep 13 | [ Sep 14 ] | Sep 15 | Sep 16 | Sep 17 | Sep 18 | Sep 19 | Sep 20 | Sep 21
View Week:
Aug 13 | Aug 20 | Aug 27 | Sep 03 | [ Sep 10 ] | Sep 17 | Sep 24 | Oct 01 | Oct 08
View Month:
Jul 2017 | Aug 2017 | [ Sep 2017 ] | Oct 2017 | Nov 2017 | Dec 2017 | Jan 2018 | Feb 2018 | Mar 2018
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Sorry here is the debug info:
Meeting Room Booking System
Last edit: Campbell Morrison 2017-09-14
Do you know how the 'modified_by' column could have got there? Did you add it manually?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
No, I did ot add it. This was originally setup by someone at another University, I've inherited it.
Does the mrbs_area table have a column called 'min_create_ahead_enabled'?
If so, then it looks as though your database has already been partially upgraded and I'll have to think a bit about what might have happened and how to fix it.
If not, then maybe it's coincidence that somebody has added a column called 'modified_by'. In which case you could alter the value of 'db_version' in the mrbs_variables table from 35 to 36. But backup your database first !!!
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Would it have upgraded when we upgraded to 1.4.10? That was the only upgrade I know of.
Yes, when you upgraded to 1.4.10 the database would have been upgraded to the 1.4.10 level.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Don't know if this helps, but when I use webmin to view tables I get:
SQL show index from
mrbs_repeat
failed : Table 'mrbs.mrbs_repeat' doesn't existVery weird. If you haven't got an mrbs_repeat table then something is seriously wrong. Did you manage to see if you have a column called 'min_create_ahead_enabled' in the mrbs_area table?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Now I'm more confused here are the tables:
mysql> show tables;
+----------------+
| Tables_in_mrbs |
+----------------+
| mrbs_area |
| mrbs_entry |
| mrbs_repeat |
| mrbs_room |
| mrbs_users |
| mrbs_variables |
| mrbs_zoneinfo |
+----------------+
7 rows in set (0.00 sec)
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Here is the list of columns:
mysql> show columns from mrbs_area;
+--------------------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| disabled | tinyint(1) | NO | | 0 | |
| area_name | varchar(30) | YES | | NULL | |
| timezone | varchar(50) | YES | | NULL | |
| area_admin_email | text | YES | | NULL | |
| resolution | int(11) | YES | | NULL | |
| default_duration | int(11) | YES | | NULL | |
| default_duration_all_day | tinyint(1) | NO | | 0 | |
| morningstarts | int(11) | YES | | NULL | |
| morningstarts_minutes | int(11) | YES | | NULL | |
| eveningends | int(11) | YES | | NULL | |
| eveningends_minutes | int(11) | YES | | NULL | |
| private_enabled | tinyint(1) | YES | | NULL | |
| private_default | tinyint(1) | YES | | NULL | |
| private_mandatory | tinyint(1) | YES | | NULL | |
| private_override | varchar(32) | YES | | NULL | |
| min_book_ahead_enabled | tinyint(1) | YES | | NULL | |
| min_book_ahead_secs | int(11) | YES | | NULL | |
| max_book_ahead_enabled | tinyint(1) | YES | | NULL | |
| max_book_ahead_secs | int(11) | YES | | NULL | |
| max_per_day_enabled | tinyint(1) | NO | | 0 | |
| max_per_day | int(11) | NO | | 0 | |
| max_per_week_enabled | tinyint(1) | NO | | 0 | |
| max_per_week | int(11) | NO | | 0 | |
| max_per_month_enabled | tinyint(1) | NO | | 0 | |
| max_per_month | int(11) | NO | | 0 | |
| max_per_year_enabled | tinyint(1) | NO | | 0 | |
| max_per_year | int(11) | NO | | 0 | |
| max_per_future_enabled | tinyint(1) | NO | | 0 | |
| max_per_future | int(11) | NO | | 0 | |
| custom_html | text | YES | | NULL | |
| approval_enabled | tinyint(1) | YES | | NULL | |
| reminders_enabled | tinyint(1) | YES | | NULL | |
| enable_periods | tinyint(1) | YES | | NULL | |
| confirmation_enabled | tinyint(1) | YES | | NULL | |
| confirmed_default | tinyint(1) | YES | | NULL | |
+--------------------------+-------------+------+-----+---------+----------------+
36 rows in set (0.00 sec)
It looks like you have got an mrbs_repeat table after all. Not sure why you were getting that message before.
As you haven't got a 'min_create_ahead_enabled' column yet, it's possible that the 'modified_by' column was there because someone had created it manually. One thing you could try then is altering the value of 'db_version' in the mrbs_variables table from 35 to 36. But backup your database first !!!
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
MRBS_REPEAT shows to be a table, but when I show:
mysql> select * from mrbs_repeat;
ERROR 1146 (42S02): Table 'mrbs.mrbs_repeat' doesn't exist
I don't know why that's happening. Did repeat bookings work OK before you tried to upgrade? If so, then it's probably OK.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Ok, we'll go with the change 35 to 36 and go from there.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Changed to variable to 35 to 36 now get:
Last edit: Campbell Morrison 2017-09-16
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
+------------------+--------+----------+----------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------+--------+----------+----------------------------------------+
| mrbs.mrbs_repeat | repair | Error | Table 'mrbs.mrbs_repeat' doesn't exist |
| mrbs.mrbs_repeat | repair | status | Operation failed |
+------------------+--------+----------+----------------------------------------+
2 rows in set (0.00 sec)
I would say you've got some sort of serious problem with your MySQL database server.
Try restarting MySQL and looking in its error log.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
It shows no errors.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Can I drop and add it.
Dropping and adding the repeat table isn't an option as you'd lose all the information about your repeat bookings.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Sorry, I was on vacation. What is the function of the repeat table?