1
coachdash
PHP Debugging - Step by Step - HELP!?
  • 2004/8/10 21:02

  • coachdash

  • Just popping in

  • Posts: 25

  • Since: 2004/7/31


After many hours of hacking, fixing and tweaking... I'm getting what I want on my site... then all of a sudden I'm getting blank screens or white screens all over the place.

I can't figure out how to view the debug error messages.

Step 1. Admin>Prefs> PHP Debugging ON - Check

Step 2. Edit /includes/common.php - Comment out these three lines [size=x-small]per XOOPS for Dummies - That's me![/size]

if ( $debug ) {
error_reporting (E_ALL);
}


Step 3. Save and upload the file.

Step 4. Click around to cause an error. (??)

Well here's an excerpt from my /includes/common.php and those three lines aren't in there. If I comment out the lines that do the same thing I get a parser error since it doesn't handle the {Else}


error_reporting(0);

//if ($xoopsConfig['debug_mode'] == 1) {
// error_reporting(E_ALL);
//}
else {
// Turn off error handler
$xoopsErrorHandler->activate(false);
}

if ($xoopsConfig['enable_badips'] == 1 && isset($HTTP_SERVER_VARS['REMOTE_ADDR']) && $HTTP_SERVER_VARS['REMOTE_ADDR'] != '') {
foreach ($xoopsConfig['bad_ips'] as $bi) {
if (!empty($bi) && preg_match("/".$bi."/", $HTTP_SERVER_VARS['REMOTE_ADDR'])) {
exit();
}
}
}


OK so now what...? I've got to do something with the {else}.. but what? comment it out? [size=x-small]I've actually tried lots of things in my frustration[/size]

Where am I supposed to actually see the error messages? In the white screen? In a File?

Oh Yeah, I'm locally building 2.07 using XSAS so I know I don't have to CHMOD anything...

Sorry for being such a newbie... I've looked all over for the answers to my questions - Please Help? The XOOPS for dummies is an excellent tool, but it isn't a "Hold my Hand - Guide" for everything.


2
Dave_L
Re: PHP Debugging - Step by Step - HELP!?
  • 2004/8/10 21:32

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


//if ($xoopsConfig['debug_mode'] == 1) {
error_reporting(E_ALL);
//}
//else {
// Turn off error handler
//$xoopsErrorHandler->activate(false);
//}

3
coachdash
Re: PHP Debugging - Step by Step - HELP!?
  • 2004/8/10 21:38

  • coachdash

  • Just popping in

  • Posts: 25

  • Since: 2004/7/31


I swear on all things sacred that I tried that several times. I even completely deleted the error handling section of the file completely, to no avail. I'll go try it again now... Is there an update function or process that I'm missing perhaps? I wouldn't think so, since the {else} handling error was immediate.

For such as simple solution, one should feel like an idiot....

My village is calling!

Thanks a ton for your quick response!

Login

Who's Online

444 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 444


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits