+1  A: 

Should you be doing

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

OR

exec("/usr/bin/python/python /usr/lib/python2.4/site-packages/MyModule/myModule script.py -v pixfx.xml 2>&1", $output, $return);
RobertPitt
Should not be doing?
ircmaxell
sorry, Should you be doing*
RobertPitt
thanks, that worked.
ssdesign
ok I ran into another bug after I got the exec() to work.I have the module installed correctly, still I get following error:************ Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MyModule/myModulw/script.py", line 60, in ? from myModule.ttLib import TTFont ImportError: No module named myModule.ttLib**************Any idea?
ssdesign
you would have to show the source of `script.py` and it loks like it cant import some fonts, im not that good at Python but if you post your code ill take a look
RobertPitt
The script itself is about generating fonts. Thats why you see things like "TTFont" etc. These are module names :)
ssdesign
uts not the modules causing the script, its a parser error, witch to fix we need the source code of the .py
RobertPitt
Hi,THis is how the .py script looks like:**************** #! /usr/bin/env pythonimport sysimport osimport getoptimport refrom fontTools.ttLib import TTFontfrom fontTools.ttLib.tables.otBase import OTLOffsetOverflowErrorfrom fontTools.ttLib.tables.otTables import fixLookupOverFlows, fixSubTableOverFlowsfrom fontTools.misc.macCreatorType import getMacCreatorAndTypefrom fontTools import version************************************ I have removed all the comments.... so the line 60 is "from fontTools.ttLib import TTFont"
ssdesign
to add to my previous comment: TTFont is a "class" defined in a file called __init__.py inside a folder called "ttLib" which is again inside a folder called "fontTools".
ssdesign
that was supposed to be two underscores before and after 'init' :)
ssdesign
can you append it to your OP please and wrap it in some code tags
RobertPitt
appended the code
ssdesign
are you sure that 'fontTools.ttLib' contains the module 'TTFont' ? the library seems to exists but within the library the module is failing, try re downloading the module.
RobertPitt
yes TTFont is a class defined inside a python file called (doubleunderscore)init(doubleunderscore).py............ this file resides inside a folder called ttLib, which is inside a foler called fontTools (where my python script is).
ssdesign
your best bet is to make a new Post and ask specifically about this issue, i understand the structure of pythen but thats as far as i go, sorry mate.
RobertPitt
I just did help('modules') in SSH and the list returned does not contain FontTools.... how come? Does it mean the module is not installed and it is just residing in site-packages?
ssdesign
i would think so, http://docs.python.org/distutils/apiref.html#module-distutils.command.register
RobertPitt
A: 

You might find it useful to debug under the user that php is running under, ie www-data, apache, etc. This is helpful for uncovering any permission, path or environment issues that may arise.

Dana the Sane
Hi, how to debug under user?
ssdesign