問題描述
ApacheMonitor 上的捲曲錯誤 (Curl error on ApacheMonitor)
我有一個似乎是錯誤的問題。我使用 Windows 7 x64,最近設置手動安裝 PHP (5.5.30) + Apache (2.4.17) + MySQL。我用擴展目錄設置了 php.ini 並發布了 php_curl.dll。之後我去Apache配置,加載模塊,指出php.ini目錄,通過終端安裝服務並準備好,正在運行php代碼。問題在嘗試運行curl命令時開始出現,例如:
curl_init ($ url);
Face出現錯誤:Call to undefined function curl_init()
經過測試和測試,發現執行的時候其他服務器上的相同代碼(xamp、WAMP、Vertrigo)代碼運行良好,包括內置的 PHP 服務器。了解更多後,我意識到通過 ApacheMonitor 運行服務器時總是會出現問題。在這樣做的過程中,錯誤是瞬時的,在手動 apache 服務器中也是如此,無論是“amp 的”自動。然後通過可執行的httpd.exe運行服務器,令我驚訝的是curl代碼運行了。
無論如何,我不知道是ApacheMonitor的錯誤,還是配置錯誤,我認為這不應該是正常的我認為這有一些東西阻止它運行。這會有一個簡單的解決方案嗎?
感謝大家的傾聽,抱歉我的英語不好,我是巴西人,我正在學習,為谷歌翻譯提供了很多陪伴
然後通過可執行的httpd.exe運行服務器,令我驚訝的是curl代碼運行了。無論如何,我不知道是ApacheMonitor的錯誤,還是配置錯誤,我認為這不應該是正常的我認為這有一些東西阻止它運行。這會有一個簡單的解決方案嗎?
感謝大家的傾聽,抱歉我的英語不好,我是巴西人,我正在學習,為谷歌翻譯提供了很多陪伴
然後通過可執行的httpd.exe運行服務器,令我驚訝的是curl代碼運行了。無論如何,我不知道是ApacheMonitor的錯誤,還是配置錯誤,我認為這不應該是正常的我認為這有一些東西阻止它運行。這會有一個簡單的解決方案嗎?
感謝大家的傾聽,抱歉我的英語不好,我是巴西人,我正在學習,為谷歌翻譯提供了很多陪伴
參考解法
方法 1:
You don't have curl support in your PHP
Go to your php.ini file and remove the ; mark from the beginning of the following line:
;extension=php_curl.dll
ubuntu 13.0 and above, simply use the debundled package. In a terminal type the following to install it and do not forgot to restart server.
sudo apt‑get install php5‑curl
(by Leandro Rodrigues、Jah)