2012-09-05 46 views
12

運行從Internet下載的源代碼時出現此錯誤。如何解決它?這似乎是PHP版本問題。我使用PHP 5.3。使用未定義常量

[Wed Sep 05 20:31:40 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 209 
[Wed Sep 05 20:31:40 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_CONNECTTIMEOUT - assumed 'CURLOPT_CONNECTTIMEOUT' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 210 
[Wed Sep 05 20:31:40 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_TIMEOUT - assumed 'CURLOPT_TIMEOUT' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 211 
[Wed Sep 05 20:31:40 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_FAILONERROR - assumed 'CURLOPT_FAILONERROR' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 212 
[Wed Sep 05 20:31:40 2012] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function curl_init() in /home/hieugioi/Workspace/PHP/Couponic/framework/uniprogy/extensions/curl/CURL.php on line 22 
[Wed Sep 05 20:33:15 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 209 
[Wed Sep 05 20:33:15 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_CONNECTTIMEOUT - assumed 'CURLOPT_CONNECTTIMEOUT' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 210 
[Wed Sep 05 20:33:15 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_TIMEOUT - assumed 'CURLOPT_TIMEOUT' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 211 
[Wed Sep 05 20:33:15 2012] [error] [client 127.0.0.1] PHP Notice: Use of undefined constant CURLOPT_FAILONERROR - assumed 'CURLOPT_FAILONERROR' in /home/hieugioi/Workspace/PHP/Couponic/protected/modules/location/worklets/WLocationHelper.php on line 212 
[Wed Sep 05 20:33:15 2012] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function curl_init() in /home/hieugioi/Workspace/PHP/Couponic/framework/uniprogy/extensions/curl/CURL.php on line 22 
+3

檢查curl是否使用phpinfo()安裝 – Nin

+0

通知如何? – Emerald214

+0

那些常量是curl的一部分 – Nin

回答

25

安裝捲曲和你所有的問題都會消失:)

+3

或者至少是錯誤日誌中的通知:P –

+0

我已經安裝了curl,並且出現此消息。 Mhh ... – kwoxer

+0

@kwoxer檢查curl是否真正安裝了phpinfo() – Nin

21

安裝php5-curl。對於Debian,使用

$ apt-get install php5-curl