php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40434 Session engine can't access /var/tmp when safe mode is on
Submitted: 2007-02-10 23:37 UTC Modified: 2007-02-11 09:30 UTC
From: r2 at music dot lt Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.1 OS: FreeBSD
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: r2 at music dot lt
New email:
PHP Version: OS:

 

 [2007-02-10 23:37 UTC] r2 at music dot lt
Description:
------------
After upgrading from PHP 5.2 to PHP 5.2.1 error log is full of these lines:

PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: SAFE MODE Restriction in effect.  The script whose uid is 80 is not allowed to access /var/tmp owned by uid 0 in /file/path.php on line 1038

PHP Fatal error:  session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /file/path.php on line 1038

safe mode is on, open_basedir includes /var/tmp, safe_mode_include_dir is set to /var/tmp

Needed to turn off safe mode.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-11 00:04 UTC] judas dot iscariote at gmail dot com
Is the session save path implicetely defined in a virtual host , php.ini or whatever.. if not.. try that

>Needed to turn off safe mode.

Do yourself and your customers that favor, safe_mode is **gone**[1], as it is a broken security measure[2]

[1] http://cvs.php.net/viewvc.cgi/php-src/NEWS?revision=1.2139&view=markup&pathrev=HEAD
[2]http://ilia.ws/archives/18-PHPs-safe_mode-or-how-not-to-implement-security.html
 [2007-02-11 09:30 UTC] tony2001@php.net
>safe mode is on, open_basedir includes /var/tmp, >safe_mode_include_dir is set to /var/tmp

The error message is clear and it has nothing to do with include() or open_basedir.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 22 08:00:03 2025 UTC