Re: problems with sessions variables and virtual domains in apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 admin@xxxxxxxxxx
    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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux