Curlopt_Connect_Only Option Not Aviable,

Hello - I am very new to YII & PHP. Though I’ve hit a brick wall with using cURL inside YII/PHP. I am running a Ubuntu 12.04LTS Server, installed a Bitnami LAPP stack, and YII 1.1.14 framework in that stack. I’ve successfully setup my YIIC created website, ran GII to connect to my postgres DB and created several models, controllers and views. On one view I have an HTML button, that when pressed should send a curl command to a URL. the URL address sent IS the command that the remote server will execute on. with no response need. So I don’t want to get any data or webpages from the remote server. I just have to connect to the URL. I can confirm that I am able to send the URL command via Curl, and the remote server executes what it needs to do on its end. However, my YII view goes away and a “404 file /index.html not found on server” is displayed. This might be the cURL code trying to display the index.html file from the remote server (which I don’t want anyway). I’d like to just have my original YII view that has the button on it stay active. Here’s my YII view PHP/HTML code with the cURl statements.

<form method="POST" action=''>

<input type="submit" name="B1R1ON"  value="Turn On">



/* @var $this SiteController */

$this->pageTitle=Yii::app()->name . ' - Relay Control';


	'Relay Control',


if (isset($_POST['B1R1ON']))


	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL,'urlsiteIPadd/run?=ON');

	curl_exec ($ch);

	curl_close ($ch);

	echo "Bank 1 Relay 1 has been Turned ON" . "<br/>";


Now it would seem that if I just connect to the remote server, this would work. However, whenever I try to add the line:

curl_setopt($ch, CURLOPT_CONNECT_ONLY, 1);

the PHP code debugger gives me an error of : “Use of undefined constant CURLOPT_CONNECT_ONLY - assumed ‘CURLOPT_CONNECT_ONLY’ '”

I am using KOMODO edit to edit my php files on the webserver. When I type I get curl code auto-completion help. The option "CURLOPT_CONNECT_ONLY" is not available/shown.

I have looked all over the web and this forum for hints to a solution. I’ve verified that my webserver has curl, php5-curl, php5.5 or newer installed. I’ve restarted the apache server and rebooted the whole machine. I’ve made sure that my php.ini file has the php_curl.dll line uncommented. I’ve tried using set_easy_curl() commands, which works in a QT/C++ application perfectly with the same remote server commands, though it doesn’t work in the YII/PHP. I’ve tried the YII wrapper, though that does not get connected at all to the remote server, and loads the CURL.php file into my view after I press the button

Any assistance in pointing me to how I can get access to the CONNECT_ONLY option, or to prevent CURLOPT_URL from displaying the remote servers index.html file and leaving my YII view up, would be highly appreciated. This question might need to go onto the CURL forum, but since I can get curl to activate the remote server command, I thought it best to start with my YII / web server setup. Thanks