[pmwiki-users] uploading with wikifarms

Maria McKinley parody at u.washington.edu
Fri Nov 16 14:49:14 CST 2007


On Nov 14, 2007 11:21 PM, Maria McKinley <parody at u.washington.edu> wrote:
>
> On Nov 12, 2007 10:57 PM, Maria McKinley <parody at u.washington.edu> wrote:
> >
> > On 11/12/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > On Sun, Nov 11, 2007 at 01:10:34AM -0800, Maria McKinley wrote:
> > > > Hello there,
> > > >
> > > > I set a new directory for uploads using:
> > > >
> > > > $UploadDir = '/var/www/wikifarm/maria/upload';
> > > > $UploadUrlFmt = 'http://www.shadlen.org/~maria/upload';
> > > >
> > > > I can upload just fine, and it puts the files in
> > > > /var/www/wikifarm/maria/upload, but when I try to click on a file that
> > > > is uploaded, I get a file doesn't exist message. I am using
> > > > (:attachlist:) to list the files, which is does, but it seems to go to
> > > > the wrong directory if I click on a file. Does the download feature
> > > > not use the same variable $UploadDir for finding files?
> > >
> > > $UploadDir indicates where the files are to be stored in the filesystem,
> > > $UploadUrlFmt indicates the url that a browser should use to locate
> > > the file.
> > >
> > > In the above, unless the url 'http://www.shadlen.org/~maria' somehow
> > > points to the /var/www/wikifarm/maria directory on the filesystem,
> > > it's not likely to work.  Normally the '/~maria' syntax in a url
> > > refers to user maria's home directory, although the webserver can
> > > certainly choose to map it somewhere else.
> > >
> > > My guess based on the limited information available is that
> > > $UploadUrlFmt needs to be set as
> > >
> > >     $UploadUrlFmt = '/wikifarm/maria/upload';
> > >
> > > Pm
> > >
> >
> > Thanks. I'm afraid that didn't work, although it seems like it should.
> > I get a permission error, but all of the directories are world
> > readable and owned by www-data, and I was able to upload the files, so
> > I think it still is looking in the wrong place.
> >
> > Maybe this stuff from my config.php will help:
> >
> > $WikiDir = new PageStore('/var/www/wikifarm/maria/{$FullName}');
> > $WorkDir = '/var/www/wikifarm/maria';
> > $FarmD = '/var/www/pmwiki';
> > $UploadDir = '/var/www/wikifarm/maria/upload';
> >
> > Maybe it is a bad idea to include the upload directory in the same
> > directory that pmwiki uses to keep all of the files it writes?
> >
> > thanks,
> > maria
> >
>
> Anyone? Why can I upload, but not download? I have my local/config.php
> in my home directory /home/maria/pmwiki, and my web pages live in the
> wikifarm /var/www/wikifarm/maria, and my upload directory
> /var/www/wikifarm/maria/upload. I can upload using my website, and it
> shows up, both in the directory, and on the page if I do
> (:attachlist:), but I can't get images to actually show up on the
> page, or download the files that show up in (:attachlist:).
>
> thanks for any troubleshooting ideas,
> maria
>

Finally figured it out. It seems that you just can't create an uploads
directory in the same directory that pmwiki puts pages. I made a new
directory /var/www/uploads, with subdirectories for each of my users,
and that works fine using the syntax:

$UploadDir = '/var/www/uploads/maria';
$UploadUrlFmt = '/uploads/maria';

cheers,
maria



More information about the pmwiki-users mailing list