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

Browse not working, #2

Open
dynamitedj opened this issue Dec 19, 2014 · 113 comments
Open

Browse not working, #2

dynamitedj opened this issue Dec 19, 2014 · 113 comments

Comments

@dynamitedj
Copy link

I've got the site and everything up and running however, when i click to search or even Browse torrents i just get a shit happens error message, any ideas what could have gone wrong? i've re-installed several times but still getting the same problem.
capture

@isohuntto
Copy link
Owner

Hey,

Looks like there is an error with .htaccess
Can you try another hosting or configure apache?

Yours truly,

Isohunt.to team.

Join us on facebook https://www.facebook.com/isohuntto, twitter
https://twitter.com/Isohuntto, Isohunt.to forum http://forum.isohunt.to/
!

On Fri, Dec 19, 2014 at 11:18 PM, dynamitedj notifications@github.com
wrote:

I've got the site and everything up and running however, when i click to
search or even Browse torrents i just get a shit happens error message, any
ideas what could have gone wrong? i've re-installed several times but still
getting the same problem.
[image: capture]
https://cloud.githubusercontent.com/assets/10245756/5508294/1569e01c-87a3-11e4-8433-4643f270207b.JPG


Reply to this email directly or view it on GitHub
#2.

@dynamitedj
Copy link
Author

I'm the Root account for the cpanel server so its no issue looking at the Apache, but i've checked htaccess and i cannot find anything relating to /browse, there is also no browse folder for /src/www/ where it is trying to find, should it not be trying to call the browse from your database server instead of mine?

i can try alternative hosting however the secondary server does not have PDO/PDO-MYSQL instaled as it is for Dev Testing of Web Scripts.

@GreySyntax
Copy link
Contributor

Try enabling the debug flag in protected/config/debug.php and see if you get any more info.

@dynamitedj
Copy link
Author

I have bolded the Red Lines from the debug page, if you want the Direct Link i can provide that @GreySyntax


PHP notice

Array to string conversion

/home/dynamite/public_html/proxy/src/protected/models/LTorrent.php(423)

411 ->option('ranker', 'SPH04')
412 ->search('@tags "' . $obj->halfEscapeMatch($tag) . '"')
413 ->where('torrent_status', LTorrent::TORRENT_STATUS_GOOD)
414 ->order('weight()', 'DESC')
415 ->order('id', 'DESC')
416 ->limit($count);
417
418 $torrentsIds = array_merge($torrentsIds, Yii::app()->sphinx->cache(600)->createCommand($obj->build())->queryColumn());
419 }
420 Yii::app()->cache->set($key, $torrentsIds);
421 }
422 } catch (Exception $e) {
423 Yii::log('getLastTorrentIdsByCategories failed. Exception: ' . $e->getMessage() . PHP_EOL . 'Trace: ' . $e->getTrace(), CLogger::LEVEL_ERROR);
424
425 if (YII_DEBUG) {
426 throw $e;
427 }
428 }
429
430 return $torrentsIds;
431 }
432
433 public function getBBParsed($str = null)
434 {
435 if ($str === null) {
Stack Trace
#0
– /home/dynamite/public_html/proxy/src/protected/controllers/MainController.php(257): LTorrent::getLastTorrentIdsByCategories()
252 public function actionCategories()
253 {
254 $this->pageTitle = 'Browse Torrents | ' . Yii::app()->name . ' Torrent Search Engine';
255
256 $torrentsByTags = array();
257 $torrentsIds = LTorrent::getLastTorrentIdsByCategories();
258
259 if (empty($torrentsIds)) {
260 Yii::log('Empty last torrents ids', CLogger::LEVEL_WARNING);
261 } else {
262 $torrentModel = LTorrent::model();
#1
– /home/dynamite/public_html/proxy/src/protected/controllers/MainController.php(102): MainController->actionCategories()
097 {
098 if ($q || $iht) {
099 return $this->actionSearch($q, $iht, $status);
100 }
101
102 return $this->actionCategories();
103 }
104
105 protected function checkSearchRequest() {
106 $uri = Yii::app()->getRequest()->getRequestUri();
107 if (preg_match('#ihq=([^&]+)#', $uri, $matches)) {
#2
unknown(0): MainController->actionBrowse(null, null, 0)
#3

  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(MainController, array(null, null, 0))
    server requirements #4
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(MainController, ReflectionMethod, array("r" => "main/browse"))
    Array to string conversion #5
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("r" => "main/browse"))
    Please help me to deploy it with Xampp!!! #6
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(CInlineAction)
    fixed 'brining' to 'bringing' #7
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
    Fixed potential security issues #8
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("browse")
    AHttpRequest::getUserHostAddress() is potentially unsafe #9
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("main/browse")
    include(Controller.php): failed to open stream: No such file or directory #10
  • /home/dynamite/public_html/proxy/src/protected/vendor/yiisoft/yii/framework/base/CApplication.php(180): CWebApplication->processRequest()
    Blank page after installation #11
    – /home/dynamite/public_html/proxy/src/www/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-19 18:18:56 Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Yii Framework/1.1.15

@GreySyntax
Copy link
Contributor

Looks like your sphinx config is incorrect, check the searchd listen section is correct

@isohuntto
Copy link
Owner

@dynamitedj was the issue fixed by recent commits?

@dynamitedj
Copy link
Author

i'm waiting to find out, i've logged out of my server for now but will update tomorrow and let you know as i've been up 40 hours and i'm flagging so not with it, don't want to risk completely messing it up.

@dynamitedj
Copy link
Author

Nope, i can only assume that with my server not having Sphinx installed and trying to use your Sphinx from the installer so i didn't have to fight with Cpanel.

image

@dynamitedj
Copy link
Author

i'll have to install Sphinx and try to get it working with CPanel

@FREEZX
Copy link

FREEZX commented Dec 20, 2014

I have the same issue. My hosting does not have sphinx, and i'm unable to browse and search.

@GreySyntax
Copy link
Contributor

After getting sphinx to behave, the browse and search pages have started working for me. I think this may actually be a non-issue

@FREEZX
Copy link

FREEZX commented Dec 20, 2014

The issue could be with the provided sphinx config.

@NewEraCracker
Copy link

I would be great if they had some sort of mechanism that allowed falling back to MySQL.
It shouldn't be hard to add an index to 'name' column and use it to search when Sphinx is not available.

This would put the script working, even in hosts without Sphinx.

@dynamitedj
Copy link
Author

I've installed Sphinx but its still failing for me, wondering if it is a problem with Config now, i've manually changed to my Sphinx instead of the default Sphinx and still getting the same thing, wondering now...

@YasarChavez
Copy link

http://openbay.com.nu/ GOOD!

@dynamitedj
Copy link
Author

@tuneniitoo what Sphinx are you running? are you running your own or are you running the default config? i'm on a dedicated server with full root access i have Sphinx installed locally and it is still not working as it should be

@dynamitedj
Copy link
Author

Ok, so i've got Sphinx somewhat working, but now i'm getting errors galore, please remember this is a CPANEL server, i've altered the conf slighly to listen on 3312 and 3307:mysql41 now when i click browse i instantly get the 404 error rather than a delay, i'm also getting warnings and a fatal error on sphinx boot.

---- QUOTE ---
Sphinx 2.2.6-id64-release (r4843)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/root/local/etc/sphinx.conf'...
WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'enable_star' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'max_matches' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: preopen_indexes=1 has no effect with seamless_rotate=0
listening on all interfaces, port=3312
listening on all interfaces, port=3307
WARNING: index 'opb_common': key 'path' not found - NOT SERVING
precaching index 'opbtorrents'
WARNING: index 'opbtorrents': preload: failed to open /var/lib/sphinx/opbtorrents2.sph: No such file or directory; NOT SERVING
FATAL: no valid indexes to serve

---- END QUOTE ----

Any ideas?

@FREEZX
Copy link

FREEZX commented Dec 22, 2014

@dynamitedj
Copy link
Author

Tried that but i'm using the Conf that was in the download, unless i've missed something else.... any other ideas?

@src386
Copy link

src386 commented Dec 22, 2014

Hi, same for me, 404 everywhere except for the "Recent torrents".
I get the feeling that the "official" sphinx.conf is problematic, at least for debian. I finally managed to run it, here are the steps :

  1. edit /etc/sphinxsearch/sphinx.conf and paste the example configuration
  2. In the source opb_dbconnect { section set your mysql parameters
  3. In the index opb_common { section add the following lines :
source = opbtorrents
path = /var/lib/sphinxsearch/data/opb_common
  1. In the index opbtorrents : opb_common { section add the following lines :
source = opbtorrents
path = /var/lib/sphinxsearch/data/opbtorrents2
  1. In the searchd { section, add/modify these :
listen = 9312
listen = 9306:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
pid_file = /var/run/sphinxsearch/searchd.pid
binlog_path = /var/lib/sphinxsearch/data
  1. Execute these commands :
indexer -c /etc/sphinxsearch/sphinx.conf opb_common
indexer -c /etc/sphinxsearch/sphinx.conf opbtorrents
  1. Run sphinxsearch !
service sphinxsearch start

Sphinx seems to be working now, but I'm still getting 404 errors ....

@src386
Copy link

src386 commented Dec 22, 2014

On openbay/src/protected/runtime/application.log I get that strange error :

SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

This is not normal. I don't use the root account for mysql. Here is my config.php :

'connectionString' => 'mysql:host=localhost;port=3306;dbname=dbopenbay',
        'username' => 'openbay',
        'password' => 'MYSECRETPASSWORD!',
        'schemaCachingDuration' => '86400',
        'charset' => 'utf8',
        'enableProfiling' => true

Is it a bug ?

@booth-f
Copy link

booth-f commented Dec 23, 2014

I followed all the instructions and such but I still cant get the search to work, just try to search on there and you'll see what I mean
http://xalogen.koding.io/

@src386
Copy link

src386 commented Dec 24, 2014

Is there a way to get openbay working ? I'm stuck on this 404 error.
No documentation, no help, no log...

@booth-f
Copy link

booth-f commented Dec 24, 2014

@src386 Just turn debug mode on in protected/config and then try browsing again. That should give you an error to work from.

@src386
Copy link

src386 commented Dec 25, 2014

Thanks.
This is what I get :
CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

Yeah because I DON'T WANT TO USE ROOT !
And my config.php says 'username' => 'openbay',
Looks like openbay doesn't care about config.php...

@hutchy1990
Copy link

This is the error I am getting 👎

DbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 unknown local index 'opbtorrents' in search request. The SQL statement executed was: SELECT count(*) FROM opbtorrents ORDER BY weight() DESC, id DESC LIMIT 0, 20

@no1453
Copy link

no1453 commented Dec 27, 2014

Just wanted to make the comment that if the example-sphinx.conf file is using 3306, then you can basically assume it's f-ed up. Mysql uses 3306. That number should definitely be 9306, for a default configuration. (EDIT: I might be wrong, still researching.) I'm struggling through the same issues.

@src386- Apparently on debian mysql defaults to not allowing web access. You have to enable it, and then give permissions to the connecting user (root or whoever you choose to use.)

see https://rtcamp.com/tutorials/mysql/remote-access/

@GreySyntax- Would you mind posting the sphinx.conf you used that seems to be working?

@bernd-stromberg
Copy link

See above

  • configuration sphinxsearch
  • /etc/sphinxsearch/sphinx.conf

BUT FIRST : Whats the output of

dpkg -l | grep "sphinxsearch"

?!

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

root@FaZe:/var/www/openbay/src/www/themes/oldpiratebay/views/layouts# dpkg -l | grep "sphinxsearch"
ii sphinxsearch 2.2.6-release-1~wheezy amd64 Fast standalone full-text SQL search engine
root@FaZe:/var/www/openbay/src/www/themes/oldpiratebay/views/layouts#

@bernd-stromberg
Copy link

Cooool ! 2.2.6 is very OK.

So on...

...you can copy/paste the above /etc/sphinxsearch/sphinx.conf. Fill in only your DB-host/user/pass/database...

  • sql_host = localhost
  • sql_user = thepiratebay
  • sql_pass = SECRET
  • sql_db = thepiratebay

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

but I gave a different database name.. and what did you say ? so i'll keep the sphinx toggle at using theirs itself ?

@bernd-stromberg
Copy link

Fill in only YOUR DB-host/...

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

Okay

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

How much time will this 'adding source' part take?

@bernd-stromberg
Copy link

Do you use the *.sql from the package here [github.com] ? Seconds...

What definitely do you mean with "adding source" ? Insert the table I hope.

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

Yeah.. I used this one : isohuntto/openbay-db-dump#9

@bernd-stromberg
Copy link

Inside of

/[pathto]/openbay-master/src/protected/data

only four datasets for testing ! 👍

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

What? Its okay right? will it work??

@bernd-stromberg
Copy link

What definitely do you mean with "adding source" ?

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

Adding the database to mysql

@bernd-stromberg
Copy link

OK.

Using "/[pathto]/openbay-master/src/protected/data/schema.mysql.sql" only costs seconds.

@TheChiefCoC
Copy link

Its all workin for me now :) Thanks a lot @bernd-stromberg
You can visit my bay at : http://tpb.ifilescloud.com

@bernd-stromberg
Copy link

Fine !! Wait...

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

This is what I did : go to the console of the server in root and type "mysql -p" and put the mysql passwd
after that type "use (MYDATABASENAME);" and then "source 1.sql" (1.sql is the database file in the home folder of root)
and after that you need to wait a few hours when it finishes restart mysql and then try indexer --all again

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

@TheChiefCoC , come to the IRC ?

@bernd-stromberg
Copy link

Tell me the room...

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

http://webchat.freenode.net #hacking-lab

@bernd-stromberg
Copy link

Nick : bernd-stromberg

@hayzamjs
Copy link

hayzamjs commented Jan 5, 2015

Yup I saw u

@TheChiefCoC
Copy link

@Fazelesswhite sorry i didnt come back , i got busy, i can help you now if needed.

@hayzamjs
Copy link

hayzamjs commented Jan 6, 2015

its okay, you can come on IRC? http://webchat.freenode.net #hacking-lab

@bernd-stromberg
Copy link

If anyone is interested, message from DynDNS :

#130

@src386
Copy link

src386 commented Jan 6, 2015

If you want to install openbay on FreeBSD, I wrote a guide :
http://maniatux.fr/index.php?article542/openbay-full-installation-on-freebsd

I think there are similare guides for debian / ubuntu.
I was working on a HOWTO for debian/ubuntu but I'm actually too busy.

@hayzamjs
Copy link

hayzamjs commented Jan 6, 2015

@src386 I got it working on debian all thanks to @bernd-stromberg

@devasia2112
Copy link

Is it possible to get up and running without using sphinx?

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