douchao9899 2012-01-13 00:20
浏览 64

Centos Linux中没有保存PHP会话变量?

I am having this PHP script that fails to save the session variable when I hit submit in my PHP Version 5.1.6 linux centos system. This problem happens over time. Currently I temporary solve this problem with PHP by rebooting the machine. However, this is not a good solution. It is just a temporary solution.

Here is PHP Session info:

Directive   Local Value Master Value 
session.auto_start  Off Off
session.bug_compat_42   Off Off 
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_lifetime 0   0
session.cookie_path /   / 
session.save_path   /var/lib/php/session    /var/lib/php/session
session.serialize_handler   php php 
session.use_cookies On  On
session.use_only_cookies    Off Off 
session.use_trans_sid   0   0

Under PHP core:

Directive   Local Value Master Value
open_basedir    /var/www/domain.com/httpdocs/public_html/:/tmp/ no value

I would like anyone to suggest why rebooting the machine solves the temporary PHP session variables not saved.

My PHP code uses session variable to check if the captcha values are solved properly when I hit submit button. This check shown below is done when the page reloads after submit is hit.

<?php
session_start();

if($_SESSION['captcha_keystring'] == $_POST["keystring"]){


} // End: if capcha verification


else
{
        echo "Wrong Capcha Entered!";
}

?>

Even when this is captcha_keystring is solved properly this fails.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
    • ¥15 LCD12864中文显示
    • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
    • ¥15 gsoap生成onvif框架
    • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
    • ¥15 stm32的can接口不能收发数据
    • ¥15 目标检测算法移植到arm开发板
    • ¥15 利用JD51设计温度报警系统
    • ¥15 快手联盟怎么快速的跑出建立模型
    • ¥15 关于腾讯云服务器中,PHP页面无法打开的问题