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 ---

(SOLVED) 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.

Yes, this works for zip files too.

--Boinst 10:58, 3 June 2010 (UTC)
 * For more info, see Manual:$wgFileExtensions. Tisane 03:47, 16 June 2010 (UTC)

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.

Uploaded file Namespace auto change

 * MediaWiki version: 1.11.0
 * PHP version: 5.1.6
 * MySQL version: 5.0.77
 * URL:

Is there a way to have uploaded files Namespace automatically set to Media, or something other than Image?

Auto Namespace Change

 * MediaWiki version: 1.11.0
 * PHP version: 5.1.6
 * MySQL version: 5.0.77
 * URL:

Is there a way to have uploaded files Namespace automatically set to Media, or something other than Image?

(UNRESOLVED) Internal Error (could not rename file) when uploading files

 * MediaWiki version: 1.15.3 (r434)
 * PHP version: 5.3.0 (cgi-fcgi)
 * MySQL version: 5.0.67-community-nt
 * URL: (internal)
 * Server is running Windows Server 2003, fully updated
 * Web server is IIS 6.0

Since updating to MediaWiki version 1.14, I have had this error and I still cannot work out how to resolve it. I have since updated to version 1.15, but I still get this problem.

What happens:

When I upload any image file (I have tested .png and .jpg, same result), I get the message (or one like it):

Internal Error Could not rename file "C:\PHP\uploadtemp\phpB951.tmp" to "public/d/d4/testimage.jpg".

I have verified that the D:\DATA\Mediawiki\images\d\d4 folder is created if it did not already exist, but the image is not moved into that folder.

What I expected to happen:

The file uploads, and a success message is displayed.

Some information on my setup:


 * PHP is installed at C:\PHP
 * Mediawiki is installed at D:\DATA\Mediawiki

What I have already tried:


 * I have set upload-tmp-dir in php.ini to C:\PHP\uploadtemp
 * I checked that Safe Mode is Off in php.ini
 * I have (recursively) set all permissions to "allow everything" for both the Everyone and the IUSR_Whatever user on both the C:\PHP\uploadtemp and the D:\DATA\Mediawiki\images directories.
 * I have tried messing with the $wgUploadDirectory and related parameters (I have since reverted these changes)
 * I have excluded the C:\PHP\uploadtemp and the D:\DATA\Mediawiki\images directories from the virus scanner.
 * I have run Sysinternals Process Monitor to see what the PHP process is doing:
 * It uploads the file to C:\PHP\uploadtemp
 * It creates the folder D:\DATA\Mediawiki\images\d\d4
 * It checks whether D:\DATA\Mediawiki\images\d\d4\testimage.jpg already exists
 * A CreateFile and subsequently CloseFile operation is logged with path D:\DATA\Mediawiki\images\d\d4
 * It deletes the temporary file from C:\PHP\uploadtemp
 * I have tried messing with the $wgHashedUploadDirectory parameter (I have since reverted these changes)
 * I have disabled my (2) extensions by commenting out the include statements in LocalSettings.php

Thanks in advance for any suggestions to solve this problem!

—Boinst 03:46, 26 May 2010 (UTC)

Please help me solve this problem! If you have any ideas, any at all, I will try them!

--Boinst 03:14, 28 May 2010 (UTC)

I've given up on this one, and have installed Apache (on a different port) for the wiki. That's all running fine, so I'll give up on this issue.

--Boinst 04:17, 28 May 2010 (UTC)


 * This is still making problems "in the Wild", and I think it boils down to rights or backslashes, but dunno.


 * I think I have the same Isssue, MicroSoft IIS here too:
 * Could not rename file "C:\PHP\uploadtemp\php34CB.tmp" to "public/Testfile.png"
 * Hope someone solves this one. -- Jochen, Germany.

Good luck! I'm afraid I tried all of my ideas, the only suggestion I can make is to switch to apache :(

--Boinst 10:57, 3 June 2010 (UTC)


 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

—182.63.204.144 08:24, 26 June 2010 (UTC)