Jump to content
php.lv forumi

Apache un PHP sessijas.


Recommended Posts

Ir:

Apache/1.3.33

FreeBSD 4.11

PHP 4.3.10

 

Un ir sekojosas dabas problema. Ir vairaki Vhosts ieraksti apache serverim.

Problema tada, ka PHP sessijas strada tikai vienam mezglam. Parejiem

sessija nostrada vienu reizi un viss.

Piemeram sekojos kods:

<?

session_start();

if(!isset($_SESSION['ddd'])) $_SESSION['ddd']=0;

$_SESSION['ddd']++;

echo

" ddd 0 ".

" ddd = " . $_SESSION['ddd'];

?>

Vienam Vhost'am viss nostrada ka vajag, pie katra refresh mainigais

tiek palielinas par 1. Parejiem Vhost'iem inkrements nostrada tikai vineu reizi.

Spiezot refresh tiek veidota jauna sessija, lids ar to max vertiba ddd mainigajam

ir 1.

Kur varetu but problema ?

Paldies.

Link to comment
Share on other sites

paarbaudi vai sesiju direktorijaa saglabaajas sesiju faili

17655[/snapback]

 

Sessiju direktorija faili saglabajas.

Sessiju direktorijas maina izmantojot php.ini mainigo session.save_path neko nedod.

Ar pieejas tiesibas ari viss kartiba.

Link to comment
Share on other sites

; The path for which the cookie is valid.

session.cookie_path = /

 

; The domain for which the cookie is valid.

session.cookie_domain =

 

php.ini ?

17657[/snapback]

 

Tiesi tapat:

 

; The path for which the cookie is valid.

session.cookie_path = /

 

; The domain for which the cookie is valid.

session.cookie_domain =

Link to comment
Share on other sites

×
×
  • Create New...