|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-29 22:29 UTC] alan at akbkhome dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
Description: ------------ Some SVN functions modify the local filesystem, such as svn_checkout(), and accordingly accept target paths to perform the operations in. Some strange behavior happens when you pass a relative path to these functions: the path is resolved as if the current working directory was the one that contains the PHP binary. The wrapper code needs to normalize the relative paths according to the current working directory, which shouldn't be too difficult as many other functions need to do the same thing. Users can workaround this problem by always specifying absolute paths (possibly using dirname(__FILE__)) Reproduce code: --------------- <?php svn_checkout('http://www.example.com/svnroot', 'target-directory'); ?> Assuming that http://www.example.com/svnroot is a valid repository directory, /home/example/scripts is the current working directory, and PHP binaries are at /usr/bin Expected result: ---------------- SVN repository is checked out at /home/example/scripts/target-directory Actual result: -------------- SVN repository attempts to be checked out at /usr/bin/target-directory