[pmwiki-users] can't upload files (*.jpg, *.txt)

H. Fox haganfox at users.sourceforge.net
Wed Nov 16 16:37:06 CST 2005


On 11/16/05, JW <jizwang at yahoo.com> wrote:
> Worked by setting  $DefaultPasswords['upload'] = "";
>
> now, if I can't use uploads password, how can I secure
> it?

You can use an uploads password.  As a matter of fact, you must use
one -- even if it's the empty string, which always matches.

Your original example had the line that sets the upload password
commented out (using a # in front of the line).  My example used an
empty string as the password to accomplish what I thought you were
going for with the commented-out line.

For a password of Sshhh, use

$DefaultPasswords['upload'] = crypt('Sshhh');

See also http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin

Hagan

> --- "H. Fox" <haganfox at users.sourceforge.net> wrote:
>
> > On 11/16/05, JW <jizwang at yahoo.com> wrote:
> > > My settings:
> > >
> > > PmWiki 2.0.12
> > > CentOS Linux 4.2
> > > default HTTPd 2 and PHP installation
> > > No passwords for both upload and edit
> > > admin has password enabled
> > >
> > > # local/config.php
> > > $EnableUpload = 1;
> > > #$DefaultPasswords['upload'] = crypt('secret');
> >
> > Try
> >
> > $DefaultPasswords['upload'] = "";
> >
> > Hagan
> >
> > > $UploadDir = "/data/http/wiki/uploads";
> > > $UploadMaxSize = 32000000;
> > >
> > > # php.ini
> > > file_uploads = On
> > > upload_max_filesize = 32M
> > > post_max_size = 32M
> > >
> > > /data/http/wiki/uploads has permission 777
> > >
> > > phpinfo() shows file_uploads enabled (other appls
> > can
> > > upload using same httpd/php
> > >
> > >
> > > Even though I don't have passwords for both
> > uploads
> > > and edit, when I click "attach file" on a page, it
> > > still asks password before displaying the upload
> > > screen. After I entered path to the file and
> > filename,
> > > and click "upload", It asks password TWICE and
> > then
> > > failure message.
> > >
> > > what have I missed?
> > >
> > > Thanks
> >
>
>




More information about the pmwiki-users mailing list