IT log

moral & concision is my dream.

Host error log

在为 phpBB 安装 GYM Sitemaps & RSS module 2.0.RC5 后,rss 倒是能通过访问 http://bbs.zuolo.info/gymrss.php?news&digest 正常生成,现已被我用 google feedburner 烧录为 http://feeds.feedburner.com/itbbs,不过可惜重烧录后内容无法实现换行了。

http://bbs.zuolo.info/sitemap.php 本来应该可以生成 Google Sitemap 文件的,但在我实际使用中却出现了服务器错误:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@bbs.zuolo.info and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at bbs.zuolo.info Port 80

Read more…

posted by Leon Tsang in Live - Work and Struggle and have No Comments

setup zend optimizer in linux centos

今天,在我的项目模板的调试功能中集成了查看 phpinfo() 的文件,发现竟然没有安装 zend optimizer 插件。

zend optimizer 的作用:

主要有两个功能,一个为加速php脚本的执行,第二为给用zend加密的文件解密
所以一般来说,如果php的脚本没有经过加密,那么zend optimizer可以不用安装!
关于zend optimizer的加速功能,一般可以让php的执行速度提高到30%左右!
所以如果是独立主机用户,最好是将zend optimizer安装上,这样不仅可以起到加速的作用,而且可以使你的空间完全

我的安装指令:

wget http://mostproject.googlecode.com/files/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
tar zxvf ZendOptimizer*
cd ZendOptimizer*
./install.sh

注:安装程序会自动修改 /etc/php.ini 文件和重启apache,我所做的只是在安装的字符界面不停地点击回车确认。
安装完成后, php.ini 最底部会新增参数:

[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

Read more…

posted by Leon Tsang in Live - Work and Struggle and have No Comments

multiple select list box & Javascript & PHP

多个复选框的参数传输我以前用数组就实现了, 这次遇到的问题是所谓的 “多项选择列表框” 提交后, 用PHP 遍历 $_POST和 $_GET 都只能得到一个参数.

看了现在的 php 版本还不支持, 只得先采用 javascript 代码来中介了.

var specid_h=document.getElementById(‘specid_h’);
for(var i=0;i<specid.options.length;i++){
if(specid.options[i].selected){
if(specid_h.value){specid_h.value=specid_h.value+”|”+specid.options[i].value;}
else{specid_h.value=specid.options[i].value;}
}
}

然后再在 php 代码中拆分成数组:

print_r(Split(“\|”,$_POST['specid_h']));

现在是凌晨4:12, 解决了这个问题后, 剩下图表控制代码我应该可以在 4:30前搞掂, 就可以放心睡觉了, 上午给高强他们简单的培训一下, 中午就可以坐火车回东莞了…

posted by Leon Tsang in Live - Work and Struggle and have No Comments