cURL on freebsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
                }

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux