Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

$_SERVER['request_uri'] in Kollection Logout Function isn't working

New Here ,
Apr 07, 2007 Apr 07, 2007

Copy link to clipboard

Copied

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 www.mydomain.com/page.php?variable=name is rewritten to www.mydomain.com/page/name.html. When the server behavior appends the parameter to the url it uses www.mydomain.com/page/name.html 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 http://www.mydomain.com/directory/pagename/pagename/image.jpg. 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.
TOPICS
Extensions

Views

943
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2007 Apr 08, 2007

Copy link to clipboard

Copied

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 http://www.w3schools.com/tags/tag_base.asp

Add the base tags it should fix this issue.


Cheers,
Brian Diaz
Media 65

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2007 Apr 08, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 09, 2007 Apr 09, 2007

Copy link to clipboard

Copied

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 😉

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

LATEST
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:

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

On the rewritten URL pages it looks like this:

http://www.my-website.com/existing-directory/pagename/variable1-variable2.html?KT_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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines