FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18130&edit=1

ID: 18130
Comment by: carcus88
Reported By: carcus88 at gmail dot com
Summary: Problems with executing checkout
Status: Open
Type: Bug
Package: VersionControl_SVN
Operating System: Windows 2003
Package Version: 0.3.4
PHP Version: 5.2.12
New Comment:

try changing this line

exec("$cmd 2>&1", $out, $ret_var);

to this

exec("\"$cmd 2>&1\"", $out, $ret_var);

Does that work for you? Thats my issue for when there are spaces in the
path name.


Previous Comments:
------------------------------------------------------------------------

[2010-12-21 15:15:20] kiklop

Description:
------------
I have a server with IIS 6 and clean install of PHP 5.2.16 with latest
PEAR. While trying to use phing I discovered that it is impossible to
execute checkout because escapeshellargs screws the command line.

Only when I comment this line in SVN.php in run method

$cmd = str_replace($this->svn_path, escapeshellarg($this->svn_path),
$cmd);

checkout starts working.

I have no antivirus, firewall or other kind of intrusive software.

Test script:
---------------
<?php

require_once 'VersionControl/SVN.php';

$svnstack = PEAR_ErrorStack::singleton('VersionControl_SVN');

$options = array(
'fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ARRAY,
'svn_path' => 'E:/bin/svn/bin/svn.exe'
);

$svn = VersionControl_SVN::factory('co', $options);

$args = array(
'--trust-server-cert',

'https://svn.filezilla-project.org/svn/FileZilla3/trunk/',
'E:/Temp/tt'
);

// Run command
$output = $svn->run($args);
if ($output) {
print_r($output);
} else {
if (count($errs = $svnstack->getErrors())) {
foreach ($errs as $err) {
echo '<br />'.$err['message']."<br />\n";
echo "Command used: " . $err['params']['cmd'];
}
}
}


Expected result:
----------------
This should checkout latest filezilla code in a specified folder.

Actual result:
--------------
E:\test>php svntest.php
<br />The filename, directory name, or volume label syntax is incorrect.
(cmd: "E:/bin/svn/bin/svn.exe" checkout --
non-interactive "--trust-server-cert"
"https://svn.filezilla-project.org/svn/FileZilla3/trunk/"
"E:/Temp/tt")<br />

Command used: "E:/bin/svn/bin/svn.exe" checkout --non-interactive
"--trust-server-cert" "https://svn.filezilla-proj
ect.org/svn/FileZilla3/trunk/" "E:/Temp/tt"

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 30, '11 at 4:27a
activeNov 30, '11 at 4:27a
posts1
users1
websitepear.php.net

1 user in discussion

Carcus88: 1 post

People

Translate

site design / logo © 2022 Grokbase