1
Coplan
ModDev: PHPSESSID in URL
  • 2004/4/6 15:50

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I'm working on a module for XOOPS that is made to track production releases. The content is not really the issue. The issue is that whenever I click on a link within my module, I get redirected to the new URL. Everything works fine and all, but I am getting the PHP session ID automatically appended to the URL, like this:

Quote:

I don't specifically call for that in my script. But even the link seems to be pointing to that address. I don't know how it gets in there.

What should I look for to figure out how to hide this in the URL? Perhaps there is a specific XOOPS way of creating links?

For an example, I have a beta up on one of my sites: dev.scenespot.org. Go to the tune tracker (in the menu) and click on any song link in that module.

Any help would be appreciated.


2
Coplan
Re: ModDev: PHPSESSID in URL
  • 2004/4/6 21:08

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


No one?

3
ajaxbr
Re: ModDev: PHPSESSID in URL
  • 2004/4/6 21:59

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


No permission to access area... anyway, I don't think I'd be able to get any more important info from there. I've tried to find relevant info posted here on xoops.org but couldn't understand what I got (search for sessions and you might catch something my non-programmer's eyes missed).

So my out of the blue advice would be "follow your script's execution path untill you find out how sessions get there". Not very helpful, is it?

I hope this bump brings someone skilled enough to help you.

4
Mithrandir
Re: ModDev: PHPSESSID in URL

The PHPSESSID in the url has something to do with PHP's session handling - an area, I don't know all that much about.

Is your site not working due to this session id in the url? Otherwise, just be careful not to paste links containing your session id.

I'm just thinking out loud and not at all sure that it is so, but perhaps if the server could not save a cookie with the sessionid, it passes it on in the url

5
Dave_L
Re: ModDev: PHPSESSID in URL
  • 2004/4/7 0:02

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


That might be your PHP settings. From http://www.php.net/session:

Quote:
PHP is capable of transforming links transparently. Unless you are using PHP 4.2 or later, you need to enable it manually when building PHP. Under Unix, pass --enable-trans-sid to configure. If this build option and the run-time option session.use_trans_sid are enabled, relative URIs will be changed to contain the session id automatically.

6
Coplan
Re: ModDev: PHPSESSID in URL
  • 2004/4/7 2:23

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I figured it out.

Just a warning...use the internal functions to create the link. In theory, this could have been a bug later on if someone had a different setup than I.

Here's my old code for the link creation:
Quote:

$slink = ''.$sname.'';


And here's how I do it now (and how it should be done):
Quote:

$slink = ''.$sname.'';



My theory is that somehow, either PHP or the HTML passed the POST data into the URL as GET data. Nevermind that, but using the XOOPS_URL fixed all this. NO redundant URL data anymore.


Thanks for the help. Dave_L, your info wasn't the end-all, but it was a definate step in the right direction.

Login

Who's Online

333 user(s) are online (225 user(s) are browsing Support Forums)


Members: 0


Guests: 333


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits