Project:Support desk/Sections/Uploading

__NEWSECTIONLINK__ = Uploading Support =

Cannot upload images

 * MediaWiki: 1.11.0
 * PHP: 5.1.4 (cgi-fcgi)
 * MySQL: 5.0.45-log
 * Database: Unknown, if you know how to figure it out please tell me.
 * URL: Red Orchestra Wiki

Whenever I try to upload an image on Mozilla Firefox it asks me if I want to open or download, how do I stop it from doing this so I can upload images?

—-PatPeter 02:59, 16 December 2007 (UTC)


 * Worked fine for me on Mozilla Firefox version 2.0.0.11: http://www.maporchestra.com/wiki/index.php?title=Image:Test.jpg — color probe (talk | contribs) 13:52, 4 January 2008 (UTC)


 * I should have been more specific, I didn't make my full report here but rather in another thread in Archive 14 about what is not uploading. For instance anything that is not a jpg, png, or ogg causes an error like this, my file extensions:

$wgFileExtensions  = array('png','jpg','jpeg','ico','bmp','ogg','doc','xls','ppt','docx','xlsx','pps','mp3','sxc','pdf','nse','rom','ukx','uc','uax','usx','utx','u');


 * I actually don't need pdfs and docs so I will take those out:

$wgFileExtensions  = array('png','jpg','jpeg','ico','bmp','ogg','rom','ukx','uc','uax','usx','utx','u');


 * -PatPeter, MediaWiki Support Team  20:30, 4 January 2008 (UTC)


 * Also somehow FileExtensions got deleted from LocalSettings, probably when I upgraded the wiki, so let me put that back in and check. -PatPeter, MediaWiki Support Team  20:32, 4 January 2008 (UTC)


 * BUMP. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  20:45, 10 January 2008 (UTC)


 * Anyone? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  02:30, 21 January 2008 (UTC)


 * I've seen this behaviour in my previous installation (MediaWiki 1.6). Sometimes it went wrong (downloaded the index.php) and most times it went right... So whenever this occured, I just tried again. I never found out what the problem was, sorry. Theo s 12:26, 22 January 2008 (UTC)


 * Update, it is PHP (the program) asking you if you want to download index.php, so that problem is fixed, now the newer problem is that now it displays a blank page when I try to upload. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  01:28, 27 January 2008 (UTC)

problems with GIF after upgrade to MediaWiki 1.11.0

 * MediaWiki: 1.11.0
 * PHP: 5.2.4 (cgi-fcgi)
 * MySQL: 5.0.27

Hi, I upgraded from MediaWiki 1.6 to 1.11.0 and all went well except: Images in GIF format don't show anymore on the pages. PNG and JPG images are OK, but when I put, it will give me only this text as a hyperlink, w/o showing the image.. Any help appreciated! —Theo s 10:03, 24 December 2007 (UTC)


 * Found an answer at, but unfortunately this script maintenance/rebuildImages.php is not at my server... :( Theo s 10:16, 24 December 2007 (UTC)
 * Well, found the script, but it contains errors...

code-snippet as of line 82:

printf( "%s: %6.2f%% done on %s; ETA %s [%d/%d] %.2f/sec <%.2f%% updated>\n",                       wfTimestamp( TS_DB, intval( $now ) ),                        $portion * 100.0,                        $this->table,                        wfTimestamp( TS_DB, intval( $eta ) ),                        $completed,   // $completed does not appear to be defined.                        $this->count,                        $rate,        // $rate does not appear to be defined.                        $updateRate * 100.0 ); flush; }

The comments state that 2 variables ($completed and $rate) are not defined, and that's the case.. Theo s 11:55, 24 December 2007 (UTC)

Anybody any suggestions please...?? Theo s 11:11, 27 December 2007 (UTC)


 * Unzip the rebuildimages script from the .zip file of MediaWiki and put it in its respective folder. -PatPeter, MediaWiki Support Team  23:30, 2 January 2008 (UTC)
 * Well, that's what I did before... See the code-snippet above. Output from the script:

test1-wiki 2008-01-04 22:29:49: Processing image... PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 14.81% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 29.63% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 44.44% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 59.26% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 74.07% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> PHP Notice: Undefined variable: completed in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 87 PHP Notice: Undefined variable: rate in /var/www/vhosts/www.test.arbace.nl/HTML/arbace/maintenance/rebuildImages.php on line 89 2008-01-04 22:29:49: 88.89% done on image; ETA 2008-01-04 22:29:49 [0/675] 0.00/sec <0.00% updated> test1-wiki 2008-01-04 22:29:49: Finished image... 0 of 675 rows updated test1-wiki 2008-01-04 22:29:49: Processing oldimage... test1-wiki 2008-01-04 22:29:49: Finished oldimage... 0 of 1 rows updated

Thanks in advance for any help. Theo s 22:32, 4 January 2008 (UTC)


 * Bump. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  18:27, 10 January 2008 (UTC)


 * Are you still having this problem? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  19:15, 13 January 2008 (UTC)


 * Unfortunately yes, I do. I tried uploading existing images again, and even tried to upload converted images (from GIF to JPG or the other way around)... nothing seems to help... :( Theo s 21:53, 16 January 2008 (UTC)


 * What does your  read? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  00:26, 17 January 2008 (UTC)

$ cat LocalSettings.php | grep -i wgfileextensions $wgFileExtensions = array( 'gif', 'png', 'jpg', 'jpeg', 'ogg', 'rtf', 'doc', 'xls', 'ppt', 'pdf', 'zip', 'wzmul' );
 * Thanks, Theo s 10:57, 17 January 2008 (UTC)


 * Where did the

$ cat LocalSettings.php | grep -i wgfileextensions come from? I haven't seen that before, also try changing your file extensions to: $wgFileExtensions = array('jpg','png','ogg','gif','jpeg','rtf','doc','xls','ppt','pdf','zip','wzmul'); Also may I ask are you able to upload your .zip files? I am trying to upload similar files on. -PatPeter,  MediaWiki Support Team  15:41, 18 January 2008 (UTC)


 * The "cat" command is used on our Linux server to display the content of the LocalSettings.php file, grep -i to filter only the wgfileextensions setting. I accidently included the command when I posted my message, the cat is not in de LocalSettings.php file...
 * I will change the $wgFileExtensions setting according to your advice, but don't see much difference... I will post any change in behaviour here after I'm done.
 * Yes, I can upload .zip files, no problem... I will take a look at your trouble there.
 * thanks again, Theo s 12:22, 22 January 2008 (UTC)
 * update: changed to $wgFileExtensions but that makes no difference at all... :( Theo s 12:33, 22 January 2008 (UTC)

Bump... anybody? Theo s 14:30, 30 January 2008 (UTC)

Another bump... anybody any idea in how to approach this? Thanks! Theo s 14:11, 21 February 2008 (UTC)

How to upload Large Files?
hi,

How to enable large file uploads? i had put '''$wgMaxUploadSize = 1024*1024*500; $wgUploadSizeWarning = false; and this one is too $wgCheckFileExtensions = false; not making any change !! plz mail me to likhin@gmail.com any valuable helps will be appreciated.


 * You will also need to change some configuration in the php.ini file, specifically the upload_max_filesize option. See File Uploads Configuration Options. If you don't have access to this file, you will probably have to contact your webhost provider. — color probe (talk | contribs | [[Image:Tournesol.png|20px]]Support team) 18:51, 1 February 2008 (UTC)


 * What folder is php.ini in? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  23:06, 1 February 2008 (UTC)


 * This problem is similar to mine . -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  22:04, 2 February 2008 (UTC)

Image upload problem

 * MediaWiki: 1.11.1
 * PHP: 5.2.3 (cgi)
 * MySQL: 4.1.22
 * URL: http://www.qedoc.org/en/index.php?title=Special:Upload (no longer shows problem due to work-around)

--McCormack 14:52, 7 February 2008 (UTC)
 * Additional info: User:McCormack/Upload problem
 * Attempts to upload any image of any format produce the system message: Warning: fopen(/var/tmp/phpepykKu) [function.fopen]: failed to open stream: No such file or directory in /usr/home/[account_name]/www/htdocs/en/includes/MacBinary.php on line 46 + 3 further ones.
 * Actually this line probably isn't the main problem itself, as the macbinary check is optional, but the fopen's are failing everywhere else as well.
 * Playing around with LocalSettings.php can produce more errors if required. If the upload form is checked to ignore warnings, the file actually uploads and is placed in the /images/... dirctory structure, but it cannot be displayed using the [[Image:...]] tag, so this is not a viable workaround.
 * Prior to this, I upgraded from MediaWiki 1.6 to 1.11. Installation went fine, and there are no signs of any other problems - e.g. page creation, movement, file deletion, logins, etc all work fine. Images uploaded fine before the upgrade. On Mediawiki installations on the same server which are still at 1.6, the file uploads still work fine. All images previously uploaded (before the upgrade) work fine with the new MediaWiki installation.
 * Set just about every directory permission in sight to 777. However directory permissions are unlikely to be the problem, because a MediaWiki 1.6 installation is still successfully using the same upload directory (e.g. (/var/tmp/phpepykKu).
 * Jiggled every available flag for LocalSettings.php
 * Trawled through php.ini and ensured that everything is as it should be. Safe mode is off; open_basedir has no value; allow_url_fopen is enabled.
 * Put debugging code into SpecialUpload.php and verified that Mediawiki 1.6 (working) was using the same upload directory as Mediawiki 1.11 (not working). The only difference between the two installations is that 1.6 is using PHP4 and 1.11 is using PHP5 (both on the same server). 1.11 uses an .htaccess entry to send php files to the php5 parser.
 * Trawled through this site and googled for anything even resembling a similar problem - all with no success.


 * Eventually I found a cludge (changed a couple of lines in SpecialUpload.php) which enabled new file uploads under all conditions and re-uploads if warnings deactivated. I wouldn't exactly call this a wonderful resolution, but it seems to work. --McCormack 11:12, 9 February 2008 (UTC)


 * ...so what lines did you change McCormack? Your post is somewhat pointless, you said you have a solution and didn't give it :P -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  01:11, 15 February 2008 (UTC)


 * The point of my 2nd post was to spare any helpful support guy from overexerting themselves on my behalf ;-) The first post is probably worth leaving for the record, as I recreated this problem on two different servers and it might actually affect someone else. Anyway, the details of the cludge: I found that pretty well every PHP f???? method was failing for want of permissions (which was illogical, as the permissions were OK), but the good old move_uploaded_file method still worked. So I did the obvious and moved the file to a new temporary location where the f???? methods started working again. I've little idea why it worked, but it worked excellently. --McCormack 18:59, 16 February 2008 (UTC)


 * Sounds a bit like my problem, which is why I was seeking your solution, could you put the lines you changed in pre tags? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  20:22, 16 February 2008 (UTC)


 * Thanks for your reply. I read a couple of times during my debugging, and I don't think it was the same problem. At least, not the same symptoms. Perhaps a related cause. I added the lines below to SpecialUpload.php, but not in the same place as an expert would, because my stashing still doesn't work (not that it needs to). --McCormack 15:53, 17 February 2008 (UTC)

Uploading Large Files

 * MediaWiki: 1.11.0
 * PHP: 5.2.4 (cgi)
 * MySQL: 5.0.45-log
 * URL: http://lolslayer.com/mediawiki-1.6.10/index.php5?title=Main_Page

I keep trying to upload large files and it keeps timing out. How do I fix this?

MediaWiki- 1.11 (The URL says 1.6 because I don't know how to move the wiki into the main folder and prevent it rom messing up. If you can help me with this too I'd appreciate it)

Link- http://lolslayer.com/mediawiki-1.6.10/index.php5?title=Main_Page

-157.89.75.237 17:45, 30 January 2008 (UTC)


 * I also have a new problem. I get a "Fatal error: Out of memory (allocated 38273024) (tried to allocate 3652 bytes) in /homepages/35/d215937493/htdocs/lolslayer/mediawiki-1.6.10/includes/media/Bitmap.php5 on line 168" message when I try to visit http://lolslayer.com/mediawiki-1.6.10/index.php5?title=Special:Newimages . Any help on this too?


 * 157.89.75.237 09:59, 1 February 2008 (UTC)

pdf woes

 * MediaWiki: 1.11.0
 * PHP: 5.2.5
 * MySQL: 5.0.45
 * URL: Internal only

I don't have an error; just a problem. Actually, 2 problems. Here's the scenario: I have ~1000 pdf manuals I would like searchable and indexed into my wiki. I have searched though every extension that I could find. Most of the extensions about pdfs are for creating pdfs out of wiki pages. Any help would be appreciated! Thanks!
 * 1) How do I transfer files to a wiki without doing them 1 at a time? I tried just putting 1 into the images dir but it looks like they need a DB entry as well.
 * 2) How do I make pdf files searchable on my wiki? I would love to do it as google has; click here for the file or click here to see it in html format.

—BruceWayne 16:54, 24 January 2008 (UTC)


 * There's the importImages.php maintenance script, but that's just bare-bones, and uploading them as files won't index the text contents as far as I'm aware. Tuvok[Talk/en.wp] 08:28, 26 January 2008 (UTC)

That looks like it will import the pdfs. I'll have to go through the php and see if I can make it recursive. I think there's a couple hundred folders. How's about making them search-able? Forgot to sign my last comment.. Doh! —bruceWayne 14:22, 30 January 2008 (UTC)

How can I upload file with Microsoft Office files such as Word, Excel, Powerpoint etc.

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

Is there any plug-in software that can support uploading of Microsoft Office files?

Please respond to email james.lo@bossini.com

James Lo

—218.189.153.158 09:20, 28 February 2008 (UTC)

Uploaded Files with "Umlauts" won't be found
My Wiki runs in German.

Whenever I upload a file that contains an umlaut in its filename, "schäden.png" for instance, the file will be upload under "sch#%&den.png" (something like that). Renaming that file by hand to "schäden.png" makes it be found again.

How can I get those umlauts to be kept within the filenames?

I just can't find any solutions here.

Thanks a lot!

--195.200.70.22 08:33, 24 January 2008 (UTC)


 * Are you still having this problem? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  23:43, 20 February 2008 (UTC)


 * Yes. I wonder if it has to do with Windows? Since my first entry, I have one Wiki set up on Win XP, one Wiki on Win 2000 and one Wiki set up under Mac OSX. All in German. All set up from scratch. All with their own resources and extensions. While I have no problem at all with uploading files with German umlauts under Mac OSX, it won't work -- as described -- under Win XP and Win 2000.  Same Browsers used under those systems (Firefox, Safari, Opera, IE7 on Windows). I use WOSportable on Windows and MAMP on OSX. Or is it WOSportable? --84.145.122.49 15:36, 21 February 2008 (UTC)


 * I think you have to upload them in unicode format. Is your wiki set in German language code? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  20:45, 27 February 2008 (UTC)

Uploading .doc .xls .xlt .ppt .pps .pdf files

 * MediaWiki: 1.11.1
 * PHP: 5.2.5
 * MySQL: 5.0.24

Hi,

I've seen a couple of threads on here about uploading different file formats but none of them seem to be answered (please correct me if i'm wrong).

Basically i need want to upload different files to my internal wiki site. how do i go about doing this? Is it as simple as changing the file extensions in LocalSettings.php?

Any input greatly appreciated.

Regards,

—62.49.155.133 16:49, 3 March 2008 (UTC)

Uploading new version of existing file

 * MediaWiki: 1.11.2
 * PHP: 5.2.4 (isapi)
 * MySQL: 5.0.18-nt
 * URL: (internal company site)

Additional Information: Win Server 2003 with IIS

We recently upgraded from MediaWiki 1.5.6. Now, when trying to upload a new version of a file which already existed, we receive the following error: Internal error Could not rename file "public/1/1e/filename.xls" to "public/archive/1/1e/20080306141550!filename.xls".

Do you have any clue what might be causing this?

—Jenn 14:41, 6 March 2008 (UTC)

In addition, I tried deleting this file and received the following message: Errors were encountered while deleting the file:

Could not rename file "public/1/1e/filename.xls" to "deleted/e/a/e/eaes7fu6npxr7fl0xd2b2tre9zzsbig.xls". Could not rename file "public/archive/1/1e/20080225135004!filename.xls" to "deleted/d/2/y/d2y2u8bns3pg5tgmqc6d53p7lm473jd.xls".

It also said that the deletion was successful. I tried uploading the file again and received the same internal error as before.

---Jenn 19:11, 6 March 2008 (UTC)

Upload not properly working with lighttpd/fast-cgi

 * MediaWiki: 1.11.1
 * PHP: 5.1.2 (cgi-fcgi)
 * MySQL: 5.0.26
 * URL: [Installed on a local network]

When I am trying to upload a file on Special:Upload I get the error message "This file is bigger than the server is configured to allow.", but only for files bigger than 5K! I am using the default (upload) settings, both for Mediawiki and PHP. A strange thing is, that a phpinfo-dump reports different values for upload_max_size than configured in my php.ini

When I am echoing the file's size (echo $_FILES['wpUploadFile']['size']), I get a "0" for those files bigger than 5K...

Any help is appreciated! Thanks in advance.

—62.220.4.250 15:20, 6 March 2008 (UTC)