cURL on freebsd

cURL on freebsd

am 31.03.2010 04:36:21 von Shane Hill

--0016363b7fa697dc1204830f9c54
Content-Type: text/plain; charset=ISO-8859-1

can anyone tell me why the cURL code below produces a POST request as
expected on linux, but the same code on freebsd is forced to be a GET
request?

the linux box is running php 5.2.11
the freebsd box is running 5.3.2

is there a bug in 5.3.2? a search does not turn anything up.

=============================

function makePostRequest( $url , $params ) {
$ch = curl_init();

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$headers = array(
'Content-type: application/json',
'Expect:'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_UPLOAD, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$content = curl_exec($ch);

$errorCode = (int)curl_getinfo($ch,
CURLINFO_HTTP_CODE);
return array("content" => $content, "errorCode" =>
$errorCode);
}

--0016363b7fa697dc1204830f9c54--

Re: cURL on freebsd

am 31.03.2010 04:50:53 von Tommy Pham

On Tue, Mar 30, 2010 at 7:36 PM, Shane Hill wrote:
> can anyone tell me why the cURL code below produces a POST request as
> expected on linux, but the same code on freebsd is forced to be a GET
> request?
>
> the linux box is running php 5.2.11
> the freebsd box is running 5.3.2
>
> is there a bug in 5.3.2?  a search does not turn anything up.
>

Just curious, what version of FreeBSD? Did you compile PHP &
extensions or used the packages?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: cURL on freebsd

am 31.03.2010 06:15:43 von Shane Hill

On Mar 30, 2010, at 19:50, Tommy Pham wrote:

> On Tue, Mar 30, 2010 at 7:36 PM, Shane Hill
> wrote:
>> can anyone tell me why the cURL code below produces a POST request as
>> expected on linux, but the same code on freebsd is forced to be a GET
>> request?
>>
>> the linux box is running php 5.2.11
>> the freebsd box is running 5.3.2
>>
>> is there a bug in 5.3.2? a search does not turn anything up.
>>
>
> Just curious, what version of FreeBSD? Did you compile PHP &
> extensions or used the packages?

Freebsd 7.2 stable

I compiled everything

enohPi ym morf tnes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php