Jump to content

Mediawiki Lost All Images


dcasal
 Share

Recommended Posts

Hello everybody,

 

A while ago, I noticed that my MediaWiki instance couldn't find any of its images...I checked permissions on the /public_html/wiki/home/images directory and it was 775..I changed that to 777 but it didn't make a difference...

 

Anyone know of a common mistake I might have made?

 

Cheers,

 

David

Link to comment
Share on other sites

  • 2 weeks later...
Hello everybody,

 

A while ago, I noticed that my MediaWiki instance couldn't find any of its images...I checked permissions on the /public_html/wiki/home/images directory and it was 775..I changed that to 777 but it didn't make a difference...

 

Anyone know of a common mistake I might have made?

 

It looks like not even public_html/index.html can display images in the public_html/images folder, as <img src="images/toad.jpg"></img> in index.html won't work (meaning, the browser won't display it)

 

Anyone have any clue why that might be happening?

 

d

Link to comment
Share on other sites

  • 2 years later...
Hi David,

 

Can you give us a link to test? (PM me if you don't want to put it on the open forum)

 

I know this thread is very old but I may or may not be having a similar issue.

 

I have installed a MediaWiki extension that can display uml diagrams.

 

It uses MetaUML, ImageMagick, etc.

 

The problem is that the extension generates a png image on the fly and while rendering

the page the extesnion inserts the following code

 

<img src='C:\Apache2\htdocs\wiki\images\math\tmp\uml-03401e206d389c784552fd8765d1d246.png'>

 

Which only displays the unknown gif I believe that the browser doesn't have a permission to the folder.

 

I have tried allowing access, deleting all the .htaccess files (test environment) and between Google and me I can't seem

to figure out the issue.

 

Hope you still around.

 

Thanks,

 

Steve

Link to comment
Share on other sites

Hi Steve, welcome to the forums :)

 

Is there anything in the error log ?

 

Are you running this on a windows machine ? I assume also ( from the path you give) that it's the only domain on that server. Is that path correct ?

 

I assume that you are referring to the Apache log file. If so, no I don't see any errors there.

 

Yes, I am using a Windows setup denoted in my path above "C:\... " :)

 

I am a programmer and not a network admin so when ask if it's my only domain I don't know what you mean. However, I will tell you what I know.

Its just running on a machine on my local home network and its also a Windows Vista machine not viewable to the outside world. I know it has put all kinds of new security stuff it so that could be an issue. I use it to try things out and if I like it I install it at work on an interal use only Wiki.

 

The path is correct and the image it refers to does exist.

 

I attached a small image of what displays when I run the extension.

post-10823-1192244596_thumb.jpg

Link to comment
Share on other sites

It sounds as if the URL being produced by mediawiki for that image is incorrect and trying to go to

 

C:\Apache2\htdocs\wiki\images\math\tmp\uml-03401e206d389c784552fd8765d1d246.png

 

Your browser will then be trying to pick up the file from your C drive ( not the c: drive with mediawiki on ). It's tricky to diagnose fully on a machine we have no access - but I'd check your config for that module.

Link to comment
Share on other sites

It sounds as if the URL being produced by mediawiki for that image is incorrect and trying to go to

 

C:\Apache2\htdocs\wiki\images\math\tmp\uml-03401e206d389c784552fd8765d1d246.png

 

Your browser will then be trying to pick up the file from your C drive ( not the c: drive with mediawiki on ). It's tricky to diagnose fully on a machine we have no access - but I'd check your config for that module.

 

 

How can the url be incorrect? The path exists the file exists. Does the path need to be relative to the wiki installation instead of an absolute path?

 

Thanks for your comments.

Link to comment
Share on other sites

because when you are on the browser on your computer it will take

 

src='C:\Apache2\htdocs\wiki\images\math\tmp\uml-03401e206d389c784552fd8765d1d246.png'

 

And look on your c:\ drive.

 

You need a path that includes the domain name or path by reference usually, so that it can find it on the correct server.

Link to comment
Share on other sites

because when you are on the browser on your computer it will take

 

src='C:\Apache2\htdocs\wiki\images\math\tmp\uml-03401e206d389c784552fd8765d1d246.png'

 

And look on your c:\ drive.

 

You need a path that includes the domain name or path by reference usually, so that it can find it on the correct server.

 

I finally think I understand.

 

http://localhost/wiki/images/math/tmp/uml.png

 

A link like this works. So I just need to return a url that the browser can understand.

 

Thanks for putting up with my dumb questions.

 

Steve

Link to comment
Share on other sites

You're welcome :)

 

The only dumb question is one that isn't asked. And yes, a path including the host should work ( although localhost usually means your own machine - so will work if you are actually on the machine that is acting as the web server )

Link to comment
Share on other sites

You're welcome :)

 

The only dumb question is one that isn't asked. And yes, a path including the host should work ( although localhost usually means your own machine - so will work if you are actually on the machine that is acting as the web server )

 

Yeah, I ended up using something like

 

$serverURL = 'http://' . $_SERVER['SERVER_ADDR'] . '/wiki/images/math/tmp';

 

which works so now I can tweak it to where ever I want.

 

Thanks again for your input.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...