Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Broken Images in Media Manager
Avatar
elstiko #1
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: Broken Images in Media Manager
Hi!

Sorry to start a new thread when there are so many Broken Images threads, but none of the solutions seemed to help me.

Images were working fine for me, and I'm not sure when they broke, but this is my situation now:

[1] Logos and such are still fine, embedded images from Media Manager (including within Media Manager itself) are showing the placeholders for a broken link.

EDIT: I've struck through the below information because it doesn't seem to be relevant, thanks to @turnermm for pointing that out.

[2] When I try to access them directly, I get a 500 error, logs say ".../wiki/data/.htaccess: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration..."

[3] I noticed my host had a message about updating htaccess for apache 2.4, so I tried replacing the "Order" command

<IfModule mod_authz_host>
    Require all denied
</IfModule>
<IfModule !mod_authz_host>
    Order allow,deny
    Deny from all
</IfModule>

...with the new, single line syntax:

<IfModule mod_authz_host>
    Require all denied
</IfModule>
<IfModule !mod_authz_host>
    Require all denied
</IfModule>

[4] Now trying to access the images returns a 403, logs say "...client denied by server configuration..."


I've tried a bunch of things from the broken images faq, other threads, and just wishing really hard, but nothing is fixing it. Does anyone have any new ideas, please? My wiki and all my plugins are up-to-date.
This post was edited on 2018-03-09, 00:55 by elstiko.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4762 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Are you trying to access them directly? If so the "denied" would block access, and also direct access is not in keeping with DW's default policy.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
elstiko #3
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
I can't see them in media manager, so I right-clicked the media manager thumbnail placeholder and opened the image link in a new tab, which gives me

".../wiki/lib/exe/fetch.php?w=90&h=90&t=1502942777&tok=effef5&media=wiki:dokuwiki-128.png"
(for example)

Sorry for not being clearer earlier.

This link (unlike the direct attempts) doesn't return any error, or any image. Chrome just shows me an empty 16x16px placeholder.
Avatar
elstiko #4
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Here's a bit more detail of how I walked through the Broken Images FAQ page

(https://www.dokuwiki.org/faq:brokenimages):

The wiki seems to work fine, but embedded images aren't working.
 Try to open one of the images directly (right click → select open image in new tab) to see if you get any errors.
 If you get some PHP error or the message The image can't be displayed because it contains errors one of your plugins might be
 broken. It might also be a whitespace or BOM introduced with one of your config files, see the FAQ entry on session cookies and the
 findBadPhp script Tip for more info on how to solve this problem.
 If you don't see any error messages displayed, they might still appear in your error log. So, please check those. (If you don't have
 access to them, ask your provider.)

If I open the thumb in a new tab, I get a blank placeholder, no error in browser, no error in logs. Just in case, I ran the findbadphp script and nothing unusual was found. A bunch of config files don't begin with <?php but that matches the installation versions, which begin with a hash and the file name.

You may also want to use a download tool like curl or wget to download the image directly and compare your original image with the one you downloaded from DokuWiki. Whitespace and BOM errors can easily be detected this way.

I confirmed via SFTP that the files are there and not corrupt.

If you get no content at all, make sure you haven't misconfigured the xsendfile option.

I haven't touched that option, and it's set to "Don't Use" by default.

If thumbnails for small images work, but larger ones fail, you might hit a memory problem with libGD. Try configuring ImageMagick instead.

Not applicable.
Avatar
elstiko #5
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
One more strange symptom:

Even though I can't see any thumbs at all in Media Manager, but one of them is still visible on preview, or when embedded in a page. Not any of the other images, just one.

Invisible Thumbnail:
https://ettincon.org/world/wiki/lib/exe/fetch.php?w=90&h=65&t=1517525302&tok=4b9d20&media=locations:sites:krogath_cave.png

Visible Preview:
https://ettincon.org/world/wiki/lib/exe/fetch.php?t=1517525302&w=400&h=290&tok=66cccf&media=locations:sites:krogath_cave.png

Visible Embed:
https://ettincon.org/world/wiki/lib/exe/fetch.php?w=400&tok=169566&media=locations:sites:krogath_cave.png
This post was edited on 2018-03-09, 01:38 by elstiko.
Avatar
elstiko #6
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
I tried installing a fresh dokuwiki in a new directory, and went to the media manager first thing. Similar issue! Thumb invisible, embed invisible, put preview is visible! I guess that means it is something to do with server config?

[Image: https://lh4.googleusercontent.com/nDVos8XikGIptA1KK1DZ6-kkFiPe5dimrI_6A6Ckq8iUpeGe0UD0ppOpsusG2kzIVZMQCL20T9903g=w1276-h664-rw]
Avatar
elstiko #7
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
And THEN, I tried removing variables from the URL to see which ones were breaking it.

This one won't load:
https://ettincon.org/world/wiki2/_media/wiki/dokuwiki-128.png?w=90&h=90&t=1520556920&tok=215c13

But this one (dimensions removed) does:
https://ettincon.org/world/wiki2/_media/wiki/dokuwiki-128.png?t=1520556920&tok=215c13

What does this mean? libGD?
Avatar
elstiko #8
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
I fixed all my embeds and previews by switching to ImageMagick.

90% of thumbnails are still broken, though.
Avatar
schplurtz (Moderator) #9
Member since Nov 2009 · 508 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
90% of thumbnails are still broken, though.
which one ? not those in media manager. everything is ok for me.
[Image: https://framapic.org/7IHRyQswOzxD/I5dY5rtVhxOi.png]

It seems:
  * GD extension is not present (image resizing was impossible). maybe your web hoster changed something in PHP and you did not notice immediately
  * your issue is resolved thanks to the switch to imagemagick because I can see correct thumbnails in mediamanager., and resized embedded images in pages. If you want to check if GD is installed or not, temporarily enable phpok in admin/configuration parameters, then create page containing <PHP>phpinfo();</PHP>. you should see a lot of php information. If GD is there, it will be reported.
This one won't load:
https://ettincon.org/world/wiki2/_media/wiki/dokuwiki-128.png?w=90&h=90&t=1520556920&tok=215c13

But this one (dimensions removed) does:
https://ettincon.org/world/wiki2/_media/wiki/dokuwiki-128.png?t=1520556920&tok=215c13

What does this mean? libGD?
No, this is standard DW behaviour. resized images must use the correct tok= parameter.


Do you run a modified DW version ? https://ettincon.org/world/wiki/?do=check gives this warning :
Warning: A non-numeric value encountered in /home/public/world/wiki/inc/common.php on line 1648
Avatar
elstiko #10
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Thanks! That's given me some things to check/fix. Everyone's been super-helpful!
Avatar
StarArmy #11
Member since Nov 2011 · 121 posts
Group memberships: Members
Show profile · Link to this post
This may or may not be relevant to your situation but I find that thumbnails tend to fail in my media manager when they're for images around 2 MB or larger in file size.
Avatar
soaringmoon #12
Member since Mar 2019 · 1 post
Group memberships: Members
Show profile · Link to this post
Coming from the future with a solution to this problem.

Warning: A non-numeric value encountered in /home/public/world/wiki/inc/common.php on line 1648

This error comes from a problem with a server problem related to (for some reason) the way that 1and1 hosting has PHP installed.

This issue is fixed with the following patch to
inc/common.php

https://github.com/splitbrain/dokuwiki/pull/2420/files

I had the exact issue as described, error code on line 1648 and all. This patch fixes the problem.

do=check
on my wiki installation still shows

Warning: A non-numeric value encountered in /homepages/42/d767599154/htdocs/inc/common.php on line 1648

However, my images now display.

Solution was found after reading this thread detailing the issue.

https://github.com/splitbrain/dokuwiki/issues/2474
Avatar
Michaelsy #13
Member since Jun 2015 · 969 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Quote by soaringmoon:
do=check
on my wiki installation still shows
Warning: A non-numeric value encountered in /homepages/42/d767599154/htdocs/inc/common.php on line 1648

Apply this patch, or follow the php.ini solution. (The last one is preferred by me.)

HTH - Michaelsy
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited on 2019-03-29, 08:45 by Michaelsy.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-01-27, 20:06:02 (UTC +01:00)