1 Vote Vote

PHP exec() problem with custom Python module

Posted by topdog 533 days ago Questions| python usr python usr All

Hi, I have installed a python module on my webserver.

When I do "whereis python" I get following path:

python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/include/python2.4 /usr/share/man/man1/python.1.gz

Later when I check my modules path, it was installed here:

/usr/llib/python2.4/site-packages/MyModule/myModule

Now in my PHP script, I am doing this:

exec("python /usr/lib/python2.4/site-packages/MyModule/myModule script.py -v pixfx.xml 2>&1", $output, $return);

This script does not get executed.

Any issues with what I am doing so far?

Thanks

******** edit *********

#! /usr/bin/env python 
import sys 
import os 
import getopt 
import re 
from fontTools.ttLib import TTFont 
from fontTools.ttLib.tables.otBase import OTLOffsetOverflowError 
from fontTools.ttLib.tables.otTables import fixLookupOverFlows, fixSubTableOverFlows     
from fontTools.misc.macCreatorType import getMacCreatorAndType 
from fontTools import version 

Originally asked by: ssdesign on Stack Overflow

Discuss Bury


Who Voted for this Question