|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-03-31 14:32 UTC] nesk at xakep dot ru
[2020-03-31 16:54 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2020-03-31 16:54 UTC] cmb@php.net
[2020-04-01 11:04 UTC] nesk at xakep dot ru
[2020-04-01 11:09 UTC] nesk at xakep dot ru
[2020-04-01 11:22 UTC] cmb@php.net
-Summary: chdir function does not change the working directory
for LoadLibrary inside lib
+Summary: ZTS chdir() does not really change the CWD
-Status: Not a bug
+Status: Re-Opened
-Type: Bug
+Type: Documentation Problem
-Package: ffi
+Package: Documentation problem
[2020-04-01 11:22 UTC] cmb@php.net
[2020-04-01 11:22 UTC] cmb@php.net
-Assigned To: cmb
+Assigned To:
[2020-06-17 18:34 UTC] alexdowad@php.net
[2020-06-18 08:16 UTC] phpdocbot@php.net
[2020-06-18 08:16 UTC] phpdocbot@php.net
-Status: Re-Opened
+Status: Closed
[2020-06-19 20:00 UTC] phpdocbot@php.net
[2020-12-30 11:59 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Description: ------------ In the case that PHP ZTS mode is used, "chdir" function does not change working directory inside the library. That is, ZTS is not able to use libraries that use dynamic linking through the LoadLibrary function. Test script: --------------- <?php // A complete example is not possible, because library // with an example is required. Like: // library.so // // void fun() { // char buff[MAX_PATH]; // GetCurrentDirectoryA(MAX_PATH, buff); // printf("Directory [%s]", buff); // } chdir('path/to/working/directory'); $sdl = FFI::cdef('extern void fun(void)', 'path/to/library.so'); // In PHP 7.4 NTS >> Directory [~/path/to/working/directory] // In PHP 7.4 ZTS >> Directory [~] Expected result: ---------------- Like "Directory [~/path/to/working/directory]" Actual result: -------------- Like "Directory [~]"