whmcs迁移故障一例

作者:linux120 发布时间:April 16, 2013 分类:服务器维护

帮一客户将whmcs从apache+mod_php迁移至nginx+php-fpm,迁移过程不细表,有以下两个问题。
1、中文乱码
默认whmcs系统数据库使用的是latin1编码,dump数据库的时候需要指定默认编码。
2、路径错误
检查$smarty.server.PHP_SELF的值没有正确获取到,$smarty.server.PHP_SELF又是直接读取系统$_SERVER['PHP_SELF']的,该值也为空,遂检查php-fpm中的设置cgi.fix_pathinfo为0,将cgi.fix_pathinfo改为1后重启php-fpm问题解决。

CentOS挂载NFS失败一例

作者:linux120 发布时间:April 14, 2013 分类:服务器配置

执行mount -t nfs -o rw 10.51.8.8:/volume1/330 /mnt提示如下错误:
mount: wrong fs type, bad option, bad superblock on 10.51.8.8:/volume1/330,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
是因为没有安装nfs-utils,centos 6下执行yum install nfs-utils rpcbind -y安装即可。

再次加载提示如下信息:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
提示statd服务没有运行所以需要启动该服务或者使用-o nolock来正常挂载。