Announcement

Collapse
No announcement yet.

Session files and pages (sort of) outside of acatalog

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

    Session files and pages (sort of) outside of acatalog

    Hello friendly forum folk,

    This is going to be quite a tricky one to explain and I think it might well be an Actinic Support shaped issue but I would be most greatful to anyone else who understands what I'm talking about and offers to help as well.

    Here's the deal:

    I have a PHP generated enquiry form, the script of which has a path of, e.g.: 'www.mysite.co.uk/sys/scripts/'. I upload this outside of Actinic, no problem.

    The HTML for the said enquiry form is contained within an HTML template (as opposed to the script itself) and this is actually a brochure page (so Actinic custom variables etc can be used in it).

    All of the above works beautifully, no problem.

    However, if I go straight to the enquiry form in a web browser, e.g: www.mysite.co.uk/sys/scripts/ox-enq.php?id=ss, the follow a link from that page, it fails with an error 404 because it's actually looking for the page in question within the /sys/scripts/ folder on the site rather than the /acatalog/ folder.

    Links from other pages are then also scuppered too, as it continually looks for things in the '/sys/scripts/' folder.

    Note that as this is an Actinic Business site, the links are defined thus: /cgi-bin/ss000001.pl?SECTIONID=pagename.html&NOLOGIN=1.

    If I visit another page before going to the enquiry form, then I have no problems with any links from any pages (including the ones from pages outside of the acatalog folder).

    It's not as simple as a base href problem in the HTML of the page unfortunately (or it would never work) and I'm pretty sure I know what's actually happening, I just don't know why it works like that or how to change it.

    Here's what I think is going on:

    The session file for a site visitor is created the first time the ss000001.pl script is called.

    If said script is called for the first time from a page stored outside of the 'acatalog' folder then the session file is created with a base url relating to the path of the current page (e.g. 'http://www.mysite.co.uk/sys/scripts/') rather than simply 'http://www.mysite.co.uk/acatalog/'.

    I'm fairly confident (as confident as you can be about such things) that I haven't done anything wrong as I've checked the websites of other version 7 users to see if I get the same behaviour (obviously they have to have pages stored outside of acatalog - so it's tricky to find sites to look at) and it behaves in the same odd way for them too. I've also seen one or two other comments on this subject in the forums, although as deleting the session file 'fixes' things, people have dismissed the issue as 'one of those things' and gone away happy. It does appear to be a version 7 issue as I can't get it to break on early versions.

    Can anyone shed any light on how I might fix this issue? Can I (and would it be sensible to) force the ss000001.pl script to always use a specific base url when it creates the session file (taking that url from 'Catalog URL' in the Network Setup, for example)? That would make sense to me but I realise there may a be a special reason why it isn't done like this.

    Thanks in advance.

    Angi
    OXLink Web Design (Oxford)
    Actinic developers since version 3
    01865 361696

    #2
    Adding &ACTINICREFERRER="http:// yourwebsitedomain/acatalog/" to your link would allow it to function correctly when it is being used as an external page, not sure if this would then impact how it operates when called from an "internal" page.
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      Hi Bill,

      Many thanks for your input. Unfortunately your suggestion doesn't solve the problem as it's not about finding a way back from an external page (as would be offered by the referrer parameter) but more about finding the way forward from an external page. I think the key thing is that this external page isn't at the root of the site (I suppose that it might work okay if it was) but is actually inside a directory which is inside another directory.

      Thanks very much for taking the trouble to reply though, Bill, much appreciated, and if you come up with any other thoughts, I'd be pleased to hear them.

      Angi
      OXLink Web Design (Oxford)
      Actinic developers since version 3
      01865 361696

      Comment


        #4
        Sorry, yes - I did rather miss the point on this one. It sounds as though you are using relative url's in the links - why not use the full http:// URL and use the ACTINICREFERRER, (or even link directly to the real page names instead of going anywhere near cgi-bin).
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          No problem. Thanks for the good suggestion, but full urls don't work either sadly, you get /sys/scripts/http://www.mysite.co.uk/blah blah etc which obviously also throws up a 404.

          I have to use the cgi-bin links as this is an Actinic Business shop and without that style of link a logged in customer is logged out.

          Angi
          OXLink Web Design (Oxford)
          Actinic developers since version 3
          01865 361696

          Comment

          Working...
          X