Author: jean.luc.henry
Description:
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.
- Images are showing on the images repository (1.17 version)
- Images are showing if using an MW 1.16 version connected to the 1.17 repo.
- 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
);
Version: 1.17.x
Severity: normal