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?

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)

Change File Upload Destination to different partition on server

 * MediaWiki version: 1.14.0
 * PHP version: 5.2.9-1
 * MySQL version: 5.1.32
 * URL: private

I have a server that I set up MediaWiki on. Unfortunately it was installed in the C: partition that doesn't have much extra space. So, I'd like to point the file upload path to another partition (D:) on the server. I would appreciate any help you can provide. Thank you.

Arsajm 17:27, 9 July 2009 (UTC)

Special:Import error
I fixed this error by setting $wgDBmysql5 = false;


 * MediaWiki version: 1.15.0
 * PHP version: 5.1.6 (apache2handler
 * MySQL version: 5.0.45
 * URL: http://school.rm-f.me/wiki/index.php/Main_Page

I am trying to import the help pages from mediawiki as per the instructions found on http://www.mediawiki.org/wiki/Project:PD_help/Copying

I keep getting the following error and can not find any info on it.'''I found a fix. See above.'''

Error in fetchObject: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)

Backtrace:


 * 1) 0 /var/www/html/school/wiki/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php(1608): Database->fetchObject(false)
 * 2) 1 /var/www/html/school/wiki/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php(1577): SMWSQLStore2->getSMWPageIDandSort('???????????????...', 0, , , true)
 * 3) 2 /var/www/html/school/wiki/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php(647): SMWSQLStore2->getSMWPageID('???????????????...', 0, '')
 * 4) 3 /var/www/html/school/wiki/extensions/SemanticForms/includes/SF_LinkUtils.inc(224): SMWSQLStore2->getInProperties(Object(SMWWikiPageValue))
 * 5) 4 /var/www/html/school/wiki/extensions/SemanticForms/includes/SF_LinkUtils.inc(209): SFLinkUtils::addDataLink(Object(Title))
 * 6) 5 [internal function]: SFLinkUtils::setBrokenLink(Object(SkinMonoBook), Object(Title), Array, '???????????????...', Array, NULL)
 * 7) 6 /var/www/html/school/wiki/includes/Hooks.php(117): call_user_func_array(Array, Array)
 * 8) 7 /var/www/html/school/wiki/includes/Linker.php(222): wfRunHooks('LinkEnd', Array)
 * 9) 8 /var/www/html/school/wiki/includes/Linker.php(509): Linker->link(Object(Title), '???????????????...', Array, Array, 'broken')
 * 10) 9 /var/www/html/school/wiki/includes/parser/LinkHolderArray.php(233): Linker->makeBrokenLinkObj(Object(Title), '???????????????...', '')
 * 11) 10 /var/www/html/school/wiki/includes/parser/LinkHolderArray.php(115): LinkHolderArray->replaceInternal('
 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

The message on the download page shows that current MeidaWiki download has been unavailable for 3 days asfo 11-3 UTC tonight Is this page 'in error' or if its true can you give an idea of when this will available again? The archive seems to not offer anything above V 1.10 Thanks

—82.21.211.115 16:40, 19 July 2009 (UTC)


 * This seems to be back up again; I've removed the message. Let us know if you have any problems downloading. Happy ‑ melon 16:46, 19 July 2009 (UTC)

Unable to create public/x/x errors...

 * MediaWiki version: 1.15.1
 * PHP version: 5.2.10
 * MySQL version: 5.0.81
 * URL: http://www.aesedra.com/wiki/

I recently upgraded to wiki 1.15.1 and it went well. The thing is, when I try to upload a picture, I get ''Could not create directory "public/3/3b". . In my logs, I get Wed Jul 22 01:21:25 2009] [error] PHP Warning: mkdir [function.mkdir]: Permission denied in /home/aesedra/public_html/wiki/includes/GlobalFunctions.php on line 2012''

The images directory has been set to 777, LocalSettings.php has $wgEnableUploads = true; ''$wgUploadPath = "$wgScriptPath/images"; $wgUploadDirectory = "$IP/images"; ''

mkdir is not a disallowed function on my site. It works.

The funny thing is, if I go to any page that has a picture, I get a php warning (but the picture still shows) [Wed Jul 22 01:17:49 2009] [error] PHP Warning: imagejpeg [function.imagejpeg]: Unable to open '/home/aesedra/public_html/wiki/images/thumb/4/41/Wikibelantine.jpg/85px-Wikibelantine.jpg' for writing: Permission denied in /home/aesedra/public_html/wiki/includes/media/Bitmap.php on line 236

I'm not sure what's going on here, and thanks in advance for your help.

Edit: the uploads now work, but now I'm getting a zillion PHP warnings and black thumbnails.

—Peter Greenwell 06:26, 22 July 2009 (UTC)


 * Same problem here:


 * MediaWiki version: 1.15.1
 * PHP: 5.2.4-2ubuntu5.6 (apache2handler)
 * MySQL: 5.0.51a-3ubuntu5.4


 * Is this a software bug or how can I fix it?
 * --JuergenL 12:43, 22 July 2009 (UTC)