First time here? Check out the FAQ!
2

Are there any tricks for Askbot w/FCGI?

I am trying to get Askbot running on a2hosting with FCGI. (I picked them because they have Postgres available.) Running the FCGI script directly with the Python interpreter seems to work (one warning "/home/qanetcom/Python/lib/python2.7/site-packages/coffin/common.py:59: UserWarning: Cannot translate loader: askbot.skins.loaders.loadtemplatesource warnings.warn('Cannot translate loader: %s' % loader" but returns a status 302) but a 404 when trying to invoke it from a browser. Nothing in the log. Note that I am using my own copy of Python (2.7.2).

Maybe the "big trick" is how to track down the problem with no log entries, error messages, ...

nicafyl's avatar
113
nicafyl
asked 2011-09-25 19:38:08 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Those warnings should be ignored, hopefully we'll find the time to silence them, but in production you could try switching logging level to logging.CRITICAL and periodically truncate or rotate the log file.

You are mentioning error 404 - what is the url for which you are getting that error?

Evgeny's avatar
13.2k
Evgeny
updated 2011-09-25 19:56:01 -0500, answered 2011-09-25 19:54:22 -0500
edit flag offensive 0 remove flag delete link

Comments

/askbot.fcgi/ with or without anything (such as questions) following it. But, just asking that question pointed me at where I should be looking. I have been staring at the fcgi script and it is clearly not the problem. That should help.

nicafyl's avatar nicafyl (2011-09-26 06:56:46 -0500) edit

@nicafyl, you can use shift+ENTER co create multiline comments, but it may be that you have urls.py file incorrect. The templates for the project files are in the directory askbot/setup_templates/ in the case you are tweaking the settings.py and urls.py manually.

Evgeny's avatar Evgeny (2011-09-26 07:02:46 -0500) edit

It appears it is not an Askbot issue but something with fcgi. I just put a dummy fcgi script out there and have the same problem. My .htaccess file is as they suggest but isn't happy. I will post the solution once I figure it out. Thanks.

nicafyl's avatar nicafyl (2011-09-26 07:50:23 -0500) edit

While I don't have a final answer, the intermediate one is that fcgi does not work there. I set up a test program and it fails. Did the same on a local system and it works. So, I am still waiting for them to fix fcgi.

nicafyl's avatar nicafyl (2011-09-30 17:01:21 -0500) edit
add a comment see more comments
2

Finally, I have an answer. Bottom line is that fcgi was broken on a2hosting.com. They have fixed it on at least their server a2s65. If it does now work for you I suggest putting up the standard Python test script there (you can find it in http://docs.python.org/howto/webservers.html) with a .htaccess file like this:

SetHandler fcgid-script

Options +ExecCGI

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ scriptname.fcgi/$1 [QSA,L]

where "scriptname" is the name you used for the test script. If it does not work, bitch at them that their web server is improperly configured.

nicafyl's avatar
113
nicafyl
updated 2011-10-01 20:06:45 -0500, answered 2011-10-01 20:05:22 -0500
edit flag offensive 0 remove flag delete link

Comments

Great! Could you explain what you mean by coming up with a test for this?

Evgeny's avatar Evgeny (2011-10-02 14:04:18 -0500) edit
add a comment see more comments