Re: Question

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

 



thank you for all of you're recommendations and directions


On Tue, Apr 29, 2014 at 11:41 PM, Yehuda Katz <yehuda@xxxxxxxxxx> wrote:
If you are already using PHP sessions, then there is no need for mod_session.
PHP supports changing the session store: session_set_save_handler
For an example solution, see http://phpsecurity.org/code/ch08-2

- Y


On Tue, Apr 29, 2014 at 1:05 AM, Билгүүн Ө <bilguun.u@xxxxxxxxxxxx> wrote:

First, thank you for response.

I’m apologize for about the asking question on comment section.

And I try to store php session in MySQL then configure Load Balancing. If I can’t store session in DB, I think our server will get single point of failure. We have a many php websites and these all using php session.

Is there any module that possible to sync php sessions.

 

From: Yehuda Katz [mailto:yehuda@xxxxxxxxxx]
Sent: Tuesday, April 29, 2014 12:27 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: Question

 

mod_session_dbd and php $_SESSION have nothing to do with each other and php has its own session management system.

 

If you can better explain what you are trying to do, someone might be able to give you a recommendation for whether to use mod_session or php session.

 

Also, the Comments section on the Apache manual pages is NOT for asking questions like this. Please don't do it again.

 

- Y

 

On Tue, Apr 29, 2014 at 12:14 AM, Билгүүн Ө <bilguun.u@xxxxxxxxxxxx> wrote:

From: Билгүүн Ө [mailto:bilguun.u@xxxxxxxxxxxx]
Sent: Tuesday, April 29, 2014 12:03 PM
To: 'users-faq@xxxxxxxxxxxxxxxx'
Subject: Question

 

Dear everyone  

I'm trying to use mo_session_db, but i cant. I'm using mysql-14.14, apache-2.4.9 and php-5.5.11.

I create database named session_db, and table named SESSION which created by query CREATE TABLE SESSION ( id VARCHAR(32) NOT NULL COMMENT 'Stores the Session ID', access INT(10) UNSIGNED NOT NULL, data TEXT, PRIMARY KEY (`id`) ) ENGINE=INNODB ROW_FORMAT=DEFAULT;

My mod_session_dbd.conf is:

Session On

SessionDBDCookieName session path=/

SessionDBDCookieRemove Off

SessionDBDPerUser On

SessionDBDDeleteLabel deletesession

SessionDBDInsertLabel insertsession

SessionDBDSelectLabel selectsession

SessionDBDUpdateLabel updatesession

DBDriver mysql

DBDParams "host=<ip address x.x.x.x/localhost>, port=3306, user=root, password=<password>, dbname=session_db"

DBDExptime 300

DBDPrepareSQL "delete from SESSION where id = %s" deletesession

DBDPrepareSQL "update SESSION set data = "" access = %lld, id = %s where id = %s" updatesession

DBDPrepareSQL "insert into SESSION (id, access, data) values (%s, %lld, %s)" insertsession

DBDPrepareSQL "select data from SESSION where id = %s and (access = 0 or access > %lld)" selectsession

DBDPrepareSQL "delete from SESSION where access != 0 and access < %lld" cleansession

 

I tested by store the session but it could not store in sql. My test pages are:

 

#index.html

<form action="" method="get">

Value:<input type="text" name="view"/>

<input type="submit" value="Submit"/>

</form>

 

#session.php

session_start();

if(isset($_GET['view']))

{ $_SESSION['view'] = $_GET['view'];

echo "Saved in SESSION<br/>";

echo "<a href=""

echo "<a href="">

}

else

{ echo "Could not save in SESSION<br/>";

echo "<a href=""

}

#link.php

session_start();

if(isset($_SESSION['view']))

{ echo"Session: ". $_SESSION['view']."<br/>";

echo "<a href="" cookie</a><br/>";

}

else

{ echo "There is no cookie<br/>"; }

 

#clear.php

session_start();

if(isset($_SESSION['view']))

{ unset($_SESSION['view']);

echo "cookie cleared<br/><br/>";

}

else{ echo "there has not been saved cookie<br/>"; }

 

Is there any problem in my config or testing pages. Sorry for my bad english

 

line

Хүндэтгэсэн

Ө.Билгүүн

Системийн администратор

МТ Системийн хэлтэс

 

Мэйл хаяг  | bilguun_u@xxxxxxxx; bilguun.u@xxxxxxxxxxxx

Вэб хуудас | www.statebank.mn

 

state-logo

Танд санхүүгийн үйлчилгээг эрсдэлгүй хүргэнэ.­

 

 




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux