Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and Browse not working #61

Open
hutchy1990 opened this issue Dec 23, 2014 · 15 comments
Open

Search and Browse not working #61

hutchy1990 opened this issue Dec 23, 2014 · 15 comments

Comments

@hutchy1990
Copy link

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

  • /home/raider/protected/vendor/yiisoft/yii/framework/db/CDbConnection.php(330): CDbConnection->open()
    Open Source Piracy is crap. #1
  • /home/raider/protected/vendor/yiisoft/yii/framework/db/CDbConnection.php(308): CDbConnection->setActive(true)
    Browse not working, #2
  • /home/raider/protected/vendor/yiisoft/yii/framework/base/CModule.php(387): CDbConnection->init()
    Fixed error in render list #3
  • /home/raider/protected/vendor/yiisoft/yii/framework/base/CModule.php(103): CModule->getComponent("sphinx")
    server requirements #4
    – /home/raider/protected/models/LSphinxDataProvider.php(174): CModule->__get("sphinx")
    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);
    Array to string conversion #5
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CDataProvider.php(224): LSphinxDataProvider->calculateTotalItemCount()
    Please help me to deploy it with Xampp!!! #6
    – /home/raider/protected/controllers/MainController.php(166): CDataProvider->getTotalItemCount()
    161 $totalCount = 0;
    162
    163 if (! $searchModel->getErrors()) {
    164 $torrentModel = LTorrent::model();
    165 $torrents = $torrentModel->getSphinxDataProvider($searchModel);
    166 $totalCount = $torrents->getTotalItemCount();
    167
    168 if (empty($totalCount)) {
    169 $words = explode(' ', $searchModel->words);
    170 if (count($words) > 1) {
    171 $searchModel->words = $words;
    fixed 'brining' to 'bringing' #7
    unknown(0): MainController->actionSearch(null, null, null)
    Fixed potential security issues #8
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(MainController, array(null, null, null))
    AHttpRequest::getUserHostAddress() is potentially unsafe #9
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(MainController, ReflectionMethod, array("q" => "test"))
    include(Controller.php): failed to open stream: No such file or directory #10
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("q" => "test"))
    Blank page after installation #11
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(CInlineAction)
    PHP Parse error: syntax error, unexpected ''torrents'' #12
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
    CSV parsing #13
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("search")
    Removed /src/protected/vendor #14
  • /home/raider/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("main/search")
    Shared hosting on subdomains ? #15
  • /home/raider/protected/vendor/yiisoft/yii/framework/base/CApplication.php(180): CWebApplication->processRequest()
    Prevents unnecessary checking of var length #16
    – /home/raider/public_html/index.php(13): CApplication->run()
    08 $yii = DIR . '/../protected/vendor/yiisoft/yii/framework/' . (YII_DEBUG ? 'yii.php' : 'yiilite.php');
    09 require_once (DIR . '/../protected/vendor/autoload.php');
    10 require_once ($yii);
    11
    12 $config =(is_file('installer.php')) ? 'installer.php' : DIR . '/../protected/config/config.php';
    13 Yii::createWebApplication($config)->run();
    2014-12-23 22:16:10 Apache/2.4.10 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Yii Framework/1.1.15
@booth-f
Copy link

booth-f commented Dec 23, 2014

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
Copy link
Author

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
Copy link

booth-f commented Dec 24, 2014

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
Copy link
Author

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
Copy link
Author

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

@booth-f
Copy link

booth-f commented Dec 24, 2014

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((4_lcs+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
Copy link
Author

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

@booth-f
Copy link

booth-f commented Dec 24, 2014

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
Copy link
Author

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

@hutchy1990
Copy link
Author

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

@booth-f
Copy link

booth-f commented Dec 24, 2014

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
Copy link
Author

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
Copy link
Author

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
Copy link

src386 commented Dec 24, 2014

Try this.

@src386
Copy link

src386 commented Dec 25, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants