I think you're right...but thanks for your help and time! Sincerely, Erin On Thu, Oct 31, 2013 at 10:01 AM, R. Michael Weylandt < michael.weylandt@gmail.com> wrote: > This really has become a python discussion and is probably better held > elsewhere, but my hunch is that you give a relative path and Apache doesn't > start python with the pwd you expect. > > Michael > > On Oct 31, 2013, at 9:12, Erin Hodgess wrote: > > I checked the error logs, and the error appears on the line in which I > open the bz2.R file. It's definitely there, and I set the permissions to > 777 for experimental permissions. > > > > On Thu, Oct 31, 2013 at 7:04 AM, R. Michael Weylandt < > michael.weylandt@gmail.com> wrote: > >> >> >> On Oct 31, 2013, at 1:50, Erin Hodgess wrote: >> >> > Hi again: >> > >> > Here is the web output: >> > >> > Internal Server Error >> > >> > The server encountered an internal error or misconfiguration and was >> unable >> > to complete your request. >> >> So your Python code is raising an exception somewhere, not the apache >> config. >> > >> > Please contact the server administrator, webmaster@erinm.info and >> inform >> > them of the time the error occurred, and anything you might have done >> that >> > may have caused the error. >> > >> > More information about this error may be available in the server error >> log. >> >> Can you check these? >> >> > >> > Additionally, a 404 Not Found error was encountered while trying to use >> an >> > ErrorDocument to handle the request. >> > I did indeed check permissions and they seem to be in order. >> >> Yes, they do seem to be; you'd be getting a 403 otherwise. >> >> > >> > Thanks, >> > Erin >> > >> > >> > >> > On Wed, Oct 30, 2013 at 10:51 PM, Collin Lynch >> wrote: >> > >> >> Erin can you share the internal error details? >> >> >> >> As a first guess are the files executable by all? CGI requires world >> rwx. >> >> >> >> Best, >> >> Collin. >> >> >> >> On Wed, 30 Oct 2013, Erin Hodgess wrote: >> >> >> >>> Hi again. >> >>> >> >>> I'm putting together a little project with R, python, and a website. >> So >> >> I >> >>> have an HTML file, a py file, an R file. >> >>> >> >>> Here is the HTML file: >> >>>
>> >>> Integrate >> >>> >> Differentiate >> >>> Graph >> >>> Function >> >>> >> >>>
>> >>> >> >>> Now the radio4.py file: >> >>> >> >>> # Import modules for CGI handling >> >>> import cgi, cgitb >> >>> from sympy import * >> >>> import sys >> >>> >> >>> from rpy2.robjects.packages import >> SignatureTranslatedAnonymousPackage as >> >>> STAP >> >>> with open("bz2.R","r") as f: >> >>> string=''.join(f.readlines()) >> >>> etest = STAP(string,"etest") >> >>> etest.etest(500) >> >>> >> >>> >> >>> # Create instance of FieldStorage >> >>> form = cgi.FieldStorage() >> >>> >> >>> # Get data from fields >> >>> if form.getvalue('subject'): >> >>> subject = form.getvalue('subject') >> >>> else: >> >>> subject = "Not set" >> >>> >> >>> if form.getvalue('func1'): >> >>> func1 = form.getvalue('func1') >> >>> else: >> >>> func1 = "Not entered" >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> print "Content-type:text/html\r\n\r\n" >> >>> print "" >> >>> print "" >> >>> print "Test Project" >> >>> print "" >> >>> print "" >> >>> print "

Selected Action is %s

" % subject >> >>> print "

output function is %s

" % func1 >> >>> print "" >> >>> print "" >> >>> >> >>> >> >>> Finally, the bz2.R file: >> >>> >> >>> etest <- function(n=100) { >> >>> y <- rnorm(n) >> >>> pdf(file="lap1.png") >> >>> plot(y) >> >>> dev.off() >> >>> } >> >>> >> >>> >> >>> The radio4.py file is in a cgi-bin directory, along with the bz2.R >> file. >> >>> >> >>> I keep getting the Internal server error. >> >>> >> >>> Thanks for any help. >> >>> >> >>> Sincerely, >> >>> Erin >> >>> >> >>> This is R version 3.0.2 and Python 2.7.5 >> >>> >> >>> -- >> >>> Erin Hodgess >> >>> Associate Professor >> >>> Department of Computer and Mathematical Sciences >> >>> University of Houston - Downtown >> >>> mailto: erinm.hodgess@gmail.com >> >>> >> >>> [[alternative HTML version deleted]] >> >>> >> >>> ______________________________________________ >> >>> R-help@r-project.org mailing list >> >>> https://stat.ethz.ch/mailman/listinfo/r-help >> >>> PLEASE do read the posting guide >> >> http://www.R-project.org/posting-guide.html >> >>> and provide commented, minimal, self-contained, reproducible code. >> > >> > >> > -- >> > Erin Hodgess >> > Associate Professor >> > Department of Computer and Mathematical Sciences >> > University of Houston - Downtown >> > mailto: erinm.hodgess@gmail.com >> > >> > [[alternative HTML version deleted]] >> > >> > ______________________________________________ >> > R-help@r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-help >> > PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> > and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > Erin Hodgess > Associate Professor > Department of Computer and Mathematical Sciences > University of Houston - Downtown > mailto: erinm.hodgess@gmail.com > > -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess@gmail.com [[alternative HTML version deleted]]