isohuntto / openbay

Other
3.53k stars 903 forks source link

Search and Browse not working #61

Open hutchy1990 opened 9 years ago

hutchy1990 commented 9 years ago

for some reason search and browse do not work for me but recent does

http://raidercove.info

bellow is the error i get for a search

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

/home/raider/protected/models/LSphinxDataProvider.php(174)

162 } 163 return $keys; 164 } 165 166 protected function calculateTotalItemCount() 167 { 168 $q = clone $this->query; 169 170 $q->setCountFieldOnly(); 171 $sql = $q->build(); 172 $total = 0; 173 try { 174 $recordsCount = Yii::app()->sphinx->cache($this->cacheTime)->createCommand($sql)->queryAll(); 175 if (isset($recordsCount[0])) { 176 $total = $recordsCount[0]['count(*)']; 177 } 178 } catch (Exception $e) { 179 Yii::log('LSphinxDataProvider exception' . PHP_EOL . 'Message: ' . $e->getMessage() . 'Trace: ' . $e->getTraceAsString(), CLogger::LEVEL_ERROR); 180 181 if (YII_DEBUG) { 182 throw $e; 183 } 184 } 185 186 return $total > 9975 ? 9975 : $total; Stack Trace

0

booth-f commented 9 years ago

Yep, the cannot connect as user is because whatever user its currently trying to connect under is ether not a user to the server or your server isn't responding, most likely the first. What I did was setup a user in the mysql server with allowed host ONLY localhost to the torrents database. Really can't do much to my database if ANYONE broke in, I already backed up the 3 I have current.

hutchy1990 commented 9 years ago

see the user credentials is correct I have checked them over 10 times now although my server is acting up and not letting me login as root i will reformat and try again

booth-f commented 9 years ago

Apparently from your error message its not taking notice of the password and thus is not using it to authenticate itself with the database. Root is suppose to be able to login from localhost so its not not letting you log in, its just missing to include the password.

hutchy1990 commented 9 years ago

na its obv a server error it lets me login when it wants to wiping the system now first time ive ever seen that problem and search on it

hutchy1990 commented 9 years ago

i get the same error when i click browse on your website

booth-f commented 9 years ago

Yep, I'm aware except mine is giving the error that I'm lacking the database, I'm running in debug mode trying to figure it out.

CDbCommand failed to execute the SQL statement: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. The SQL statement executed was: SELECT count(_) FROM opbtorrents WHERE MATCH('@name tfirueidkw') ORDER BY weight() DESC, id DESC LIMIT 0, 20 OPTION ranker=expr('sum((4lcs+2(min_hit_pos==1)+exact_hit)_user_weight)1000+bm25 + (created_at - 1000000000) / (NOW() - 1000000000) \ 100 + if(torrent_status=1,100,0)')

So not the same error

hutchy1990 commented 9 years ago

see all these errors lol i just want this to work so i can start coding user accounts and stuff

booth-f commented 9 years ago

I agree 100%, the faster we get to working on that the closer we are to having a torrent index with functionality.

Once we have the user accounts then we can focus on uploading of torrents.

hutchy1990 commented 9 years ago

Yeah theres so much that can be done to the future of file transferring

hutchy1990 commented 9 years ago

done a fresh install and i get the same error passwords are correct

booth-f commented 9 years ago

Fresh install doesn't matter its something in the site code itself where it tells the database to tell it what is there. I'm not 100% sure where the actual problem spot is at this moment (in reality there shouldn't be one as I've seen a couple fully working replicas around) but it might be something really stupid we are missing.

hutchy1990 commented 9 years ago

sphinx can connect to the db and its the same password in sphinx as the db same user and stuff aswell my thoughts are maybe its to do with the 2 lines of code you have to remove to get the install working at the moment

hutchy1990 commented 9 years ago

Ok i found out what is causing my error it is sphinx i used the tutorial on here to set it up but there seems to be an error here Sphinx 2.0.9-id64-release (rel20-r4115) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinx/sphinx.conf'... indexing index 'opb_common'... ERROR: index 'opb_common': key 'path' not found. indexing index 'opbtorrents'... WARNING: min_infix_len is not supported yet with dict=keywords; using dict=crc collected 366000 docs, 16.3 MB

ERROR: index 'opb_common': key 'path' not found.

what is the key path and how do i fix it

src386 commented 9 years ago

Try this.

src386 commented 9 years ago

If someone managed to get openbay working (with its own database and sphinx) I'm interested (please post your config.php, sphinx.conf).