Edit report at https://bugs.php.net/bug.php?id=50524&edit=1
ID: 50524 Comment by: axel at zehden dot net Reported by: carsten_sttgt at gmx dot de Summary: proc_open is using a wrong initial working dir Status: Closed Type: Bug Package: Program Execution Operating System: win32 only PHP Version: 5.3.1 Assigned To: pajoye Block user comment: N Private report: N New Comment: I have exactly this buggy behavior in my actual PHP 5.3.10 on Ubuntu. With cwd parameter NULL, I get a wrong working dir. This did not happen in the PHP 5.2, I used before. Previous Comments: ------------------------------------------------------------------------ [2010-09-08 10:35:16] paj...@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/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2010-09-08 10:34:59] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=303163 Log: - Fix #50524, proc_open should respect cwd as it does on other platforms ------------------------------------------------------------------------ [2009-12-23 15:16:41] paj...@php.net Agreed, it should behave the same. ------------------------------------------------------------------------ [2009-12-23 14:22:30] carsten_sttgt at gmx dot de > This is expected, No, a different behavior on Linux/BSD/OS X and Windows is not expected. (and also between proc_open and the other program execution functions) > as also noted in the manual on the proc_open() page for the $cwd parameter. Well, > or NULL if you want to use the default value > (the working dir of the current PHP process) If you really test the script yourself, you can see that getcwd() is returning the correct working dir of the current PHP process, but proc_open is using something else. > then on Windows atleast This have nothing to do with Windows. Only a wrong usage of CreateProcess from the PHP developers in this case (lpCurrentDirectory is not set to the value of getcwd). ------------------------------------------------------------------------ [2009-12-23 13:56:25] ka...@php.net This is expected, as also noted in the manual on the proc_open() page for the $cwd parameter. If NULL is supplied to $cwd, then on Windows atleast the directory where the PHP script interpreter is located is the cwd. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=50524 -- Edit this bug report at https://bugs.php.net/bug.php?id=50524&edit=1