Transparent session issues....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Transparent session issues....

Post by nielsene »

Please correct me if I'm wrong, but when using transparent sessions, ie --enable-trans-sid, so that you don't need to worry about whether the user accepted your session cookie, there is no way to change the resulting link that PHP autogenerates?

The problem, php appends "&PHPSESSID=foo" to all internal links. However, to be valid XHTML the & needs to be converted to its entity &. I can easily do this conversion with str_replace, but that's always before PHP works its magic.....
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Sorry for the stupid post, I found the answer, just had to uncomment a line in php.ini to change the argument_seperator.output from "&" to "&"
Coco
Forum Contributor
Posts: 339
Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:

Post by Coco »

yeah i was about to suggest that :lol:

honest :oops:
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

I found that, if i did something like

<a href="file.php" target="_self">Valid link</a>

it would append the whole deal.. but if i did this:

<a href="http://mydomain.com/file.php" target="_self">Valid Link</a>

it wouldn't, odd. I'll ask my host about that so i don't have to type the whole deal
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Along the same lines, is there a way to make the <input> added to forms to propagate the session a proper empty element?
Post Reply