6 Ways to Debug a Raven Nuke or Phpnuke Problem Quickly
Everyday, I see users installing new modules, blocks, or themes. What happens when a new installation messes up your site? Do you just remove the new installation or do you try to fix the problem? I can teach you 6 different techniques that I use all the time to find phpnuke problems fast and fix them. Some of this tutorial deals with general phpnuke and some of it deals with installing forum mods for phpnuke.
1) Make a backup (OMG)
Anytime you change something you need to make a backup of the original. I prefer to put my backups on my server or on my storage drive. You need to keep these backups for more than a few days. My standard policy is to keep a backup for at least a month. Why? You might see a problem later down the road or your members might notice it before you do. BACKUP, BACKUP, BACKUP!!! So important, but your gonna learn this one the hard way like everyone always does.
2) $display_errors = true;
Much like the post thumb I used for this tutorial, you can see only half of the page is loading. If that user would turn on $display_errors in the config.php they might know what is causing that. Display errors is part of phpnuke’s way of handling the built in error reporting functions that come with PHP.
The PHP errors which are normally returned can be quite helpful to a developer who is trying to debug a script, indicating such things as the function or file that failed, the PHP file it failed in, and the line number which the failure occurred in. This is all information that can be exploited. It is not uncommon for a php developer to use show_source(), highlight_string(), or highlight_file() as a debugging measure, but in a live site, this can expose hidden variables, unchecked syntax, and other dangerous information. Especially dangerous is running code from known sources with built-in debugging handlers, or using common debugging techniques. If the attacker can determine what general technique you are using, they may try to brute-force a page, by sending various common debugging strings:
Source: PHP->Error Reporting
Off
$display_errors = false;
On
$display_errors = true;
Noob Note: For Evolution and Evo Extreme, the errors are recorded in the admin section.
Turning this on only when you have an issue will give you more insight into what the underlying problem is and it is definitely the first step you want to take into debugging a problem with phpnuke.
3) Error Logs
Error Logs are becoming more and more common in phpnuke. An error log is basically a file somewhere on the server (most of the time) that records any errors that phpnuke produces. You may need to consult with the author of whatever script / theme your using to find out the location of the log or if one exist.
Noob Note: If you have cpanel or something like it. You may find an error logs icon that will display some errors recorded by your server. I will not go into too much detail about this, but they can be helpful in finding all sorts of problems.
4) Re-Upload or Re-Install
If you just installed a mod and $display_errors is reporting no error, the next step is to double check you have all the files uploaded in the right place. Many many times, to fix someone’s problem all I do is re-upload the files. I never know if they are really missing one, but it never hurts to check.
Noob Note: I always backup the config.php so I can just re-upload it again quickly since it has the database connection information. It is a pain in the butt to look that up again and re-enter it. It saves time.
If it is a completely new installation I will run the installer again or re-load the .sql. I wrote a tutorial on loading .sql files through phpmyadmin that might help you with that. A fresh install might reveal an error you missed before and especially if you still have $display_errors set to true.
5) Tips for Forum Mods
When a coder converts or writes a forum mod, They usually write it for one distribution (ex: raven nuke). It is tough work to convert that mod for some distributions like phpnuke evolution extreme. What you the user doesn’t realize is that sometimes they are not that much different. You sort of have to use your ingenuity and if you have backed everything up this will not be a problem if you go wrong.
For Instance this is part of the ribbon forums mod for Clan Roster…
In standard phpnuke or Raven Nuke I tell you to find
$template->assign_block_vars('postrow', array(
In Evo or Evo Extreme the code is actually
$template->assign_block_vars('postrow',array_merge( array(
You can see how the two are similar, but slightly different. You can solve this problem by only searching for part of the variable. This skill takes some practice and like I said, backup everything..
6) Ask the Developer for Support
Many times you can find the developer of a mod / theme by just looking at the top of an actual file. For instance,
/********************************************************/ /* Theme Designed and coded by */ /* Clan Themes (admin@clanthemes.com) */ /* http://www.clanthemes.com */ /********************************************************/
Provide your damn url. I know your all secretive about some huge project that is going to explode on to the web, but a picture is worth a thousand words. It is gonna be the first question I ask you anyways.
One of the biggest challenges even for me is learning to debug problems. You need to gather all the intel you can before ever thinking of asking for support. Why? Developers have a life too… If you come to me with a detailed problem, the likely hood of finding the answer is great. If I have to walk you through the above 5 steps first it is possibly going to take awhile. The more information you can provide, the faster we can solve the problem.
If you can’t find support for a mod, you might want to try asking on different sites only after you have exhausting all efforts to bother the developer. A developer is going to know more about that mod than anyone else or so they think.
Related posts:




