Re: [up-discuss] Running Spyce on shared hosting
"Jonathan Ellis" <[email protected]>
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 17 Jan 2006 15:41:03 -0800 (PST), "Ryan Bowman" <ryanlbowman-/[email protected]> said: > I have signed up for a shared hosting service that allows python to be > executed > as cgi. I can run .py files and they'll be executed, so I can visit a > file in > a browser, say hello.py > > #!/usr/bin/python > print '<h1>Hello</h1>' > > and get <h1>Hello</h1> output to the browser. That's nice, but I want to > use > Spyce. > > Following the 'Alternate CGI Config' instructions at > http://spyce.sourceforge.net/docs/doc-conf_source.html I'm trying to run > a > simple test, the one on spyce's home page, hello.spy: > > #!/usr/bin/python /home/ryanlb/spyce/run_spyceCGI.py > <spy:parent title="Hello" /> > [[ import spyce ]] > > Hello from Spyce version > [[= spyce.__version__ ]]! > > With the following directory structure: > ~/spyce/ > ~/ryanlb.com/ > > If I put hello.spy in ryanlb.com and visit it with a browser it displays > code > rather than running it. > If I run ./hello.spy from the command line it runs spyce and dumps the > generated html code to the console, as expected. > So, am I doing something wrong, or is Dreamhost doing something so I > can't run > spyce via cgi? Typically shared hosts configure CGI to be allowed to run from a specific directory, e.g., ~/cgi-bin. That is probably what is going on here. -Jonathan -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642