Last modified: 2014-05-22 16:08:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33943, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31943 - Images are not showing when using ForeignDBRepo on MW 1.17
Images are not showing when using ForeignDBRepo on MW 1.17
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-25 17:50 UTC by Jean-Luc Henry
Modified: 2014-05-22 16:08 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jean-Luc Henry 2011-10-25 17:50:56 UTC
After update from 1.16 to 1.17, images are not showing and, I have 2 error messages in apache error log:

PHP Warning:  mysql_query() expects parameter 2 to be resource, null given in .../w/includes/db/DatabaseMysql.php on line 23

PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, null given in .../w/includes/db/DatabaseMysql.php on line 316

I am using ForeignDBRepo and, it seems to be related.

1) Images are showing on the images repository (1.17 version)
2) Images are showing if using an MW 1.16 version connected to the 1.17 repo.
3) Images are not showing on an 1.17 connected to the 1.17 repo.

My issue is probably the same as this one describe here: http://www.mediawiki.org/wiki/Thread:Project:Support_desk/$wgUseSharedUploads_causes_trouble

Here is my ForeignDBRepo configuration:

$wgForeignFileRepos[] = array(
    'class' => 'ForeignDBRepo',
    'name' => 'base',
    'url' => "http://base.ekopedia.org/w/images",
    'directory' => '/var/www/base.ekopedia.org/w/images',
    'hashLevels' => 2,
    'dbType' => 'mysql',
    'dbServer' => 'localhost',
    'dbUser' => 'ekopedia',
    'dbPassword' => 'xxxxxxxxxxxx',
    'dbFlags' => DBO_DEFAULT,
    'dbName' => 'ekobase',
    'tablePrefix' => '',
    'hasSharedCache' => false,
    'descBaseUrl' => 'http://base.ekopedia.org/Image:',
    'fetchDescription' => true
);
Comment 1 Jean-Luc Henry 2011-10-25 18:12:27 UTC
The bug is not here when using ForeignAPIRepo:

$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'shared',
   'apibase'                 => 'http://base.ekopedia.org/w/api.php',
   'fetchDescription'        => true, // Optional
   'descriptionCacheExpiry'  => 43200, // 12 hours, optional (values are seconds)
   'apiThumbCacheExpiry'     => 43200, // 12 hours, optional, but required for local thumb caching
);
Comment 2 Bawolff (Brian Wolff) 2013-09-04 15:14:32 UTC
Tested on MediaWiki 1.22alpha. Can not reproduce. Is this still an issue for you?
Comment 3 Don Xello 2013-10-17 08:30:57 UTC
Hi, Mediawiki 1.21 (upgrade from 1.16). 6 WIKIs, 1 WIKI is the commons.wiki....
where the mediafiles are saved.
We use the wgForeignFileRepos which works perfect (means we see the file and we can even enlarge it!) BUT NOT getting thumbs.
No thumbnailing if a mediafile is used in the various language WIKIs (if a "local" Mediafile is used, meaning directly uploaded to the corresponding WIKI thumbnailing works).
The error we get is strange because it assumes we have an ImageMagick issue which is definetely not the case as everythings works within 1 wiki.

convert: no decode delegate for this image format `/var/tmp/magick-6505R3QorkgCQavW' @ error/constitute.c/ReadImage/550.
convert: no images defined `/var/tmp//transform_853b47e1b746-1.jpg' @ error/convert.c/ConvertImageCommand/3078

Any ideas?

Cheers
Christian
~~~~
Comment 4 Mark A. Hershberger 2013-10-21 17:34:10 UTC
If no one here knows, you can always ask in the ImageMagick forum: http://www.imagemagick.org/discourse-server/
Comment 5 Bawolff (Brian Wolff) 2013-10-21 17:42:04 UTC
Error message probably indicates something goes wrong when copying over the image file (aka image is corupted, or image magick is set on a zero-byte file, etc)
Comment 6 Bawolff (Brian Wolff) 2014-05-22 16:08:14 UTC
Tested again on 1.24alpha. Works fine for me. Closing worksforme. It appears the issue described above is either some sort of configuration issue, or something wrong with your image magick install.

Please re-open if you have steps to reproduce that can be followed outside of your install to generate the error

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links