Skip to content
thecoolestguy edited this page Mar 4, 2013 · 7 revisions

This page is intended for a technical audience (e.g. DevOps who are tasked with installing/maintaining instances of Ilios).

General Troubleshooting Instructions

Let's start with some general instructions for debugging PHP and CodeIgniter-powered applications.

Enable PHP error logging

In your php.ini file, set log_errors to On and specify a log file path (make sure this is in a writeable location!) via the error_log option.
E.g.

log_errors = On
error_log = "/tmp/phperrors.log

Restart your web server, then tail that log file.

Check the application log files

Check the log-*.php files for any error messages. They are located under application/logs ( Ilios 2.2+) or system/logs (Ilios 2.1.2 or older) in your webroot directory.

Turn on DB Debug mode

NOT RECOMMENDED FOR PRODUCTION SYSTEMS!

In your database configuration file (application/config/database.php or system/application/config/database.php, depending on your Ilios version), set the db_debug flag to TRUE.

<?php
// ...
$db['default']['db_debug'] = true;

This will enable the display of database error messages. For more details on database configuration see the CodeIgniter User Guide.

Dealing with Login Problems

The following checklist pertains to the default authentication mechanism in Ilios.

  1. Does the user account that you are trying to log in with exist?
  • Make sure that there is an enabled user account record in the user table with a corresponding record in the authentication table. Verify that the username value matches the user name that you are providing in the login form.
  1. Make sure that your MySQL database is not running in "strict" mode. Check the MySQL online docs for how to detect and disable strict mode.

Dealing with character encoding issues

If content-contributing users find themselves in situations where their textual input (such as objectives, session descriptions, etc.) have been stripped of "special" characters (i.e. non-English characters with umlauts or accents), or where text has been otherwise "munged" entirely, this usually indicates a problem with the conversion of character encodings.
Ilios enforces the conversion of ALL user input to UTF-8 encoding by default, but it may not be able to correctly identify the original source encoding under every circumstance, so some extra steps should be taken to limit the exceptions:

It may prove helpful to provide an explicit detection order in your PHP configuration .

We also recommend adding the following setting to your php.ini file as a starting point:

mbstring.detect_order = "UTF-8,ISO-8859-1"