Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
Submit a Q&A Request a Q&A Open Questions

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $65.00
Net Balance: $61.80
Left to go: $38.20

Donations
studioC  ($25)May-17
Anonymous ($15)May-16
Anonymous ($25)May-4

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

How do I...

Install my StatCounter code?

Answer here!

Did you know ?

you can use a simple php script to change file/folder permissions!

More details...

Random question

How to download files from XOOPS SVN to my Windows PC, if I don't have the SVN tools, like TortoiseSVN?

Answer here!

Recent Q&A List

Cumulus Tag Cloud

2 2.5 2.6 3.0 87 2013 Abuse admin Amazon AntiHarvesting AntiMalUser AntiSpam API Beats billige black Blocks blue Captcha capture Casual cell Checksum Christmas chronolabs content Conversion Debauchosity demo docek download Dresses EC2 editor evden eve facebook floor free herre Honeypot Human IP jQuery kantor klubovi lamps log logger Marquee mobile module modules Monster MyAlbum-p newbb news newsletter online PageRank Password Permissions pink Plugin portal Prevention profile project propose Protector Protocols publisher Rights rmcommon Room sale security Server site SmartClone Smarty Songlist Spam stem Studio tag tags tdmcreate Theme themes upgrade userlog website Whitepaper WSDL XIPS xoops Xortify XPayment ZendFramework

New Users

Registering user

# 136033

Arizamartin

Welcome to XOOPS!
SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)

Question
What is debugging and how do I do this?
Answer
Debugging is the art of finding errors.
XOOPS has three levels of debugging; PHP debug, MySQL debug and Smarty debug.

PHP Debug
If PHP debug is not on, the system will suppress error messages coming from the PHP code.

This is the main reason for the dreaded "Blank Page" problem, which is caused by an error in the PHP code, so serious that the interpretation of the code can no longer continue.

Enabling PHP debug will often result in these blank pages showing an error message instead.

MySQL Debug
With this debugging setting enabled, a window will popup after each page load, showing the database queries, executed on the page. It will also show which blocks and templates are used on the page along with caching information (whether the block or template is cached)

Faulty SQL queries will be highlighted in red with a MySQL error message appended

Smarty Debug
Smarty debug settings will open a new window on all pages using Smarty templates, showing all variables assigned to Smarty along with their values.
This debug setting is useful if you know that there are no PHP errors, that the SQL queries execute successfully, but the information does not show up as expected. Quite often it is a matter of organising the information correctly for display which is only discovered by looking at the actual values in each Smarty variable. An example is information in an array, which the template is coded to take from a sub-array instead - or vice versa.

--- Additional details submitted by Jdseymour on 13-Jan-2005 00:07

To add to this answer here are three flash tutorials that show how to enable each debug mode, and how the output of each mode looks.

1.PHP Debug Mode Tutorial

2. MySQL Debug Tutorial

3. Smarty Template Debug Tutorial

Requested by Carnuke and Answered by Mithrandir on 2004/11/2 5:03:33 (26174 reads) 6 Comment(s) Print Q&A Send Q&A

The comments are owned by the author. We aren't responsible for their content.
This FAQ should add a solution to enable php debug using phpmyadmin. Just incase users can't gain access to admin/user interface *similar to blank page*. Just a suggestion.

SMD
Published: 2005/1/1 20:49 • Updated: 2005/1/1 20:49
I'll post that info here for reference.

MySQL query to change the XOOPS Debug Mode setting:

UPDATE XXXX_conf SET conf_value=YYYY WHERE conf_modid=AND conf_catid=AND conf_name='debug_mode'


Replace XXXX with the value of XOOPS_DB_PREFIX in mainfile.php (default is "xoops").

Replace YYYY (Debug Mode) with:

0, for Off
1, for PHP Debug
2, for MySQL/Blocks Debug
3, for Smarty Template Debug
Published: 2005/1/1 23:03 • Updated: 2005/1/1 23:03
I'm not sure if you're out of date or if I'm out of date, but my config table is named xxxx_config, NOT xxxx_conf. Anyway, thanks for the good info.
Published: 2005/11/4 15:39 • Updated: 2005/11/4 15:39
I'm pretty sure its a typo. The correct one is:

UPDATE XXXX_config SET conf_value=YYYY WHERE conf_modid=AND conf_catid=AND conf_name='debug_mode'

Published: 2005/11/5 2:51 • Updated: 2005/11/5 2:51
It doesnt work for me... tell me that 0 row changed...
Published: 2005/12/28 17:38 • Updated: 2005/12/28 17:38
I'm doing an ajax-style include of pages within a form and I want to disable the called pages' debugging. Is there any way within a specific page context to change the debug_mode value?
Published: 2006/9/8 15:07 • Updated: 2006/9/8 15:07