[PHP] PHP session URL rewriting

2003-10-05 Thread Scott Teresi
I'm having trouble getting PHP's built-in session management to rewrite my
a href= tags to include the session ID across pages when cookies are
disabled. Unfortunately, PHP seems to only add the PHPSESSID to a link if
the page ends in .php, not .html.

I've preferred to hide my .php extensions and simply have Apache execute
all files ending in .html (traffic isn't too heavy on this site). How can
I force PHP to pass the session ID to all URLs, even ones that don't end in
.php?

Thanks for any help or references anyone can provide!

Scott Teresi
--
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP session URL rewriting

2003-10-05 Thread Justin French
I'm running PHP 4.3.2 on Mac OS X 10.2.8, with .html files parsed by 
PHP (specified with a local .htaccess file), and everything seems to be 
working fine here (.html URLs are re-written by PHP).

My advice would be to delete all your cookies, clear your cache, 
restart your browser with cookies disabled, and THEN do some testing :)

If it's still not working for your set-up, I guess you need to find out 
if the re-write code was changed between your version and mine, or 
perhaps something else?

Justin



On Monday, October 6, 2003, at 11:26  AM, Scott Teresi wrote:

I'm having trouble getting PHP's built-in session management to 
rewrite my
a href= tags to include the session ID across pages when cookies 
are
disabled. Unfortunately, PHP seems to only add the PHPSESSID to a link 
if
the page ends in .php, not .html.

I've preferred to hide my .php extensions and simply have Apache 
execute
all files ending in .html (traffic isn't too heavy on this site). 
How can
I force PHP to pass the session ID to all URLs, even ones that don't 
end in
.php?

Thanks for any help or references anyone can provide!

Scott Teresi
--
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP session URL rewriting

2003-10-05 Thread Curt Zirzow
* Thus wrote Justin French ([EMAIL PROTECTED]):
 I'm running PHP 4.3.2 on Mac OS X 10.2.8, with .html files parsed by 
 PHP (specified with a local .htaccess file), and everything seems to be 
 working fine here (.html URLs are re-written by PHP).
 
 My advice would be to delete all your cookies, clear your cache, 
 restart your browser with cookies disabled, and THEN do some testing :)

also...

PHP will not put a session id at the end of any absolute uri/url:

  href=http://somedomain.com/;
  href=/

Will not have the session automatically added (for security
purposes).  If you want a sessionid at the end of those you must
explictly tell php that you want it there:

  href=/?php echo SID?


Curt
-- 
List Stats: http://zirzow.dyndns.org/html/mlists/php_general/

I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php