Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-21 Thread Chris

esteban wrote:

The don't want to pass the session variable across domains.  The problem is
in the main domain, i don't know what happens, the session variable lost the
value or is distroyed.


Track down where is happens with lots of 'error_log' and 'print_r' 
calls. Work out where it breaks then I'm sure you'll work out why it's 
breaking.


--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-19 Thread esteban
The don't want to pass the session variable across domains.  The problem is
in the main domain, i don't know what happens, the session variable lost the
value or is distroyed.

Chris [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
esteban wrote:
 I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
 variables to validate users, each page have something like this:

 if($_SESSION[validated]==0){
   header(Location: index.php);
   exit;
  }

 This worked fine when i had only one domain, but when i began to use
virtual
 domains, sometimes, not always, the session variable lost the value or the
 session variable is distroyed, i don't know what really happens.  I add
this
 lines to httpd.conf for each domain and the main domain is first:

 VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot C:/Program Files/Apache Group/Apache2/htdocs/domain
 ServerName www.domain.com
 ErrorLog logs/domain.com-error_log
 CustomLog logs/domain.com-access_log common
 php_admin_value upload_tmp_dir C:/Program Files/Apache
 Group/Apache2/htdocs/domain/tmp
 php_admin_value session.save_path C:/Program Files/Apache
 Group/Apache2/htdocs/domain/session
 /VirtualHost

 At the beginning i didn't use the two last lines with php_admin_value, i
add
 the lines for trying to solve the problem but it doesn't work.

 I have an application made with phpmaker and SquierreMail v.1.4.7 too, and
i
 have the same problem in both. In both case sometimes, when i want to go
to
 other page, the server ask me for the username and the password, it is not
 always.

If you are going across domains (page 1 is on domain 'a' and page 2 is
on domain 'b'), you need to explicitly pass the session across in the
query string.

Even them I'm not sure it will work for security reasons.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP] problems with sessions variables and virtual domains in apache

2007-01-18 Thread esteban
I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
variables to validate users, each page have something like this:

if($_SESSION[validated]==0){
  header(Location: index.php);
  exit;
 }

This worked fine when i had only one domain, but when i began to use virtual
domains, sometimes, not always, the session variable lost the value or the
session variable is distroyed, i don't know what really happens.  I add this
lines to httpd.conf for each domain and the main domain is first:

VirtualHost *:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot C:/Program Files/Apache Group/Apache2/htdocs/domain
ServerName www.domain.com
ErrorLog logs/domain.com-error_log
CustomLog logs/domain.com-access_log common
php_admin_value upload_tmp_dir C:/Program Files/Apache
Group/Apache2/htdocs/domain/tmp
php_admin_value session.save_path C:/Program Files/Apache
Group/Apache2/htdocs/domain/session
/VirtualHost

At the beginning i didn't use the two last lines with php_admin_value, i add
the lines for trying to solve the problem but it doesn't work.

I have an application made with phpmaker and SquierreMail v.1.4.7 too, and i
have the same problem in both. In both case sometimes, when i want to go to
other page, the server ask me for the username and the password, it is not
always.

Please help me

Thanks.

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



Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-18 Thread Chris

esteban wrote:

I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
variables to validate users, each page have something like this:

if($_SESSION[validated]==0){
  header(Location: index.php);
  exit;
 }

This worked fine when i had only one domain, but when i began to use virtual
domains, sometimes, not always, the session variable lost the value or the
session variable is distroyed, i don't know what really happens.  I add this
lines to httpd.conf for each domain and the main domain is first:

VirtualHost *:80
ServerAdmin [EMAIL PROTECTED]
DocumentRoot C:/Program Files/Apache Group/Apache2/htdocs/domain
ServerName www.domain.com
ErrorLog logs/domain.com-error_log
CustomLog logs/domain.com-access_log common
php_admin_value upload_tmp_dir C:/Program Files/Apache
Group/Apache2/htdocs/domain/tmp
php_admin_value session.save_path C:/Program Files/Apache
Group/Apache2/htdocs/domain/session
/VirtualHost

At the beginning i didn't use the two last lines with php_admin_value, i add
the lines for trying to solve the problem but it doesn't work.

I have an application made with phpmaker and SquierreMail v.1.4.7 too, and i
have the same problem in both. In both case sometimes, when i want to go to
other page, the server ask me for the username and the password, it is not
always.


If you are going across domains (page 1 is on domain 'a' and page 2 is 
on domain 'b'), you need to explicitly pass the session across in the 
query string.


Even them I'm not sure it will work for security reasons.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-18 Thread Andre Dubuc
On Thursday 18 January 2007 06:26 pm, esteban wrote:
 I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
 variables to validate users, each page have something like this:

 if($_SESSION[validated]==0){
   header(Location: index.php);
   exit;
  }

 This worked fine when i had only one domain, but when i began to use
 virtual domains, sometimes, not always, the session variable lost the value
 or the session variable is distroyed, i don't know what really happens.  I
 add this lines to httpd.conf for each domain and the main domain is first:

 VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot C:/Program Files/Apache Group/Apache2/htdocs/domain
 ServerName www.domain.com
 ErrorLog logs/domain.com-error_log
 CustomLog logs/domain.com-access_log common
 php_admin_value upload_tmp_dir C:/Program Files/Apache
 Group/Apache2/htdocs/domain/tmp
 php_admin_value session.save_path C:/Program Files/Apache
 Group/Apache2/htdocs/domain/session
 /VirtualHost

 At the beginning i didn't use the two last lines with php_admin_value, i
 add the lines for trying to solve the problem but it doesn't work.

 I have an application made with phpmaker and SquierreMail v.1.4.7 too, and
 i have the same problem in both. In both case sometimes, when i want to go
 to other page, the server ask me for the username and the password, it is
 not always.

 Please help me

 Thanks.

Following Chris' idea - going from http to https - try this simple technique - 
works for me:

?php session_start(); ob_start(); ?
?php if ($_SERVER['HTTPS'] != on){
header(Location: https://your_domain/the_page_you_want_at_https;);
exit;}
?

Saves you having to explicitly set the page for https

Hth,
Andre

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



[PHP] Problems with sessions .. qualified/non-qualified domain names

2006-01-03 Thread Kall, Bruce A.
I have diagnosed a problem with sessions I am having.  I'm don't believe 
it's necessarily a PHP problem, but I thought someone must have seen 
this before.


The first thing I do is a

session_start()

and then determine if (using session variables) whether the user has 
logged in successfully using a password and their session has not timed 
out (to some value I keep track of, not the php.ini variables). Anyway, 
if I come in to my site using a fully qualified domain name such as


http://mysubsite.mycompany.com/index.php

and start a session and then have the user log in, I then pass them 
along to:


http://mysubsite/index.php

internal to my organization (using the non-qualified domain name).  But 
this starts a different session than the one they came in as, so this 
user now has two different sessions, the one that determined they needed 
to log in on (using the fully qualified domain name) and the second 
session that was started after they logged in (using the non-qualified 
name).


I see this problem when you set your default browser 'home' page to be

http://mysubsite.mycompany.com/index.php

and attempt to use that.  Every time you click on that (after you've 
logged in initially and haven't timed out) you go immediately to a login 
window since that session is still around and was never logged in.


If my default browser home page is:

http://mysubsite/index.php

you then get into the session that was started after you log in.

The reason I think this issue must have come up for someone before is 
that almost all of my users should be able to use


http://mysubsite/index.php

BUT if you're coming in (from home for example), you need to come in as
http://mysubsite.mycompany.com/index.php for it to find my site.

Is there some way for a session to be registered to both?

mysubsite.mycompany.com  (using the fully qualified domain name)
 AND
mysubsite  (using the non-fully qualified domain name)


Thanks,
Bruce

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



[PHP] problems with sessions!!AAH

2004-08-16 Thread Angelo Zanetti
Hi, 

Im running a win2k with apache and PHP 4.3.4 and I have gone through
the installation readme for PHP. I have copied the necessary files to
the correct directories. I have also set register_globals= Off (default)
I have set my session path (it exists). 

Now my problem is that I cant get my sessions to work at all. I have
tried everything and no luck.
Ok here is what I do:

$_SESSION['login']=true;  

if (session_is_registered($_SESSION['login']))
echo(seesion is reg);
else
echo(seesion not reg);

I have not used the session_register function as the manual says the
following:

If you want your script to work regardless of register_globals, you
need to instead use the $_SESSION array as $_SESSION entries are
automatically registered.

I seriously dont know what else to try or do. If you think I've missed
something then please help.

Thanks in advance

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Matt M.
 if (session_is_registered($_SESSION['login']))
 echo(seesion is reg);
 else
 echo(seesion not reg);

try

if (isset($_SESSION['login']))
echo(seesion is reg);
else
   echo(seesion not reg);

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



RE: [PHP] problems with sessions!!AAH

2004-08-16 Thread Jay Blanchard
[snip]
Ok here is what I do:

$_SESSION['login']=true;  

if (session_is_registered($_SESSION['login']))
echo(seesion is reg);
else
echo(seesion not reg);

I have not used the session_register function as the manual says the
following:
[/snip]

Have you set session_start? http://www.php.net/session_start

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



RE: [PHP] problems with sessions!!SOLVED!!

2004-08-16 Thread Angelo Zanetti
thanks MATT it appears that the isset function worked!

 Jay Blanchard [EMAIL PROTECTED] 8/16/2004
4:46:16 PM 
[snip]
Ok here is what I do:

$_SESSION['login']=true;  

if (session_is_registered($_SESSION['login']))
echo(seesion is reg);
else
echo(seesion not reg);

I have not used the session_register function as the manual says the
following:
[/snip]

Have you set session_start? http://www.php.net/session_start 

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



RE: [PHP] problems with sessions!!AAH

2004-08-16 Thread Angelo Zanetti
ok I thought the problem was fixed but its not. The session variable
gets registered correctly however when I go to the next page and too see
if its still registered using the isset() function its not registered
anymore. I do have session_start(); at the top of the new page.

I cant think why its not working?!?!

TIA

 Jay Blanchard [EMAIL PROTECTED] 8/16/2004
4:46:16 PM 
[snip]
Ok here is what I do:

$_SESSION['login']=true;  

if (session_is_registered($_SESSION['login']))
echo(seesion is reg);
else
echo(seesion not reg);

I have not used the session_register function as the manual says the
following:
[/snip]

Have you set session_start? http://www.php.net/session_start 

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Torsten Roehr
Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 ok I thought the problem was fixed but its not. The session variable
 gets registered correctly however when I go to the next page and too see
 if its still registered using the isset() function its not registered
 anymore. I do have session_start(); at the top of the new page.

 I cant think why its not working?!?!

Are you using cookies? What are your session configuration values?

Regards, Torsten


 TIA

  Jay Blanchard [EMAIL PROTECTED] 8/16/2004
 4:46:16 PM 
 [snip]
 Ok here is what I do:

 $_SESSION['login']=true;

 if (session_is_registered($_SESSION['login']))
 echo(seesion is reg);
 else
 echo(seesion not reg);

 I have not used the session_register function as the manual says the
 following:
 [/snip]

 Have you set session_start? http://www.php.net/session_start

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

 
 Disclaimer
 This e-mail transmission contains confidential information,
 which is the property of the sender.
 The information in this e-mail or attachments thereto is
 intended for the attention and use only of the addressee.
 Should you have received this e-mail in error, please delete
 and destroy it and any attachments thereto immediately.
 Under no circumstances will the Cape Technikon or the sender
 of this e-mail be liable to any party for any direct, indirect,
 special or other consequential damages for any use of this e-mail.
 For the detailed e-mail disclaimer please refer to
 http://www.ctech.ac.za/polic or call +27 (0)21 460 3911


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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Matt M.
On Mon, 16 Aug 2004 17:39:21 +0200, Angelo Zanetti [EMAIL PROTECTED] wrote:
 ok I thought the problem was fixed but its not. The session variable
 gets registered correctly however when I go to the next page and too see
 if its still registered using the isset() function its not registered
 anymore. I do have session_start(); at the top of the new page.
 
 I cant think why its not working?!?!


make sure that the session cookie is being set.  check the
session_id() on both pages, make sure they are the same.  If they
arent, you are having a problem getting the sid passed from page to
page.

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Angelo Zanetti
Hi Matt, 

The session_id() is correct on both pages. Some info I forgot to add is
this:

on my first page:

session_write_close();
header(Location: franchise_menu.php?.SID);
exit();

however on my franchise_menu.php page, no SID is displayed in the
browser address. could that be a reason? Or have i misconfigured
something?

TIA


 Matt M. [EMAIL PROTECTED] 8/16/2004 5:59:26 PM 
On Mon, 16 Aug 2004 17:39:21 +0200, Angelo Zanetti [EMAIL PROTECTED]
wrote:
 ok I thought the problem was fixed but its not. The session variable
 gets registered correctly however when I go to the next page and too
see
 if its still registered using the isset() function its not
registered
 anymore. I do have session_start(); at the top of the new page.
 
 I cant think why its not working?!?!


make sure that the session cookie is being set.  check the
session_id() on both pages, make sure they are the same.  If they
arent, you are having a problem getting the sid passed from page to
page.

Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Angelo Zanetti
no I'm not using cookies.

Session configuration values from php.ini:

session.save_handler = files

session.save_path = c:\temp\sessions

session.use_cookies = 0

session.name = PHPSESSID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.serialize_handler = php

session.gc_probability = 1
session.gc_divisor = 100

session.gc_maxlifetime = 1440

session.bug_compat_42 = 1
session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180


is there anything else that I am missing or is anything set
incorrectly?

thanks guys, really appreciate it.


 Torsten Roehr [EMAIL PROTECTED] 8/16/2004 6:00:01 PM 
Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 ok I thought the problem was fixed but its not. The session variable
 gets registered correctly however when I go to the next page and too
see
 if its still registered using the isset() function its not
registered
 anymore. I do have session_start(); at the top of the new page.

 I cant think why its not working?!?!

Are you using cookies? What are your session configuration values?

Regards, Torsten


 TIA

  Jay Blanchard [EMAIL PROTECTED] 8/16/2004
 4:46:16 PM 
 [snip]
 Ok here is what I do:

 $_SESSION['login']=true;

 if (session_is_registered($_SESSION['login']))
 echo(seesion is reg);
 else
 echo(seesion not reg);

 I have not used the session_register function as the manual says the
 following:
 [/snip]

 Have you set session_start? http://www.php.net/session_start 

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

 
 Disclaimer
 This e-mail transmission contains confidential information,
 which is the property of the sender.
 The information in this e-mail or attachments thereto is
 intended for the attention and use only of the addressee.
 Should you have received this e-mail in error, please delete
 and destroy it and any attachments thereto immediately.
 Under no circumstances will the Cape Technikon or the sender
 of this e-mail be liable to any party for any direct, indirect,
 special or other consequential damages for any use of this e-mail.
 For the detailed e-mail disclaimer please refer to
 http://www.ctech.ac.za/polic or call +27 (0)21 460 3911


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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Matt M.
 session_write_close();
 header(Location: franchise_menu.php?.SID);
 exit();

SID will be empty if session ID was set in an appropriate session cookie

if you do a print_r($_SESSION) on franchise_menu.php do you see anything?

If you have access to the webserver you could just go in and look at
the session file that php creates.  It is pretty easy to find and you
should be able to see your variables if they are being correctly
written to the file.

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



Re: [PHP] problems with sessions!!AAH

2004-08-16 Thread Torsten Roehr
Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi Matt,

 The session_id() is correct on both pages. Some info I forgot to add is
 this:

 on my first page:

 session_write_close();
 header(Location: franchise_menu.php?.SID);
 exit();

 however on my franchise_menu.php page, no SID is displayed in the
 browser address. could that be a reason? Or have i misconfigured
 something?

Hi Angelo,

your code looks right but you should see the session id in the address bar
after the redirect. Does echo SID produce any output?

By the way, I don't think you need to call session_write_close().

Torsten

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



[PHP] Problems with sessions

2003-02-07 Thread John Almberg
I've got an odd problem . . . I've got a PHP site (PHP 4.2.2, Apache 
1.3.26, Linux box) that uses sessions to track a user_id for each user. 
I use the user_id to grant various rights.

This works like a dream 95% of the time. But every once in awhile, the 
session information gets lost. It's so rare that I have only seen it 
happen once or twice, but my customer, who works on the site all day, 
sees it 4 or 5 times a day.

I added code to send me an email whenever it happens, with some 
debugging info. The session parameter (called $user_id), just ends up 
blank (actually, unset) at random times. I've tried to see some pattern, 
but there doesn't seem to be one. It can happen on any page at any time. 
 It doesn't seem to correlate to times of heavy usage, either.

I'm really at a loss for this. Any ideas would be mucho appreciated!


-- John


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



[PHP] Problems with sessions

2002-10-30 Thread Tomas Kubis
Hello,
 I have big problem. I upgraded PHP from 4.1.2 to 4.2.3 and my scripts with
doesn´t work. Please help me!
in php.info register globals=On

I have two sripts:

first.php
?
session_start();
$ID = $txtusername . md5(microtime());
session_register('ID');
...

Header(Location: second.php);
?

second.php

?
.
.SELECT uzivatel from uzivatele WHERE md_hash='$ID';
?

In second.php ID is empty; but in previous version of php work it ok??

thanks
Tomas Kubis



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




[PHP] problems with sessions (not working)

2001-10-27 Thread Christian Dechery

I have a file called miec.php that does quite a lot of processing and then 
include()s user_track.inc.php...

miec.php:

?
a lot of db processing  (NO OUTPUT whatsoever)
include(user_track.inc.php);
UserTrack($products);
the output starts here...
?

user_track.inc.php:
--
?
session_start();

function UserTrack($products)
{
global $prod_views;

if( !session_is_registered(prod_views) )
{
fill the $prod_views array, serialize it...
session_register(prod_views);
// I've tested the code above... and session_register returns 
TRUE and I 
saw the session file...
}
else
{
do other stuff with the prod_views array
}
}
?

the problem is why does it NEVER go into the 'else'... it seems that 
the session is registered... but as soon as I refresh the page the session 
is lost...

why?



_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
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]




[PHP] Problems with Sessions?

2001-09-06 Thread Tim

When I first browse to a site on my LAN, I get links with URLs that look
like this:

chat/?PHPSESSID=f3d149f79f5196bd709fb3c256dbb3d8

after a refresh, the whoe PHPSESSID goes away.

Wondered if there was some setting in php.ini that I've overlooked?

I'm running PHP4 with Apache on an Unstable Debian box.

Any help would be appreciated :-)



-- 
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]




[PHP] problems with sessions login/logout and frames

2001-06-21 Thread kaab kaoutar


Hi there!
I'm happy the mailing lisi is finally activated :)
Well guys, i've spent bad time using sessions with frames :
i have a  website that dislpays some tour products, and i have four frames 
in most of the pages! i have a logon button in the top frame where once 
clicked it asks for the login and password then resistered a variable 
session and set it to true then reload the whole page and activates the 
tarifs which where invisible in the not logged version! then when i logout i 
unregister the logged varaible then reload the whole page!
Well i also start session in each page even if it's not registered so as to 
test whether it's registerd and set to true ! therefore i always have a 
session even not logged which is wierd! also i stsrt the session in the 
index file then send the session id to the 4 frames in their urls as 
test.php?phpsessid=$phpsessid...
i also add the ?phpsessid=$phpsessid to each link in each page/frame!
Here are the problems i encounter:
1-a session is always created cause i have to test!
2-with IE nad Netscape i have to clear the temporary files and set history 
to 0 otherwise it always shows the old page wich was for instance not logged 
however now i'm logged out ! but it still do me that after surfing a bit 
cause it remmbers the first pages !

Please help me !these drive me mad !
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
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]