Edit report at https://bugs.php.net/bug.php?id=50524&edit=1
ID: 50524 Updated by: paj...@php.net Reported by: carsten_sttgt at gmx dot de Summary: proc_open is using a wrong initial working dir -Status: Closed +Status: Feedback 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: Please try again using next snapshot from http://windows.php.net/downloads/snaps/ Previous Comments: ------------------------------------------------------------------------ [2012-03-29 10:02:21] axel at zehden dot net 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. ------------------------------------------------------------------------ [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). ------------------------------------------------------------------------ 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