Topic: Random 404 errors with xajax_core.js ???

Hi all,
I've scoured the posts for others with a similar problem, but found nothing. Here's what's happening:

I wrote a PHP script that emails me when 404 errors occur, so I can see how my site is being (mis)used, and spot errors quickly. The script tells me (a) The last page loaded, (b) the URL that created the 404, and (c) the browser info (aka user agent).

For about a year, around 1-in-1,000 visitors triggers this 404 error script in a way I can't explain. The error generating URL is strangely formed (examples below). I thought at first it was a random IE glitch with a particular combo of browser/platform versions that might be incompatible with xajax, but then I noticed a few Firefox events.

Here are some examples:

THE LAST LOCATION URL: (a) http://www.ayyawear.com/store/footwear/tabi/
THE 404 ERROR URL: (b) http://www.ayyawear.com/store/footwear/ … ax_core.js
THE USER AGENT: (c) Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

(a) http://www.ayyawear.com/store/mens/jackets-and-vests/
(b) http://www.ayyawear.com/store/mens/jack … ax_core.js
(c) Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.3; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

(a) http://www.ayyawear.com/store/footwear/
(b) http://www.ayyawear.com/store/footwear/ … ax_core.js
(c) Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.16) Gecko/2009120208 Firefox/3.0.16 (.NET CLR 3.5.30729)

There are hundreds like this, and I haven't a clue as to what could be generating these strange URLs! The only place where the sting "URL:" even exists in the xajax code is in xajaxAIO.inc.php line 1132, where the "Javascript component could not be included" error is printed to screen, but I don't see how this could be generating 404s, especially since the exact same script works without error over 99% of the time.

I hope I was clear. Anyone run into this problem before? Any suggestions on things to try?

Cheers,
Neokio

Re: Random 404 errors with xajax_core.js ???

Hey again .. just bumping my own post smile
I'm a bit surprised no-one has chimed in, it seems like something someone would have come across already tongue
No ideas out there?
Cheers,
N

Re: Random 404 errors with xajax_core.js ???

Hi,

I have never seen this phenomenon. Do you want to submit some code?

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Random 404 errors with xajax_core.js ???

Hi Ed, thanks! The codebase is pretty big, so I'm not sure what I can submit to help. My general structure is as follows:

Code: PHP

<?

    require_once 'lib/xajax_core/xajaxAIO.inc.php';

   

    function whatsup( $str )

    {

        $res = new xajaxResponse();

        $res->alert( $str );

        return $res;

    }

   

    $xajax = new xajax('index.php');

    // I recently added 'index.php' here as an attempt to fix this very problem ...

    // my sense is that it works better as a result, but errors are still being generated

   

    $xajax->setFlag('decodeUTF8Input', true);

    $xajax->registerFunction('whatsup');

    $xajax->processRequest();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <title>test</title>

    <? $xajax->printJavascript('js/'); ?>

</head>

<body>



    <a href="./" onclick="xajax_whatsup('yep, it works');return false;">does it work?</a>



</body>

</html>

 

Ostensibly, if I were able to get 30,000 people to run this code, ~30 404 errors would result from a malformed URL of http://www.something.com/nURL:%20/js/xa … ax_core.js

Can you think of anything else I can provide to help identify this problem?

Re: Random 404 errors with xajax_core.js ???

Ugh .. a month later and the problem is just getting worse.
I can't trace the problem. So NO ONE else has come across this glitch?