1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Issue with curl /ssl/ php5

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by kadoudal, Apr 11, 2011.

  1. kadoudal

    kadoudal Regular Pleskian

    27
    23%
    Joined:
    Nov 20, 2007
    Messages:
    244
    Likes Received:
    0
    what could be wrong ? PHP5, curl, SSL ( I have a self-generated certificate for my domain - Plesk console)

    thanks for your suggestions

    v3
     
  2. kadoudal

    kadoudal Regular Pleskian

    27
    23%
    Joined:
    Nov 20, 2007
    Messages:
    244
    Likes Received:
    0
    Acces Curl/ SSL from PHP5 script

    I made a mistake before sending .. (cut all the msg)

    here is the complete msg :

    I transferred a PHP script from a Centos5 server into our new server Debian5 (Lenny)
    now the curl request raises an error message :

    Curl error: error:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message

    script PHP (5.2.6-1) - Lenny 10 - curl : libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18 =======
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $APIUrl);
    curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequestData);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    $result = curl_exec($ch);
    curl_close($ch);
    return $result;
    ===========================================

    jI tried to use Curl in the console ( tested access to Plesk Plesk ) and it runs so is a Paypal request
    curl -k "https://www.paypal.com" --sslv3 ,

    what could be wrong ?

    httpdocs# dpkg -l | grep curl
    ii curl 7.18.2-8lenny4 Get a file from an HTTP, HTTPS or FTP server
    ii libcurl3 7.18.2-8lenny4 Multi-protocol file transfer library (OpenSS
    ii libcurl3-gnutls 7.18.2-8lenny4 Multi-protocol file transfer library (GnuTLS
    ii libcurl4-openssl-dev 7.18.2-8lenny4 Development files and documentation for libc
    ii php5-curl 5.2.6.dfsg.1-1+lenny10 CURL module for php5
     
    Last edited: Apr 11, 2011
Loading...