2009年02月 的归档

lighttpd + webpy 启动时出错

调了大半天,火挺大,还好总算解决了。

运行环境:

  • gentoo
  • python 2.5.2
  • lighttpd 1.4.21
  • webpy 0.31

直接跑 /work/www/test/main.py 没问题,交给跑 fastcgi 就有问题,错误提示:

2009-02-22 06:09:47: (log.c.97) server started 2009-02-22 06:09:47: (mod_fastcgi.c.1051) the fastcgi-backend /work/www/test/main.py failed to start: 2009-02-22 06:09:47: (mod_fastcgi.c.1055) child exited with status 1 /work/www/test/main.py 2009-02-22 06:09:47: (mod_fastcgi.c.1058) If you're trying to run PHP as a FastCGI backend, make sure you're using the FastCGI-enabled version. You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT '(cgi)' NOR '(cli)'. For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add 'fa

继续阅读本文……

发表评论 (2)

注册 Paypal 帐户时添加信用卡失败

提示如下:

发行您的信用卡的银行已经拒绝了此信用卡。有关您的信用卡被拒绝的详情,请联系您的信用卡发卡方的客户服务部门。您也可以尝试添加别的信用卡。

原因是卡片额度不足:

我们会从您的信用卡收取 $ 1.95 USD。在您的卡得到确认后,我们会将此扣款退还至您的PayPal账户。

修改额度后,再次添加信用卡,就注册成功了!

以后就试试用 Paypal 啦。

-- EOF --

继续阅读本文……

发表评论

配置 Linux 内核,并利用 iptables 作端口映射

  • 主机 IP:192.168.1.100
  • 目标机 IP:192.168.2.101

要求将到主机 192.168.1.100:11101 的请求映射到内部网目标机的 sshd 服务端口上,即:192.168.2.101:22。

配置内核(以 2.6.18 为例)

如果执行 iptable -L 出现以下信息,那么就需要重新配置和编译内核:

iptables v1.4.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

继续阅读本文……

发表评论

解决 xend stop 后无法还原网络配置的问题

我使用的是 3.3.0 版本的 xen 及管理工具。

在 Xen 官网的用户手册(http://tx.downloads.xensource.com/downloads/docs/user/)的 5.2.2 节中提到:

network-bridge:

This script is called whenever xend is started or stopped to respectively initialize or tear down the Xen virtual network. In the default configuration initialization creates the bridge `xen-br0' and moves eth0 onto that bridge, modifying the routing accordingly. When xend exits, it deletes the Xen bridge and removes eth0, restoring the normal IP and routing configuration.

也就是说,在使用桥接网络时:

  • xend 开始时,会创建 xen-br0,并将物理网卡 eth0 的配置复制到该桥上;
  • xend 停止时,将会删除 eth0,并还原物理网卡。

发表评论

让 Kohama 支持 Unix Domain Socket 方式连接到 MySQL

我使用的 Kohana 版本为 2.3.1。

虽然数据库配置上留有 socket 的接口,但是配置后仍然不会使用到这个 socket。

只好对框架代码进行修改,如下(粗体部分

继续阅读本文……

发表评论

对希捷 500G ST3500320AS 进行固件升级

上个月一块新买没几个月的希捷 500G 硬盘挂了,导致我的大部分数据丢失。从福州大利嘉城的配机情况得知,这不只是个别现象,有许多人都碰到这样的问题。

今天偶然在希捷的网站上看到这样的通告

在极少数 Seagate Barracuda 7200.11 硬盘中发现一个固件问题,该问题导致开/关电源后可能无法访问数据。受影响的产品是 Barracuda 7200.11、Barracuda ES.2 SATA 和 DiamondMax 22。

通过分析现场返回数据,可以确定该风险极低,因此 Seagate 认为受影响的硬盘可以照常使用。不过,作为对客户满意度承诺的一部分,Seagate 提供免费固件升级。

继续阅读本文……

发表评论 (6)