{"id":537,"date":"2011-07-15T14:20:32","date_gmt":"2011-07-15T11:20:32","guid":{"rendered":"https:\/\/polyetilen.lt\/?p=537"},"modified":"2023-05-02T11:00:31","modified_gmt":"2023-05-02T08:00:31","slug":"mediawiki-1-17-0-wgshareduploaddbname-error","status":"publish","type":"post","link":"https:\/\/polyetilen.lt\/en\/mediawiki-1-17-0-wgshareduploaddbname-error","title":{"rendered":"Mediawiki 1.17.0 $wgSharedUploadDBname error"},"content":{"rendered":"<p>I tried Mediawiki 1.17.0 and set common database for all upload files by variable $wgSharedUploadDBname, and uploading file got warnings and fatal error.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nWarning: mysql_real_escape_string() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 316 \r\nWarning: mysql_query() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 23\r\nWarning: mysql_query() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 23\r\nWarning: mysql_real_escape_string() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 316 \r\nWarning: mysql_real_escape_string() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 316 \r\nWarning: mysql_query() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 23\r\nWarning: mysql_real_escape_string() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 316 \r\nWarning: mysql_query() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php on line 23 \r\nWarning: Invalid argument supplied for foreach() in \/includes\/filerepo\/LocalRepo.php on line 169 \r\nFatal error: Call to a member function free() on a non-object in \/includes\/filerepo\/LocalRepo.php on line 172 \r\n<\/pre>\n<p>So if you need $wgSharedUploadDBname, it is better not to use Mediawiki 1.17.0, yet use the older version 1.16.5.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tried Mediawiki 1.17.0 and set common database for all upload files by variable $wgSharedUploadDBname, and uploading file got warnings and fatal error. Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in \/includes\/db\/DatabaseMysql.php &hellip; <a href=\"https:\/\/polyetilen.lt\/en\/mediawiki-1-17-0-wgshareduploaddbname-error\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"http:\/\/polyetilen.lt\/?p=186","footnotes":""},"categories":[8],"tags":[73,72,70,71],"class_list":["post-537","post","type-post","status-publish","format-standard","hentry","category-programavimas","tag-wgshareduploaddbname","tag-error","tag-mediawiki","tag-mediawiki-1-17-0","en-US"],"_links":{"self":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":1,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"predecessor-version":[{"id":538,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/537\/revisions\/538"}],"wp:attachment":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}