You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alexander Schumann <as...@connection2.com> on 2009/09/16 08:21:38 UTC

SVN not interpreting with PHP

Hi everyone,

 

I setup for a 10 member development team Subversion.  They develop Web
applications.  The issue I am seeing is that while browsing the repositories
using http://mercury.domain.name/repos/ all the HTML is executed in IE and
Firefox however no PHP code is interpreted.  I then created a test file that
should display the PHP server info.

 

Example:

<?php
        phpinfo();
?>

 

However it is only displayed as clear test no the code is not actually
executed.  Could you please advice?

The team create mainly PHP code is it is vital that function for them.

 

Details:

OS:  Centos 5.3

Subversion version 1.4.2 (r22196)

PHP version: PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:04)

Server version: Apache/2.2.3

 

-> /etc/httpd/conf.d/subversion.conf

<Location /repos>

    DAV svn

    SVNParentPath /var/www/svn-repositories/

    SVNListParentPath On

      AuthType Basic

      AuthName "Subversion repository"

      AuthUserFile /etc/svn-auth-file

      Require valid-user

</Location>

 

Thanks and kindest regards,

 

Alexander

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2395395

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: SVN not interpreting with PHP

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 16, 2009, at 03:21, Alexander Schumann wrote:

> I setup for a 10 member development team Subversion.  They develop  
> Web applications.  The issue I am seeing is that while browsing the  
> repositories usinghttp://mercury.domain.name/repos/ all the HTML is  
> executed in IE and Firefox however no PHP code is interpreted.  I  
> then created a test file that should display the PHP server info.
>
> Example:
> <?php
>         phpinfo();
> ?>
>
> However it is only displayed as clear test no the code is not  
> actually executed.  Could you please advice?

Correct. You're not going to get PHP code to execute that way, nor  
CGIs to execute. Subversion is only going to show you the contents of  
the files that are in the repository; it's not going to pass them  
through any other Apache modules or executables.

You will need to write a post-commit hook that updates a server side  
working copy. You will first have to create that working copy and  
change its ownership to whatever user your Apache runs as. From then  
on, nobody will touch this working copy other than the post-commit  
script. You will configure a VirtualHost or Alias in Apache to point  
to this working copy, and use the corresponding URL whenever you want  
to see the PHP code executed as PHP.

There are many prior messages on the list going into more detail if  
you need it.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2395400

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].