|
PmWikiRu /
, ! PmWiki upload.php . ( ) . . PmWiki . , :
/ . , (!) . upload.php , , , . , . config.php: $EnableUploadOverwrite = 0;
, .
<?php if (!defined('PmWiki')) exit(); ## Enable uploads and set a site-wide default upload password. $EnableUpload = 1; $DefaultPasswords['upload'] = crypt('secret'); : uploads. . URL : $UploadDir = "/home/john/public_html/uploads"; $UploadUrlFmt = [="http://www.john.com/~john/uploads";=] $UploadPrefixFmt = '';
, :
$UploadPrefixFmt = '/$FullName'; $UploadPrefixFmt = '/$Group/$Name'; , $UploadDir , (, public_html). PmWiki ( ). , " , PmWiki . , PmWiki . , . . :
$UploadMaxSize = 102400;
, . , " $UploadExtSize['gif'] = 20480; # .gif 20K
: $UploadExtSize['zip'] = 0; # .zip
: $UploadExts['ext'] = 'content-type';
ext content-type (MIME ) . , ' $UploadExts['dxf'] = 'image/x-dxf';
$UploadExts mime- , :
$UploadExts = array( 'gif' => 'image/gif', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'png' => 'image/png', 'xxx' => 'yyyy/zzz' ) , PmWiki ( ''upload.php' PmWiki ). . Apache 2.0 LimitRequestBody (posted) ( ). Apache . , Linux ( .. Red Had Linux) 512 , . ( httpd.conf /etc/httpd/conf.d.) Red Hat 8.0/9.0 Apache 2.0.x "Requested content-length of 670955 is larger than the configured limit of 524288" "Page not found"( ). PHP, .. Red Hat 8.0/9.0 PHP /etc/httpd/conf.d/php.conf. "LimitRequestBody 524288" . PHP ( /etc/php.ini). - : PmWiki , Apache PHP. ( ) , ( uploads/) :
Cookbook:SecureAttachments.
file_uploads = On
, , httpd ( ) (restart). - << AuthUser | DocumentationIndex | Internationalizations >> ? local/config.php .zip :
PmWikiRu.UploadsAdmin - Backlinks |