Closed BlackBeardo closed 8 years ago
I'm having exactly the same problem. Although, I'm quite sure that it is not the problem with installation. Even on a clean Ubuntu 14.04 LAMP server, the PHP pages show a white screen. I think something is wrong with the code. I sent him an email but he didn't reply yet. I was trying to make another project of the same kind work: 'dhtbay'. Did you try it?
Thanks, I'll try it also, but I am not node guy, I am little good at PHP. I want to make this project work. but I don't know whom to ask solution. @algoprog please help me.
Have you enabled error reporting in php.ini?
I am using PHP 5.5.9, sphinx 2.2.11, innodb version (mysql)5.5.50. ubuntu 14.04 amazon ec2
I didn't enable err_reporting in php.ini. but I tried <?php error_reporting(E_ALL); ?> in index.php and other files also. but I didn't find any log for errors.
White page means error during php code interpretation. It's probably issue with config.php. Sphinx database (realtime index) details may not be always the same. It may run on a different port. You should check it. If you don't see any reported errors I can't help you more.
Also, when you fix the problem, the scrappers may need a small update to work (the structure and/or domain names of the websites may have changed). If they need to be fixed and you fix them, please make a pull request. I am really busy these months, that's why I didn't update the project. I have also created a realtime metasearch torrent search engine that works with a simple MySQL database but is really slow compared to this search engine.
@BlackBeardsolution I look forward to you fixing the problems.
@algoprog Would you mind sharing the meta search engine code too?
Yes, possibly at the end of the month, to make sure it works and improve the UI.
@Tunap , I am working on it. I have to solve this one. anyhow.
checking if anything wrong with listen port.?
currently using : $sdb = db_connect('127.0.0.1:9306', 'root', 'xxxxxx', 'rtindex'); // Sphinx Real-time index
also I tried:
### ubuntu@ip-xxx-xx-xx-xx:~$ sudo netstat -taupen Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 8931 1049/sshd tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 106 9071 1105/mysqld tcp 0 0 172.31.29.17:22 1.39.14.111:29673 ESTABLISHED 0 15429 2437/sshd: ubuntu [ tcp 0 356 172.31.29.17:22 1.39.14.111:11287 ESTABLISHED 0 15837 2581/sshd: ubuntu [ tcp6 0 0 :::80 :::* LISTEN 0 9366 1320/apache2 tcp6 0 0 :::22 :::* LISTEN 0 8933 1049/sshd udp 0 0 0.0.0.0:55835 0.0.0.0:* 0 7851 619/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 0 7949 619/dhclient udp6 0 0 :::9669 :::* 0 7852 619/dhclient
but don't know which one is listening :(
You should start Sphinx search daemon (searchd). I don't see any searchd listening on port 9306...
You need both MySQL and Sphinx.
I did this
> searchd
it gives me:
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
WARNING: compat_sphinxql_magics=1 is deprecated; please update your application and config
FATAL: failed to open log file '/var/log/sphinxsearch/searchd.log': Permission denied
Did you use the .conf file from install folder? Also it seems that Sphinx doesn't start because access is denied to log file.
Try: sudo searchd
The default sphinx package on Ubuntu 14.04 isn't compatible. Use this guide: http://sphinxsearch.com/docs/current/installing-debian.html
And I'm attaching the sphinx config modified for Ubuntu.
after using > sudo searchd
GOT:
ubuntu@ip-xxx-xx-xx-xx:~$ sudo searchd
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
WARNING: compat_sphinxql_magics=1 is deprecated; please update your application and config
listening on all interfaces, port=9312
listening on all interfaces, port=9306
precaching index 'mysql_all'
precaching index 'mysql0'
precaching index 'mysql1'
precaching index 'mysql2'
precaching index 'mysql3'
precaching index 'rtindex'
precaching index 'rtindex0'
precaching index 'rtindex1'
precaching index 'rtindex2'
precaching index 'rtindex3'
precached 10 indexes in 0.210 sec
You don't need the MySQL indexes anymore. They are only needed to import the torrents.
ok thanks,
but when I tried command you mensioned in readme.md for "Access Sphinx indexes with MySQL client":
sudo mysql -h 0 -P 9306
it said:
ERROR 2003 (HY000): Can't connect to MySQL server on '0' (111)
Try 127.0.0.1 or localhost instead of 0.
After attaching the MySQL indexes to realtime indexes, you can get rid of the MySQL indexes and remove them from Sphinx configuration file.
127.0.0.1 is not working but localhost is giving some other clue:
ubuntu@ip-xxx-xx-xx-xx:~$ sudo mysql -h localhost -P 9306
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I am Confuse.!
I removed all files from /var/lib/sphinxsearch/data
then
step 1:
ubuntu@ip-xxx-xx-xx-xx:~$ sudo indexer --all
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'mysql_all'...
collected 2250996 docs, 105.2 MB
sorted 18.0 Mhits, 100.0% done
total 2250996 docs, 105156553 bytes
total 11.961 sec, 8790884 bytes/sec, 188178.91 docs/sec
indexing index 'mysql0'...
collected 562826 docs, 26.3 MB
sorted 4.5 Mhits, 100.0% done
total 562826 docs, 26300949 bytes
total 3.695 sec, 7116421 bytes/sec, 152287.54 docs/sec
indexing index 'mysql1'...
collected 562559 docs, 26.3 MB
sorted 4.5 Mhits, 100.0% done
total 562559 docs, 26290309 bytes
total 3.397 sec, 7737682 bytes/sec, 165570.63 docs/sec
indexing index 'mysql2'...
collected 562703 docs, 26.3 MB
sorted 4.5 Mhits, 100.0% done
total 562703 docs, 26293807 bytes
total 3.310 sec, 7941828 bytes/sec, 169959.82 docs/sec
indexing index 'mysql3'...
collected 562908 docs, 26.3 MB
sorted 4.5 Mhits, 100.0% done
total 562908 docs, 26271488 bytes
total 3.295 sec, 7972919 bytes/sec, 170832.35 docs/sec
skipping non-plain index 'orig'...
skipping non-plain index 'rtindex'...
skipping non-plain index 'rtindex0'...
skipping non-plain index 'rtindex1'...
skipping non-plain index 'rtindex2'...
skipping non-plain index 'rtindex3'...
total 17 reads, 0.602 sec, 18730.7 kb/call avg, 35.4 msec/call avg
total 1128 writes, 0.547 sec, 751.1 kb/call avg, 0.4 msec/call avg
It creates 40 files in /var/lib/sphinxsearch/data
like mysql0.spa, mysql0.spd, mysql0.sph, mysql0.spi, mysql0.spk, mysql0.spm, mysql0.spp, mysql0.sps and for other same like mysql1.spd.........etc
Am I going Right way?
if yes then what's next?
Now access Sphinx indexes with MySQL client on port 9306, and execute the attach commands. After that you can remove the mysql indexes definitions from sphinx.conf.
to access sphinx indexes i did like this:
ubuntu@ip-xxx-xx-xx-xx:~$ mysql -uroot -hlocalhost -p -P9306
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 68
Server version: 5.5.50-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ATTACH INDEX mysql0 TO RTINDEX rtindex0;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ATTACH INDEX mysql0 TO RTINDEX rtindex0' at line 1
it's showing error.
also rtindex.lock is showing 0 KB size. i think something is wrong with it. my filezilla sanpshot:
Can you view any records from mysql0 table for example?
Everything is setup. rtindex result:
mysql> select * from rtindex; show meta;
+---------------+---------+
| Variable_name | Value |
+---------------+---------+
| total | 1000 |
| total_found | 8876468 |
| time | 2.326 |
+---------------+---------+
3 rows in set (0.00 sec)
Here is the problem: Search results are not showing up... @algoprog
Try searching something else, enable error reporting and execute the query in search.php manually from the mysql client to see if you get results.
I found the part which is causing problem.
in search.php --->
$quality = Rivr::getQuality($data['title']);
$data['quality'] = $quality;
$hasQuality[$quality] = 1;
if I comment this three lines the search results are showing. here is screenshot(after comment those three line):
If you comment these lines, you won't be able to filter movies and TV shows by quality. But did it cause a problem? Can you see the errors or warnings? It works for me.
and also this is my queries table:
mysql> select * from queries;
+----+--------------+------+-------+------------+----------------------+
| id | query | type | count | first_date | last_date |
+----+---------------+------+-------+------------+----------------------+
| 1 | transformer | 1 | 10 | 1472902687 | 1472902687 |
| 2 | god | 4 | 5 | 123456 | 1472925701 |
| 3 | xxx | 1 | 1 | 123456 | 123456 |
+---+----------------+-----+----------+-----------------+----------------+
NOTE: I added this 3 rows manually when i search for transformer--> result showsup. same for god, and xxx
when I search for any other keyword instead of these 3, no results. just like first image that I attached today.
another issue is auto suggestion is not working. no suggestions. @algoprog
I did error_reporting(E_ALL);
in search.php
but no error. only blank page with searchbar in header.
I tried echo $data['quality']
, but no values/errors.
You need to enable error reporting. You may have compatibility issues, because for me everything works fine.
Execute the search query manually.
error found, mbstring extention was not installed in my apache and also disabled by default. so I installed it and ON it in php.ini. @algoprog
Finally Done. 100% running with current sql dump. @algoprog @Tunap thanks alot.
Also I will test this on server and make small detailed wiki for this one.
hello can you please provide me full config requiremets like php version and mysql version and sphinx version also. can you please provide me full installation guide for this script. I am trying from last one week but it's not working.
I don't know what's missing. sphinx giving results in command line input like "search captain america". when I try to load index.php or any other url from browser I am getting "currently unable to handle this request. HTTP ERROR 500" in chrome. rest of browsers remain blank.
Please help me.