middlebury / CategorySuggest

A fork of the CategorySuggest mediawiki extension, with fixes for MediaWiki 1.18 compatability and a few other improvements.
http://www.mediawiki.org/wiki/Extension:CategorySuggest
GNU General Public License v2.0
1 stars 5 forks source link

MySQL connection issue #8

Closed wmat closed 9 years ago

wmat commented 10 years ago

The other two issues around MySQL access errors don't have resolutions, so I'm curious how to fix this:

I'm receiving the error: ...Access denied for user 'apache'@'localhost' (using password: NO) in ....CategorySuggest.php on line 54

This stops CategorySuggest from sorting the Category list based on the character input. The full list of categories does appear, but is very long and frustrating to scroll through.

adamfranco commented 10 years ago

Hi @wmat , what version of MediaWiki are you encountering this error with?

wmat commented 10 years ago

Sorry, this was with 1.23.4

On Thu, Jul 31, 2014 at 4:36 PM, Adam Franco notifications@github.com wrote:

Hi @wmat https://github.com/wmat , what version of MediaWiki are you encountering this error with?

— Reply to this email directly or view it on GitHub https://github.com/middlebury/CategorySuggest/issues/8#issuecomment-50814944 .

rajeltomari commented 10 years ago

I was able to fix it on my own wiki by moving

$dbr =& wfGetDB( DB_SLAVE );

One line above

$searchString = mysql_real_escape_string($query);

So that the final will look like this:

$dbr =& wfGetDB( DB_SLAVE ); $searchString = mysql_real_escape_string($query);

I hope this works for you too.

Bibliothecary commented 10 years ago

I am also having the same issue. MW V 1.23.3. I've tried updating credentials and rajeltomari's suggestion to no effect. I'm not versed in PHP but "Access denied for user 'apache'@'localhost' (using password: NO) in ....CategorySuggest.php on line 54" seems to say it needs the password specified. If so, what is the correct way to add that to the CategorySuggest.php file please? (or the CategorySuggestSuggest.php if that's needed too?)