I'm having issues importing matplotlib into my python script, but only when runing under PHP.
The line:
from matplotlib import *
causes my .py script to return an error code "1" when being called from inside a PHP script. However, the script runs just fine when called from the command line.
If i comment out the above line and all the matplotlib-related commands in my script, it will run just fine (but without plots of course). But the include command alone is enough to cause an error 1 return.
I have been through every documentation source I can find, I've tried every variation of import i can think of, and I've come up with a big fat 0. I've tried something like:
sys.path.append("/usr/lib/python2.3/site-packages/matplotlib")
after the sys import and before the matplotlib import thinking there was a path issue with the apache user, and got jack squat out of that.
Has anyone else had issues calling python scripts from inside PHP? All my other imports below:
# Module Imports
from optparse import OptionParser
import sys
#from matplotlib import *
from os import listdir
from string import split
from array import array
from time import time#, ctime
work just fine. I've been on this for 3 solid days, someone either shoot me or help me! Thanks.