2008年12月6日 星期六

連接db的問題

使用Zend_Db連接資料庫時,最好使用$db->closeConnection()關閉每次
使用後的資料庫連結,以免產生一堆有的沒的問題,
這是上線後的網站實際發生的狀況,使用$db->closeConnection()後就少了一些問題,
win上的記憶體管理做得似乎並不好。

Zend Framework出現空白頁

錯誤訊息顯示:
Fatal error: Cannot redeclare class Zend_Loader in .....lib\Zend\Loader.php on line 31

查了一下php manual
require及include的差別

require:只要在程式中都會執行檔案含入的動作,不論是不是在判斷式中

include:只有判斷式正確,才會執行檔案含入的動作


看了一下含入的路徑,由於是windows平台
路徑是: d:\a\b\c/lib

改了一下程式碼

/lib改成 DIRECTORY_SEPARATOR.'lib'

路徑就成了d:\a\b\c\lib


經過這些手續,暫時消除這個問題,不過還要再觀察一陣子。

2008年10月14日 星期二

沒有轉址軟體時,使用zend framework的解法

http://akrabat.com/2008/06/03/zend-framework-urls-without-mod_rewrite/

2008年10月10日 星期五

mssql的分頁

http://blog.blueshop.com.tw/blackncc/archive/2007/01/06/49123.aspx

2008年10月9日 星期四

iis上支援轉址的免費軟體

http://cheeso.members.winisp.net/IIRF.aspx

2008年10月8日 星期三

連接mssql

http://www.zxbc.cn/html/20070506/13033.html

Zend_Framework 1.6的版本的protected $_pdoType已改為mssql

http://mlblog.osdir.com/php.zend.framework.general/2006-12/index.shtml

PDO, MSSQL and FreeTDS

Date: December 12, 2006
From: Todd Wolaver

Hi,


I'm using FreeTDS under Linux to access MSSQL databases, which won' t work with the framework since the PDO driver is dblib not mssql.

$db = Zend_Db::factory('pdo_mssql', $params);

will return:
"The mssql driver is not currently installed"

This is set in the Mssql.php PDO adapter (Zend_Db_Adapter_Pdo_Mssql):
43: protected $_pdoType = 'mssql';


If this is changed to dblib then it works. What would be the best way of implementing the dblib driver without changing the core code of the framework?

Thanks
Todd Wolaver


Zend_Framework 1.6的版本的protected $_pdoType已改為mssql