Archive for the ‘PHP’ Category

php-fpm报错

[ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool ‘default’
安装完php-cgi 不能启动
[ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool ‘default’
出现些错误提示,请修改 php-fpm.conf,将注释去掉
Unix user of processes

Read the rest of this entry »

SCWS-1.0.4 php分词模块安装

scws   php分词模块
以 Linux(FreeBSD) 操作系统为例
1. 取得 scws-1.0.4 的代码
wget http://www.ftphp.com/scws/down/scws-1.0.4.tar.bz2
2. 解开压缩包
tar jxvf scws-1.0.4.tar.bz2
3. 进入目录执行配置脚本和编译
cd scws-1.0.4
./configure –prefix=/usr/local/scws
make
make install
注:这里和通用的 GNU 软件安装方式一样,具体选项参数执行 ./configure –help 查看。
常用的三个选项为:
–prefix=<scws的安装目录>
–disable-mmap     <这表示禁用 MMAP 来读取 xdb,在 debian, ubuntu 的部分 Linux 中建议关闭 mmap>
–enable-developer <这表示以开发者模式编译,主要是用于调试编译时加入了 -g 选项及部分标准输出的信息>
4. 正常的话已经编译并安装成功到 /usr/local/scws 中了,执行下面命令看看文件是否存在
ls -al /usr/local/scws/lib/libscws.la
5. 试试执行 scws-cli 文件
/usr/local/scws/bin/scws -h
scws (scws-cli/1.0.4)
Simple Chinese Word Segmentation – Command line usage.
Copyright (C)2007 by hightman.

6 用 wget [...]

Read the rest of this entry »