phpBB2.0.18 如何支援 PHP5?
版主: 版主管理群
版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
抱歉,剛剛在翻 mysql 的 manual,發現我上面的內容有錯 (居然沒有人在看chiouss 寫:不是b90220208 寫:不知其意思是說在 PHP5 還要配合用 MYSQLI_CONNECT() 來連線 MYSQL 4.1 以上板之 SERVER 作認證時才沒問題 ?是b90220208 寫: 還是說只要是用 PHP5 的 MYSQL_CONNECT() 就沒問題了…
而原文只是在解釋 MYSQLI EXTENSIONS 也有支援 MYSQL 4.1 以上的認證機制 ?
根據 MySQL Manual 的說法,要能夠使用新的 password hashing 有幾種方式:
- 更新 client,或是讓 client program 使用新的 client library
- 如果沒更新 client 或是 client library,那就使用舊的帳號登入 (舊的帳號 password 欄位必須還是使用舊的 password hashing 方式)
- 改密碼:
代碼: 選擇全部
SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd'); - 告訴 server 用舊的 password hashing:啟動 mysqld 時加上 --old-passwords 然後使用 3. 的方式把密碼也改成舊的。
如果沒有更新 client library 的話,即使是用 PHP5,mysql_* 還是沒辦法連上 MySQL 4.1.1 之後的版本,mysqli 我就不知道了。希望我沒搞錯最後這段話的意思。Note: In PHP, the mysql extension does not support the new authentication protocol in MySQL 4.1.1 and higher. This is true regardless of the PHP version being used. If you wish to use the mysql extension with MySQL 4.1 or newer, you will need to follow one of the options discussed above for configuring MySQL to work with old clients. The mysqli extension (stands for "MySQL, Improved"; new in PHP 5) is compatible with the improved password hashing employed in MySQL 4.1 and higher, and no special configuration of MySQL need be done in order to use this newer MySQL client library for PHP. For more information about the mysqli extension, see http://php.net/mysqli.
