Re: [Cheetahtemplate-discuss] using compiled template as CGI script
Brought to you by:
rtyler,
tavis_rudd
From: Paul S. <so...@us...> - 2002-05-22 09:47:08
|
I mightn't have explained myself very well. All the .py files work just fine. It is only when I upload the .tmpl file to the remote server that the cgi script returns a blank screen, actually: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY><XMP></XMP></BODY></HTML> On my local test server, having the template files there makes no difference. On the permissions issue, I was thinking that the .py files check the .tmpl files and re-compile if necessary, this would require write access to the .py files. Purely for execution though, I just leave the permissions 755. Cheers sosman ----- Original Message ----- From: "Mike Orr" <ir...@ms...> To: "Cheetah Template List" <che...@li...> Sent: Wednesday, May 22, 2002 6:45 PM Subject: Re: [Cheetahtemplate-discuss] using compiled template as CGI script > On Wed, May 22, 2002 at 05:02:17PM +1000, Paul Sorenson wrote: > > There is one strange thing remaining (at least that I know of). If I upload > > the .tmpl files as well, then the python cgi's just return a blank page. > > Click on the "contact" button and you will see what I mean. > > The presence or absence of the .tmpl file shouldn't make a difference. > > > Is this likely to be just a permissions issue? > > No. If the .py file doesn't have permission, the user would most likely > get a "Forbidden" error. > > A blank screen implies the script did send the headers but then > aborted. If it aborted before sending the headers, the user would > get an "Internal Server Error". > > > To fix the permissions issue would I have to make the .py files world > > writable? > > You have one .py file that works. So make all of them that way. > Check the permissions and also which user and group they are. > > The files need to be readable and/or executable (I forget which) for the > user the webserver is running as. Traditionally, that's "nobody", but > nowadays most sites set up a special user like "www-data". How you > accomplish it is up to you. You can make the files owned by the > webserver user, or put them in the webserver's group and make them > group readable, or just make them world readable. > user, or make them that user's group and make them group readable, or > just make them world readable. Common sense suggests not making them > writable by the webserver, so making the files owned by the webserver > user would be the last choice. > > Somebody posted recently on the Webware list about a program that lets > you see what the browser is sending the webserver and that it's getting > back. I don't remember the name, but it may be helpful for > troubleshooting "blank screen" issues. Or you can do it interactively > in Python using the urllib.urlopen function. > > -- > -Mike (Iron) Orr, ir...@ms... (if mail problems: ms...@oz...) > http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Cheetahtemplate-discuss mailing list > Che...@li... > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss > |