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?

i don'tage bing tag'Bold text''[Link title] == [[File:Headline text[[Media: Example.ogg --~Insert non-formatted text here

]]''' -
 * 1) REDIRECT — ==


 * 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
bing http:charter,net tahoo google 19o6 later that bing.com sing all it been dad eor me(VI zcampron@http:charter.net,yahoo, HTTP:GOOGIE CEL ALL MEST UP ATT RONALD D CAMPBEII PLEASE HELP ?(WINDOWS vIST &iNTERNET


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

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?

Internal Error when uploading images

 * MediaWiki version: 1.15.2
 * PHP version: 5.2.4-2ubuntu5.6 (apache2handler)
 * MySQL version: 5.0.51a-3ubuntu5.4
 * URL: http://www.brod.med.br

I have read several posts regarding the same problem and still was not able to figure out what is going on. I do have other systems installed in my server (such as Drupal) using exactly the same structures and file uploads work fine. I have set $wgHashedUploadDirectory = false and this only changed the mkdir error from not being able to create the directory public/f/f1 to not being able to create the directory public/archive. The public directory is now 777 and I even tried to create by hand the archive directory with no success.

I am pretty new to MediaWiki and I am sure I am missing something. All help is welcome!

—Cesar Brod 13:49, 20 March 2010 (UTC)


 * MediaWiki version: 1.15.2
 * PHP version: 5.2.6
 * MySQL version: 5.0.51
 * URL:

"Die hochgeladene Datei ist leer. Der Grund kann ein Tippfehler im Dateinamen sein. Bitte kontrolliere, ob du die Datei wirklich hochladen willst."

Hello toghether,

when i try to upload a file, i become everytime a errror, that the uploaded file is empty. url_fopen in the php.ini is activated, upload file in LocalSettings is activated too.

Has anyone a idea?

Thanks...

—217.7.152.98 11:56, 23 March 2010 (UTC)

MediaWiki version: 1.14.0

PHP version: 5.2.8 (apache2handler)

MySQL version: 5.1.30-community-log

Hi I have a wiki that is locked down so that a certain group [users] is unable to create new pages. They are able to edit existing pages but unable to add new ones. I need this group to be able to upload images. Currently they get an error stating that they are unable to create or edit pages so an image cannot be uploaded.

I am unsure how to get around this issue. Can anyone guide me in the right direction to fix the issue.

Regards Hayden

Current Group Permissions

1.Group Premissions $wgGroupPermissions['*' ]['read'] = false;

$wgGroupPermissions['*' ]['edit'] = false;

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['createpage'] = false;

$wgGroupPermissions['*']['createtalk'] = false;

$wgGroupPermissions['user' ]['read'] = true;

$wgGroupPermissions['user' ]['edit'] = true;

$wgGroupPermissions['user']['reupload'] = true;

$wgGroupPermissions['user']['reupload-shared'] = true;

$wgGroupPermissions['user']['upload'] = true;

$wgGroupPermissions['user']['createpage'] = false;

$wgGroupPermissions['user']['createtalk'] = false;

$wgGroupPermissions['staff']['read'] = true;

$wgGroupPermissions['staff']['search'] = true;

$wgGroupPermissions['staff']['createpage'] = true;

$wgGroupPermissions['staff']['createtalk'] = true;

$wgGroupPermissions['staff']['edit'] = true;

$wgGroupPermissions['staff']['move'] = true;

$wgGroupPermissions['staff']['move-subpages'] = true;

$wgGroupPermissions['staff']['reupload'] = true;

$wgGroupPermissions['staff']['reupload-shared'] = true;

$wgGroupPermissions['staff']['upload'] = true;

$wgGroupPermissions['staff']['writeapi'] = true;

$wgGroupPermissions['staff']['minoredit'] = true;

$wgGroupPermissions['staff']['purge'] = true;

$wgGPManagerNeverGrant['staff'] = array;

$wgGroupPermissions['sysop']['category'] = true;

$wgNamespaceProtection[NS_CATEGORY] = array( 'category' );

Cannot upload PDFs

 * MediaWiki version: 1.16.0beta2
 * PHP version: 5.2.6-1+lenny4 (apache2handler)
 * MySQL version: 5.0.51a-24+lenny2+spu1
 * URL: http://www.theyesmenfixtheworld.com/guide (un: guest pw: todayonly!)

I cannot upload PDFs to my wiki. I am logged in as a sysop. I can upload images just fine. The research I have done leads be to believe these changes in LocalSettings should do the trick, but they don't... The public directory is now 777. I don't an error message. $wgEnableUploads      = true; $wgAllowExternalImages = true; $wgAllowCopyUploads 	= true; $wgAllowImageMoving		= true; $wgFileExtensions[] = 'pdf'; $wgVerifyMimeType = false; $wgStrictFileExtensions = false; $wgCheckFileExtensions = false; ini_set( 'memory_limit', '64M' ); /** This is a flag to determine whether or not to check file extensions on upload. */ $wgUploadSizeWarning = true;
 * 1) $wgUseImageMagick = true;
 * 2) $wgImageMagickConvertCommand = "/usr/bin/convert";
 * 3) allow more file types:
 * 1) trying to get pdfs to work
 * 1) $wgMimeDetectorCommand = "file -bi";

Any advice?

—Two7s clash 15:59, 23 April 2010 (UTC)

Uploading File Error gives 'stat failed for C:\WINNT\TEMP\php1399.tmp'

 * MediaWiki version: 1.15.3
 * PHP version: 5.2.0 (cgi-fcgi)
 * MySQL version: 5.0.22-community-max-nt
 * URL: http://wiki.butterflyvista.com/

Hello,

I am attempting to upload a file, an image in this particular case but I presume could be anything, in my MediaWiki installation. I pressed the Upload File link in the Tools box and got to the Upload File page. I selected the file with no problems, but when I clicked on the 'Upload file' button, I keep getting an error no matter what I try and do. Obviously, I am not doing the right thing.

Error - PHP Warning: filesize [function.filesize]: stat failed for C:\WINNT\TEMP\php1399.tmp in <>\mediawiki\includes\filerepo\File.php on line 1160


 * Note the temporary file changes each time.

Internal Error

Could not find file "C:\WINNT\TEMP\php1390.tmp"

-
 * Note the temporary file changes each time.

I opened the File.php error and saw:

$info['size'] = filesize( $path );

I also tried contacting my web host provider. They responded as follows:

'Please contact your web developer to change the default temporary upload path from c:\winnt\temp to your member folder. Then your issue should be solved.'

I am the web developer and the one that posted the request to them, not that it helped resolve anything.

I did notice the following in the 'DefaultSettings.php' file.

$wgUploadPath      = false; ///< defaults to "{$wgScriptPath}/images" $wgUploadDirectory	= false; ///< defaults to "{$IP}/images" $wgTmpDirectory    = false; ///< defaults to "{$wgUploadDirectory}/tmp"

I tried modifying them in the LocalSettings.php file to see if it would make a difference. The answer was a resounding no, so I took out what I added. I added temporary:

$wgTmpDirectory = "{$IP}/images/tmp";

What is causing the error that prevents me from uploading any files?

Thanks in advance.

—98.151.56.206 01:41, 30 April 2010 (UTC)