On Jan 29, 2:02 pm, PF4Pylons <[email protected]> wrote:
> The provider is Godaddy
> Here is all they say about fastcgi in their help section
>
> http://help.godaddy.com/search?q=fastcgi&x=0&y=0
>
> Quite cryptic sometimes.
>
> I will get back to this after I configure the HelloWorld app.
> I did mention the provider in the other thread I started here, I had
> the impression you replied there too.
>
> I will also update that thread, I have made some progress there but I
> run into an other roadblock.


Under their Perl FAQ entry they say:

"""NOTE: This will need to be done in any directory outside of /cgi in
which you want to run .fcgi scripts."""

So, they mention .fcgi files.

It would be quite silly if they were using .fcgi files and the only
thing you can stick in it is Perl. If that were the case they should
have used a specific Perl extension.

As such, it looks a good bet that if you can get flup installed into
your account and can set up sys.path to reference where flup is, it
may work.

Thus, install flup under lib/python in your home directory. Presuming
your home directory is '/home/pf4pylons', then use following in file
called 'hello.fcgi'.

#!/usr/bin/env python

import sys
sys.path.insert(0, '/home/pf4pylons/lib/python')

def myapp(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    return ['Hello World!\n']

if __name__ == '__main__':
    from flup.server.fcgi import WSGIServer
    WSGIServer(myapp).run()

Get that going and then you can work out getting Pylons installed as
well.

Graham

> Thanks
> PF
>
> On Jan 28, 9:57 pm, PF4Pylons <[email protected]> wrote:
>
>
>
> > 010/1/29 PF4Pylons <[email protected]>:
>
> > > Hi Graham
>
> > > According with the 
> > > documentationhttp://www.fastcgi.com/docs/faq.html#typical_httpd.conf
> > > they can configure some specific file extensions only to be executed
> > > via the fastcgi module.
>
> > >http://www.fastcgi.com/docs/faq.html#typical_httpd.conf
>
> > No, as I understand the configuration in that specific section, that
> > does not restrict it to a specific language. This is because that
> > configuration would rely on the #! line in the .fcgi file to know what
> > interpreter to run.
>
> > If you look down further at the PHP example however, that does
> > restrict the language. This is because for .php it has been configured
> > to execute a wrapper or helper script instead of the target resource.
> > That wrapper will then read in the resource file and interpret it
> > specifically as PHP code, ignoring the #! line.
>
> > > As the web hosting company mentioned in their documentation they only
> > > support perl and ruby for
> > > fastcgi. They don't mention any extension to be specifically used for
> > > fastcgi.
>
> > > In general if, according with the documentation you specify fcgi or
> > > fpl as extesions these will be executed via
> > > fastcgi. Does the fastcgi module care for the shebang line you put in
> > > your file? Can that be restricted only to
> > > specific script interpreters?
>
> > As I said before, it really depends on how the hosting company has
> > configured it. The default way people usually set up fastcgi however,
> > ie., that typical configuration, would be such that .fcgi would be
> > executed per the #! line.
>
> > > I am thinking about just pointing the shebang line to Python but
> > > use .pl extension for my files. Would that work?
>
> > Try it. You haven't as far as I remember even pointed at which hosting
> > company it is or where there documentation is describing their setup,
> > so I am not going to know. Just try and make sure you have a working
> > Python fastcgi hello world first by testing it on your own computer
> > system somehow because any mistake in the code will yield a 500 error
> > and you may not know whether it is a coding error in your program or
> > lack of flup, of whether it just isn't honouring the #! line.
>
> > Graham
>
> > > On Jan 26, 10:48 pm, Graham Dumpleton <[email protected]>
> > > wrote:

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to