1

I am trying to call a Python script from PHP, with XAMPP. In the Python script there is a call to a function of the external library Kairos. The Python script runs well, if called from the terminal; a call from PHP to Python without the Kairos function works well either, but if I put the call to Kairos it does not work, returning error 1. If I put that line in a try-catch block, it gives the following error:

Max retries exceeded with url: /detect(SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

I tried following Setting up SSL on a local xampp/apache server but it did not work.

Here it is the code:

<?php 
$result = exec("/usr/bin/python /home/caterina/Scrivania/HRI_Codice/codice/prova_face.py",$output,$return_val);
echo $return_val;
var_dump($output);
echo $result;
?>

and the Python funct:

def prova(filename):
image = open(filename,'r')
try:
    recognized_faces = kairos_face.detect_face(file=filename)
except BaseException as e:
    print e

print filename
Caterina
  • 27
  • 6

0 Answers0