|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-12-17 14:34 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Package: *General Issues
+Package: *Directory/Filesystem functions
-Assigned To:
+Assigned To: cmb
[2020-12-17 14:34 UTC] cmb@php.net
[2020-12-17 14:52 UTC] heavy-traffic-website at yopmail dot com
[2020-12-17 14:54 UTC] heavy-traffic-website at yopmail dot com
-Type: Bug
+Type: Feature/Change Request
[2020-12-17 14:54 UTC] heavy-traffic-website at yopmail dot com
[2020-12-17 14:59 UTC] cmb@php.net
-Status: Not a bug
+Status: Open
-Assigned To: cmb
+Assigned To:
[2021-01-07 14:21 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2021-01-07 14:21 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 15:00:01 2025 UTC |
Description: ------------ Files functions doesn't work with relative paths since the current working directory is deleted during the "exit" line. Is this a bug or a feature ? :-) Test script: --------------- function debug_cwd(int $i) { syslog(LOG_DEBUG, "getcwd [$i] -> " . getcwd()); } function shutdown() { debug_cwd(4); chdir('/var/www/website'); debug_cwd(5); } chdir('/var/www/website') debug_cwd(1); register_shutdown_function('shutdown'); debug_cwd(2); fastcgi_finish_request(); debug_cwd(3); exit; debug_cwd(6); // will not be displayed Expected result: ---------------- $> tail /var/log/syslog Dec 17 15:09:43 hosting php: getcwd [1] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [2] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [3] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [4] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [5] -> /var/www/website Actual result: -------------- $> tail /var/log/syslog Dec 17 15:09:43 hosting php: getcwd [1] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [2] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [3] -> /var/www/website Dec 17 15:09:43 hosting php: getcwd [4] -> / Dec 17 15:09:43 hosting php: getcwd [5] -> /var/www/website