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?

(Resolved)Zip Files can't be uploaded
Italic text
 * MediaWiki version: MediaWiki 1.14.0
 * PHP version: PHP 5.2.6 (apache2handler)
 * MySQL version: MySQL 5.0.67
 * URL:

Since 1.14 it isn't possible to load any zip files in the system. Do have a solution to load zip files to mediawiki?

See aslo my Localsettings.php and the orginal error message

A part of my Localsettings.php

$wgEnableUploads = true; $wgCheckFileExtensions = true; $wgFileExtensions = array('png', 'zip', 'jpg', 'jpeg', 'ppt', 'doc', 'xls', 'pdf', 'gif', 'tiff');

Error Message from IE:

Upload warning Files of the MIME type "application/zip" are not allowed to be uploaded.

—194.7.161.147 09:34, 24 April 2009 (UTC)


 * Adjust $wgMimeTypeBlacklist. —Emufarmers(T 00:30, 25 April 2009 (UTC)


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

nature of zonouz

A study on Zonouz nature

What should i change in the Localsettings.php? Can you please help?

Very slow uploads and non-starting uploads
Sometimes, far too often, upload slows to the point of just not working. It seems that the page gets stuck updating, nothing is uploaded. This happens via localhost as well as when logged in from an external. I have rather a lot of data to upload so this is something of an issue for me.
 * MediaWiki version: 1.14.0
 * PHP version: 5.2.6
 * MySQL version: 5.0.67
 * URL: localhost, release soon
 * OS: Mac OS 10.5.6

—130.237.175.237 15:00, 7 May 2009 (UTC)


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

I setup mediawiki on my server not too long ago. I enabled the image upload feature, however, when I upload am image and try to use it in a page I get thi error: The requested URL /images/9/97/Jade-head.jpg was not found on this server.

Can someone provide help here?

—76.29.127.133 04:14, 11 May 2009 (UTC)

Problem with Picture Upload / Picture Preview

 * Moved from Project:Forum Happy ‑ melon 21:48, 19 May 2009 (UTC)

Hi,

i have following Problem on my wiki-Project:

I get following message: Fehler beim Erstellen des Vorschaubildes:

Warning: passthru has been disabled for security reasons in /www/htdocs/v089483/sticker/sammelbildwiki/includes/GlobalFunctions.php on line 2131

This is the Line 2131 of globalfunctions.php: passthru( $cmd, $retval );

I´m not very good in PHP, so i don´t know what to do. Someone can help me?

Kind Regards,

--SVWRamius 11:15, 9 April 2009 (UTC)

PS: Wenns jemand auf deutsche erklären könnte wäre das wirklich nice. :-)


 * MediaWiki version: 1.14
 * PHP version: 5.2.8
 * MySQL version: 4.1.22
 * URL:

My site has safe_mode set to On so I followed the instructions from http://www.mediawiki.org/wiki/Safe_mode#Image_upload_and_deletion_workaround and I'm still getting the classical upload error: The upload directory (public) is not writable by the webserver.

Images folder has 755 and images/archive, images/temp, images/deleted, and images/thumb directories have 777.

Somehow I got it to work (reuploading all files) but now thumbnails aren't working (they are not shown even source image exists on the server.

How can I fix it? Thanks

—69.116.169.102 13:12, 20 May 2009 (UTC) Bogdan bog_tom@yahoo.com

(RESOLVED) Upload page doesn't upload anything... same with export page.

 * MediaWiki version: 1.15.0
 * PHP version: 5.2.9
 * MySQL version: 5.0.77

Absolutely no clue what the problem is. I try to upload a file, image, doesn't matter what, and the Upload page just comes back like a blank form, as if nothing had been done. I checked everything possible... error logs, PHP errors (not sure I did that correctly however), folder permissions for 'images', nothing works. Some one else had the exact same problem, but you never answered. Does anyone have some sort of solution?

Oh yeah, and unlike everybody else, I have no folder under 'images', if that helps.

And please, at least try to give an answer. Don't skip over it like you seem to do to every other problem... 99.252.59.196 02:24, 18 June 2009 (UTC)


 * Everyone here is a volunteer, we donate our time and bandwidth to creating and supporting free software and free content. Everyone will work on what they choose to work on; no one can require us to work in one particular area.  If there is no response to this issue, it is because no one who knows what the solution is has chosen to review the support desk threads. Accusing people of "skipping over it like you seem to do to every other problem" is offensive and actively discourages such volunteers from wanting to help you. Happy ‑ melon 08:34, 18 June 2009 (UTC)


 * Alright, sorry, I've been trying to figure this out for three days now and was up all night in forums and the IRC chat trying to get help but everyone seems to ignore me. Kind of lost it here, seeing that many problems were overlooked, including a guy with an exact problem to mine in the archives. 99.252.59.196 12:55, 18 June 2009 (UTC)


 * Ok, at least you took the time to read the archives, which is more than many people manage. You say you've looked at the error logs, presumably without finding anything useful.  Have you enabled extended debugging?  There are a lot of switches you can flip to get more information about what's going on inside the clockwork; have a read of Manual:How to debug if you haven't already, and see if there's any more information you can squeeze out of it. Happy ‑ melon 13:06, 18 June 2009 (UTC)


 * I looked around a little, not sure how to do extended debugging, however I flipped on $wgShowDebug, and when trying to upload, nothing shows. The other guy in the archive couldn't debug anything out either, it was as if nothing was wrong. Although again, would it have to do with the fact that I have no subfolders under my 'Images' folder? Wasn't it supposed to be created during the installation, or was it supposed to be done when my first images upload?


 * I could try creating them myself, maybe that's what the form is looking for... don't know the folder names though. And thanks for the help. 99.252.59.196 15:31, 18 June 2009 (UTC)


 * $wgShowDebug will just add stuff in an HTML comment at the end of the page, assuming that the thread gets far enough through the process to actually start rendering the page, which it sounds like it isn't. Try enabling PHP errors if they're not already, and the debug log (How to debug) to get data that's not dependent on the process actually finishing. Happy ‑ melon 15:36, 18 June 2009 (UTC)


 * Enabled PHP errors, nothing, tried to create a log, didn't seem to be working (have a feeling I didn't do that right though...) 99.252.59.196 15:56, 18 June 2009 (UTC)


 * If it worked, it will get tons of stuff poured into it on every page view, successful or not. So if the log stays empty when you view or do things to the wiki, it's not set up right. Happy ‑ melon 16:07, 18 June 2009 (UTC)

Well the instructions are rather vague. "after the invocation of DefaultSettings.php" means what exactly? Is there a specific place in Localsettings I have to add $wgDebugLogFile? Because right now, there is no log file. 99.252.59.196 19:36, 18 June 2009 (UTC)


 * Ahh, whatever. I'm sick of this problem, so I'll reconfigure my whole wiki... I'll see if it solves the problem.

EDIT: Found the solution: People with this problem shortened the URL link with the wrong codes. They have to follow the instructions here. 99.252.59.196 20:54, 18 June 2009 (UTC)


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

How can I upload excel, word, pdf etc. without using the conversion function via html?

Potential bug in FSRepo.php causes image uploads to fail on Windows server: Internal error - Could not create directory

 * MediaWiki version: 1.15.0
 * PHP version: 5.1.6 (apache2handler)
 * MySQL version: 5.0.45-community-nt
 * URL: index.php?title=Special:Upload (on a private wiki)

I've been trying to debug file uploads on my Windows server. After going to Special:Upload and uploading a jpg (an allowed format) it would die with something like this: Internal error

Could not create directory "public/a/a5".

It would also generate a PHP error: Warning: mkdir [function.mkdir]: No such file or directory in \includes\GlobalFunctions.php on line 2012

I did some debugging and mkdir is called by wfMkdirParents which in this case is called by publishBatch in FSRepo.php line 298: if ( !is_dir( $dstDir ) && !wfMkdirParents( $dstDir ) ) {

I think the $dstDir path is not a valid one on the Windows server because the path is constructed manually in publishBatch using forward slashes ("/"), so what gets eventually passed to mkdir is something that looks like this: C:\my\path\htdocs\mediawiki/images/a/a5

I added this statement to GlobalFunctions.php at line 2011 to fix the path: $dir = str_replace('/', '\\', $dir);

So $dir was changed to something like this: C:\my\path\htdocs\mediawiki\images\a\a5

This solved my problem and I was able to upload files. Perhaps FSRepo.php needs to be more sensitive to servers that require a backslash as a path separator? Or is there a better way to fix this problem?

I am not running PHP in safe_mode and I have left $wgHashedUploadDirectory defaulted to true.

cheers, Dave

--Dmarwick 05:42, 1 July 2009 (UTC)