星期二, 十二月 30, 2008

PHP SSL Apache Windows

PHP 在 5 以後已經內建支援 SSL 了 (這邊指的是發送 SSL request, 與 Apache 承接 https:// 。沒有關係,一個是 request, 一個是接 request)

安裝的方式很簡單,就是將

1. php.ini 打開 (將 ; 拿掉)
extension=php_openssl.dll
extension=php_sockets.dll (建議也打開)

2. 把 php folder 下的 libeay32.dll, 與 ssleay32.dll 拷貝到 windows/system32 下
重啟 apache.

理論上應該就可以了,不過你如果跟我一樣安裝的 apache 有含 openssl, 那就可能跟我一樣花了很多時間

因為根據 windows 的設計, 他會先搜尋 (根據下面那段英文字) apache/bin,
所以 php 內建的永遠跑不到了. 所以覆蓋到 apache/bin 去吧. 因為他才是應用程式的執行地方.

"
When any application attempts to use a dll file in windows, the system searches for this file using the following order:
1. The directory from which the application loaded.
2. The windows\system32 directory.
3. The windows\system directory.
4. The windows directory.
5. The current directory.
6. The directories that are listed in the PATH environment variable.
"

這篇文章完整描述了問題與解決方式. (看 log 最重要, 再來是看官網)
http://tw2.php.net/manual/en/openssl.installation.php

星期四, 八月 14, 2008

autorun.inf

使用 windows 與隨身碟的人常常會遇到這個病毒

會導致檔案總管無法開啟隨身碟的磁碟.

所以我的神犬同事. 就告訴我了一個方法

在磁碟機裡建立一個目錄. 取名叫做 autorun.inf

星期五, 六月 27, 2008

Winodws XP 程式集選單上無法按右鍵

之前重灌電腦後, 一直無法在程式集上的選單上按右鍵.
導致無法排序程式集名稱 也無法建立shortcut 至桌面上
google 了好久都沒有發現. 後來終於在 ptt 上找到解法

--

[控制台] -> [工作列和[開始]功能表] -> [[開始]功能表]

如果選用[[開始]功能表] -> [自訂] -> [進階] -> [啟用拖曳功能]

如果選用[傳統[開始]功能表] -> [自訂] -> [啟用拖曳功能]

之後再點選[確定]離開 :)

星期日, 四月 27, 2008

[FreeBSD] 改了 root 的 shell , 結果無法登入

每個灌完 Unix-Like 的人. 應該都會想要改成自己習慣的 shell.
不過如果你將 root 的 shell 改成一個不存在的 shell, 會導致無法登入
這時候有個方法可以解決

進入 single user mode
(ps. 如果沒出現選單, 則在開機倒數時按下非 Enter 任意鍵中斷開機程序
鍵入 boot -s 進入單人模式)

鍵入 mount -a
鍵入 vipw 修改 root 的 shell 即可