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

AW: Re: Updating a live website with a post-commit hook script

From: Felix Gilcher <gilcher_at_exozet.com>
Date: 2006-06-29 17:40:24 CEST

Rainer Sokoll <mailto:r.sokoll@intershop.de> schrieb am Donnerstag, 29. Juni 2006 17:00:

> Greg Thomas wrote:
>> On Thu, 29 Jun 2006 15:23:51 +0200, Rainer Sokoll
>> <r.sokoll@intershop.de> wrote:
>>> What if svn:mime-type is set to application/x-httpd-php?
>> The MIME type of a file only affects how the client displays it. PHP
>> etc. code is processed server side.
> [The discussion goes slightly off topic, but I cannot stop myself ;-)]
> I disagree.
> To my best knowledge:
> If you do not have somewhere in your apache config:
> "AddType application/x-httpd-php .php" or
> "application/x-httpd-php php" in mime.types

Well, the first directive does not add a mimetype but is a kind of a processing-directive. It basically says: "Files that end with .php" shall be handled by a special handler" (note that you can add any type of handler and any file-ending, making trivial to have all .html files parsed by php).

The second directive would force apache to send an "application/x-httpd-php" mime-type header with each php file. (The mime-type directive gets overwritten by php and is not required, otherwise your browser would not understand how to handle an "application/x-httpd-php" file.) There is some more magick to it, but to the best of my knowledge (I'm no sysadmin) this is how it basically works.

> then apache will deliver the contents of your php file as text/plain.
> If you have one of the statements above, apache will pass the php file
> to mod_php (if DSO is supported) and then deliver whatever the php
> script returns. So my question is: Does mod_svn give back its results
> to apache for further processing (for example mod_php) or not?

Even if it would pass the file through php: what would happen with all included files - those files do not exist on disk etc. You *might* be able to get that working by setting your includepath to "http(s)://your.subversion.host/svn/repository_path" but that would require url_fopen_wrappers to be enabled which is a bad idea (TM) if you ask me. All in all you're heading for lots of trouble. Better check your project out and use a post-commit hook to update the working copy. This is waaayyyy easier and less error prone. (btw: it's what we do and it's working pretty fine.)

> Rainer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

Whatever you end up doing:

good luck


Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
eMail: gilcher@exozet.com
URL: www.exozet.com
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 29 17:42:47 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.