The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!
You are not logged in.
So sphinx works from the commandline (search sex for example returns correct results). Debugging the php part now.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Hmm...the error seems to be a connect timeout;
(string) connection to localhost:3312 failed (errno=110, msg=Connection timed out)
which doesnt really make that much sense because it works with telnet and also with search from localhost.
Still debugging.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Fixed. The problem was that fsockopen() in php could not open a connection to localhost (this usually happens when the server is not configured correctly, the network part, but from ssh it works....no idea exactly). I changed localhost to thepornstuff.com in modules/video/components/search.php and it works correctly now.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Thank you very much for everything! This should be the last time I need you
Offline
Update Sphinx configuration example:
source videos
{
type = mysql
sql_host = localhost
sql_user = asp
sql_pass = asp
sql_db = asp_b4
sql_sock = /var/run/mysqld/mysqld.sock
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS video, \
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS tags \
FROM video AS v \
LEFT JOIN video_tags AS t ON (t.video_id = v.video_id) \
AND v.status = 1 \
GROUP BY v.video_id
sql_attr_uint = video
sql_attr_uint = mobile
sql_attr_uint = total_views
sql_attr_float = duration
sql_attr_float = rating
sql_attr_timestamp = add_time
sql_attr_multi = uint categories FROM query; SELECT video_id, cat_id FROM video_category
sql_query_info = SELECT video_id, add_date FROM video WHERE video_id=$id
}
index videos
{
source = videos
path = /var/lib/sphinxsearch/data/videos
charset_type = utf-8
min_prefix_len = 3
enable_star = 1
}
searchd
{
port = 3312
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
pid_file = /var/log/sphinxsearch/searchd.pid
}
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Offline
No. I need to add a fix. Its because sphinx cant search if the search query has more than 40 characters (or something similar...). I will fix on your box today (its fixed in 1.0).
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
root@server1 [/home]# sudo -u sphinx indexer --all --rotate
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
ERROR: unknown key name 'GROUP_CONCAT' in /etc/sphinx/sphinx.conf line 15 col 22.
FATAL: failed to parse config file '/etc/sphinx/sphinx.conf'
root@server1 [/home]#
source videos
{
type = mysql
sql_host = localhost
sql_user = user
sql_pass = pass
sql_db = db
sql_sock = /var/lib/mysqld/mysqld.sock (this depends on your server)
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS video, \ #added in RC4
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS tags \
FROM video AS v \
LEFT JOIN video_tags AS t ON (t.video_id = v.video_id) \
AND v.status = 1 \
GROUP BY v.video_id
sql_attr_uint = video #added in RC4
sql_attr_uint = mobile
sql_attr_uint = total_views
sql_attr_float = duration
sql_attr_float = rating
sql_attr_timestamp = add_time
sql_attr_multi = uint categories FROM query; SELECT video_id, cat_id FROM video_category
sql_query_info = SELECT video_id, add_date FROM video WHERE video_id=$id
}
index videos
{
source = videos
path = /var/lib/sphinxsearch/data/videos (this depends on your distribution)
charset_type = utf-8
min_prefix_len = 3
enable_star = 1
}
searchd
{
port = 3312
log = /var/log/sphinxsearch/searchd.log (this depends on your distribution)
query_log = /var/log/sphinxsearch/query.log (this depends on your distribution)
pid_file = /var/log/sphinxsearch/searchd.pid (this depends on your distribution)
}
Last edited by thiva7 (2013-02-03 14:02:06)
Offline
What version of mysql do you have installed?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
WAS
Server version: 5.1.66-cll MySQL Community Server (GPL)
and i make update from WHM and now is
5.5
and i get this message :
root@server1 [~]# sudo -u sphinx indexer --all --rotate
indexer: /usr/lib/libmysqlclient.so.16: no version information available (required by indexer)
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
ERROR: unknown key name 'GROUP_CONCAT' in /etc/sphinx/sphinx.conf line 15 col 22.
FATAL: failed to parse config file '/etc/sphinx/sphinx.conf'
root@server1 [~]#
Last edited by thiva7 (2013-02-03 22:28:20)
Offline
You need to recompile sphinx also.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
i remove sphinx to install the new version and now i get this :
root@server1 [/home]# libmysqlclient.so.16(libmysqlclient_16) is needed by sphinx-2.0.6-1.rhel6.i386.rpm
-bash: syntax error near unexpected token `libmysqlclient_16'
root@server1 [/home]#
Offline
You need to recompile sphinx, not re-install it. You can also rebuild the srpm.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
ok i do this stupid think...what i have do now for that??
root@server1 [/home]# libmysqlclient.so.16(libmysqlclient_16) is needed by sphinx-2.0.6-1.rhel6.i386.rpm
-bash: syntax error near unexpected token `libmysqlclient_16'
root@server1 [/home]#
Offline
You need to recompile sphinx from source in order to make it use the installed mysql library. You can just continue without sphinx, its only needed when you have a lot of visitors and you want to use it for search.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
You need to recompile sphinx from source in order to make it use the installed mysql library. You can just continue without sphinx, its only needed when you have a lot of visitors and you want to use it for search.
adrian i will buy trafic from some greek website and i will get some day 5000-10000 visitors to my site....so i i dont want to start my site load slow!!!....so i want to be ready for anything!!!!!!
first i upgrade mysql from WHM but indexer is not work i and i get errors s i use this command
yum remove sphinx
and now when i try to install it again i get this :
with : yum install sphinx
root@server1 [~]# yum install sphinx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.facebook.net
* extras: centos.mirror.ndchost.com
* updates: mirror.5ninesolutions.com
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
updates | 3.5 kB 00:00
vz-base | 951 B 00:00
vz-updates | 951 B 00:00
Setting up Install Process
No package sphinx available.
Error: Nothing to do
root@server1 [~]#
then i try this site method :
http://gadelkareem.com/2012/03/12/insta … entos-6-2/
i change to last version
rpm -Uhv http://sphinxsearch.com/files/sphinx-2. … 5.i386.rpm
root@server1 [~]# rpm -Uhv http://sphinxsearch.com/files/sphinx-2.0.6-1.rhel5.i386.rpm
Retrieving http://sphinxsearch.com/files/sphinx-2.0.6-1.rhel5.i386.rpm
error: Failed dependencies:
libcrypto.so.6 is needed by sphinx-2.0.6-1.rhel5.i386
libexpat.so.0 is needed by sphinx-2.0.6-1.rhel5.i386
libmysqlclient.so.15 is needed by sphinx-2.0.6-1.rhel5.i386
libmysqlclient.so.15(libmysqlclient_15) is needed by sphinx-2.0.6-1.rhel5.i386
libssl.so.6 is needed by sphinx-2.0.6-1.rhel5.i386
root@server1 [~]#
what i have to do?
i just try this one
http://answers.oreilly.com/topic/2738-h … om-source/
and i install it and i get same error
root@server1 [/home/sphinx/bin]# ./searchd
Sphinx 2.0.5-release (r3308)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/home/sphinx/etc/sphinx.conf'...
ERROR: unknown key name 'GROUP_CONCAT' in /home/sphinx/etc/sphinx.conf line 15 col 22.
FATAL: failed to parse config file '/home/sphinx/etc/sphinx.conf'
root@server1 [/home/sphinx/bin]#
Last edited by thiva7 (2013-02-05 15:18:49)
Offline
Do you have this line in your sphinx.conf:
v.video_id AS video
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
yes....here is my config file :
source videos
{
type = mysql
sql_host = localhost
sql_user = user_
sql_pass = pass_
sql_db = DB_
sql_sock = /var/lib/mysqld/mysqld.sock (this depends on your server)
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS video, \ #added in RC4
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS tags \
FROM video AS v \
LEFT JOIN video_tags AS t ON (t.video_id = v.video_id) \
AND v.status = 1 \
GROUP BY v.video_id
sql_attr_uint = video #added in RC4
sql_attr_uint = mobile
sql_attr_uint = total_views
sql_attr_float = duration
sql_attr_float = rating
sql_attr_timestamp = add_time
sql_attr_multi = uint categories FROM query; SELECT video_id, cat_id FROM video_category
sql_query_info = SELECT video_id, add_date FROM video WHERE video_id=$id
}
index videos
{
source = videos
path = /var/lib/sphinxsearch/data/videos (this depends on your distribution)
charset_type = utf-8
min_prefix_len = 3
enable_star = 1
}
searchd
{
port = 3312
log = /var/log/sphinxsearch/searchd.log (this depends on your distribution)
query_log = /var/log/sphinxsearch/query.log (this depends on your distribution)
pid_file = /var/log/sphinxsearch/searchd.pid (this depends on your distribution)
}
Offline
i have change server and now i get this
root@server1 [/home/APC-3.1.13]# sudo -u sphinx indexer --all --rotate
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
indexing index 'videos'...
FATAL: failed to open /var/lib/sphinxsearch/data/videos.tmp.spl: No such file or directory, will not index. Try --rotate option.
Offline
make sure the /var/lib/sphinxsearch/data/ folder exists and that the user that runs the searchd server can write to it.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
i made some changes and my config file have this
source videos
{
type = mysql
sql_host = localhost
sql_user = user
sql_pass = pass
sql_db = database_
sql_sock = /var/lib/mysql/mysql.sock
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS celebvideo, \
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS celebtags \
FROM celebvideo AS v \
LEFT JOIN celebvideo_tags AS t ON (t.video_id = v.video_id) \
AND v.status = 1 \
GROUP BY v.video_id
sql_attr_uint = celebvideo
sql_attr_uint = mobile
sql_attr_uint = total_views
sql_attr_float = duration
sql_attr_float = rating
sql_attr_timestamp = add_time
sql_attr_multi = uint celebcategories FROM query; SELECT video_id, cat_id FROM celebvideo_category
sql_query_info = SELECT video_id, add_date FROM celebvideo WHERE video_id=$id
}
index videos
{
source = videos
path = /var/lib/sphinx/data/videos
charset_type = utf-8
min_prefix_len = 3
enable_star = 1
}
searchd
{
port = 3312
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
pid_file = /var/log/sphinx/searchd.pid
}
with this code
indexer --all --config /etc/sphinx/sphinx.conf
i dont get any error
but with this :
!/bin/bash
/usr/bin/indexer --all --rotate --config /etc/sphinx/sphinx.conf
i get this :
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinx/sphinx.conf'...
indexing index 'videos'...
collected 1222 docs, 0.3 MB
collected 1232 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.2 Mhits, 100.0% done
total 1222 docs, 338909 bytes
total 0.240 sec, 1409489 bytes/sec, 5082.17 docs/sec
total 3680 reads, 0.013 sec, 0.3 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.003 sec, 210.4 kb/call avg, 0.3 msec/call avg
WARNING: failed to scanf pid from pid_file '/var/log/sphinx/searchd.pid'.
WARNING: indices NOT rotated.
Offline
make sure /var/log/sphinx exists...also make sure searchd is running.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
/var/log/sphinx/searchd.pid was not there so I created.... How to run it?
Offline
If you start searchd (should be /etc/init.d/searchd and start via service searchd start) then the pid file will be automatically created.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline