$_SERVER['request_uri'] in Kollection Logout Functionisn't working

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default $_SERVER['request_uri'] in Kollection Logout Functionisn't working

    I am using DW 8.02 and MX Kollection. I am using php to build my website. I am
    using the logout server behavior from MX Kollection. The logout function uses a
    $_SERVER['request_uri'] and $_SERVER['php_self'] to append the logout parameter
    to the url. The problem is that the uri that it is appending to is the modified
    uri after the mod_rewrite. So on [url]www.mydomain.com/page.php?variable=name[/url] is
    rewritten to [url]www.mydomain.com/page/name.html[/url]. When the server behavior appends
    the parameter to the url it uses [url]www.mydomain.com/page/name.html[/url] or something
    close to that. The result is the logout function doesn't work.

    I did notice similar problems before on the mod_rewritten pages with images
    and css files. The browser was looking for images on
    [url]http://www.mydomain.com/directory/pagename/pagename/image.jpg[/url]. So to fix this I
    just made the image sources relative to root instead of the document and it
    fixed the problem. I don't know enough about php to sort through the include
    files in the MX Kollection to fix the problem. Anyone know how to fix this.
    There have been other problems similar to this with passing variables to
    include files and stuff but I haven't found the answer to this yet.

    Please help or the mod_rewrite is a waste of time but it is very neccessary.

    I posted this in the application development but no responses so I thought
    maybe this one was more appropriate. Hope I am right. Thanks in advance for
    the help.

    slackjaw47 Guest

  2. Similar Questions and Discussions

    1. #25968 [Bgs]: $_SERVER['REQUEST_URI'] - Undefined index
      ID: 25968 User updated by: bob at rsi dot com Reported By: bob at rsi dot com Status: Bogus Bug Type: CGI...
    2. #25968 [Opn->Bgs]: $_SERVER['REQUEST_URI'] - Undefined index
      ID: 25968 Updated by: sniper@php.net Reported By: bob at rsi dot com -Status: Open +Status: Bogus...
    3. #25968 [Fbk->Opn]: $_SERVER['REQUEST_URI'] - Undefined index
      ID: 25968 User updated by: bob at rsi dot com Reported By: bob at rsi dot com -Status: Feedback +Status: ...
    4. #25968 [Opn->Fbk]: $_SERVER['REQUEST_URI'] - Undefined index
      ID: 25968 Updated by: iliaa@php.net Reported By: bob at rsi dot com -Status: Open +Status: Feedback...
    5. #25804 [NEW]: _SERVER['REQUEST_URI'] does not capture fragment
      From: greg at freephile dot com Operating system: RH Linux 8.0 PHP version: 4.3.3 PHP Bug Type: HTTP related Bug...
  3. #2

    Default Re: $_SERVER['request_uri'] in Kollection LogoutFunction isn't working

    Hi

    Your problem has too many variables to resolve on a forum post.
    When you use Mod_rewrite it depends on how your rewrite rules are written and
    the order in which
    they are lined up.

    The Kollection has its login and logout functions in
    the file below you will find most the array keys that Kollection uses.

    //includes\tng\
    tNG_config.inc.php

    This is where the PHP classes are stored with little PHP knowledge you can
    start to see how things work
    //includes\tng\triggers

    The MVP tools that PHP gives you to see what?s going on.
    Add these to the page that your having trouble with find the $_SESSION key
    that
    your using and work it into your log-out.

    <pre>
    <?php var_dump($_SESSION); ?>
    </pre>

    <pre>
    <?php var_dump($_REQUEST); ?>
    </pre>

    The file below has a lot of key functions that you?re looking for and can help
    you with your log out issues.
    //includes\tng\
    tNG_functions.inc.php

    Lastly you should be easy on the Kollection its not easy two make such a great
    set of tools
    to work with Dreamweaver and make it so easy to use. It takes years of study
    to have half of what there system does in minutes. When you add Mod_rewrite
    into the picture it another ballgame now you?re talking Regular expressions
    etc. No one can plan for this type of free design without having a fix set of
    pre defined rules or a pre fix Database schema.

    Any way best of luck on your project the above hints should put you on your
    way.
    Also please note that you could still use none mod_write links to Log-out your
    users and don?t forget the cookies. And any atoms or variables that may be
    needed for your mod_rewrite rules.

    P.S: The image issues your having it?s not the Kollection you need to add a
    Base tag to your page or pages as this is happening because of your rule
    settings.
    See this url [url]http://www.w3schools.com/tags/tag_base.asp[/url]

    Add the base tags it should fix this issue.


    Cheers,
    Brian Diaz
    Media 65


    webmouth Guest

  4. #3

    Default Re: $_SERVER['request_uri'] in Kollection LogoutFunction isn't working

    Thanks, webmouth. I will give them a try. By the way. I wasn't giving
    Kollection a hard time. I think the Kollection is phenominal. Its easy to fix
    it to get what you want it to do but also customize it for the things its not
    necessarily built for. I was just stuck on this part. I only hope that Adobe
    brings out the next version of the Kollection for Dreamweaver. I haven't seen
    anything on the Adobe site just yet about that. I thought that maybe some of
    the functionality would be included in Dreamweaver. After the feature tours on
    Adobe.com I didn't see any mention of this but I am still hoping that they have
    some version of the product available.

    Thanks again sir or ma'am.

    slackjaw47 Guest

  5. #4

    Default Re: $_SERVER['request_uri'] in Kollection LogoutFunction isn't working

    Hi sorry if I sounded a bit on the defensive about the Kollection.
    It?s that after doing tech support emails and people saying it?s the product
    But what happen is that they forgot to do the right steps like check the on
    switch ;) then
    they say it?s not me it?s a product error.

    Also just came to mind there are a lot of Globals calls try.

    <pre>
    <?php var_dump($_GLOBALS); ?>
    </pre>
    Cheers,
    Sir Brian ;)

    webmouth Guest

  6. #5

    Default Re: $_SERVER['request_uri'] in Kollection LogoutFunction isn't working

    That's ok. I don't think it's the software. I have been able to figure all MY
    problems out up until now. If I didn't want to do such odd stuff then I
    wouldn't have any problems with the software. But as luck would have it I
    can't just do things normal. So I used the mod_rewrite. I think this is fine.
    I looked at the documents that you mentioned and I found this logout_trigger
    in the tng/triggers directory and I think this is the problem:

    function getLogoutLink() {
    return KT_addReplaceParam(KT_getFullUri(), 'KT_logout_now', 'true');

    The KT_getFullUri() is the problem because of the mod_rewrite. On
    non-rewritten url pages it looks like this:

    [url]http://www.my-website.com/existing-directory/pagename.php?KT_logout_now=1[/url]

    On the rewritten URL pages it looks like this:


    [url]http://www.my-website.com/existing-directory/pagename/variable1-variable2.html?K[/url]
    T_logout_now=1

    pagename is not a directory but the KT_getFullUri looks at it as if it is a
    directory and the variable1-variable2 looks like a page. So how do I get the
    KT_getFullUri to get a truncated url without the varialbles? The KT_getFullUri
    uses the $_SERVER[request_uri] which gets the uri and the variables. If I use
    the PHP_self instead will that help? Because that doesn't use the

    I don't want to start tweaking code until I can understand it. Not to mention
    that the KT_getFullUri calls another function which calls another function and
    so on I don't know where to begin to fix it. I don't want someone to fix it I
    want to learn how to fix it myself. Is that possible? Thanks, Sir Brian.

    slackjaw47 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139