I do know that this is not relatated to Phalcon BUT I really need to know the solution for my problem!
I am trying to run a Python script in PHP from the exec command. Works fine in terminal, but when i run it in PHP i get the following error:
Array (  => sh: sysctl: command not found  => Traceback (most recent call last):  => File "../server/search.py", line 5, in  => from pyimagesearch.colordescriptor import ColorDescriptor  => File "/Applications/MAMP/htdocs/toys/server/pyimagesearch/colordescriptor.py", line 3, in  => import cv2  => File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv2/__init__.py", line 6, in  => os.environ["PATH"] += os.pathsep + os.path.dirname(os.path.realpath(__file__))  => File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 40, in __getitem__  => raise KeyError(key)  => KeyError: 'PATH' ) 1
My PHP script:
$response = exec("python ../server/search.py 2>&1", $output, $return); print_r($output); echo $return;
I think that when I run it in the webserver it can't find cv2 and "from pyimagesearch.colordescriptor" wich is in the folder
Sorry that it is not related to Phalcon, but if there is someone that can't spot the problem i would be thanksfull!