Well, I've got a little further, maybe... (I also tryied mod_python and worked, but instead of printing it would ask to download a file with "hello world!")...
back to fcgi, I did two fixes: * suexec was wrong (as Bjorn suggested), my htdocs folder was wrongly owned... too bad. * added the directive Options +ExecCGI Now it's working! but it's acting weird... The fcgi keeps reloading the script and never ends loading... the errors shows the script reloading and prints the output too, for example for an easy print "hello world" it would print it over the error log, but never finish loading the page... this is the output: [Sat Apr 19 19:33:07 2008] [warn] FastCGI: (dynamic) server "/var/www/virtual/mydomain.com/htdocs/code.py" (uid 2007, gid 2007) started (pid 13679) hello world [Sat Apr 19 19:33:07 2008] [warn] FastCGI: (dynamic) server "/var/www/virtual/mydomain.com/htdocs/code.py" (pid 13679) terminated by calling exit with status '0' [Sat Apr 19 19:33:12 2008] [warn] FastCGI: (dynamic) server "/var/www/virtual/mydomain.com/htdocs/code.py" (uid 2007, gid 2007) restarted (pid 13680) hello world [Sat Apr 19 19:33:13 2008] [warn] FastCGI: (dynamic) server "/var/www/virtual/mydomain.com/htdocs/code.py" (pid 13680) terminated by calling exit with status '0' I guess this is not related to webpy, so I'll search for help somewhere else, just wanted to report. thanks. On Sat, Apr 19, 2008 at 5:44 PM, Bruno Sarlo <[EMAIL PROTECTED]> wrote: > Ok, thanks for your help, I'll go throught it again. I'm also trying > mod_python right now... let you know how it went. > > > > On Sat, Apr 19, 2008 at 5:41 PM, Bjorn Tipling <[EMAIL PROTECTED]> wrote: > > > > It seems like you should read the documentation. I think you'll find > > that if you follow these and are using 0.23, that you will get > > everything to work. > > > > http://webpy.org/tutorial2.en > > http://webpy.org/install > > > > > > On Apr 19, 1:26 pm, "Bruno Sarlo" <[EMAIL PROTECTED]> wrote: > > > Also, is the order of the code right? if I change the order of the > > > last lines like the following: > > > web.webapi.internalerror = web.debugerror > > > web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) > > > > > > if __name__ == "__main__": web.run(urls, globals()) > > > > > > and I run it through an erro: > > > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > > > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > > > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > > > WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! > > > Status: 404 Not Found > > > Content-Type: text/html > > > Content-Length: 9 > > > > > > I don't know if this has anything to do, neither which is the right > > > order of the mentioned lines... > > > > > > > > > > > > > > > > On Sat, Apr 19, 2008 at 5:22 PM, Bruno Sarlo <[EMAIL PROTECTED]> wrote: > > > > On Sat, Apr 19, 2008 at 5:19 PM, Bjorn Tipling <[EMAIL PROTECTED]> > wrote: > > > > > > > > What web server are you using? If your web server is running as > some > > > > > user other than you, such as 'www' or 'www-data', and your files > are > > > > > in your user directory it wont matter what permissions are set > for the > > > > > file, it may not work > > > > > > > The permissions are set same as other files that serv correctly. > www-data... > > > > > > > arrg.. still trying to fix in various ways.. no clue yet. > > > > > > > > On Apr 19, 1:05 pm, "Bruno Sarlo" <[EMAIL PROTECTED]> wrote: > > > > > > Thanks for your responce Bjorn, > > > > > > > > > On Sat, Apr 19, 2008 at 5:00 PM, Bjorn Tipling <[EMAIL > PROTECTED]> wrote: > > > > > > > > > > 403 is a permissions error > > > > > > > > > > http://www.checkupdown.com/status/E403.html > > > > > > > > > > Are permissions right? > > > > > > > > > well, they seem to be, at least the file permissions... I'm not > sure > > > > > > about the execution of cgi permissions or other... with chmod > 777 > > > > > > code.py it through the same error, I would guess it's execution > > > > > > permissions. > > > > > > > > > > A couple of recommendations: > > > > > > > > > > Look up HTTP response codes. > > > > > > > Check your web server error log for detailed information. > > > > > > > > > the only error log is 403 - "GET /code.py/ HTTP/1.1" 403 1136 > "-" > > > > > > > > > > On Apr 19, 12:55 pm, "Bruno Sarlo" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi all, > > > > > > > > > > > finally I decided to try webpy, I created the tutorial > example, run > > > > > > > > python code.py and it went all smoothly... > > > > > > > > > > > now i want to make my real web so I wanted to configure it > with my > > > > > > > > current fcgi configuration but it didn't work... > > > > > > > > > > > I did the following steps following the installation notes: > > > > > > > > > > > * easy_install flup > > > > > > > > * chmod +x code.py > > > > > > > > ---- jumped to apache with FastCGI > > > > > > > > * added <Files code.py> SetHandler fastcgi-script > </Files> to my .htaccess > > > > > > > > * and my code.py file looks like this: > > > > > > > > > > > #!/usr/bin/env python > > > > > > > > import web > > > > > > > > urls = ( > > > > > > > > '/', 'index' ) > > > > > > > > class index: > > > > > > > > def GET(self): > > > > > > > > print "Hello, world!" > > > > > > > > if __name__ == "__main__": web.run(urls, globals()) > > > > > > > > web.webapi.internalerror = web.debugerror > > > > > > > > web.wsgi.runwsgi = lambda func, addr=None: > web.wsgi.runfcgi(func, addr) > > > > > > > > > > > ------- > > > > > > > > well, a bit frustrating but I'll get throught... it's > obviously not a > > > > > > > > web.py problem... > > > > > > > > I got php running through fcgi too... Just don't know what > else to test... > > > > > > > > > > > when accessinghttp://myserver/code.py/returnsservererror > is 403.. > > > > > > > > > > > > > > > thanks for any help. > > > > > > > > > > > -- > > > > > > > > Bruno > > > > > > > > > -- > > > > > > Bruno > > > > > > > -- > > > > Bruno > > > > > > -- > > > Bruno > > > > > > > > > > -- > Bruno > -- Bruno --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
