Jump to content
php.lv forumi

problēma ar $_SESSION


Mikijs

Recommended Posts

sveiki, tātad problēma ir sekojoša

Kods

<?php
session_start();
if($user=="correct") $_SESSION["db"]=$_POST["current_usr"];
?>

tatad

<?php
print_r($_SESSION);
?>

Array ()

[current_usr] => "Mikijs"

un tagad es uzspiezu kadu linku un $_SESSION ir tuksh.. :/

 

kur varetu but problema? jo uz 1 servera man viss strada saglaba Sessiju, bet uz otra ne, vai tiesam ta ir php.ini vai kkada apache konfiguracijas kluda un ja ta vai varetu pateikt kas isti jaizdara ?

Edited by Mikijs
Link to comment
Share on other sites

domaju ka headeri nav vainigi

 

Gabals no headera kodam

<?php
set_magic_quotes_runtime (0);
error_reporting (E_ALL);
session_start();

if (isset ($_CONF_PATH)) require_once ($_CONF_PATH.'conf.php');
if (!defined ('CMS_PATH')) die ('Configuration file is not found!');
if (!isset ($_ISFULL)) $_ISFULL = 1;
if (!isset ($_ISHTA)) $_ISHTA = 0;
if (!isset ($_SKIP_HEADERS)) $_SKIP_HEADERS = 0;

if ($_ISHTA)
{
 header ('Content-Type: application/hta; charset=UTF-8');
}

un tiek izveidots HTA applications, tapec headerim viss kartiba :)

Link to comment
Share on other sites

session

Session Support enabled

Registered save handlers files user

Registered serializer handlers php php_binary wddx

Directive - - - - - - - - - -- - - - Local Value - - - - - - - Master Value

session.auto_start - - - - - -- - - - Off - - - - - - - - - - - - - Off

session.bug_compat_42 - - - -- - -On - - - - - - - - - - - - - On

session.bug_compat_warn - - - - - On - - - - - - - - - - - - - On

session.cache_expire - - - - -- - - 180 - - - - - - - - - - - - - 180

session.cache_limiter - - - -- - - nocache - - - - - - - - - -nocache

session.cookie_domain - - - - - no value - - - - - - - - - -no value

session.cookie_httponly - -- - - - Off - - - - - - - - - - - - - -Off

session.cookie_lifetime - - - - - - - 0 - - - - - - - - - - - - - - -0 domaju ka te varetu but ta problema, bet tas ir cookie ?

session.cookie_path - - - - - - - - - / - - - - - - - - - - - - - - /

session.cookie_secure - - - - - - - Off - - - - - - - - - - - - - Off

session.entropy_file - - - - - - - -no value - - - - - - - - - - no value

session.entropy_length - - - - - - - -0 - - - - - - - - - - - - - - - 0

session.gc_divisor - - - - - -- - - - 100 - - - - - - - - - - - - - 100

session.gc_maxlifetime - - - - - - -1440 - - - - - - - - - - - - - 1440

session.gc_probability - - - - - -- - - 0 - - - - - - - - - - - - - - 0

session.hash_bits_per_character - - 4 - - - - - - - - - - - 4

session.hash_function - - - - - - - - -0 - - - - - - - - - - - -0

session.name - - - - - - - - - - - PHPSESSID - - - - - PHPSESSID

session.referer_check - - - - - - - no value - - - - - - no value

session.save_handler - - - - - - - - files - - - - - - - - - -files

session.save_path - - - - - - - - /home/tmp - - - /var/lib/php5

session.serialize_handler - - - - - - php - - - - - - - - - - php

session.use_cookies - - - - - - - - - - On - - - - - - - - - On

session.use_only_cookies - - - - - - - Off - - - - - - - - - Off

session.use_trans_sid - - - - - - - - - - 0 - - - - - - - - - - - 0

Edited by Mikijs
Link to comment
Share on other sites

es to visu apzinos.. :)

 

<?php

Headers(uzliekam ka ir HTA) un viss notiek.. uz servera tiek generati dati un ka HTA ir FrameWorks utt.. un katrs freims ietver "admin.php") kura ir session start.. un admin.php parbauda ja ir index.php tatad isHTA veidojam HTA failu ja nav tad attiecigo freimu.)

?>

Link to comment
Share on other sites

bet teiksim uz servera uz kura man tas session strada loti labi var redzet ka session.save_path = no value

vieniga starpbiba ir

 

dators uz kura strada tie sess..

session.gc_probability 1

dators uz kruan estrada tie sess..

session.gc_probability 0

Edited by Mikijs
Link to comment
Share on other sites

×
×
  • Create New...