b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Developer Reference
  3. Debugging
  4. Debugging

Debugging

Before you try to debug anything, start by checking if you have caching turned on for your blog. If so, you may be seeing bugs that are cached but no longer exist. Turn caches off to make sure you see what’s going on in real time.

Enable Debugging

Brute force debugging for everyone (not recommended on production servers)

To see complete error messages as well as a debug log with loads of information on the bottom of each page, set

 $debug = 1;

in _advanced.php.

For some specific cases, it’s also possible to use the value 2 but this is not recommended for 99.9% of the situations because it will seriously break the proper display of some pages by inserting debug information inline everywhere.

Turning on debugging only for you and only when you need it (recommended method)

If you want to be able to turn on/off the debuglog selectively at will, leave the default setting of $debug = 'pwd' but define a password in $debug_pwd like this:

$debug = 'pwd';
$debug_pwd = 'mysecret';

Once this is done, you can go to any page and append the following to the URL to turn on the debuglog: ?debug=mysecret

NOTE: To add the debug option to a URL that already uses a question mark then use the ampersand character instead. For example
https://example.com/xyz.php?s=pears&submit=Dig&disp=search&debug=mysecret

To turn off, just load a page with ?debug=

Enable the AJAX debuglog

You can also display a debuglog for AJAX calls. It will float in a CSS window about the page and will be populated in real time (for example, when loading a comment form).

For more info see: Ajax Debug Log

Enable logging of XMLRPC

To debug communication between a blogging tool which uses the XMLRPC interface, you can set

 $debug_xmlrpc_logging = 1;

in _advanced.php.

This will log to the file /xmlsrv/xmlrpc.log then and will be helpful when debugging what’s going on or why a particular request fails.

Display errors, even when not in debug mode

There is a variable that forces displaying error even if the debug mode is not enabled. This option is intented to help users quoting meaningful error messages in the forums.

$display_errors_on_production = true;

Important: this variable is set in true by default but we encourage you to override this option by changing it into false, following best practices about security. Detailed information could be found here: Exposing Errors To Visitors.

Configuration overrides

Sometimes it’s useful to override some configuration settings on a specific test machine without affecting the normal configuration files that are synchronized with the production server.

To do this you can create a file called _local.php.

This file will be loaded after all other configuration files and any setting in that file will override previous values.

This method is also very helpful in order to not lose your configurations when you upgrade.

Created by fatimahnasra • Last edit by fplanque on 2020-07-28 23:39 • •

No feedback yet

On this page

  • Enable Debugging
  • Brute force debugging for everyone (not recommended on production servers)
  • Turning on debugging only for you and only when you need it (recommended method)
  • Enable the AJAX debuglog
  • Enable logging of XMLRPC
  • Display errors, even when not in debug mode
  • Configuration overrides

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
    • Website Skins/Themes
    • Email Skins/Themes
    • b2evolution Files
    • Website Integration
    • Plugins
    • Debugging
      • Using Multiple Domains
      • Crumbs (nonces)
      • Setting up a multidomain test environment
      • Ajax Debug Log
      • Debugging
      • Viewing PHP errors
      • Dev Menu
    • Technical Reference
    • Hacks
    • Credits
    • Development
    • How to... (Customize)
    • Scheduled Tasks Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
b2evolution CCMS

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque