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

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时,目录分隔符用'/'或'\'均可。




Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment