everbright Posted March 11, 2011 Share Posted March 11, 2011 Hi all, I'm trying to create a simple PHP script for backing up my SVN repositories via svnadmin.exe. My environment is as follows:- OS: Windows 7 PHP version: 5.2.12 SVN (VisualSVN): 1.6.6 Here's my PHP code sample: system("\"D:/VisualSVN/bin/svnadmin.exe\" dump \"E:/VisualSVN/Repositories/MyProject\" > \"E:/PHP/Batch Scripts/ServerBackup/Backups/20110311/svn/MyProject.svn\"", $code); print "Code: $code"; The result of this script is that the error code is 1, which means the command isn't dumping out the data as expected. However if I run the command manually through a command console, the data comes out fine, and I get MyProject.svn generated as expected. I'm executing the PHP script using a command window that's running as Administrator, so I don't think it's a permission issue. Any ideas what status code 1 is for svnadmin.exe? Also does anyone know how to get this working? Thanks in advance for any suggestions! Quote Link to comment https://forums.phpfreaks.com/topic/230336-executing-svn-command-through-php/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.