| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Sessions and XHTML
Hey,
Wondering if someone can help me out here. I'm working on a bit of the schools website, and it's going to have student logins and whatnot. Anyhow, it validates perfectly fine EXCEPT when I have sessions. It's wanting to throw a session tag on the end of the URL. Because of that, it's using invalid URL usage by putting "&" instead of "&" Anyone know how I can either get it to stop putting that on the end of URLs, or how I can get it to put "&" instead? Thanks. |
|
|
|
|
|
#2 (permalink) |
|
the one who was
Super #1
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
|
Try this in a .htaccess file in the root of your website.
Code:
php_flag session.use_trans_sid 1
__________________
Patrick Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org |
|
|
|
|
|
#3 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Thanks Patrick. That worked great on the actual pages; however, for some reason the validator is still picking it up.
The page: http://hosted.hauglanddesigns.com/ndss/ The Validation: http://validator.w3.org/check?uri=ht...igns.com/ndss/ I did find something weird though. When I open it for the first time in a browser, it WILL show the session ID in the URL, but if I refresh for click another link, it disappears and doesn't show up again. Thanks again, greatly appreciated. |
|
|
|
|
|
#4 (permalink) |
|
the one who was
Super #1
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
|
Yes, the behavior of that one variable is sporadic I think. I don't deal with cookies myself, other than to store the session ID. Everything else is stored server side with the session info. Try setting these values and forcing cookie usage only. This may help you some more. The use only cookies may work, but the last two entries will force PHP to use the encoded version of the ampersand which should get you past the validation problem.
Code:
php_flag session.use_only_cookies 1 php_value arg_separator.output "&" php_value arg_separator.input "&"
__________________
Patrick Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org |
|
|
|
|
|
#5 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Thank you Patrick! I got away with using the bottom two. I've never touched cookies, so I thought I'd try to avoid the cookie one.
It works perfectly. Now I can brag to my teacher about my elite skills and then when he asks how I did it, I can say the great Patrick of Surmunity told me the way. Anyhow, thank you very much Patrick. Two thumbs up and a nomination for Admin of the Hour. |
|
|
|
|
|
#6 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
|
Ahh.. Sorry to bring this back, but it turns out I'm not very observant. I was just editing the one page and main layout last night and never really clicked any links. There's a wee problem. For some reason it's deciding to only load the "home" page. I have it set to load it if no other variables are set. This does come across as a problem as it hinders navigation. I tried taking it out and the links seem to function properly, but then it doesn't validate... I'm so confused and lost now as to what I should do.
Also, it's not the only page that it affects.. I just launched my main site and it's stuck on the main page too. Ok -- I just tried something before I hit submit and I seemed to solve it. I removed "php_value arg_separator.input "&" " and it seemed to have working links AND validate. Further proof that I am in fact, a blonde. |
|
|
|
|
|
#7 (permalink) |
|
the one who was
Super #1
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
|
So much for bragging to the teach about your elite skills.
![]() I recall telling someone else to do this once before and not even mentioning using the arg_separator.input arugment and had no problems. It just makes logical sense to me that the input would need to be adjusted since the output is changed and there would be compatibility problems when clicking the links. Looks like I was backwards on the thinking behind this. Of course, I never have cared much for validation, since all of the various browsers out there don't stick to any single standard very well. I just ignore validation entirely. Maybe that is why my designs look so bad? dunno... glad you figured it out though...
__________________
Patrick Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org |
|
|
|