ERROR 1067 (42000) at line xxx: Invalid default value for ‘field’

This is beacuse mysql server 5.7 have changed the the date time default field 0000-00-00 00:00:00 options. You can only have one field with the value 0000-00-00 00:00:00. Where fore you have to change the default indata mask to.

datetime NOT NULL DEFAULT ‘1000-01-01 00:00:00’
or
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP

exampel
ALTER TABLE testdate CHANGE datestart datestart DATETIME NOT NULL DEFAULT ‘1000-01-01 00:00:00’;

Joomla! module assignment list is broken

If the module selection list in the module assignment is broken, i.e. the tool for select / deselect of sub menu items is missing and the layout is generally garbled, the cause can be a menu item in the menu above that is listed as a child item but has no parent.

Go the the menu items for the last menu that is working. A menu item which has a missing parent has one or more leading vertical bars before the menu item name (instead of the leading dash which is the normal indication of a child item).

Just open the menu item and save it.

FreePBX multiple time conditions

The easiest way to get multiple time conditions in FreePBX is to daisy chain them. A common scenario is to have a standard time condition for normal opening hours and in addition to that, time conditions for holidays occuring on normal weekdays, like christmas and new year for example.

  • Create one time group for normal opening hours, for example monday to friday 08.00-17.00.
  • Create one time condition for the normal opening hours, using the above time group. If time matches, connect the destination to the open IVR or queue. If time doesn’t match, connect it to a closed IVR or a voice message saying you’re closed. This is going to be the last time condition in the chain.
  • Create time groups for each of the holidays. If time matches, connect the destination to a voice message saying you’re closed. If time condition doesn’t match connect it to the next time condition. Remember, the last time condition in the chain should be the one for normal opening hours.
  • Connect the inbound route to the first time condition in your chain.

Inbound route -> Time condition for holiday 1 -> Time condition for holiday 2 -> Time condition for normal opening hours

How to change mysql table engine MyISAM to InnoDB

login to mysql shell as root.
locate the database where the tables are situated.
SET @DATABASE_NAME = ‘name_of_your_db’; // name_of_your_db = the database you want to change table engine.
SELECT CONCAT(‘ALTER TABLE ', table_name, ' ENGINE=InnoDB;’) AS sql_statements FROM information_schema.tables AS tb WHERE table_schema = @DATABASE_NAME AND ENGINE = ‘MyISAM’ AND TABLE_TYPE = ‘BASE TABLE’ ORDER BY table_name DESC;
The result will end up in a list of the tables that needs to be changed. Copy the list and do the following.
Shift to the database involved:

USE name_of_your_db
START TRANSACTION;
insert the copied list
COMMIT;
You have now changed the engine of the tables.

[ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist

This error ocurs then the database mysql is missing or corrupt.
Stop the mysql server “service mysql-server stop”
Make a backup of /var/db/mysql “mv /var/db/mysql /var/db/mysql.old”.
To rebuild the database execute “/usr/local/libexec/mysqld –initialize”
You will get a temporary password. Remember the password for later use.
Start the mysql server “service mysql-server start”
To start upp the new configuration “mysql_secure_installation”. Use the Password to start the configuration and step thru the wizzard.
Restore the mysql backup and the server is good as new.