Current time: 04-18-2014, 06:50 AM Hello There, Guest! (LoginRegister)

Post Reply 
[solved] Mediawi Image uploads succeed, but can't view images
06-26-2010, 01:16 PM (This post was last modified: 06-26-2010 07:11 PM by andyb.)
Post: #1
[solved] Mediawi Image uploads succeed, but can't view images
I'm having a trouble with a new, clean install of Mediawiki 1.15 (advanced one-click method). Images can be successfully uploaded, but they are not usable in wiki pages: attempting to click and view the just-uploaded image yields an Internal Server Error (404).

On a wiki page where the image is embedded, the image simply doesn't display- instead I just see the image title. How can I fix this and make uploads usable on wiki pages?

Possibly helpful info:
- Turning off short URLs does not fix this problem- it just clarifies that the internal error is a 404.
- ImageMagick has been disabled (per other forum threads). If I re-enable it, the problem still happens.
- Via SFTP, I can download the image (and thumbnails). The files aren't corrupt. (Mediawiki even reads the image metadata correctly- it just doesn't display the image!)
- The permissions on the "images" directory (and subfolders) are drwxr-xr-x, the default setting. A quick forum search suggests that this should be ok.
- Hashed upload directories are in use (the default setting)

The file size is 1.12 MB, well below the upload limit. (it's a full-page scan of some handwritten notes) A smaller image gives the same problem.
Find all posts by this user
Quote this message in a reply
06-26-2010, 03:15 PM
Post: #2
RE: Mediawi Image uploads succeed, but can't view images
Offhand, I'd guess you have $wgUploadPath (or $wgScriptPath, from which it's derived) set wrong.
Find all posts by this user
Quote this message in a reply
06-26-2010, 05:11 PM (This post was last modified: 06-26-2010 06:21 PM by andyb.)
Post: #3
RE: Mediawi Image uploads succeed, but can't view images
(06-26-2010 03:15 PM)andrewf Wrote:  Offhand, I'd guess you have $wgUploadPath (or $wgScriptPath, from which it's derived) set wrong.

Thanks for the reply. This is a fairly default install, which means that my $wgUploadPath value is just the "images" subdirectory- that seems to be the default. And indeed, the directory exists (with the permissions mentioned before).

Just to check, I then set $wgUploadPath manually, and confirmed that the wiki is looking for the image URL in what should be the right place. Unfortunately, the problem persists.


EDIT: Found the problem! Apparently, some previous work early on resulted in an incorrect HTACCESS file in this folder. Removing that allowed uploads to work as expected. Thanks again!

One helpful piece of information: the error message is actually an error "500 internal error"- the 404 message simply referred to a problem locating an error document. The error document is pasted below:
'500 internal error page Wrote:Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, x@y.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: