If you see Error 500 page on your site, you probably have PHP errors on background, but they are not visible. If you want to see these error messages, follow these instructions. Error messages must be also provided to support if you want to get help.

Following lines should be placed with care into config.php file located in root folder of your Osclass installation.

Basic settings

Enable error logging in PHP for your website/application.

ini_set('display_errors', 'on');
ini_set('log_errors', 'on');
ini_set('display_startup_errors', 'on');
ini_set('error_reporting', E_ALL);

Enable Osclass error log. PHP errors, notices and warnings will be visible on your site.

define('OSC_DEBUG', true);

Save error logs to log file. File is located in oc-content folder.

define('OSC_DEBUG_LOG', true);

Additional available constants for debugging

Debug Osclass cache (memcache, memcached, APC,…).

define('OSC_DEBUG_CACHE', true);

Debug PHP mailer class.

Accepted debug level values:

  • 1 – client only
  • 2 – client and server (default)
  • 3 – client, server and connection
  • 4 – low-level information

Make sure to disable error logging once you collected error messages on production websites. On starting websites it make sense to have error log enabled, but collect messages into file (OSC_DEBUG, OSC_DEBUG_LOG set to true).

Database debug mode: