QPM4.0 and LMS 3.1 are incompatible. By installing QPM 4.0 on LMS 3.1, you have broken LMS. You will need to clean up the system, then reinstall LMS from scratch. QPM 4.0 must be installed on a separate server. You can install QPM 4.1 with LMS 3.1, but LMS must be installed first.