Project:Support desk/Sections/Uploading

__NEWSECTIONLINK__

= Uploading Support =

.TMP File issue?

 * Mediawiki Version: latest
 * PHP version Latest
 * mySQL latest

When Users try to upload images onto the wiki, they get a error that states "Cannot find C:\WINDOWS\TEMP\PHP"X" Whereas X indicates a letter (currently PHPc.tmp) I've disabled Imagemagic(sp?) and I am still getting an error. Can I remote host the images and what tag would I use to embed it?

-


 * Mediawiki Version: 1.13.2
 * PHP version: 5.2.6
 * mySQL: 5.0.51a

Getting the same error message: "Cannot find C:\WINDOWS\TEMP\PHP"X" intermittently when uploading files. Tried changing upload_tmp_dir directive and other settings in PHP.ini but nothing seems to work. Does anyone know what might be causing this error?

(SOLVED) Errors while deleting files/images

 * MediaWiki version: 1.15.1
 * PHP version: 5.0.4 (apache)
 * MySQL version: 4.1.21
 * URL: (intranet)

Error deleting file: Could not create directory "deleted/d/2/n" (or the like).

Hi, I have the problem that I get an error message when trying to delete images from our wiki. It says: "Error deleting file: Could not create directory "deleted/d/2/n" (or the like).

I found that the permissions of the ./images/deleted directory can not be changed to 777. Apparently it was made (or is owned) by another user. I have no root access, so I can't chown the directory.

I also tried to create another directory (del), set its permissions to 777. And then included in the LocalSettings.php :

$wgFileStore['deleted']['directory'] = "$wgUploadPath/del"; $wgFileStore['deleted']['url'] = null; $wgFileStore['deleted']['hash'] = 0;

This doesn't help either. Even worse, after trying to delete a file, it turned out that also the owner of del was changed...

Any suggestions?

-> I managed to resolve it myself, after browsing mediawiki and Google for the same problem. It turned out that Safe_Mode should be tunred off (search on Safe_Mode for instructions how to do that).

--- Gert-willem Romer ---

Upload Zip Files
I need to be able to upload zip files and possibly a few other extension to my Wiki. I have searched and read pages but am still unable to work out how to do this. Please if you do have a solution for me include the file name that I would need to edit to change or add code into

You can add this to LocalSettings.php:

$wgFileExtensions[] = 'doc';

Don't know if it works for ZIP files though.

uploading documents

 * MediaWiki version: 1.14.0
 * PHP version: 5.1.6
 * MySQL version: 5.0.22
 * URL:

Hi folks,

I encounter the following problem when uploading a document. When I uploaded a document and then upload a new version of the document, I can't see the new version of the document when I download it. Another user can see it. After an hour or so I'm also able to see the updated document. I tried it with the IE and Firefox, same problem. I also emptied my cach and all other options within the browser, so I guess it has to do with the MediaWiki itself. Thanks for your support.

Warning: mkdir [function.mkdir]: Permission denied
I have recently updated this wiki to 1.15.1 and have the same problem reported by others. That is: ‘Warning: mkdir [function.mkdir]: Permission denied in /home/naturewe/public_html/includes/GlobalFunctions.php on line 2012’ Most of the requests and replies in the forums, some dating back to 2006, having the same problem have provided some sort of ‘solution’ but ones that I cannot properly understand, although where possible all solutions have been attempted. Shell access is not available to me. If anyone is able to guide me through the solution it will be much appreciated. Darryl
 * MediaWiki version: MediaWiki 1.15.1
 * PHP version: PHP 5.2.11 (apache2handler)
 * MySQL version: MySQL 5.0.87-community
 * URL: []

—144.131.29.144 06:11, 13 January 2010 (UTC)

I have the same question. System:Windows XP I have set the documents in the right way. The documents included the php.int,LocalSettings.php,DefaultSettings.php,http.conf.When I upload the images.That is 'Warning:mkdir[function mkdir]: No such file or directory in D:\wiki\Apache2\htdocs\testwiki\includes\GlobalFunctions.php on line 2012'. Thanks for your help.
 * MediaWiki version:1.15.1
 * Mysql version :MySQL 5.0
 * PHP version: PHP 5.0.5

I just find the solution in the support. I added this statement to GlobalFunctions.php at line 2011 to fix the path: $dir = str_replace('/', '\\', $dir); I hope this solution is helpful to the users who have the same question.

(RESOLVED) Restriction on Uploads doesn't work

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.6-3ubuntu4.2 (apache2handler)
 * MySQL version: 5.0.75-0ubuntu10.2
 * URL:

I added the line:

$wgGroupPermissions['something']['upload'] = false;

To the LocalSettings.php file, but the user group "something" can still upload files. I want the file uploads to be restricted to the "sysop" group.

—Johannekie 10:46, 15 January 2010 (UTC)
 * The user and sysop groups have the upload right by default. Even if you disable upload for the something group they'll still get it from the user group, so you'll need to add  to LocalSettings.php. Check Special:ListGroupRights to make sure that only sysops have the upload right. Reach Out to the Truth 15:07, 15 January 2010 (UTC)

Thank you. I posted another question on another Support page http://www.mediawiki.org/wiki/Project:Support_desk/Sections/Miscellaneous#How_can_I_restrict_certain_user_groups_from_Special_pages

If someone can please look at that as well.

Wiki not loads doc-files saved in MS Word 2007 format 97-2003
Our wiki not loads files *.doc which was created in the MS Word 2007 and saved in the format suitable for MS Word 97-2003. Message is: '''File is damaged or has an incorrect extension. Please check the file and try to download it again.''' (in Russian: Файл либо повреждён, либо имеет неверное расширение. Пожалуйста, проверьте файл и попробуйте загрузить его ещё раз.) Help please.
 * MediaWiki version: 1.15.1 (in Russian)
 * PHP version: 5.2.6-3ubuntu4.5 (apache2handler)
 * MySQL version: 5.0.75-0ubuntu10.2
 * URL:

Possible solution: http://www.mwusers.com/forums/showthread.php?10094-Error-on-uploading-doc-after-MW-1-14-upgrade

—194.85.96.104 17:26, 28 January 2010 (UTC)