2012-09-05 15 views
12

Aparece este error al ejecutar un código fuente descargado de Internet. ¿Como arreglarlo? Parece ser el problema de la versión de PHP. Yo uso PHP 5.3.Uso de constante indefinida

[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

Compruebe si curl está instalado usando phpinfo() – Nin

+0

¿Qué le parece el Aviso? – Emerald214

+0

esas constantes son parte de curl – Nin

Respuesta

25

Instalar rizo y todos sus problemas desaparecerán :)

+3

O al menos los avisos en el registro de errores: P –

+0

Tengo curl instalado y aparece este mensaje. Mhh ... – kwoxer

+0

@kwoxer Compruebe si curl realmente está instalado con phpinfo() – Nin

21

Instalar php5-curl. Para Debian, use

$ apt-get install php5-curl