I was hoping for a PHP based SVN API like this one here (http://php.net/manual/en/book.svn.php) It does look a bit experimental but it's on the PHP website. I'm wondering what would be required/recommended to make this work, or what alternatives there might be available (other than something like exec in PHP) Thanks EDITED: THE .htaccess CODE BELOW WORKS, BUT only if you change it to read "Action php53-cgi /php53.cgi" first! asked 17 Aug '11, 19:08 Mick
showing 5 of 8
show 3 more comments
|
You could possibly install this with a PECL package. You would have to download and install PECL and the package,
The above code was modified from another module and is untested, but should in general work. answered 17 Aug '11, 21:15 johns ^Wow... from the looks of the PECL requirements it seemed like a long shot. I did not notice this reply even though it's 9hrs old. I expected an email notification I think. I've added some comments to the top post, if I can refocus the Q&A at this point. Mainly I would like to be able to use php53 (DateTime) for this application, and I seem to have a pesky but nonfatal permissions problem. Thanks again.
(18 Aug '11, 06:26)
Mick
|
I came across (eventually) a handy PEAR effort (http://pear.php.net/manual/en/package.tools.versioncontrol-svn.php) which does a good job of encapsulating the svn command.
The only hiccup is executing svn from within PHP generates some noise in the first line...
svn: Can't open file '/root/.subversion/servers': Permission denied
Found this (http://forum.webfaction.com/viewtopic.php?id=1564) but did not seem helpful.
I hacked the PEAR code to shift the error off the output array so that it would be legal XML. Assuming this remains very regular output wise it's probably livable. But I would feel better to do things right.
FYI: I don't get this error (as you guys probably well know) from the command line, logged in over SSH. The file being complained about does not seem to be necessary because the rest of the output is as it should be.
PS: Is there a way to switch to php53 for files under a given directory? Eg. with a .htaccess file? Thanks!
As for the bug it is difficult to say without actually running it what the issue could be. From the info in that old post the issue is who the script is running as, the 'apache' user vs your user and it simply may not work or would need its permissions or how it works with permissions altered. I do not see any solution that I would try that was not tried in that post.
As for php53 conversion yes it is possible,
You will also need a symbolic link,
$ ln -s /home/php-cgi/php53.cgi .
Is it appropriate that the apache user would get this error? Could someone maybe look into making the error go away for the apache user?
Running the svn command as apache in just about any way will probably reproduce the bug.
Hmmm, the php53 changes did not go well. Browsers download the files unprocessed after the changes.
I put the Action/AddHandler line at the top of the .htaccess file and added the symlink to the same directory.
Q: "Is it appropriate that the apache user would get this error? Could someone maybe look into making the error go away for the apache user?"
A: We can not research and debug 3rd party libraries for you, there is simply to many syntax errors and not enough time. We are happy to assist you with debugging them and answering any questions we can. To further research this we would need a way to reproduce the issue in real time step by step so we can see what is going on. You might want to submit a support ticket for this, or parse the information for public viewing here.
The same goes for the php53 issue as we would need to see the issue live.
Ok, but 'svn: Can't open file '/root/.subversion/servers': Permission denied' seems like it might be a config/setup thing vs. a bug. I did not setup the svn command as far as I know, so one of you guys must have.
I suppose I will have to submit a support ticket for php53 then...
FYI: The support ticket revealed that the .htaccess "Action" line above should've read "Action php53-cgi /php53.cgi" instead. I will edit a comment into the top post now...