博客從虛擬主機遷到 VPS 后,開始水土不服,曝各種問題,當然,水土不服是屁話,WordPress 運行環境不一樣,各種配置需要做調整才是真的.
比如這 WordPress 后臺上傳圖片的問題:
There are no HTTP transports available which can complete the requested request.
有人說是缺少 php5-curl 模塊的緣故,我服務器系統跑的是 openSUSE 13.1 64位,檢查 php5-curl 的情況,代碼如下:
zypper info php5-curl
輸出結果如下:
- Information for package php5-curl:
- ----------------------------------
- Repository: openSUSE-13.1-Update
- Name: php5-curl
- Version: 5.4.20-30.1
- Arch: i586
- Vendor: openSUSE
- Installed: No
- Status: not installed
- Installed Size: 70.2 KiB
- Summary: PHP5 Extension Module
- Description: //開源軟件:Vevb.com
- PHP interface to libcurl that allows you to connect to and communicate
- with servers of many different types, using protocols of many different
- types.
請注意 Installed: No,確實未曾安裝,且安裝一下,代碼如下:
sudo zypper install php5-curl
然后重啟服務器上的 Apache:
sudo /usr/sbin/rcapache2 restart
之后圖片就可以上傳,不再報錯,有些人說要改 php.ini 文件配置,我的情況則不需要.
新聞熱點
疑難解答
圖片精選