使用Zend_Db連接資料庫時,最好使用$db->closeConnection()關閉每次
使用後的資料庫連結,以免產生一堆有的沒的問題,
這是上線後的網站實際發生的狀況,使用$db->closeConnection()後就少了一些問題,
win上的記憶體管理做得似乎並不好。
2008年12月6日 星期六
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
經過這些手續,暫時消除這個問題,不過還要再觀察一陣子。
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日 星期二
2008年10月10日 星期五
2008年10月9日 星期四
2008年10月8日 星期三
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
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
訂閱:
文章 (Atom)