Habari errors

1 view
Skip to first unread message

Scott Merrill

unread,
Feb 23, 2008, 11:46:39 AM2/23/08
to habar...@googlegroups.com
I have a number of repeating errors in my error log, and the messages
are not sufficiently descriptive to allow me to diagnose them.

First:
Undefined index: HTTP_HOST in
/home/www/skippy.net/system/classes/error.php line 84
This comes always from 127.0.0.1, and is identified as a "theme" error.

Second:
Trying to get property of non-object in
/home/www/skippy.net/system/classes/error.php line 84
This comes from a lot of different IP addresses (I assume my
visitors), and is also identified as a theme error.

There is no facility on the log viewer page to see the details of the
error that are, in fact, stored in the log table.

Here is the data from the first error:
http://habari.pastebin.ca/915199

And here is what I believe to be the salient information from the second error:
http://habari.pastebin.ca/915195

Any assistance in identifying and resolving the root cause of these
errors is greatly appreciated.

Scott Merrill

unread,
Feb 23, 2008, 12:54:25 PM2/23/08
to habar...@googlegroups.com
> First:
> Undefined index: HTTP_HOST in
> /home/www/skippy.net/system/classes/error.php line 84
> This comes always from 127.0.0.1, and is identified as a "theme" error.
...

> Here is the data from the first error:
> http://habari.pastebin.ca/915199

After some more investigation, I'm pretty sure this is a result of
Apache2 making "internal dummy connections" to my vhost. Habari
accepts the connection, then fails to do anything meaningful with it,
instead writing a lot of error data to the log.

http://www.mail-archive.com/us...@httpd.apache.org/msg11687.html
http://vdachev.net/blog/2007/02/01/apache-internal-dummy-connection/

I tried the rewrite rule in the first link, but that didn't seem to
work, and I still get the errors. Suggestions on how to avoid Habari
serving these requests would be appreciated.

Thanks,
Scott

Scott Merrill

unread,
Feb 23, 2008, 3:06:53 PM2/23/08
to habar...@googlegroups.com
On 2/23/08, Scott Merrill <ski...@skippy.net> wrote:
> > First:
> > Undefined index: HTTP_HOST in
> > /home/www/skippy.net/system/classes/error.php line 84
> > This comes always from 127.0.0.1, and is identified as a "theme" error.
>
> ...
>
> > Here is the data from the first error:
> > http://habari.pastebin.ca/915199
>
>
> After some more investigation, I'm pretty sure this is a result of
> Apache2 making "internal dummy connections" to my vhost. Habari
> accepts the connection, then fails to do anything meaningful with it,
> instead writing a lot of error data to the log.
>
> http://www.mail-archive.com/us...@httpd.apache.org/msg11687.html
> http://vdachev.net/blog/2007/02/01/apache-internal-dummy-connection/

I found this:
http://www.linuxsupport.org.uk/apache/index.html#q4
and followed the advice to increase my MinSpareServers,
MaxSpareServers, and MaxRequests, all of which had been set
intentionally low. That reduced the frequency with which this error
was logged.

I also added the following to my config.php:
if ( ! isset($_SERVER['HTTP_HOST'])) { die; }
I haven't seen that error crop up since, but I'm keeping an eye on things.

As to the other problem, with Owen's help we identified the cause:
requests to non-existant URLs that did not match a rewrite rule would
trigger this. Owen committed r1378 which resolves the problem, though
he tells me a better fix is in the works.

Cheers,
Scott

Owen Winkler

unread,
Feb 23, 2008, 3:37:31 PM2/23/08
to habar...@googlegroups.com
Scott Merrill wrote:
>
> As to the other problem, with Owen's help we identified the cause:
> requests to non-existant URLs that did not match a rewrite rule would
> trigger this. Owen committed r1378 which resolves the problem, though
> he tells me a better fix is in the works.

And is applied in 1379.

Now if something causes a 404, whether it's a request that matches no
rule or a request that matches a rule to something that doesn't exist
(like asking for a post that doesn't exist or you don't have access to),
Habari will create a RewriteRule to handle that 404 and supplant any
matched rule already recorded. This allows subsequent code that depends
on values in the matched rule to execute without incident.

Please post any issues with the changes to the issue tracker. :)

Owen

Reply all
Reply to author
Forward
0 new messages