Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/230336-executing-svn-command-through-php/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.