Subject: Web server error logs

From: Jason L Tibbitts III <[email-masked]>
Date: Sun, 08 Aug 2004 19:47:44 -0500

www.fvwm.org's error log grows by about 2GB a week lately; this is
almost exclusively due to "Undefined index" or "Undefined variable"
PHP warnings.  The server is running Apache 2.0.50/PHP 4.3.8.  Here's
a selection:

Undefined variable:  navigation_check in /local/www/fvwm/documentation/index.php on line 14

Undefined variable:  definitions_has_been_read in /local/www/fvwm/definitions.inc on line 35

Undefined variable:  val in /local/www/fvwm/definitions.inc on line 183

Undefined index:  clear_cookies in /local/www/fvwm/definitions.inc on line 148

Undefined index:  cookies_disabled in /local/www/fvwm/definitions.inc on line 153

Undefined variable:  site_has_been_loaded in /local/www/fvwm/documentation/index.php on line 35

Undefined variable:  heading in /local/www/fvwm/web-theme/themes/pager_on_top_theme.inc on line 24

Undefined variable:  bg_color in /local/www/fvwm/web-theme/classes/default_class.inc on line 34

Undefined index:  top in /local/www/fvwm/web-theme/classes/pager_on_top_class.inc on line 193

Undefined variable:  opts in /local/www/fvwm/web-theme/classes/base_class.inc on line 140

Undefined offset:  2 in /local/www/fvwm/web-theme/classes/pager_on_top_class.inc on line 159

Undefined offset:  1 in /local/www/fvwm/web-theme/classes/pager_on_top_class.inc on line 154

Undefined offset:  0 in /local/www/fvwm/web-theme/classes/pager_on_top_class.inc on line 159

Undefined variable:  title_background in /local/www/fvwm/web-theme/classes/default_class.inc on line 169

Undefined variable:  td_opts in /local/www/fvwm/web-theme/classes/default_class.inc on line 173

 - J<
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Kingsly John <[email-masked]>
Date: Mon, 9 Aug 2004 06:47:46 +0530

+++ Jason L Tibbitts III [2004-08-08 19:47:44]:

> Undefined variable:  navigation_check in
> /local/www/fvwm/documentation/index.php on line 14

Wouldn't it be easier to turn off the logging in php.ini ?

Or atleast turn on the  ignore_repeated_errors/ignore_repeated_source
parameters ?

Kingsly

---

From: Jason L Tibbitts III <[email-masked]>
Date: Sun, 08 Aug 2004 21:35:10 -0500

>>>>> "KJ" == Kingsly John <[email-masked]> writes:

KJ> Wouldn't it be easier to turn off the logging in php.ini ?

Don't ask me; I know very little about PHP.  I have no idea if these
warnings indicate bugs or not, but in my Perl programming I always try
to make sure that the code runs warning free.

 - J<

---

From: Uwe Pross <[email-masked]>
Date: Mon, 9 Aug 2004 09:19:28 +0200

Hi there,

On 08 Aug 2004 at 19:47:44 -0500, Jason L Tibbitts III wrote:

> www.fvwm.org's error log grows by about 2GB a week
> lately; this is almost exclusively due to "Undefined
> index" or "Undefined variable" PHP warnings.  The server
> is running Apache 2.0.50/PHP 4.3.8.  Here's a selection:
> 

I am going to check this on my box. Maybe we should
turn off warnings. I used a lot of tests like 

if($navigation_check) {
	...
}

I think most warnings come from these contructs. I have
a look if there is another way to avoid these warnings.

Cheers, Uwe

---

From: Chris Ross <[email-masked]>
Date: Mon, 09 Aug 2004 11:59:17 -0400

> a look if there is another way to avoid these warnings.

   If there's a risk that that variable doesn't exist, it
should probably be:

   if (isset($navigation_check) && $navigation_check) {
   }

   There are a variety of such checking mechanism's in PHP.

                - Chris

---

From: Harshwardhan Nagaonkar <[email-masked]>
Date: Mon, 09 Aug 2004 10:26:56 -0600

>   There are a variety of such checking mechanism's in PHP.

This has probably already been checked, but the other obvious thing is 
to check if they are POST or GET variables, in which case you need 
$_POST["variablename"] instead of just $variablename in PHP installs 
configured that way.

HTH,
-- 
Harshwardhan Nagaonkar
Electrical Engineering Sysop
Brigham Young University - 84602
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Uwe Pross <[email-masked]>
Date: Wed, 11 Aug 2004 11:18:59 +0200

> PHP warnings.  The server is running Apache 2.0.50/PHP 4.3.8.  Here's

I have turned on warning logging on my local box and changed the php code so
that it does not produce warnings anymore (at least on my box).
Jason, could you please check the log files in the next days/weeks and tell me
if there are still warnings or errors?
Is there a way that I can access the log file?

Cheers, Uwe

---

From: Jason L Tibbitts III <[email-masked]>
Date: Wed, 11 Aug 2004 08:43:19 -0500

>>>>> "UP" == Uwe Pross <[email-masked]> writes:

UP> Jason, could you please check the log files in the next days/weeks
UP> and tell me if there are still warnings or errors?

I cleaned out the log file about 15 minutes ago; currently it's only
31K which is certainly better than before.

UP> Is there a way that I can access the log file?

I'll make a symlink to somewhere accessible and send you the link via
private email.

 - J<