Re: Re: Apache Error accessing Subversion
| From: | Andy Czerwonka | Date: | Tue, 07 Oct 2008 01:06:56 +0000 |
| Subject: | Re: Re: Apache Error accessing Subversion | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5794@lists.php.net to get a copy of this message | ||
This doesn't work. The same error is generated - it's still trying to access root.
svn_auth_set_parameter(): svn error(s) occured\n13 (Permission denied) Can't open file '/root/.subversion/servers': Permission denied
On 2008-10-05 22:12:30 -0600, cyberlot@cyberlot.net (Richard Thomas) said:
This isn't a bug but an environment issue. Do some googling for that error string and you will find a lot on the subject Basically Apache is started by root and assigned the proper user, When svn trys to run it ends up pulling roots enviromental variables including HOME which is /root One solution that I am not sure if it will work in with pecl svn, have only used it with the running svn through exec is to set your HOME value Try setting this using exec('HOME="/home/userx"'); Andy Czerwonka wrote:I've logged a bug at http://pecl.php.net/bugs/bug.php?id=14749 On 2008-10-05 19:22:42 -0600, czerwonka@arcticpenguin.ca (Andy Czerwonka) said:I've got a PHP script being executed by Apache (www user) :<?php echo 'SVN Client is ' . svn_client_version(); svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, "aczerwon"); ?>I'm getting an error on the second line (first on reports 1.4.0 correctly) saying: svn_auth_set_parameter(): svn error(s) occured\n13 (Permission denied) Can't open file '/root/.subversion/servers': Permission denied All other commands, svn_log() etc., generate the exact same error. This has got to be a common use case for the subversion extension. Can anyone point to what I'm doing wrong? openSUSE 10.2 Apache 2 Subversion 2.4 -andy