php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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-04-30 04:10 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b
Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
 [2012-04-30 04:16 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b
Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
 [2012-04-30 04:17 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b
Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
 [2012-05-29 10:26 UTC] ab@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4054890b26c4d146cfbcd56d75aab7a7aebc8c89
Log: Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
 [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-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=4054890b26c4d146cfbcd56d75aab7a7aebc8c89
Log: Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
 [2014-10-07 23:26 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b
Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
 [2014-10-07 23:35 UTC] stas@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=4054890b26c4d146cfbcd56d75aab7a7aebc8c89
Log: Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
 [2014-10-07 23:37 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b
Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC