按月归档: 5月 2012

[转]php sphinx 高效率搜索引擎搭建

原文地址:http://blog.csdn.net/adparking/article/details/7207119

 

1.下载PHP客户端安装:

http://pecl.php.net/package/sphinx

 

vim sphinxclient.c
找到
void sock_close ( int sock );
改为
static void sock_close ( int sock );

 


 php.ini加扩展,客户端安装完毕 2.安装sphinx,前提你已经安装mysql且安装了mysql-devel重源码安装mysql

mysql-devel都已经安装,yum安装的运行
yum -y install mysql-devel

下载sphinx2.0.1地址:  

http://sphinxsearch.com/downloads/

 

tar -xvzf sphinx-2.0.1-beta.tar.gz
cd sphinx-2.0.1-beta
./configure –prefix=/usr/local/sphinx –with-mysql –with-iconv

 

备注:64位增加参数 –enable-id64


make && make install cd /usr/local/sphinx/etc/ cp sphinx.conf.dist sphinx.conf

 

继续阅读

Read: 4211

ImageImagick + PHP + Apache On WINDOWS

今天帮同事安装配置php_imagick,结果装是装上了apache也能正常启动,但是程序一new Imagick()就会导致Apache崩溃。

在google之后从Stack Overflow找到问题原因:

I’ve had the same issue today. You have to install version of Image Magick no higher than 6.6.4.0 – next builds are made using VC10 which seems to be incompatible with Apache VC9 + PHP5.3.x VC9.

 

ImageImagick dll for windows 在6.6.4以后用的都是VC10编译,所以不兼容vc9编译的php,虽然apache能正常启动,但是new Imagick的时候会导致apache崩溃。

解决办法就是安装低版本的ImageImagick

下载地址:http://image_magick.veidrodis.com/image_magick/binaries/

 

参考资料:

http://stackoverflow.com/questions/8608426/imagick-crash-with-php-5-3

http://www.elxsy.com/2009/07/installing-imagemagick-on-windows-and-using-with-php-imagick/

Read: 1169

修复zsh svn1.7 自动完成的问题

更新svn(subversion)到1.7后 zsh 的svn自动完成就傻X了。

错误: _arguments:comparguments:312: invalid argument: [–cl]:arg:

修改方法

打开文件:/usr/share/zsh/4.3.11/functions/_subversion

找到35行左右

${=${${${(M)${(f)”$(LC_ALL=C _call_program options svn help $cmd)”#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[–([a-z-]##)\](:arg:)#/(–$match[2])-    $match[1]$match[3] (-$match[1])–$match[2]$match[3]}

改为

${=${${${(M)${(f)”$(LC_ALL=C _call_program options svn help $cmd)”#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[–([a-z-]##)\](:arg:)#/(-    -$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])–$match[3]$match[4]}

 

参考资料:

http://www.zsh.org/mla/workers/2011/msg01448.html

Read: 281