[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Returncode 1 when invoking SVN from a PHP-script

From: Gerard Verhoeven <g.verhoeven_at_hccnet.nl>
Date: 2006-12-23 16:46:31 CET


thank you for your help.
I didn't think of the possibility that there could be error-messages not
shown to me.

After the change, adviced by you, I got a message telling me that SVN
was not able to get access to the directory '/root/.subversion'. This
surprises me as I added a parameter --username that holds the userid of
Apache and I expected that I needed the configuration-data in a
subdirectory for that userid.
I was now able to solve the problem by adding a paramater --config-dir,
so I can go on now. But as I said, I do not understand why I need it.

Again, thank you very much. It is good that some people are willing to
react on a forum like this and help others out.

Gerard Verhoeven

Ryan Schmidt wrote:
> On Dec 21, 2006, at 09:29, Gerard Verhoeven wrote:
>> I'm desperate, I have a script in PHP that uses an 'exec-function' to
>> do an export of the HEAD of a repository.
>> This script worked fine when it was used on the Subversion and PHP
>> versions distributed with the 9.1 release
>> of SuSE Linux. But after upgrading to the versions distributed with
>> 10.1, I always get a returncode of 1.
>> I've copied the command, as it is generated and used from the script,
>> to a command-line and then it works
>> fine, the export is being performed.
>> I've tried a number of different commands instead of the 'svn export'
>> (like svnlook and svnadmin) by updating
>> my script, and they all work fine.
>> But for example an 'svn help' doesn't work. Always when I use the
>> svn-command I get an rc of 1.
>> The command I use is:
>> svn export --force --non-interactive --username user --password pw
>> file:///wrk/repos/images /srv/www/images
> I imagine something useful is being printed to stderr. Discover what
> it is by redirecting stderr to stdout ("2>&1") and echoing the output:
> <?php
> exec(
> 'svn export'
> . ' --force'
> . ' --non-interactive'
> . ' --username ' . escapeshellarg('user')
> . ' --password ' . escapeshellarg('pw')
> . ' file:///wrk/repos/images'
> . ' /srv/www/images'
> . ' 2>&1',
> $output,
> $return_var
> );
> if (0 != $return_var) {
> echo implode("\n", $output) . "\n";
> }
> ?>
> --
> To reply to the mailing list, please use your mailer's Reply To All
> function

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Dec 23 16:47:28 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.