Home > php教程 > php手册 > PHP 4.0.0中session.save_path的bug (转载)

PHP 4.0.0中session.save_path的bug (转载)

WBOY
Release: 2016-06-21 09:13:16
Original
1049 people have browsed it

session

PHP 4.0.0中session.save_path的bug
作者/来源:limodou

PHP 4.0.0中session.save_path的bug

作者:limodou

  这里向大家汇报我发现的一个4.0.0版的一个bug,只限于windows版本。那就是:在4.0.0版下,
session.save_path如果使用绝对目录,即加上盘符的话,盘符不起作用。如session.save_path设为
c: emp,此时存在c: emp目录。但是当php程序文件在其它盘上时,如在f盘上,c:不起作用。而是在处理
session时寻找f盘上的 emp目录。如果f盘上无 emp目录,则会报如下错误:

Warning: open(    emp/sess_0beef27320944002381aa93c9ec0968d, O_RDWR) failed: m (2)
in f:    esta.php3 on line 2

Warning: open(    emp/sess_0beef27320944002381aa93c9ec0968d, O_RDWR) failed: m (2)
in Unknown on line 0

Warning: Failed to write session data. Please check that the current setting of
session.save_path is correct (c:    emp) in Unknown on line 0

  如果在f盘上创建一个temp目录,则错误消失。我查了查源程序,看着很费劲,也没查出来。发现我看
的是4.0.1pl2版的源码。于是我又升级php为4.0.1pl2版,再运行,咦,错误不见了。看来4.0.1pl2版改正
了这个错误。

  建议大家装上4.0.1pl2版吧。

  同时设置session.save_path时,目录分隔符用'/'或'\'均可。




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template