Announcement

Collapse
No announcement yet.

Configuring Debug Mode

Collapse
X
Collapse
  •  

  • Configuring Debug Mode

    Debug mode is useful for development purposes- it is required if you will be creating VB5 Modifications you intend to distribute for others to download. However it is also useful for trouble-shooting issues with your site as debug mode often provides more specific error messages when something goes wrong- as such if you are having trouble support will often ask you to put your site into debug mode.

    Debug mode requires two small file edits in vBulletin 5. This is because VB5 has two config.php files by design. Both files require an edit and it is a little different for each.

    Please note- before editing any PHP files be sure you have a real code/text editor. The built in Windows Notepad should never be used to edit PHP files- Windows Notepad can often add invisible characters to code files that will cause errors once your re-upload the edited files. Windows users should instead download one of the many free alternatives. Two popular free text editors for Windows (all versions) are:

    Notepad2 - Available from Flo's Freeware - Looks almost exactly like regular Notepad, Native 32bit and 64bit versions.
    Notepad++ - Available from notepad-plus-plus.org - A little more advanced than Notepad2

    I am not aware of any problems with the built in text editors in Max OSX or Linux but there are plenty of advanced free editors available for all systems.

    Once you have your text editor setup the first edit is to your front-end or "Presentation" config,php file. This is the one in your forum-root directory.

    Download this file from your server and open it in a text editor. Look for the line that says:
    PHP Code:
    $config['debug'] = false

    Here is a screenshot from the VB 5.0.5 config.php file-
    Click image for larger version

Name:	
Views:	0
Size:	65.0 KB
ID:	4460788

    Edit the line to say:

    PHP Code:
    $config['debug'] = true
    Then save the file and re-upload it to your server overwriting the existing file.

    Test your site- make sure it loads- it should- if you run into any problem simply re-copy the original config.php file from the original VB Install package and overwrite it, but it is very unlikely you will have an issue.

    Now we must make the 2nd edit. This edit is to the back-end or "core" config.php file which is in your /core/includes/ directory.

    This file contains a lot of important information for your database which is not as easily replaced as the front-end file should something go wrong, so please save a back-up of this file somewhere else on your computer before editing the original file.

    Download a copy of this file and find the line that says

    PHP Code:
    // $config['Misc']['debug'] = true; 
    This is toward the end of the file, below is a screenshot-



    Edit the line to remove the two slashes // at the front and then re-save and re-upload the file.

    PHP Code:
    $config['Misc']['debug'] = true
    Now check your site one more time- it should both be working and be in debug mode.

    You will know it is in debug mode when there is a bunch of extra information shown below pages on the front end- example:



    Debug mode in the back-end (Admin CP) is a little less noticeable. There will be several new/more options mostly for those developing their own modifications. One way to tell is to go to Admin CP -> Style Manager and you will now see the "Master Style" visible above all other styles as below:



    If you see these changes you have confirmed you are in debug mode.

    To disable debug mode you basically reverse the above, edit each file and undo the changes.

    Note- if in either of the above files you can't find the text I say to look for you can safely simply add the line $config['debug'] = true; to the front-end/presentation file or $config['Misc']['debug'] = true; to the back-end/core file and that will work as well. Add it at the very top, just below the first line of the file which should be <?php.

    To undo the above changes simply comment out the line by adding two slashes // at the start of the line so it will be ignored as if it didn't exist. This way should you need to enable it again you just have to remove those slashes.

    • BirdOPrey5
      #4
      BirdOPrey5 commented
      Editing a comment
      vBcloud users should create a support ticket and support staff can enter debug mode themselves to check the issue.

    • avitor
      #5
      avitor commented
      Editing a comment
      thanks for this help

    • Craig
      #6
      Craig commented
      Editing a comment
      Please add to /articles/vbulletin-5-connect-aa/vbulletin-5-tutorials
    Posting comments is disabled.

About the Author

Collapse

BirdOPrey5 The details of my life are quite inconsequential... Find out more about BirdOPrey5

Article Tags

Collapse

Latest Articles

Collapse

  • Using User Ranks
    by Wayne Luke

    User ranks allow the administrator to set up image and HTML rewards for their users once they reach specific goals. In versions before vBulletin Connect 5.7.1, ranks could only be triggered by the number of posts and the usergroups assigned to the user. In vBulletin Connect 5.7.1, User Ranks have been expanded to allow more flexibility in creating individual ranks. Now you can build combinations of different criteria to create unique ranks for your site.

    ​ Ranks can be created using th...
    Tue 25 Oct '22, 1:04pm
  • Excluding Custom Files from Suspect File Diagnostic
    by Wayne Luke
    If you have custom files, you can create an md5 sums for your smilie directory if you want. Inside the /do_not_upload folder of your download package is a checksum sub-folder. That will create custom md5_sums files.
    1. Copy the included sample_checksum_config.php file to smilies_config.php.
    2. Enter in your forum root.
    3. Give it a product id like 'smilies'.
    4. Delete the existing directories and files in the scanpaths.
    5. Add in '/core/images/smilies', under the directories comment.
    6. Run the command
    ...
    Mon 24 Aug '20, 9:48am
  • Creating a Redirect Channel
    by Wayne Luke

    In older versions of vBulletin, you could specify a URL to redirect a forum to another location. This could be on your site or elsewhere. With the release of vBulletin 5, this functionality was removed. You can recreate this functionality using Template Hooks. I will outline the steps to create a channel redirect here.

    Note: This functionality is not available on vBulletin Cloud at this time.
    This tutorial involves changing options, creating custom templates and building a temple hook. Allowi...
    Wed 5 Feb '20, 7:09pm
  • The Basic Anatomy of a vBulletin Page
    by Wayne Luke
    vBulletin 5's user output is created using a system of pages that are customizable by the site administrator. This system is called Site Builder. By breaking the system down into pages, a lot of control is given to the system administrator. By using Site Builder, you can create a unique site without any knowledge of HTML or CSS.

    vBulletin's pages are created using layers built upon a grid layout. Each page starts with a layout which defines the content areas of the page. Layouts define...
    Mon 11 Sep '17, 9:55am
  • Enabling Two-Factor Authentication
    by Wayne Luke
    vBulletin 5.3.0 and higher will allow site owners to enable Two-Factor Authentication for Administrator and Moderator functionality. This is an extra layer of security provided to make sure your user data remains as safe as possible. Two-Factor Authentication works in conjunction with an app on the user's smartphone, tablet, or computer. These apps provide a security token that lasts a limited time before expiring. The security token is created using industry standard algorithms and a unique string...
    Tue 4 Apr '17, 9:38am
  • How to moderate the posts of new users only
    by Wayne Luke
    To help combat spam, many users opt to have new user’s posts moderated until they’ve made a specific number of posts. This allows the Admin/Moderator team to keep potentially malicious posts out of the public eye until a user has effectively passed a ‘probationary period’ as a member of the site.

    In order to do this, you will need to create a custom usergroup and a promotion.

    Creating a Custom Usergroup
    First, you need to setup the usergroup for your non-Moderated...
    Wed 22 Feb '17, 10:13am
Working...
X