[PHP] Re: Problem: lost session id when htaccess'ing.

2001-09-18 Thread Chris Lee

- you have cookie support on or off ?
- you using any header redirects ? (you have to manually add the SID to
URI's)

send some src and a link. lets see whats going on.

--

  Chris Lee
  [EMAIL PROTECTED]




Lic. Rodolfo Gonzalez Gonzalez [EMAIL PROTECTED] wrote in
message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I have a problem with sessions: I have php with sessions autostarting,
 compiled with transid support. I have a homepage with a link to another
 page protected via Apache's htaccess. Well, the href's in the homepage get
 the correct SID=md5 session id, then I click the link, I give login and
 password, Apache checks and accepts the data, but then in the next page I
 get a new session_id value!! (as if the SID passed in the URL were being
 lost!). I guess this is not normal. What can I do?.

 Many thanks in advanced.
 Rodolfo.

 P.S. apache-1.3.20, custom mod_mysql_auth, php-4.0.8-dev (latest snapshot,
 4.0.6 had a bug in the imap code, and I haven't returned to 4.0.5 yet).





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Problem: lost session id when htaccess'ing.

2001-09-18 Thread Lic. Rodolfo Gonzalez Gonzalez

On Tue, 18 Sep 2001, Chris Lee wrote:
 - you have cookie support on or off ?
 - you using any header redirects ? (you have to manually add the SID to
 URI's)

Sorry for the lenght of this mail.

PHP compiled with --enable-trans-id, so PHP adds SID to the URL.

session.use_cookies = 0, session.referer_check =, session.auto_start = 1,
session.name = SID

Having this doc tree:

/index.html
   |
   \___ systems/index.html
   |___ .htaccess

--- /index.html ---

!-- where systems/ is htaccess protected, using a hacked version of
mod_auth_mysql --
!-- here PHP attaches the first SID (supposed to be taken by
systems/index.html automagically, as session.auto_start = 1 --
a href=systems/index.htmlEnter/a

--- /index.html ---

Now:

--- systems/index.html ---

?php
if ($HTTP_SESSION_VARS[inside] != 1)
   // register all the session variables, etc.
?
frameset cols=100,*
   frame src=menu.html !-- here php attaches the *new* SID, not the --
   !-- passed from /index.html --
   frame src=main.html
/frameset

--- systems/index.html ---

Do I need to use the SID constant with session_id() to set the first
session ID? (I mean, the one from the href who taked me to the systems/
directory).

Thanks,
Rodolfo.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]