Notice: this is a static mirror for historical purposes.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
186Source IntegrationWebSVNpublic2010-11-29 15:022011-04-07 00:10
ReporterJeff Baumgardt 
Assigned To 
PrioritynormalSeverityminorReproducibilityunable to reproduce
Product Version0.13 
Target VersionFixed in Version 
Summary186: check_svn returns NULL for SVN binary
DescriptionI've look at the other issues regarding this but they didn't quite help.

I'm running WEBSvn with VisualSVN in C:\Program Files\VisualSVN Server

The problem is the shell_exec errors out because of the space after program. I've tried adding escapeshellarg but it still returns null.

Safe mode is off and I can run commands like dir.

I do have my SVN bin in the Path so I also tried shell_exec("svn.exe help"); and that also returns NULL.

Just to test I gave everyone full control to the svn.exe binary and still get NULL.

If I run the command from a command window it works just fine.
Steps To Reproduce$svn = self::svn_binary();

var_dump(shell_exec("$svn help"));
var_dump(shell_exec("C:\Program Files\VisualSVN Server\bin\svn.exe help");
var_dump(shell_exec("C:\\Program Files\\VisualSVN Server\\bin\\svn.exe help");
var_dump(shell_exec("\"C:\Program Files\VisualSVN Server\bin\svn.exe\" help");
var_dump(shell_exec("svn.exe help");

var_dump(shell_exec(escapeshellarg($svn) . " help"));
var_dump(shell_exec(escapeshellarg("C:\Program Files\VisualSVN Server\bin\svn.exe") . " help"));
Additional InformationI've also tried the start method (start /B /D "C:\Program Files\VisualSVN Server\bin" svn.exe help) and that also still returns NULL.

I've checked the permissions to the bin and the system account has full control so it should be able to execute the command.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (251)
Jeff Baumgardt (reporter)
2010-11-29 15:10

For additional information:
Windows Server 2008 R2
PHP 5.2.10
SVN 1.6.12
Mantis 1.2.3
WebSvn 2.3.1
User avatar (252)
Jeff Baumgardt (reporter)
2010-11-30 09:46

I found this today when adding 2>&1
string(44) "svn: Can't determine the user's config path "
Shell_exec is running as nt authority\Network Service

Network Service has Read & Execute on svn.exe and directory
User avatar (253)
Jeff Baumgardt (reporter)
2010-11-30 10:02

Ok solved problem

The users config path must be set to true in IIS Application pool for the application running Mantis. Under Advanced settings change Load User Profile under Process Model from false to true and also make sure that you are using the Start option. Or else modify the check_svn shell_exec("$svn help") to shell_exec(parseshellarg($svn) . " help");

This will clear up any issues with spaces in path names.
User avatar (271)
Bart Bourgeois (reporter)
2011-03-10 06:49

I have exactly the same system config, experiencing the same problem.

Could you please go a little more into detail about your solution?

>> The users config path must be set to true in IIS Application pool for the application running Mantis
=> I did't find this option

>>Under Advanced settings change Load User Profile under Process Model from false to true
=> Ok, found this one

>> and also make sure that you are using the Start option
=> Which option do you mean exactly, and what should the settings be.
User avatar (280)
Jeff Baumgardt (reporter)
2011-04-06 12:10

Sorry for my delay in replying.

In the IIS settings you have sites and application pools. You have to open the application pool for the site that Mantis is running in right click and select Advanced Settings. Under the Process Model section make sure that Load User Profile is set to true.

And the start option is set on the Source Control Integration: Configuration page in Mantis under repositories -> configuration. Make sure that there is a check mark in the start option.

Easy way to test is to make a quick page that tries make the same system call: shell_exec("$svn help") where $svn is you path to the binary of your svn. Like the code I posted in the ticket. Run that and echo out the results. You should expect the same output as if you types it into the command prompt.
User avatar (281)
Bart Bourgeois (reporter)
2011-04-07 00:10

I works perfectly now, tnx Jeff for the good description!

- Issue History
Date Modified Username Field Change
2010-11-29 15:02 Jeff Baumgardt New Issue
2010-11-29 15:10 Jeff Baumgardt Note Added: 251
2010-11-30 09:46 Jeff Baumgardt Note Added: 252
2010-11-30 10:02 Jeff Baumgardt Note Added: 253
2011-03-10 06:49 Bart Bourgeois Note Added: 271
2011-04-06 12:10 Jeff Baumgardt Note Added: 280
2011-04-07 00:10 Bart Bourgeois Note Added: 281

Copyright © 2000 - 2012 MantisBT Group
Time: 0.1160 seconds.
memory usage: 8,352 KB
Powered by Mantis Bugtracker

hosted with