get_current_user() return empty string after chdir

Bug #61546 get_current_user() return empty string after chdir
Submitted: 2012-03-28 18:31 UTC Modified: 2012-07-08 16:30 UTC
From: daedmen at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 5.3.10 OS: Debian 4.3.5-4
Private report: No CVE-ID: None

 [2012-03-28 18:31 UTC] daedmen at gmail dot com

Description:
------------
After chdir get_current_user() return '' 

Test script:
---------------
---first script---
var_dump(get_current_user());
---second---
var_dump(chdir('../'),get_current_user());
---third---
var_dump(get_current_user(),chdir('../'),get_current_user());


Expected result:
----------------
always return current user

Actual result:
--------------
first script return  current user -ok
second return empty string
third return current user to times

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2012-04-29 16:25 UTC] reeze dot xia at gmail dot com

Hi, 
   I can only reproduce it in cli sapi, fast-cgi & fpm didn't affected.
and I sent a pull request https://github.com/php/php-src/pull/69.

Thanks.

 [2012-07-08 09:03 UTC] reeze dot xia at gmail dot com

This bug have already been fixed by laruence. but it's status is open.
Can anyone close it please?

 [2012-07-08 16:30 UTC] laruence@php.net

-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence

 [2012-07-08 16:30 UTC] laruence@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

oh, thanks , forget to close it :)

 [2014-01-21 10:44 UTC] martynas at dulksna dot org

Related To: Bug #65940