[pmwiki-users] shared storage via http? and upload via http

Patrick R. Michaud pmichaud at pobox.com
Fri Oct 27 14:27:46 CDT 2006


On Thu, Oct 26, 2006 at 04:16:50PM +0200, Stefan Schimanski wrote:
> I guess the problem is that PHP cannot "stat" files with http:// urls:
> 
>   http://de3.php.net/manual/en/wrappers.http.php
> 
> The PageStore calls file_exists which then tries to stat the page which
> fails. Probably replacing the file_exists in the PageStore by some fopen
> (which is supported for http://) construction will give you an http://
> enabled PageStore.

On the other hand, this also means that every link to a page that
isn't local results in an external http:// request to the remote
server, just to display the link.

In other words, every time a page containing the markup "[[NoSuchPage]]"
is displayed, a request will be sent to the remote server looking for 
NoSuchPage.  Whether this is acceptable would be up to the 
administrators involved.

Patrick Ogay wrote:
> > If I'm correct, it's possible from php to read data via http/ftp and so 
> > I tried this:
> >
> > $LockFile = "$FarmD/shared.d/.flock";
> >     $WikiLibDirs = array(
> >       &$WikiDir,
> >       new PageStore('http://www.ddy.ch/pm/laden/wiki.d/$FullName'),
> >       new PageStore('$FarmD/shared.d/$FullName', 1),
> >       new PageStore('$FarmD/wikilib.d/$FullName'));

I don't recommend this for a number of reasons, but if doing
it then you might want to put the http:// PageStore at the end 
of the list.  Having it sequenced as above means that any remote 
pages will take priority over the shared.d and wikilib.d pages on the
local server.

In particular, the above sequence means that every browse request
will result in requests to the remote server for the other pages
used in skins, such as Site.SideBar, Group.SideBar, Site.PageActions,
etc., unless locally customized versions of these pages exist
in $WikiDir.

Pm




More information about the pmwiki-users mailing list