[pmwiki-users] Impossible to upload files

Fabiano Bonin fabiano at personalsoft.com.br
Sat Sep 19 17:20:16 CDT 2009


Hi,

I´m trying PmWiki for some weeks, and until now i was unable to upload
a single file.
I have no idea what else i have to do to make it work.

I have read tons of forum messages, tutorials, changed a bunch of
configurations of pmwiki, php and apache, without success, and without
a clue of what is going on.

The strange thing is im relying on default installations of xampp and
pmwiki, so there is nothing unusual in my configuration, at least i
think.

Basically, I´m installing xampp this way:

cd /opt
wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.7.2/xampp-linux-1.7.2.tar.gz?use_mirror=ufpr
tar xzf xampp-linux-1.7.2.tar.gz
cd lampp
./lampp start

Test to see if PHP uploads are ON:
[root at server1 lampp]# cat etc/php.ini | grep upload
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

I´m installing PmWiki this way:

cd /opt
wget http://pmwiki.org/pub/pmwiki/pmwiki-2.2.5.tgz
tar xzf pmwiki-2.2.5.tgz
cd pmwiki-2.2.5
mkdir wiki.d
chmod 777 wiki.d
echo -e "<?php include('pmwiki.php');" > index.php
cp docs/sample-config.php local/config.php
mkdir uploads
chmod 777 uploads
echo test > uploads/test.txt
chown nobody:root * -R
ln -s /opt/pmwiki-2.2.5 /opt/lampp/htdocs/wiki

Now i add these lines to local/config.php:

$EnableUpload = 1;
$EnableUploadVersions=1;
$DefaultPasswords['upload'] = crypt('upload');
$UploadDir = "/opt/pmwiki-2.2.5/uploads";
$UploadPrefixFmt = '';

And when i try to upload i file with this URL:

http://127.0.0.1/wiki/index.php?n=Main.HomePage?action=upload

I am asked for a password, enter 'upload', and gain access to the upload page.
I can see the file 'test.txt' i created during installation listed
below in this page, so i presume my directory configurations are OK.
Now i try to upload the file 'test1.txt', have to enter password
'upload' two times, and get this message:

"file1.txt: no file uploaded"

Here is some info i got from diag:

    [EnableLocalConfig] =>
    [EnableUpload] => 1
    [EnableUploadVersions] => 1
    [UploadDir] => /opt/pmwiki-2.2.5/uploads
    [UploadPrefixFmt] =>
    [EnableDiag] => 1
    [EnableRelativePageVars] => 1
    [CurrentTime] => September 20, 2009, at 12:12 AM
    [CurrentTimeISO] => 2009-09-20T00:12:54
    [EnableStdConfig] =>
    [DefaultPage] => Main.HomePage
    [EnableFixedUrlRedirect] =>
    [MakePageNameFunction] =>
    [PageNameChars] => -[:alnum:]
    [MakePageNamePatterns] => Array

    [EnableUploadOverwrite] => 1
    [UploadExts] => Array
        (
            [gif] => image/gif
            [jpg] => image/jpeg
            [jpeg] => image/jpeg
            [png] => image/png
            [bmp] => image/bmp
            [ico] => image/x-icon
            [wbmp] => image/vnd.wap.wbmp
            [mp3] => audio/mpeg
            [au] => audio/basic
            [wav] => audio/x-wav
            [mpg] => video/mpeg
            [mpeg] => video/mpeg
            [mov] => video/quicktime
            [qt] => video/quicktime
            [wmf] => text/plain
            [avi] => video/x-msvideo
            [zip] => application/zip
            [7z] => application/x-7z-compressed
            [gz] => application/x-gzip
            [tgz] => application/x-gzip
            [rpm] => application/x-rpm
            [hqx] => application/mac-binhex40
            [sit] => application/x-stuffit
            [doc] => application/msword
            [ppt] => application/vnd.ms-powerpoint
            [xls] => application/vnd.ms-excel
            [mdb] => text/plain
            [exe] => application/octet-stream
            [pdf] => application/pdf
            [psd] => text/plain
            [ps] => application/postscript
            [ai] => application/postscript
            [eps] => application/postscript
            [htm] => text/html
            [html] => text/html
            [css] => text/css
            [fla] => application/x-shockwave-flash
            [swf] => application/x-shockwave-flash
            [txt] => text/plain
            [rtf] => application/rtf
            [tex] => application/x-tex
            [dvi] => application/x-dvi
            [odt] => application/vnd.oasis.opendocument.text
            [ods] => application/vnd.oasis.opendocument.spreadsheet
            [odp] => application/vnd.oasis.opendocument.presentation
            [kml] => application/vnd.google-earth.kml+xml
            [kmz] => application/vnd.google-earth.kmz
            [] => text/plain
        )

    [UploadMaxSize] => 50000
    [UploadPrefixQuota] => 0
    [UploadDirQuota] => 0
    [UploadExtSize] => Array
        (
            [gif] => 50000
            [jpg] => 50000
            [jpeg] => 50000
            [png] => 50000
            [bmp] => 50000
            [ico] => 50000
            [wbmp] => 50000
            [mp3] => 50000
            [au] => 50000
            [wav] => 50000
            [mpg] => 50000
            [mpeg] => 50000
            [mov] => 50000
            [qt] => 50000
            [wmf] => 50000
            [avi] => 50000
            [zip] => 50000
            [7z] => 50000
            [gz] => 50000
            [tgz] => 50000
            [rpm] => 50000
            [hqx] => 50000
            [sit] => 50000
            [doc] => 50000
            [ppt] => 50000
            [xls] => 50000
            [mdb] => 50000
            [exe] => 50000
            [pdf] => 50000
            [psd] => 50000
            [ps] => 50000
            [ai] => 50000
            [eps] => 50000
            [htm] => 50000
            [html] => 50000
            [css] => 50000
            [fla] => 50000
            [swf] => 50000
            [txt] => 50000
            [rtf] => 50000
            [tex] => 50000
            [dvi] => 50000
            [odt] => 50000
            [ods] => 50000
            [odp] => 50000
            [kml] => 50000
            [kmz] => 50000
            [] => 50000
        )

    [UploadFileFmt] => /opt/pmwiki-2.2.5/uploads
    [UploadUrlFmt] => http://127.0.0.1/wiki/uploads
    [LinkUploadCreateFmt] => <a rel='nofollow' class='createlinktext'
href='$LinkUpload'>$LinkText</a><a rel='nofollow' class='createlink'
href='$LinkUpload'>&nbsp;&Delta;</a>

Do someone have a clue about what else i can try?

Regards,

Fabiano



More information about the pmwiki-users mailing list