Project:Support desk/Sections/Images

__NEWSECTIONLINK__ = Image Support =

Background image on pages?
I'm designing a page layout template for members of a wiki I admin to use for their user page and other pages that they create. I'd like to be able to use an image for backgrounds in this template. How can I accomplish this?


 * What versions of MediaWiki, PHP, etc. are you running along with a URL of your wiki? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:06, 12 January 2008 (UTC)

Thank you! Let's see. This is needed for two separate wiki's really. The first is as follows: MediaWiki version: 1.6.8 PHP version: 	5.2.4 MySQL version: 	5.0.45-community URL: http://evolution-rpg.com/wiki/index.php/Main_Page The second is as follows: MediaWiki version: 1.11.0 PHP version: 	5.2.5 MySQL version: 	5.0.45-community URL: http://sharnyl.net/wiki/index.php/Main_Page

75.167.211.181 13:41, 11 February 2008 (UTC)


 * You would have to upload the image to your wiki whether it be manually (using FileZilla or whatnot), or using the upload function. Then you would have to write out the code as to where the image is supposed to go in for instance MediaWiki:Monobook.css, if that is what you want to guide off of. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  15:29, 15 January 2008 (UTC)

I guess I should rephrase the question as this: How can I tell the wiki to accept the html coding for using an image for a background that the text would be placed on? Example coding:  75.167.211.181 13:41, 11 February 2008 (UTC)


 * Please sign your posts with ~ . As for the body tags I don't know I will leave this to another member of MST. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  18:15, 16 January 2008 (UTC)


 * I hope this is solved too because I really want to do this too. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  00:39, 17 January 2008 (UTC)

Me too! I'm anxious to be able to do this ^_^ 75.167.199.197 01:27, 18 January 2008 (UTC)

Just curious if there's a step closer to resolving this? 75.167.199.197 18:10, 30 January 2008 (UTC)


 * Extension:RawMsg allows you to add HTML code to pages as does Extension:HTMLets --Chris  08:17, 22 February 2008 (UTC)

Thanks. That should work for other types of coding I'd like to be able to do using html, but when I tried both for having an image as a page's background that the text would be placed on top of, it didn't work 75.167.200.148 12:22, 24 February 2008 (UTC)

Is there any update to this? 75.167.205.251 03:25, 8 April 2008 (UTC)

Thumbnails Not Working
I get an error for thumbnails: "Error creating thumbnail: sh: convert: command not found". My LocalSettings.php includes the line '$wgImageMagickConvertCommand = "/usr/local/bin/convert";' and this is the correct path for the convert executable. And it has execute privileges for all users. Any idea what could be wrong? (Reinstalling ImageMagick did not help either.)—99.236.141.81 04:16, 4 December 2007 (UTC)


 * Hi, I encountered the same problems like you before. Are you using a webhost to host your site? If so, this thing requires your webhost to do something as it involves some server security features. &mdash; PM Poon 12:26, 4 December 2007 (UTC)


 * No, I am not using a webhost. I'm using MediaWiki 1.11, Apache 2, PHP 5, and MySQL 5. —99.236.141.81 19:17, 4 December 2007 (UTC)


 * Perhaps I should have mentioned that the files involved were SVG files. —99.236.141.81 19:28, 4 December 2007 (UTC)


 * Try setting $wgSVGConverterPath to /usr/local/bin --Nad 20:25, 4 December 2007 (UTC)


 * Well, it works now. Thanks! —99.236.141.81 21:48, 4 December 2007 (UTC)

I had this same problem before I upgraded to 11, I haven't uploaded any images yet, I am still trying to restore my database. PatPeter 01:56, 8 December 2007 (UTC)

I have a problem that is like this: Error message: Error creating thumbnail: The system cannot find the path specified. I have a line in my Localsettings.php: $wgImageMagickConvertCommand = "/usr/bin/convert", but in that folder there are no commands, just files like svnstat and ulimit*. What command do I need to convert? How can I solve this problem? -194.138.26.89 11:52, 10 December 2007 (UTC)

Yes when I try to upload a file it asks me if I want to open or save, how can I fix this? I am using Mozilla Firefox. -PatPeter 02:33, 16 December 2007 (UTC)


 * Look here: Image. -PatPeter, MediaWiki Support Team
 * Do you have a recent version of ImageMagick installed? find where it's put the convert command and set $wgImageMagickConvertCommand to its full pathname. --Nad 05:48, 4 January 2008 (UTC)


 * I have this for my image settings in LocalSettings.php:

$wgEnableUploads		= true;
 * 1) To enable image uploads, make sure the 'images' directory
 * 2) is writable, then set this to true:

$wgUseImageResize		= true; $wgUseImageMagick      = true; $wgImageMagickConvertCommand = "/usr/bin/convert";

How do I find the full URL? -PatPeter, MediaWiki Support Team  05:20, 6 January 2008 (UTC)
 * Not sure if this was addressed, but  from the command line should give you the correct path to convert for your OS if it (and which) is installed --Zven 08:06, 6 January 2008 (UTC)


 * So where can I find "which convert"? -PatPeter, MediaWiki Support Team  23:02, 6 January 2008 (UTC)


 * You don't find it, just type which convert in to your shell and it will tell you the full pathname of the convert utility which you should then set your $wgImageMagickConvertCommand to (or create a symlink to it in /usr/bin since that's the normal location for it). If it doesn't find any, then you shuld install ImageMagick or set $wgUseImageMagick to false so it uses PHP's GD lib instead --Nad 23:18, 6 January 2008 (UTC)


 * Forgive me for being a noob, but where can I type it, like where is the shell? -PatPeter, MediaWiki Support Team  04:04, 7 January 2008 (UTC)


 * The shell is just the command line of the computer your wiki is running on, if you've never accessed the shell, then I guess you must be running your wiki on a shared web host who offer restricted access to the system in which case you'll need to ask them whether they have ImageMagick installed and where it is located etc. --Nad 04:41, 7 January 2008 (UTC)


 * I have full access to the database along with the image files, the includes, extensions, LocalSettings.php, etc. but I don't have access to the computer the Wiki is running on, correct. In /usr/bin is the default location for that, do you mean that those are folders on the computer server? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  22:17, 9 January 2008 (UTC)
 * Secure Shell would be useful to give you a Shell console. Then you can check if the file convert is in the filesystem path by typing  in the console--Zven 03:57, 16 January 2008 (UTC)


 * Any particular client you would suggest? FileZilla is listed here, but I don't think that is SSH... the wikipedia page is somewhat confusing. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  18:22, 16 January 2008 (UTC)
 * Looks like your on a windows machine connecting to a *unix server. Putty will do the job. All those applications are using the SSL protocol, some provide secure copy functionality, some provide an interactive SSH window console. One that does both is best. --Zven 19:36, 16 January 2008 (UTC)
 * So I downloaded Putty, what information do I put in to access the database? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:31, 15 February 2008 (UTC)

Images not appearing as thumbnails

 * MediaWiki: 1.11.0
 * PHP: 5.0.5 (cgi)
 * MySQL: 5.0.45-community-log
 * Database: Not sure

I'm having problems getting certain images to appear as thumbnails, when using both the Image:Name.jpg|thumb feature and the gallery tag. While some images will look fine, others will simply display as the alternate text in articles and an empty box in the gallery.

From what I can tell, there doesn't seem to be any predictable pattern to guess which images will do this. All are JPGs, but other JPGs have worked fine. Size does not appear to make a difference. All read the MIME type as "image/jpeg", but others with the same MIME type have worked out okay. The closest thing I could find in the FAQ was this, but it doesn't appear to be the same thing. I could ask an administrator at my web host to run the rebuildImages.php script, I suppose, but I wanted to ask here first. Besides, The software hasn't been updated recently as far as I know, and the problem is happening on images uploaded just now... and I'd rather not have to ask them to run the script every time I add some new stuff.

Thanks in advance for the help. I appreciate it.

—66.68.143.7 12:33, 18 January 2008 (UTC)

Thumbnailing doesn't work

 * MediaWiki: 1.11.1
 * PHP: 5.2
 * MySQL: 5.0.41
 * URL: http://ymca-ca.tym.cz

Hi! My problem is with thumgnailing. Just reported articles are not about my problem,so I'm typing new article.

When I Upload a file I'm emediatly redirect to the main page. The file is uploaded on server, but there is no thumbnail of it. So if I click on its name,I'm always redirect to the main page. All the settings I tried, I think there is all right. Do you know, what it could be? Thanks

—Finalgrab 15:55, 17 February 2008 (UTC)

Thumbnail Conversion not working

 * MediaWiki: 1.11.1
 * PHP: 5.2.5 (cgi-fcgi)
 * MySQL: 5.0.45-log

I so far haven't seen my exact problem here, but it's in the same category. Here goes.

When a file is uploaded that needs to be thumbnailed, the thumbnail itself doesn't work. If the image is below the threshold, it will display fine. What happens on a full-size image is it simply shows a grey box with "Error creating thumbnail: /usr/bin/convert: Unrecognized option (-thumbnail)." inside it. Whenyou open the full0sized option, it works fine. Here's our guinea pig picture:. All other files have been resized to work for now. Thank you. —75.70.77.232 03:50, 11 June 2008 (UTC)

THUMBNAIL WORKAROUND FOR SOLARIS

The workaround for Solaris is to install another version of imagemagick. Instead of using the convert program found in /usr/sfw/bin/convert that lacks the -thumbnail option you will need to install a new version.

Go to http://www.sunfreeware.com/ and click on your version of Solaris. In my case it was Solaris 10 Sparc. Then click on the ImageMagick link on the right hand side. In my case it was http://www.sunfreeware.com/programlistsparc10.html#imagemagick. The program has alot of dependencies. Download all of the dependency packages & the imagemagick program itself. Then unzip each package and add them to your system using pkgadd -d package name. Once you have added all of the dependency packages and the imagemagick package you will need to edit your LocalSettings.php file. Change the line $wgImageMagickConvertCommand = "/usr/sfw/bin/convert"; or $wgImageMagickConvertCommand = "/usr/bin/convert";

to $wgImageMagickConvertCommand = "/usr/local/bin/convert";

Enjoy your thumbnails.

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)


 * I am getting the exact same error! McCormack, are you able to tell me exactly where in SpecialUpload.php I need to insert those lines?  Also, do I need to change anything or can I simply copy and paste that text exactly as is?  In case you couldn't tell, I'm a bit of a PHP novice!  Cheers mate! -- Stanbridge 13:15, 21 April 2008 (GMT+10:00)

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)

Image for section edit links from within MediaWiki (no extension)

 * MediaWiki: 1.11.0
 * PHP: 5.2.4 (apache2handler)
 * MySQL: 5.0.45-community-nt
 * Database: Er... Is this not the same as MySQL?
 * URL: Home intranet. You can try http://gateway-86558bc/wiki/, but I don't think it'll work. :D

I have a question about using an image or imagemap for the edit links. Can I do that without hacking together an extension? I tried putting an image in MediaWiki:Editsection and it showed up as instead of an image. Am I trying to do the impossible? Tuvok[Talk/en.wp] 19:50, 4 January 2008 (UTC)
 * If you have image hotlinking enabled (aka $wgAllowExternalImages is true), try putting the full url of the image in the page and see if that works. If not, there IS an extension available that does this, just can't remember what it's called and I'm too lazy atm to search for it :) --Skizzerz talk 21:30, 4 January 2008 (UTC)
 * Good idea on the $wgAllowExternalImages thing, but it didn't work. I'll go search for the extension, I guess. Thanks! Tuvok[Talk/en.wp] 22:11, 4 January 2008 (UTC)
 * Found it; the extension is Edit Section Link Transform. Tuvok[Talk/en.wp] 22:14, 4 January 2008 (UTC)
 * The EditSectionLink hook was introduced in MW1.11 which allows you to change the URL that it links to. Also, there's a system message called editsection-brackets which allows you to customise the format of the edit links further to make them into images etc. The final result is wrapped in a span with class attribute set to "editsection" so that further CSS styles can be applied. Using the official hooks is more efficient than Edit Section Link Transform which does regular expression replacement of the rendered page content. --Nad 22:14, 5 January 2008 (UTC)
 * Ah, thanks, Nad! I'll have to look into the documentation for that hook and see if I can't write my own extension to fuss with the links. Regex replacements are a little bit of overkill, and I notice it has [square brackets] hard-coded into the regex. Hmm... *Goes off to think * Tuvok[Talk/en.wp] 00:42, 6 January 2008 (UTC)

Images are not readable in browser after upload

 * MediaWiki: 1.11.0
 * PHP: 5.2.5 (cgi)
 * MySQL: 5.0.45-Max
 * URL: Klick

The Problem: I can upload images without any problems and can show them without scaling. Images will be also generate for thumbnails in /thumb//..., but the rights/permissions of these images are set to 640, not readable for browsers. I must set the rights to 644 with a ftp-client, e.g. Filezilla, then the images are visible. What can I do? I'm baffled...

—Dbt 18:25, 27 February 2008 (UTC)

escapeshellarg etc.

 * MediaWiki: 1.9.3
 * PHP: 5.2.4 (apache)
 * MySQL: 4.0.23-standard-log
 * URL: thephantom.frih.net/wiki

sorry for my poor english

i want to make thumbnails but this error appear when I tried

in my localsetings.php:

—189.30.112.38 03:05, 28 February 2008 (UTC)

How do I purge the cache for hundreds of images?
I am upgrading to mediawiki 1.11.1 I ran in to a problem the problem with a new version of PHP that could not properly determine the Mime type for png files, so png images would not display properly. Instead I would just see the image name. I fixed the problem in the magic file (magic.mime for some) by simply adding the mime type for png. (it was missing)

Almost there, but when I go to any page like "Image:foo.png" the image is not displaying and is still reading as Mime type "plain/text". If I purge the individual page cache then voila my image is restored and the mime type shows "image/png". victory... ummm for one image...

However I have hundreds of png images! yikes. How can I force all the image pages to purge/refresh. I have tried many techniques nothing seems to work. It tried setting $wgCacheEpoch set to the current date, (and $wgThumbnailEpoch) I have tried the maintenance scripts refreshlinks.php and rebuildImages.php. I even tried the SQL command TRUNCATE TABLE objectcache; in the MySQL database. How the heck do I do this? Any help anyone can give would be greatly appreciated. --Maxelrod 22:46, 12 March 2008 (UTC)

Image template editing

 * MediaWiki: 1.11.1
 * PHP: 5.2.3 (cgi-fcgi)
 * MySQL: 5.0.24a-standard-log
 * URL: http://www.sourcefortsmod.com/wiki - Note, this wiki is being constructed and having templates made up ATM and is passworded until this is complete. It is a manual rebuild of an old wiki from a different package.

Hi,I am helping in the rebuild of a Wiki. The wiki is integrated into the look and feel of the main site. All the templates and so forth follow a theme. I have noticed that the default image thumbnail does not fit with our style. (This can be seen here: http://img246.imageshack.us/img246/4343/examplekf3.jpg )

My question is this: How can I edit the look of the image thumb template? What files do I need to change and where are they located?

Many thanks!

mc_nebula —86.4.135.223 12:02, 21 March 2008 (UTC)

Broken redirect in image namespace

 * MediaWiki: 1.12.0
 * PHP: 5.2.0-8+etch10 (apache2handler)
 * MySQL: 5.0.32-Debian_7etch5-log
 * URL: here or here

Hi, it seems that the redirect system is broken on image page. When a #REDIRECT is put in a image page, it doesn't forward to the specified link... but it works correctly in the others namespaces.

Any idea ? Is it related with the revision r29858? ("* Support redirects in image namespace, Now doesn't require schema change)", I don't know what he wants to say with "Support redirects in image namespace", because redirects in image namespace worked before...)

—83.203.10.57 09:15, 23 March 2008 (UTC)
 * As someone with little strictly technical understanding of the software, but someone with fairly intimate knowledge of the general software functionality, I'd guess that it's because the image is actually an uploaded file. Perhaps if the file was deleted, and the same pagename was redirected to the new, desired image name where the file could be re-uploaded, things would end up working. -- Anon  Diss  10:17, 23 March 2008 (UTC)

Logo
The discription on Manual:LocalSettings.phpis not correct. Is it possible tot give me a simple way to change the logo ? Great thanks

—Spiriwiki.com 13:11, 26 March 2008 (UTC)

Resizing down not working; error being given

 * MediaWiki: 1.11.
 * PHP: 5.2.5 (cgi-fcgi)
 * MySQL: 5.0.45-community
 * URL: http://hive.rhinocap.net/wiki/

I know that images can be resized by just adding what width you want after the image link. However, for whatever reason, I can only size up images. For example, I have an 80px image -- if I size it up to 100px, it works fine. However, if I resize it down even one pixel -- to 79px -- I get this error message on the top of the screen. Warning: escapeshellarg has been disabled for security reasons in /home2/flulvhbn/public_html/hive/wiki/includes/GlobalFunctions.php on line 1061 Warning: escapeshellarg has been disabled for security reasons in /home2/flulvhbn/public_html/hive/wiki/includes/GlobalFunctions.php on line 1061 Warning: escapeshellarg has been disabled for security reasons in /home2/flulvhbn/public_html/hive/wiki/includes/GlobalFunctions.php on line 1061 Warning: escapeshellarg has been disabled for security reasons in /home2/flulvhbn/public_html/hive/wiki/includes/GlobalFunctions.php on line 1061 Warning: exec has been disabled for security reasons in /home2/flulvhbn/public_html/hive/wiki/includes/GlobalFunctions.php on line 1812

I've checked all my settings, and resizing is set to "true" (even though it's supposed to be automatically). I've even checked my MimeMagic file and the GlobalFunctions file on the lines mentioned (though, all I get is the functions that the wiki is suppressing for whatever reason).

Is there any way I can get images to actually size down? I've checked the Sandbox and know it's a problem with just my wiki, rather than with MediaWiki itself, but I haven't been able to find the problem.

—76.26.130.23 23:14, 29 March 2008 (UTC)


 * I had a similar problem (with almost the same error massage, although it appeared instead of the images in the images frames) and in my case it turned out to be related to my settings in localsettings.php. For SVG-Images I had inserted the following lines, which seemed to mix up my whole thumbnailing process after my last upgrade of MW:

$wgSVGConverters = array(   'ImageMagick' => '"/usr/bin/convert" -background white -geometry $width $input $output', );

$wgSVGConverter = 'ImageMagick';


 * after deleting them things worked fine again. Only SVG-Images don't display anymore, but they were never rendered properly ba ImageMagick anyways... so its not such a big loss. Hope that helps. My best, --Gollum 09:22, 5 September 2008 (UTC)

Gallery and ParserAfterTidy Hook

 * MediaWiki: 1.9.6
 * PHP: 5.2.3 (apache2handler)
 * MySQL: 5.0.18
 * URL:

Is there a good reason, why every image caption text in a gallery goes thru a full parse and calls the ParserAfterTidy hook individually? Is there any way to avoid this or to detect (within the hook) that it is being called on behalf of the gallery (instead of the main content)?

—WsW 05:34, 8 April 2008 (UTC)

How do I disable Saving of deleted image in mediawiki 1.11 and higher?

 * MediaWiki: 1.12.0
 * PHP5
 * MySQL v5.xx

This feature is totally useless to me and I need to kill it. --Yakushi.kabuto 10:51, 8 April 2008 (UTC)
 * What about letting $wgFileStore point to /dev/null ? --Flominator 06:17, 15 April 2008 (UTC)


 * I have got the same "problem", and setting

$wgFileStore['deleted']['directory'] = null;
 * in LocalSettings.php does not have any effect with my 1.12.0 wiki: files can still be restored and so are saved meanwhile in the deleted directory ... Or how do I have to set this variable? -- 89.55.189.253 09:54, 22 June 2008 (UTC)

Browser unable to access wiki after viewing newly-resized image

 * MediaWiki: 1.10.2
 * PHP: 5.2.4 (apache2handler)
 * MySQL:5.0.45-community-nt
 * URL: [intranet]

Whenever I look at a wiki page that requires an image to be newly resized, it seems to lock-up access to the wiki from that browser.

e.g.:
 * 1) Upload an image
 * 2) Image is uploaded OK. Browser is redirected to a page containing the image, which never gets displayed ("waiting for response from [server]")

alternately:
 * 1) Use an existing image in a new size
 * 2) Preview or save.  Browser never loads the page containing the new image  ("waiting for response from [server]")

Whenever this happens, no further pages can be viewed from that wiki. Closing and restarting the browser allows things to work normally again, with no changes made to the server.

ImageMagick is used on server: $wgEnableUploads      = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-6.3.7-Q16\convert.exe";

Many cmd.exe process are visible on the server's task manager after this occurs a few times.

Upgrading server software is likely to be difficult for us, so hints that don't require new mediawiki would be helpful.

80.177.58.133 11:17, 15 April 2008 (UTC)

Unable to delete images, could not create folder deleted/d/a/h

 * MediaWiki: 1.12
 * PHP: 5.2.2
 * MySQL: 4.1.21
 * URL: http://www.galacticempire.se/testwiki/

Hello. I have this problem where I am unable to remove images uploaded to the wiki. It says, in Swedish, something as that it was unable to create a folder /deleted/d/a/h/. I have checked and in the FTP there actually are these folders. I am not able to change their permissions and cannot find any .htaccess-files or anything supposedly preventing me from this, but the folders are there allright.

—81.228.213.21 18:36, 16 April 2008 (UTC)


 * The directories in question need to be writable by the webserver; their permissions probably need to be 755 or 777. —Emufarmers(T 01:47, 17 April 2008 (UTC)


 * I've tried to change, but it says "Unable to change permission, file has different UID (398)" 81.228.213.21 14:46, 17 April 2008 (UTC)

Problem displaying image in a browser
Hi

I am trying to display image in a map view (bubble). It display image in a first stage, but it doesn't display image in a second stage.

Please could some one help me.

Many thank

HTML File 

Data File JSON {	"Element" :          "FSDU 48 Board B1", "Film" :             "The Simpsons", "Classification" :   "Retail", "Stage+Name" :       "Artwork-Local", "Google+Ref" :       "55.378051, -3.435973", "Status" :           "Started (ArtLoc)", "type" :             "Item", "Job+Number" :       "520565", "label" :            "The Simpsons", "Country" :          "UK", "Date+Last+Updated" : "May 17 2004 12:00AM", "year" : "2007-05-17", "imageURL" : "http://nobelprize.org/nobel_prizes/physics/laureates/1998/stormer_thumb.jpg" }, {	"Element" :          "Poster", "Film" :             "Starsky & Hutch", "Classification" :   "Retail", "Stage+Name" :       "Artwork-Local", "Google+Ref" :       "34.462425, -89.147104", "Status" :           "Cancelled (ArtLoc)", "type" :             "Item", "Job+Number" :       "516303", "label" :            "Starsky & Hutch", "Country" :          "Scandinavia", "Date+Last+Updated" : "May 13 2004 12:00AM", "year" : "2004-5-13", "imageURL" : "http://image.olas.net/image?assetId=3AD541ED-26AB-4D47-B5E2-101995447A71&action=dbBinary" }

Upgrade from 1.4 to 1.11; no images displayed

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

I'm upgrading from mediawiki 1.4 to 1.11. At the same time I'm moving from a linux machine to a windows machine. I can't really do the upgrade on the linux machine. In order to do this I had to do an iconv on the linux machine first and copy the database directly from the linux machine to the windows machine. I fixed a bug in "FiveUpgrade" (it wasn't passing the $filename parameter in line 716), ran upgrade1_5, ran update, and repaired the mw_objectcache table, which had become corrupted. For whatever reason mediawiki can't figure out where the images are for thumbnails or inline images. If I add a new image it works fine. But for an old image, if I click on an image link, then on the link of the image page, that link shows the image. But no inlining and no thumbnail. Any ideas?

The best idea I have is to write a script that will look at each page, find the image name, find that image in the file, remove it from the database, and readd it to the database. Is there a script that will do this for me? If not, what sections of the API should I be looking at to figure out how to do this?

The alternative is for me to reupload all 180 images by hand. But I would still need to figure out which page each image is on, which will be painful.

Help?

OK, I understand the imagelinks table better. It relates each image to the page it's on. Still, I can't understand why images aren't being displayed. I did notice that a lot of the information in the image table is absent from the 1.4 version of the table, and is set to 0 or unknown in the new table (such as height and width). Could this be why? I edited these manually for one image, and it still doesn't display. How does media wiki find the image in the file anyway?

Thanks Matt Brown —64.128.200.78 00:12, 14 May 2008 (UTC)

Thumbnails Not Updating

 * MediaWiki: 1.12.0
 * PHP: 5.2.5
 * MySQL: 5.0.45

I have two separate wikis running on a windows xp machine. On one, if you upload a new version of an image file, and a page contains a thumbnail of the image, the thumbnail will not update (I have tried clearing my browser cache, etc., and waiting for weeks, etc., but it never updates).

On the other, it works fine: if you update a new version of the image file, the thumbnail is updated right away when you load the page.

The only difference between the two wikis in the LocalSettings.php file appears to be as follows:

In the wiki where the thumbnails update, this line is commented out:
 * 1) $wgHashedUploadDirectory = false;

whereas in the wiki where the thumbnails do not update, it instead has the line: $wgHashedUploadDirectory = false;

There's a comment above the line, but I believe I have followed it: I have the necessary directories, and they seem to all be writable.

I'm not really sure what the line does, and couldn't find a clear explanation of it, other than the obvious thing that it puts the images in a different folder setup. I do not guarantee it is the responsible party, but it is the only difference that I can see between the two setting files. I don't want to comment it out on the not-working wiki because my understanding is I would have to re-upload every image file if I did so.

I use ImageMagick for my image management. Thanks for your help.

—Crlamb 14:15, 29 May 2008 (UTC)


 * Try appending "?action=purge" to the image (article) page. Like for Image:Logo.png, change the last part of the URL from "wiki/Image:Logo.png" to "wiki/Image:Logo.png?action=purge".  This will ask mediawiki to regenerate the thumbnail.  If you are having trouble on another article page, you can use the ?action=purge trick there too (which will recreate all the thumbnails used on that particular page). JackSchmidt 18:49, 10 July 2008 (UTC)


 * I tried your suggestion, but it doesn't appear to do anything. The thumbnails are not changed by appending "?action=purge" It doesn't give me any kind of error; it just doesn't seem to do anything at all. I can delete the old thumbnails myself by going into the appropriate directory on the host machine, and it then generates a new one, but this is not ideal since I usually connect to the wiki from elsewhere. - Crlamb 03:57, 11 July 2008 (UTC)


 * I thought I'd add that if I delete the thumbnails directory, the wiki doesn't always generate new thumbnails. In that case "?action-purge" will force it to create new ones. However, if there are ones already there, it doesn't create replacement ones even if they are from an image version that is now out of date. - 216.15.46.80 13:47, 11 July 2008 (UTC)

remove blue border from uploaded images

 * MediaWiki: 1.10.0
 * PHP: 5.2.2 (cgi-fcgi)
 * MySQL: 5.0.41-community-nt
 * URL: uh - its internal..

ive been through the help docos and the manual, but I cant seem to find out how to remove the blue border from uploaded images. i dont want to remove the 'clickability' / linkage per se, just remove the blue border. apologies if this is a stupid question...

Cheers

Alastair Jones alastair.jones@methodologygroup.com —83.217.103.26 10:52, 4 June 2008 (UTC)

Thumbnails and appropriate UIDs/Permissions

 * MediaWiki: 1.12.0
 * PHP: 5.2.0 (apache2handler)
 * MySQL: 5.0.27-standard
 * URL: Wiki

Hey fellows, Im having a problem regarding thumbnails and regarding the Permissions of the Images. I would like you to visit this Page and watch those PHP-errors on the top. The contents of the images Folder looks like that: http://wayne.klinkerstein.m-faq.de/1.png and the thumb directory is empty (since I manually deleted the folders(why folders?) that were named exactly like the image name). http://wayne.klinkerstein.m-faq.de/2.png.

Somehow I can't figure out whats going wrong actually. PS: The "deleted" folder has been created by MediaWiki and therefore has the UID of the Webserver, but unfortunately I can't set any permissions of that folder, or delete it, since my ftp's user ID is different.

Now I don't know how to fix that actually. I tried to re-upload the images, but MediaWiki still doesn't generate correct thumbnails. Instead it generates folders that are named like the image. Funnily, Im having another wiki working on the same server, in another directory, that works flawlessly with images and thumbnails: http://it51.stlcd.de/wiki/ Probably it's because it is MediaWiki 1.10.0rc2.

Im also having another problem. When I try to upload images via "Upload file" on the left side on my wiki, the browser loads and loads, but doesn't finish actually. Im not getting any response. Everything else is working fine.

Im appreciating any help I can get, thanks in advance, guys.

—84.62.166.54 11:39, 3 July 2008 (UTC)

ImageMagick convert SVG problem

 * MediaWiki: 1.12.0
 * PHP: 5.2.6 (apache2handler)
 * MySQL: 5.0.51

I had some trouble debugging a problem with SVGs on a local wiki. Image:Map_of_USA_with_state_names.svg was displaying with text replaced by boxes. I figured this was a font problem, but had extreme difficulty replicating it. I finally used "strace" to see what was happening, and discovered it was failing to load a font due to running out of memory. The memory limit had been set for 100M, but I had to raise it to 1G to succeed. In case someone else runs into strange thumbnailing problems, it might be wise to suggest more prominently to set: $wgMaxShellMemory = 1024000; the memory limit higher. —JackSchmidt 18:45, 10 July 2008 (UTC)

Getting MediaWiki and ImageMagick to agree on colors.xml and image delegates.

 * MediaWiki: 1.12.0
 * PHP: 5.2.6 (apache2handler)
 * MySQL: 5.0.51b
 * URL: Not currently available. Given out only on special request.

I'm trying to set up image thumbnailing for my wiki. I'm pretty sure I correctly installed ImageMagick; it seems to be working just fine. I can convert images and display them. However, my wiki displays this in place of any thumbs:

Error creating thumbnail: convert: unable to access configure file `colors.xml'.

convert: no decode delegate for this image format `/Users/Audacitor/Sites/wiki/images/e/e8/Xcodeicon.png'.

convert: missing an image filename `/Users/Audacitor/Sites/wiki/images/thumb/e/e8/Xcodeicon.png/180px-Xcodeicon.png'.

I found colors.xml alright and made sure the permissions were all set correctly, which they are. I get the feeling that it's because I have an incorrect MAGICK_HOME environment variable (which is currently set to the directory which contains ImageMagick). I have checked my LocalSettings.php and made sure it points to the actual convert command, rather than just an alias.

—65.87.62.33 07:22, 15 August 2008 (UTC)

I have the same problem, anybody know a solution? --142.162.8.222 18:14, 6 September 2008 (UTC)

MediaWiki confused about where it is in the file system

 * MediaWiki: 1.12.0
 * PHP: 5.2.6
 * MySQL: 5.0.51b
 * URL:

I'm getting an error message whenever MediaWiki tries to use ImageMagick:

Error creating thumbnail:

dyld: Library not loaded: /ImageMagick-6.4.2/lib/libMagickCore.1.dylib

Referenced from: /usr/bin/ImageMagick-6.4.2/bin/convert

Reason: image not found

This is a MediaWiki specific problem; ImageMagick works just fine everywhere else. IM has no problem creating thumbnails and placing them in MediaWiki's image directory from the command line or a shell script. It just happens whenever MediaWiki tries to use it.

I have a feeling this has something to with the path MediaWiki is working in. The part the error message displays is correct, so I assume it has something to do with where MediaWiki thinks it is in the file system. Here's the relevant paths to files and stuff:

ImageMagick is located in: /usr/bin/ImageMagick-6.4.2 Both MAGICK_HOME and DYLD_LIBRARY_PATH are set appropriately. Also, symbolic links to IM's executables are located in /usr/bin.

MediaWiki is located in: /Users/[username]/Sites/wiki

Apache's root is in: /Users/[username]/Sites/

Anybody got any ideas? —65.87.54.60 02:52, 20 August 2008 (UTC)

logo query

 * MediaWiki:
 * PHP: ?
 * MySQL: ?
 * URL: http://wiki.arts.usyd.edu.au/GCSwiki/index.php/Main_Page

At present our wikis are showing up the top left-hand image (yellow flower) faded out, with the message 'Set $wgLogo to the URL path to your own logo image' over it.

Can you please advise how we can put our own image (University of Sydney logo) in a the default for this wiki site?

Many thanks, Julie-Ann Robson —129.78.64.100 04:52, 2 September 2008 (UTC)


 * Manual:FAQ didn't help? -- :bdk: 09:40, 2 September 2008 (UTC)

Thumbnails storage in Safe Mode

 * MediaWiki version: 1.11.2
 * PHP version: 5.1.6 (apache2handler)
 * MySQL version: 5.0.45

I have a problem with the storage of the thumbnails. The script creates a folder named the same as the image, but it cannot store the thumbnail in it (logical because of Safe Mode).

With the deletion of images, I had to declare a variable ($wgFileStore) to tell the script that there should not be any subdirectory in the deleted folder ($wgFileStore['deleted']['hash'] = 0;)

Is there a similar variable for the thumb directory ??

Moreover thumbnails were created correctly with MW 1.8.

Thanks for your help!

—Matt84 20:05, 8 September 2008 (UTC)