Bug #61546 [Com]: get_current_user() return empty string after chdir
| From: | reeze dot xia at gmail dot com | Date: | Sun, 29 Apr 2012 16:25:36 +0000 |
| Subject: | Bug #61546 [Com]: get_current_user() return empty string after chdir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170025@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61546&edit=1
ID: 61546
Comment by: reeze dot xia at gmail dot com
Reported by: daedmen at gmail dot com
Summary: get_current_user() return empty string after chdir
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Debian 4.3.5-4
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2012-03-28 18:31:40] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61546&edit=1