If things start to go strange with your OJS installation, you have several debugging options available to you.
If you encounter a blank page, chances are there's a PHP error of some sort
happening in the background. PHP errors are normally sent to your web server or
system log file. To send any PHP errors to the browser, put the following line near
the top of the root index.php file:
ini_set('display_errors', E_ALL);
When you rerun the task or reload the page you were having problems with, any PHP error messages that were being sent to the log files should now be displayed on the web page.
Of course, you can always check your server's error log for errors as well.
There are also a number of debugging variables in
config.inc.php.
You can set the system to display database output in the page header. Under the
Database Settings section of config.inc.php, set
the debug variable to On:
; Enable database debug output (very verbose!) debug = On
Turning database debugging on will display every database query for that particular page, regardless of any errors (or the lack thereof) in the page header. You may also see a few warnings about headers in the debug info too: those are harmless and can be ignored.
With debug turned on, certain parts of the system may not function (for example, trying to log in). The debug option should only be used to try and diagnose a problem and may expose private information. Additionally, as the warning in the config file suggests, it is very verbose - it prints out every database query regardless of whether the system has encountered an error, and so should not be turned on by default.
Turning on show_stats (Under Debug Settings at the end
of config.inc.php) will display execution stats provided by the
included PHP
Quick Profiler.
; Display execution stats in the footer show_stats = On
The Profiler will give you information and metrics on load times, database queries, files included, and more, and is useful for pinpointing bottlenecks and other points of failure.
The stack_trace option (found just after the
show_stats option) will cause OJS to display a full dump of the
current call stack if an error occurs. This makes it easier to find out where in the
process of execution an error occurred, by displaying the full list of functions
that are running at the time. It may expose a variety of private information,
depending on where the error occurs, and should be left disabled on a production
machine.