Announcement

Collapse
No announcement yet.

referrer.pl Not Working As Intended

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    referrer.pl Not Working As Intended

    Hi folks,

    I hope you can help me. I studied the Actinic guide to learn how to set up the referrer script to track my buyers.

    In the end I have this url
    Code:
    http://www.geocities.com/king_tut_tutankhamun/referrer_test.html
    But when I paste it into any external site and try to click on it, it says: "CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers."

    I have read the guide over and over again but I cannot find the error.

    Then, this PATH looks very strange, but all I did was just copying it from my Network Settings and replacing the special characters like : . and /

    Besides I also tried the ftp path and both paths in different combinations (with and without trailing slash etc.)

    Any suggestions much appreciated!
    Last edited by adder; 18-Jun-2008, 09:19 AM. Reason: Wrong url given, sorry
    Eco-Friendly House

    #2
    Right, this is because of my host. I have tested the script on my alternative (Unix) server and everything works fine.

    So, does anyone have experience of putting the referrer script on Windows server? Is there another way to handle the paths in referral url?

    Thanks.
    Eco-Friendly House

    Comment


      #3
      Nobody using Windows server to host Actinic? I didn't think Unix is so dominant here
      Eco-Friendly House

      Comment


        #4
        Hi,

        Can you try the following:

        - browse to your site folder and locate 'referrer.pl' and take a backup
        - edit this file in a text editor such as notepad
        - find

        Code:
        push (@INC, "cgi-bin");
        change it to:

        push (@INC, "cgi-bin/");
        (ie add a '/' after 'cgi-bin')

        - close and save the file
        - update your site.
        ********************
        Tracey
        SellerDeck

        Comment


          #5
          TraceyG, thank you very much for your suggestion. It didn't help, though. It still says the same old thing about HTTP headers.

          I am concerned about the path in my referrer URL, all this C:/web_data/yadda/etc
          But then I have tried every other combination.
          Eco-Friendly House

          Comment


            #6
            There was a problem with using the referrer on windows servers a very long time ago but was fixed. Can you just check that you have the following in your 'referrer.pl' file:

            Code:
            my $bFound = 0;
            my $sDir;
            foreach $sDir (@INC)
            	{
            	if ($sDir eq ".")
            		{
            		$bFound = 1;
            		last;
            		}
            	}
            if (!$bFound)
            	{
            	push (@INC, ".");
            	}
            It should be close to the top.
            ********************
            Tracey
            SellerDeck

            Comment


              #7
              Yes this code is in my file. There shouldn't be anything wrong with the files because I have tested it on a Linux and it worked fine. The problem is that I don't have enough space on my Linux to move the shop permanently.

              I am still inclined to think that the paths are to blame for this mess. What if I try to replace

              Code:
              my $sPathToCatalog = '<Actinic:Variable Name="PathFromCGIToWeb"/>';
              with the real path. Maybe it just calls out the wrong variable or it fails to understand what is C:/web_data
              Eco-Friendly House

              Comment


                #8
                I think it is a problem with the script because if I run "cgi-bin/rs000004.pl" in the browser I still get the error. I should see 'Input is Null' as I do when I run "cgi-bin/os000004.pl". Can you try replacing the 'referrer.pl' file in your site folder with the one that is in 'c:\program files\actinic v8\Original', delete rs000004.pl from your site folder and the server (in the cgi-bin) and refresh your site to see if that will work. If it doesn't solve the problem then I'll have to see if the development team have any ideas.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  I really appreciate your help. Although it made a perfect sense, it didn't change the CGI response

                  There is another point that makes me think the server is to blame. If you have a moment to click here, you will see the same script, generated by the same PC but hosted on Linux working as it should do and returning NULL. How come? It's a mystery.
                  Eco-Friendly House

                  Comment


                    #10
                    I've put it through to our development team as I'm out of ideas now.
                    ********************
                    Tracey
                    SellerDeck

                    Comment


                      #11
                      Thank you and sorry for the fuss. My host found the fault and kindly fixed everything during the weekend. It allegedly needed a configuration change within IIS

                      However, while we are on this. I found this old post http://community.actinic.com/showthread.php?t=196
                      where guys speak about adding 14 day cookie to the referrer script. Unfortunately, Version 8 doesn't have these lines of code in referrer.pl any more.

                      Being a PHP person, I do not pretend to understand anything about Perl. But, what if I replace
                      Code:
                      my ($sCartID, $sContactDetails) = ACTINIC::GetCookies();
                      	$::Session = new Session($sCartID, $sContactDetails, ACTINIC::GetPath(), $::TRUE);
                      	}
                      with
                      Code:
                      my ($sSource, $sCartID, $sContactDetails) = ACTINIC::GetCookies();
                      	$::Session = new Session($sCartID, $sContactDetails, ACTINIC::GetPath(), $::TRUE);
                      	}
                      i.e. I just added $sSource to the "my" string.
                      Eco-Friendly House

                      Comment


                        #12
                        Hi,

                        My host found the fault and kindly fixed everything during the weekend.
                        Do you have any information regarding what your hosting company fixed - it may help others in the future?

                        However, while we are on this. I found this old post http://community.actinic.com/showthread.php?t=196
                        where guys speak about adding 14 day cookie to the referrer script. Unfortunately, Version 8 doesn't have these lines of code in referrer.pl any more.
                        Can you let me know the exact version of v8 that you are using (Help | About) as there have been quite a few changes to the referrer script. I should then be able to let you know what to do in your version.
                        ********************
                        Tracey
                        SellerDeck

                        Comment


                          #13
                          Originally posted by TraceyG View Post
                          Hi,
                          Do you have any information regarding what your hosting company fixed - it may help others in the future?
                          I really hope I will be able to provide more info in the beginning of next week. The guy is on a vacation and he's been doing it on his laptop. I will interrogate him when he comes back

                          Originally posted by TraceyG View Post
                          Can you let me know the exact version of v8 that you are using (Help | About) as there have been quite a few changes to the referrer script. I should then be able to let you know what to do in your version.
                          It is 8.5.3.0.0.0.lDHB Actinic Business Multisite version.

                          Thank you.
                          Eco-Friendly House

                          Comment


                            #14
                            Originally posted by TraceyG View Post
                            Do you have any information regarding what your hosting company fixed - it may help others in the future?
                            Here are the details: So, the thingy that executes cgi scripts on a server is usually an .exe file and also it is easier to run (from the host's point of view) it can give problems to advanced users because of limited functionality. The another way to run CGI is under a .dll server. It is difficult to debug but much faster and better from a webmaster's point of view.

                            What my host did was switching from .exe to .dll. I am lucky he's as flexible as he is. Otherwise it just would be impossible to run the referrer thing on that server because of the way .exe interprets some Perl instructions.

                            Well, now it remains to get the cookies thing right for my complete happiness!
                            Eco-Friendly House

                            Comment


                              #15
                              Hi,

                              I'm afraid I've been told that this change can't be done anymore as the referrer details are not stored in the cookie anymore but in the session file. Apparently, there were lots of changes between v6 and v8 in this area.

                              Thanks for the information from your host.
                              ********************
                              Tracey
                              SellerDeck

                              Comment

                              Working...
                              X