[Pmwiki-users] can't get uploads working

Tom Holroyd tomh
Sun Dec 19 14:27:20 CST 2004

> It easily could be.  You need to make sure that the URL
>    http://mysite.domain/wiki?pagename=Group.SomePage&action=upload
> actually takes you to the upload form.  

It does.  Then I type random garbage into the fields, and hit 
"Upload", and printing some server variables I get, among other 

[SERVER_SOFTWARE] => Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/4.1.2 
[QUERY_STRING] => n=Main.HomePage 
[REQUEST_URI] => /wiki?n=Main.HomePage 
[SCRIPT_NAME] => /wiki 
[PATH_TRANSLATED] => /home/meglab/wiki/index.php 
[PHP_SELF] => /wiki 
[argv] => Array ( [0] => n=Main.HomePage ) 
[argc] => 1

> Renaming pmwiki.php to index.php isn't recommended in general, as it
> often confuses the webserver (and/or PmWiki) when constructing URLs.
> In particular, http://mysite.domain/wiki no longer points to the script,
> it points to the directory containing the script, and Apache doesn't
> always rewrite this correctly.

Well, /wiki by itself does return the same "PATH_TRANSLATED" 
variable as above, which is correct.  Also "SCRIPT_FILENAME".

>    $EnableRedirect = 0;

Hmm.  That takes me back to the browse view, and this is set:


The form looks like

  <form enctype='multipart/form-data' 
  <input type='hidden' name='n' value='Main.HomePage' />
  <input type='hidden' name='action' value='postupload' />
  <table border='0'>
    <tr><td align='right'>File to upload:</td><td><input
      name='uploadfile' type='file' /></td></tr>

    <tr><td align='right'>Name attachment as:</td>
      <td><input type='text' name='upname' value='' />
        <input type='submit' value=' Upload ' /><br />

It processes upload.php but never calls HandleUpload or 

I can try a more default install to see what happens...

(I appreciate the help with this.)

Dr. Tom Holroyd
"A man of genius makes no mistakes. His errors are volitional and
are the portals of discovery." -- James Joyce

More information about the pmwiki-users mailing list