Fork me on GitHub

Statistics v.5 - "Handle Referer" at top of page  Bottom

  • Installed Statistics V.5 on both a test site and production site. The production site shows the text 'Handle Referer' at the top of every page. Anyone know what is going on here?

    http://www.nscale.net

    Here is an excerpt from pnAPI.php as altered per instructions. The only difference is, after I started getting the 'handle referer' message at the top of the page, I block commented out the 'Handle Referer' function.

    Code

    // Other other includes

        include 'includes/advblocks.php';

        //include 'includes/counter.php';

        include 'includes/pnHTML.php';

        include 'includes/pnMod.php';

        include 'includes/queryutil.php';

        include 'includes/xhtml.php';

        include 'includes/oldfuncs.php';


    /*
        // Handle referer

        //if (pnConfigGetVar('httpref') == 1) {

        //    include 'referer.php';

        //    httpreferer();

        //}

    */


        include 'modules/statistics/collect.php';


    Any help would be appreciated.

    gtoddv
  • OK, I figured out what the problem was. It appears that the editor I was using adversly altered the file (pnAPI.php) I was editing. This caused the 'Handle Referer' error as well as some other strange anomolies. What I don't understand, and I hope someone can help me here, is why the editor would do this.

    I have tried to use both DreamWeaver and Maguma Studio to edit PHP files. They both have caused unexpected results when saving the file. One of the obvious things I have noticed is they open the file with a space between every line of code. I have never experienced this before (I am a JAVA/C++ developer). If this is the problem, is there a setting I need to enable to stop this from happening in the future?

    Again, any help would be appreciated.

    gtoddv
  • What your seeing there is the difference between windows, unix and macintosh handling of files. Unix uses the LF character (line feed) as a line terminator, older macs uses CR (carriage return) - newer macs are unix and windows uses both (CR/LF). So if you've a unux file it will appear double line spaced in some windows editors. Dreamweaver has the option of what line break combination to use. I successfully use dreamweaver for some of my development work.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks Mark!

This list is based on users active over the last 60 minutes.