Bug #69582 [Opn->Fbk]: Sessions are not read from CLI
| From: | yohgaki@php.net | Date: | Thu, 11 Jun 2015 01:53:23 +0000 |
| Subject: | Bug #69582 [Opn->Fbk]: Sessions are not read from CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193318@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69582&edit=1
ID: 69582
Updated by: yohgaki@php.net
Reported by: me at spinov dot net
Summary: Sessions are not read from CLI
-Status: Open
+Status: Feedback
Type: Bug
Package: Session related
Operating System: CentOS 6
PHP Version: 5.4.40
Block user comment: N
Private report: N
New Comment:
I cannot reproduce by PHP-5.4 branch's PHP.
Sounds like you have selinux problem. Try
sudo setenforce 0
see if this helps.
Previous Comments:
------------------------------------------------------------------------
[2015-05-06 06:23:56] me at spinov dot net
Description:
------------
Session is created by Apache user ( apache ) via web interface. Everything is good and nice.
Then session is accessed via CLI and here is the problem:
If I access session from the same user ( apache ), then everything works.
If I access session from root user - I get:
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting
of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
What I've tried:
- I can write/read file directly, under any of users mentioned.
- I've tried setting mode to 777 on directory/file.
- Same code worked in PHP 5.3. No changes to configuration has been made.
Test script:
---------------
<?php
# Create session from web and then try to execute the following script by root user
session_id(*session_id_here*);
session_start();
Expected result:
----------------
Receive session data in $_SESSION variable
Actual result:
--------------
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting
of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69582&edit=1