住展 iamsheny
購屋五步曲
貸款試算
2011年3月1日 星期二
無法載入mysql擴展 解決辦法php_mcrypt.dll需要libmcrypt.dll
原因:php_mcrypt.dll需要libmcrypt.dll支持。
解決方法如下:
1). 在php.ini配置文件中,搜索 ;extension=php_mcrypt.dll
將php_mcrypt.dll前的 " ; "分號去掉改成
extension=php_mcrypt.dll
2). 從php5中複製 libmcrypt.dll 到system32目錄下。
3). 修改完後重起iis(iis必須在cmd下用iisreset 命令重起服務器,在「Internet 信息服務」重啟無效)或Apache。
解決方法如下:
1). 在php.ini配置文件中,搜索 ;extension=php_mcrypt.dll
將php_mcrypt.dll前的 " ; "分號去掉改成
extension=php_mcrypt.dll
2). 從php5中複製 libmcrypt.dll 到system32目錄下。
3). 修改完後重起iis(iis必須在cmd下用iisreset 命令重起服務器,在「Internet 信息服務」重啟無效)或Apache。
2011年2月7日 星期一
[MySQL特有語法] 變更Table欄位順序
代碼:
ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name column_definition [FIRST|AFTER col_name]
範例:
number1 column:varchar(64) default NULL 在 number2 column 之前,現在要將number1搬到number2之後。
alter table test change column number1 number1 varchar(64) default NULL after number2;
ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name column_definition [FIRST|AFTER col_name]
範例:
number1 column:varchar(64) default NULL 在 number2 column 之前,現在要將number1搬到number2之後。
alter table test change column number1 number1 varchar(64) default NULL after number2;
使用 MySQL 時遇到 Can't connect to MySQL server 問題…
如果你的程式使用了太多的 mysqlpp::Connection 物件,會導致你的系統殘存太多的 TCP Connection 在 TIME_WAIT,一旦系統有超過可使用的數量,則會導致無法在建立連線,進而導致 mysqlpp::Connection 無法連線到 mysql 伺服器。
針對此問題,mysql 官方手冊有提到如何對應:
2 Connection to MySQL Server Failing on Windows
When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows doesn't allow for enough ephemeral (short-lived) ports to serve those connections. ... 閱讀全文
跟著文章的方式修改 reg 註冊表,重開機後即可增加連線數量。
針對此問題,mysql 官方手冊有提到如何對應:
2 Connection to MySQL Server Failing on Windows
When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows doesn't allow for enough ephemeral (short-lived) ports to serve those connections. ... 閱讀全文
跟著文章的方式修改 reg 註冊表,重開機後即可增加連線數量。
2011年1月30日 星期日
訂閱:
意見 (Atom)