I have the following methods in my class:
public function __construct(){
$this->handle = curl_init();
}
public function setOptArrayAndExecute(){
$curlArray = curl_setopt_array(
$this->handle,
array(
CURLOPT_URL => $this->getUrl(),
CURLOPT_USERAGENT => $this->getUserAgent(),
CURLOPT_COOKIEJAR => $this->getCookie(),
CURLOPT_COOKIEFILE => $this->getCookie(),
CURLOPT_REFERER => $this->getReferer(),
CURLOPT_TIMEOUT => $this->getTimeOut(),
CURLOPT_FOLLOWLOCATION => true
)
);
ob_start(); //<-- Execution stops here
curl_exec($this->handle);
$this->response = ob_get_contents();
curl_close($this->handle);
ob_end_clean();
return $this->response;
}
So I just wrote down the specific part of code instead of the whole class. I watched my php.ini: Output buffering is set 'On'. I also have error reporting activated:
error_reporting(E_ALL);
ini_set('display_errors', 1);
My PHP Version is 5.4.3.
The script just stops at ob_start()
without any notice or error report ...
I have no clue what I missed out or what I did wrong. I really apreciate your help.