Hi all,
I can't get image thumbnails to work at all. I get 404 errors for them. I see the correct directories exist but the actual thumbnail files themselves don't.
I'm using 1.5rc3 on Windows with Apache, Mysql, PHP. GD2 is enabled for gif, jpg and png. I've also tried with ImageMagick. Neither work.
I get 404 errors e.g:
"The requested URL /w/images/thumb/8/85/image.jpg/300px-image.jpg was not found on this server."
The full size images are uploaded successfully. Just the thumbnails that aren't being created.
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Replies much appreciated!
Jake.
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
Hi Rowan,
Thanks for your help. A checklist:
- Yes, GD2 is working. phpinfo() says its there and on another virtual server I see its working to generate thumbnails (using my own code not mediawiki)
- Yes, I was just typing the URL of the image as a last resort
- Yes, I've tried action=purge . No effect
Thanks for explaining the generation process though. I'll see where in that process things are going wrong.
Jake.
Rowan Collins wrote:
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
Just to go down the d'oh! list: - It has permissions to write there? - $IP is correct? - No hard disk quotas? (ie, you have permissions to write there but out of disk space) - ImageMagick and safe mode?
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Rowan,
Thanks for your help. A checklist:
- Yes, GD2 is working. phpinfo() says its there and on another virtual
server I see its working to generate thumbnails (using my own code not mediawiki)
Yes, I was just typing the URL of the image as a last resort
Yes, I've tried action=purge . No effect
Thanks for explaining the generation process though. I'll see where in that process things are going wrong.
Jake.
Rowan Collins wrote:
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hi Jamie
- It has permissions to write there?
- I'm on windows so there aren't permissions
- $IP is correct?
$IP = "C:\Documents\Websites\local\wiki\w";
... it works for everything else
- No hard disk quotas? (ie, you have permissions to write there but
out of disk space)
- again, Windows, no quotas
- ImageMagick and safe mode?
I'm trying with GD2, which works fine for another site on my apache installation
... so no d'oh yet unfortunately :(
In my localsettings.php I have:
------ ## To enable image uploads, make sure the 'images' directory ## is writable, then uncomment this: $wgEnableUploads = true; $wgUseImageResize = true; ## $wgUseImageMagick = true; ## $wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-6.2.3-Q16\convert.exe"; ------
I've tried uncommenting the two bottom lines which is the correct imagemagick path.
Safe mode is off.
Jake.
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Rowan,
Thanks for your help. A checklist:
- Yes, GD2 is working. phpinfo() says its there and on another virtual
server I see its working to generate thumbnails (using my own code not mediawiki)
Yes, I was just typing the URL of the image as a last resort
Yes, I've tried action=purge . No effect
Thanks for explaining the generation process though. I'll see where in that process things are going wrong.
Jake.
Rowan Collins wrote:
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Well, it's not going to help you if you try using GD2. But I also had problems with resize and solved it by installing the Win32 version of ImageMagick to the "/usr/bin" for Apache and the Wiki. This works. (it only pops up an annoying Command Prompt window when resizing for the first time).
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Jamie
- It has permissions to write there?
- I'm on windows so there aren't permissions
- $IP is correct?
$IP = "C:\Documents\Websites\local\wiki\w";
... it works for everything else
- No hard disk quotas? (ie, you have permissions to write there but
out of disk space)
- again, Windows, no quotas
- ImageMagick and safe mode?
I'm trying with GD2, which works fine for another site on my apache installation
... so no d'oh yet unfortunately :(
In my localsettings.php I have:
## To enable image uploads, make sure the 'images' directory ## is writable, then uncomment this: $wgEnableUploads = true; $wgUseImageResize = true; ## $wgUseImageMagick = true; ## $wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-6.2.3-Q16\convert.exe";
I've tried uncommenting the two bottom lines which is the correct imagemagick path.
Safe mode is off.
Jake.
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Rowan,
Thanks for your help. A checklist:
- Yes, GD2 is working. phpinfo() says its there and on another virtual
server I see its working to generate thumbnails (using my own code not mediawiki)
Yes, I was just typing the URL of the image as a last resort
Yes, I've tried action=purge . No effect
Thanks for explaining the generation process though. I'll see where in that process things are going wrong.
Jake.
Rowan Collins wrote:
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Okay, just got the announcement about 1.5beta4 and saw this in the changelog:
* (bug 2780) Fix thumbnail generation with GD for new image schema
... so I downloaded and copied the files over to the installation directory and reloaded a page with a broken thumbnail on it and it works.
Woohooo!!!
Thanks for all suggestions from people in the interim :)
I no longer feel like I'm going mad.
Regards,
Jake.
Hans Voss wrote:
Well, it's not going to help you if you try using GD2. But I also had problems with resize and solved it by installing the Win32 version of ImageMagick to the "/usr/bin" for Apache and the Wiki. This works. (it only pops up an annoying Command Prompt window when resizing for the first time).
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Jamie
- It has permissions to write there?
- I'm on windows so there aren't permissions
- $IP is correct?
$IP = "C:\Documents\Websites\local\wiki\w";
... it works for everything else
- No hard disk quotas? (ie, you have permissions to write there but
out of disk space)
- again, Windows, no quotas
- ImageMagick and safe mode?
I'm trying with GD2, which works fine for another site on my apache installation
... so no d'oh yet unfortunately :(
In my localsettings.php I have:
## To enable image uploads, make sure the 'images' directory ## is writable, then uncomment this: $wgEnableUploads = true; $wgUseImageResize = true; ## $wgUseImageMagick = true; ## $wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-6.2.3-Q16\convert.exe";
I've tried uncommenting the two bottom lines which is the correct imagemagick path.
Safe mode is off.
Jake.
On 7/29/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
Hi Rowan,
Thanks for your help. A checklist:
- Yes, GD2 is working. phpinfo() says its there and on another virtual
server I see its working to generate thumbnails (using my own code not mediawiki)
Yes, I was just typing the URL of the image as a last resort
Yes, I've tried action=purge . No effect
Thanks for explaining the generation process though. I'll see where in that process things are going wrong.
Jake.
Rowan Collins wrote:
On 29/07/05, Jake Gordon mediawiki@jakeg.co.uk wrote:
I presume normally they're created on the fly when a thumbnail doesn't already exist? In which case, the 404 page should instead by handled by mediawiki to create the thumbnail, no? Well, this isn't happening.
Well, that's not quite how it works - you would never normally be trying to view the thumbnail on its own, so any 404 error would generally just cause a "broken image" graphic in your browser, not a textual 404 page. And the thumbnails aren't generated on request to the *graphic*, but on rendering the *page* - when the parsing code (makeImageLinkObj() in Linker.php) comes across the syntax for a resized image, it calls a function in Image.php, which uses either GD or ImageMagick (depending on configuration) to create an appropriate thumbnail, unless one is already there from another request. The HTML output is then simply generated to reference the newly-created graphic.
[Oh, I've just remembered, description pages use thumbnails too now, don't they; still, the steps must be similar]
I imagine you only went directly to the URL as a last resort, but since I'm not sure what you're doing wrong, I thought I'd give a quick run-down of how things work, in case it helps with debugging. Note that whenever you change a config option, it's a good idea to use "?action=purge" or a page preview to make sure nothing's being recalled from internal caches.
But I should think the first thing to check is that ImageMagick and/or GD are actually set up correctly, and can be used from within PHP.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org