Undefined requests and logging the error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
SpecialK
Forum Commoner
Posts: 96
Joined: Mon Sep 18, 2006 3:49 pm

Undefined requests and logging the error

Post by SpecialK »

I keep getting a undefined requests sent to one server. It doesn't happen on other sites following the same template, leading me to believe I have made an error somewhere in my PHP.

[Thu Mar 26 13:56:38 2009] [error] [client (removed)] File does not exist: (site path removed)/undefined

Sometimes it has a referer address and sometimes it doesn't. When trying to use my own error handler (works but doesn't hit the error handler for this)

This is the request from the access log. It usually exists after a page load, not always the root of the site.
(removed) - - [26/Mar/2009:13:56:38 -0500] "GET /undefined HTTP/1.1" 404 706 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)"

Is there something I should be setting in PHP so I can see more about these requests? Maybe I need to set something in Apache? If it was a constant error it would be easier to find, but it's often different addresses and varying times.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Undefined requests and logging the error

Post by requinix »

"undefined" doesn't really come up in PHP but it does with JavaScript. You have any kind of AJAX working on your site?
User avatar
SpecialK
Forum Commoner
Posts: 96
Joined: Mon Sep 18, 2006 3:49 pm

Re: Undefined requests and logging the error

Post by SpecialK »

It likely is a javascript issue. With your suggestion I looked more at the legacy javascript code. It was apparently trying to preload an image that doesn't exist. I assume this will correct the issue by removing that line.
Post Reply