Bug #69582 [NEW]: Sessions are not read from CLI

From: Date: Wed, 06 May 2015 06:23:59 +0000
Subject: Bug #69582 [NEW]: Sessions are not read from CLI
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192513@lists.php.net to get a copy of this message
From: me at spinov dot net Operating system: CentOS 6 PHP version: 5.4.40 Package: Session related Bug Type: Bug Bug description:Sessions are not read from CLI 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 bug report at https://bugs.php.net/bug.php?id=69582&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69582&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69582&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69582&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69582&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69582&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69582&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69582&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69582&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69582&r=support Expected behavior: https://bugs.php.net/fix.php?id=69582&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69582&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69582&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69582&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69582&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69582&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69582&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69582&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69582&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69582&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69582&r=mysqlcfg

« previous php.bugs (#192513) next »