php上的ubuntu proc_open命令错误与python

i faced this problem while i was trying to use youtube-dl by php on ubuntu.

I am using XAMPP for Linux v1.8.3 (PHP 5.5.9)


The error i received after executing:

{"status":0,"errors":"Traceback (most recent call last): File \"/usr/bin/youtube-dl\", line 3, in import youtube_dl File \"/usr/lib/python2.7/dist-packages/youtube_dl/_init_.py\", line 65, in from .utils import ( File \"/usr/lib/python2.7/dist-packages/youtube_dl/utils.py\", line 18, in import ssl File \"/usr/lib/python2.7/ssl.py\", line 61, in import _ssl # if we can't import it, let the error propagate ImportError: /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so: symbol GENERAL_NAME_free, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference

And this is my php code

<?php
    $url = 'https://www.youtube.com/watch?v=xFQFMSNZW08&list=RDV-jLo0Ovems';
    //escapeshellarg
    $string = ('youtube-dl --max-quality 2180 --write-thumbnail -x --audio-format mp3 -c -o "/home/bahaa/%(id)s.%(ext)s" https://www.youtube.com/watch?v=xFQFMSNZW08&list=RDV-jLo0Ovems');

    $descriptorspec = array(
        0 => array("pipe", "r"),  // stdin
        1 => array("pipe", "w"),  // stdout
        2 => array("pipe", "w"),  // stderr
    );

    $process = proc_open($string, $descriptorspec, $pipes);
    $stdout = stream_get_contents($pipes[1]);
    fclose($pipes[1]);
    $stderr = stream_get_contents($pipes[2]);
    fclose($pipes[2]);
    $ret = proc_close($process);
    echo json_encode(
        array(
            'status' => $ret,
            'errors' => str_replace(array('', "
"), "<br />", $stderr."<hr />"),
            'output' => $stdout,
        )
    );
?>

Any help will be appreciated.