小弟在linux下面把mysql5+apache2+php5都配置好了 可是 用 phpinfo查看的时候 那个session.save_path的值就是 显示 no value
小弟 已经修改了/etc/php.ini 的设置session的session.save_path了 具体如下:[Session]
; Handler used to store/retrieve data.
session.save_handler = files; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this 
; variable in order to use PHP's session functions.
; As of PHP 4.0.1, you can define the path as:
;     session.save_path = "N;/path"
; where N is an integer.  Instead of storing all the session files in 
; /path, what this will do is use subdirectories N-levels deep, and 
; store the session data in those directories.  This is useful if you 
; or your OS have problems with lots of files in one directory, and is 
; a more efficient layout for servers that handle lots of sessions.
; NOTE 1: PHP will not create this directory structure automatically.
;         You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
;         use subdirectories for session storage
session.save_path = /tmp; Whether to use cookies.
session.use_cookies = 1
;session.use_cookies = 0; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1; Name of the session (used as cookie name).
session.name = PHPSESSID
...linux下默认的 /tmp已经有了 并且已经将其目录权限设为 777了 虽然小弟知道保存这个seeion数据文件 目录不安全 但是小弟现在只要测试成功就可以了 谢谢大哥求助!

解决方案 »

  1.   

    首先,你确认你改的是否是当前生效的PHP.INI具体的,请在 phpinfo() 里去看.
      

  2.   

    你的php.ini路径可能不对,看楼上的提示。
    phpinfo() 里php.ini的加载路径
      

  3.   

    因为小弟现在不在公司 请大哥说下现在就是2种情况
    1。如果我现在修改的/etc/php.ini 是生效的的那个文件的话出现session.save_path的值还是为
       no value话改怎么解决?2。如果/usr/local/zend/etc/php.ini 这个是生效的文件那么我只要修改这个文件就可以了嘛?谢谢指点!
      

  4.   

    Zend下的没用过
    我们的php.ini是有php5目录下的
    原则上可能是这样的,一是看php和apache是否能下常工作;
    二是看成功运行环境时加载的php.ini路径是哪个,找到模块加载的那个修改才有效。
    一般情况下只要正确加载php.ini,不会没有值。可查看phpinfo()里session.save_path的值
      

  5.   

    我的也是这种情况,怎么改都是显示no ovalue
      

  6.   

    session.save_path = "/tmp"注意引号,或者注释掉,他默认就存 /tmp了
      

  7.   

    可以在apache的HTTPD.CONF里写上一句PHPIniDir "/etc",就可以确定你用的是这个目录里的PHP.INI了