note 107314 added to function.curl-setopt

From: Date: Mon, 30 Jan 2012 11:51:39 +0000
Subject: note 107314 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-185793@lists.php.net to get a copy of this message
I've been stuck when using the CURLOPT_CONNECTTIMEOUT_MS constant. In fact, on my PHP version (5.3.1) it's not a number but rather a string. Same thing for CURLOPT_TIMEOUT_MS. I got this error: Warning: curl_setopt() expects parameter 2 to be long, string given If you are experiencing simular problems, you can replace the constant with the actual number or (re)define the constant. CURLOPT_TIMEOUT_MS should be 155 CURLOPT_CONNECTTIMEOUT_MS should be 156 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 2500); // error curl_setopt($ch, 156, 2500); // problem solved ---- Server IP: 213.249.64.162 Probable Submitter: 82.176.103.177 ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- https://master.php.net/note/edit/107314 Del: integrated -- https://master.php.net/note/delete/107314/integrated Del: useless -- https://master.php.net/note/delete/107314/useless Del: bad code -- https://master.php.net/note/delete/107314/bad+code Del: spam -- https://master.php.net/note/delete/107314/spam Del: non-english -- https://master.php.net/note/delete/107314/non-english Del: in docs -- https://master.php.net/note/delete/107314/in+docs Del: other reasons-- https://master.php.net/note/delete/107314 Reject -- https://master.php.net/note/reject/107314 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185793) next »