From: Peter G. <pgr...@ge...> - 2004-07-09 00:05:30
|
My guess would be that it is a permission issue from running udner apache.. did you look at your apache error log files? What os are you using? Can you run this script under apache directly (as cgi say) instead of calling it throught php? I remember that I had to manually change some permissions on some of the matplotlib (or maybe the font packages that come with it) stuff to get things running... Peter Jonathan Hanson wrote: > 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. > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital > self defense, top technical experts, no vendor pitches, unmatched > networking opportunities. Visit www.blackhat.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |