Bug in 1.08 by creating Repo
Brought to you by:
mverkerk
i made an update from 1.03 to 1.08 an with the new Version i can't create a new repro.
After a little bit of Debugging i found this in svnmanager-1.08/svnmanager/RepositoryModule/DataModule.php
Line 54:
$a_dir = $svn_repos_loc.DIRECTORY_SEPARATOR.escapeshellarg($rname);
Are you sure that escapeshellarg is the right command ?
Because with this my repo name is in Single Quotes.
I think the right command is escapeshellcmd
Sry for my bad english :D
Hmmm i think the right version should be:
$a_dir = escapeshellarg($svn_repos_loc.DIRECTORY_SEPARATOR.$rname);
I have reproduced this bug in windows 2k3 with apache 2.2 php 5.3.1 and svnmanager 1.08.
I think the problem lies in
svnmanager-1.08/svnmanager/RepositoryModule/DataModule.php
$ret = exec("LANG".$lang."$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
(sorry that after several edits, i lose the original line number)
since i found
'LANG' is not recognized as an internal or external command,"
in my apache logs
After i changed the line into:
$ret = exec("$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
It successfully create my new repos now.
Is it because there's no LANG environment variable on win2k3?
I'm completely new to PHP, so this may not be the exact solution, but it seems working well now.
Regards
I found that the create command fails if in the config.php there is;
$svnadmin_cmd = "c:\\Program Files\\CollabNet\\Subversion Server\\svnadmin";
I corrected as follow:
$svnadmin_cmd = "\""."c:\\Program Files\\CollabNet\\Subversion Server\\svnadmin"."\"";
Further I had to change in RepositoryModule\DataModule.php
$ret = exec("LANG=".$lang.";$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
to
$ret = exec("$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
Bye
Thanks all for comments.. should be fixed now