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

Re: Web Apps

From: Johannes Fahrenkrug <jfa_at_gebeco.de>
Date: 2004-06-28 15:01:12 CEST

Hi Orcrist,

> I'm new with Subversion and I have a little question. I want to use
> this sofware to keep web apps. That's not a problem. But, I want to
> know if there is any way to acces the files throw the WEB. Not to get
> the files. I want to acces to any *.php file like it was in a normal
> apache server, and see and work with them, not only get the source
code.
> Can you help me? Thanks,

Ok, let me get this straight:
you want to keep a file test.php in Subversion.
Test.php reads:
<? phpinfo(); ?>

when you keep test.php in Subversion for versioning, you want to be
able
to view it straight from the repository and instead of seeing
<? phpinfo(); ?>
you want to see the OUTPUT of phpinfo, hence having the script parsed
and executed.

Is that what you want?

If so, I don't think you can solve this problem »out of the box«.
This is the problem:
test.php is stored in the subversion repository and when you want to
view it
in a web browser, the subversion apache module delives the content of
test.php (that being »<? phpinfo(); ?>«). Since the svn apache module
delievers the content, the file never goes through any php module and
thus
never gets executed.
I think what you have to is a write a script, that checks out the
requested
file, and then executes it.
You should take a look at WebSVN. I can imagine that you could also do
this:
Use WebSVN's functions for retrieving a file and then just use the PHP
eval() function to execute it. That should work, but only if your php
skript doesn't depend on other php files that are in the repository.
I think then you won't get around checking the files out before being
able
to execute them

I hope this helps!

-Johannes.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 28 13:02:13 2004

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

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