First time here? Check out the FAQ!

nicanorl's profile - activity

2015-08-03 13:21:11 -0600 received badge Notable Question (source)
2015-07-08 06:07:00 -0600 received badge Notable Question (source)
2015-05-11 14:02:08 -0600 received badge Popular Question (source)
2014-11-25 07:35:09 -0600 received badge Popular Question (source)
2014-10-19 19:57:02 -0600 received badge Popular Question (source)
2014-05-19 11:10:02 -0600 received badge Notable Question (source)
2014-05-19 11:10:02 -0600 received badge Popular Question (source)
2014-04-28 07:07:40 -0600 received badge Famous Question (source)
2014-04-24 13:12:26 -0600 answered a question What user moderation tools are necessary?

I'm using Drupal on other sites. I have no more spam using:

Honeypot: adds a hidden field, if it's filled, it's a bot.

SpamBlack Hole: replaces form actions with a dummy URL which is then replaced during form submission using javascript.

Hashcash: javascript proof-of-work algorithm

These techniques are only valid for annonymous users, but developers should take them into account since Askbot should have this feature in the future, since there is a need for allowing anonymous questions and answers, specially, when building a new community.

2014-04-18 04:44:53 -0600 received badge Famous Question (source)
2014-01-13 09:47:08 -0600 received badge Self-Learner ( source )
2014-01-13 09:41:13 -0600 answered a question exception raised by WSGI script

I have solved the issue. It seems that somehow the permissions of $HOME/memcached.sock where no more 777.

chmod 777 $HOME/memcached.sock

Solved it.

I spend many hours trying to solve it and the solution was so simple!

2014-01-12 11:45:22 -0600 commented answer exception raised by WSGI script

Thanks, the file contains only one line, and the this log seems to be old: "/usr/local/lib/python2.7/dist-packages/askbot/deps/django_authopenid/forms.py TIME: 2013-12-24 01:34:48,197 MSG: forms.py:clean:79 unknown provider name /proc/self/environ"

2014-01-12 09:51:52 -0600 asked a question exception raised by WSGI script

Hi,

My website has been running for some weeks but now I'm seeing a 500 Internal Server Error.

Looking at the logs, I see:

[...]
[Sun Jan 12 12:37:19 2014] [info] mod_wsgi (pid=9594): Create interpreter 'example.com|'.
[Sun Jan 12 09:37:20 2014] [error]
[Sun Jan 12 09:37:20 2014] [error] [client 11.123.219.127] mod_wsgi (pid=9594): SystemExit exception raised by WSGI script '/var/www/example/django.wsgi' ignored.
[...]

Please note the vertical bar after example.com

Create interpreter 'example.com|

Shouldn't it be just "example.com". Is this causing the error. Where is this setting set?

Here is my /etc/apache2/sites-available/example.com file:

WSGIPythonEggs /var/www/mike/eggs
<VirtualHost 123.123.123.123:80>
     DocumentRoot /var/www/example
     ServerName example.com
     ServerAlias www.example.com
     Alias /m/ /var/www/example/static/
     Alias /upfiles/ /var/www/example/askbot/upfiles/
     <DirectoryMatch "/var/www/example/askbot/skins/([^/]+)/media">
        Order deny,allow
        Allow from all
     </DirectoryMatch>
     <Directory "/var/www/example/askbot/upfiles">
        Order deny,allow
        Allow from all
     </Directory>
     #must be a distinct name within your apache configuration
        WSGIDaemonProcess example
        WSGIProcessGroup example
        WSGIScriptAlias / /var/www/example/django.wsgi
     #make all admin stuff except media go through secure connection
     <LocationMatch "/admin(?!/media)">
         RewriteEngine on
         RewriteRule /admin(.*)$ https://example.com/admin$1 [L,R=301]
     </LocationMatch>
</VirtualHost>

Development server log:

Exception happened during processing of request from ('123.123.123.123', 29433)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 116, in handle
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
2014-01-09 05:49:05 -0600 received badge Famous Question (source)
2014-01-02 05:51:20 -0600 received badge Famous Question (source)
2013-12-15 12:52:18 -0600 answered a question How to setup email notifcation

Try using this settings:

SERVER_EMAIL = 'youremail@gmail.com'
DEFAULT_FROM_EMAIL = 'youremail@gmail.com'
EMAIL_HOST_USER = 'youremail@gmail.com'
EMAIL_HOST_PASSWORD = 'yourpassword'
EMAIL_SUBJECT_PREFIX = ''
EMAIL_HOST='smtp.gmail.com'
EMAIL_PORT='587' #try also 645
EMAIL_USE_TLS=True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

After that, restart apache.

I must say that it didn't worked for me, because Gmail sees the login from my server as suspicious and blocks it.

To test, go to /settings/EMAIL/ and put your email address. Then go to the feedback form and send a test message, if you receive the email, it's working, if not, check the logs in /var/log/apache2/error.log

2013-12-15 12:20:43 -0600 commented answer Server runs for some minutes and then 500 error

Thanks a lot for your help!! I can confirm that "when a request for robots.txt hits django an exception is thrown and the app does not go back working normally afterwards." But I found no way to add a robots.txt file, I will keep trying tomorrow.

2013-12-13 12:48:22 -0600 asked a question Server runs for some minutes and then 500 error

Hi,

I'm running apache2 with wsgi. I've put the website for production yesterday and It was running fine, but now it just sends a 500 error. Restarting apache doesn't seem to solve the issue. This is the error I'm receiving:

 [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
 mod_wsgi (pid=27861): Exception occurred processing WSGI script '/var/www/example/django.wsgi'.
 Traceback (most recent call last):
   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 255, in __call__
     response = self.get_response(request)
   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 178, in get_response
     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 224, in handle_uncaught_exception
     return callback(request, **param_dict)
   File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
     response = view_func(request, *args, **kwargs)
   File "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 41, in server_error
     return http.HttpResponseServerError(template.render(Context({})))
   File "/usr/local/lib/python2.7/dist-packages/coffin/template/__init__.py", line 55, in render
     return super(Template, self).render(**context)
   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
     return self.environment.handle_exception(exc_info, True)
   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
     reraise(exc_type, exc_value, tb)
   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/500.html", line 1, in top-level template code
     {% extends "two_column_body.html" %}
   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/two_column_body.html", line 1, in top-level template code
     {% extends "base.html" %}
   File "/usr/local/lib/python2.7/dist-packages/askbot/templates/base.html", line 5, in top-level template code
     <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 397, in getattr
     return getattr(obj, attribute)
 UndefinedError: 'settings' is undefined

I'm running in production mode.

Thanks !

Edit: I discovered that the command touch django.wsgi solves the issue for some minutes. Then the error arises again.

Edit2: Sometimes, when a 500 error arises, reloading the page solves the issue. But visiting any other page will cause the 500 error again, until you reload the page again.

2013-12-10 06:07:22 -0600 commented answer How to extend comments beyond 300 characters?

In "settings" -> "data entry and display rules" -> "maximum comment length" I've entered "2000", but maximum comment length seems to be 1000 (like in this page askbot.org). If I enter 1000 characters, I can see, below the textarea, "1000" characters left, but I cannot type anymore characters.

2013-12-09 23:57:41 -0600 received badge Nice Answer ( source )
2013-12-09 13:27:57 -0600 received badge Scholar ( source )
2013-12-09 12:03:41 -0600 commented question TypeError whent trying to process_emailed_question()

Usign gmail smtp server: #python manage.py post_emailed_questions TypeError: expected string or buffer

2013-12-09 11:56:27 -0600 asked a question TypeError whent trying to process_emailed_question()

When I try to fetch emailed questions I'm seing this message:

#python manage.py post_emailed_questions
TypeError: process_emailed_question() takes at least 4 arguments (3 given)

My settings:

settings.py:

IMAP_HOST = 'imap-mail.outlook.com'
IMAP_HOST_USER = 'example@outlook.com'
IMAP_HOST_PASSWORD = '1234'
IMAP_PORT = '993'
IMAP_USE_TLS = True

in "settings/EMAIL/" : "Reply by email hostname": outlook.com or imap-mail.outlook.com (neither works)

and "Enable posting answers and comments by email" checked

2013-12-09 05:47:58 -0600 received badge Enthusiast
2013-12-08 08:22:07 -0600 received badge Student (source)
2013-12-08 06:59:30 -0600 asked a question Best way to publish articles

I'm moving a forum to Askbot. Most of the content of this forum are "discussions" that will be made "questions". But the forum has also some editor "stories" or "articles", that receive a lot of visits.

I would like to know your thought on the best way to publish the articles into Askbot. Ideally, I would like to create page like http://askbot.org/en/about/ .

  1. An option would be to post wiki pages using a common tag, and then add a link to all wiki pages in the header, but I'm not sure this is the best way to go.
  2. Another option is to add a second CMS for stories, but this option will require too much work for about 20 articles.
  3. A third option is to add the stories as static html content, but it will require more time to manually edit each story.

A related question has been posted.

Thanks for your advice!

2013-12-07 20:01:14 -0600 commented answer How to debug email sending?

Thanks, I've done it and It returns status 1, and email was sent (I've sent an email to myself). But using askbot, users do not receive emails when a questioin is answered. I've checked all subscriptions to "instant". Also, there are no messages on mail.log I've sent a message using the feedback form and the message was sent.

2013-12-06 13:18:57 -0600 commented answer How do I upload a photo without using Gravatar?

+1 for this feature into core

2013-12-05 10:40:33 -0600 received badge Supporter ( source )
2013-12-05 10:14:44 -0600 commented answer How do I change language to modified chinese

Thanks, I have done that already. Anyway, despite the errors, the site is displayed in the new language. My issue is solved. Thanks

2013-12-05 09:24:19 -0600 received badge Self-Learner ( source )
2013-12-05 09:24:19 -0600 received badge Teacher ( source )
2013-12-05 07:55:15 -0600 commented answer How do I change language to modified chinese

I have installed askbot in production mode (not development). I've run compilemessages from app dir and also from askbot folder and I get the message: "CommandError: This script should be run from the Django Git checkout or your project or app tree, or with the settings module specified." I haven't used virtualenv

2013-12-05 07:51:05 -0600 answered a question Fresh install: "ImportError: No module named site"

Commented: WSGISocketPrefix /var/run/apache2 WSGIPythonHome /usr/lib/python2.7

Now it works!

2013-12-04 13:36:56 -0600 received badge Editor (source)
2013-12-04 13:35:26 -0600 asked a question Fresh install: "ImportError: No module named site"

I'm trying to deploy Askbot to production.

I'm using Ubuntu 12.04 , Apache2 and Python 2.7

Running the Django development server, the website works fine, but it doesn't seem to work under Apache.

This is my error log:

[warn] mod_wsgi: Compiled for Python/2.7.2+. 
[warn] mod_wsgi: Runtime using Python/2.7.3.
[notice] Apache/2.2.22 (Ubuntu)
mod_wsgi/3.3 Python/2.7.3 configured
-- resuming normal operations 
ImportError: No module named site
ImportError: No module named site

I added

import sys
sys.stderr.write('\n'.join(sys.path))

to django.wsgi and run python2 django.wsgi, this is the output:

/var/www/example /usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
 /usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages

I've checked [link removed] and I see that my install is missing all folders like "/usr/lib/python2.7/site-packages/"

running python:

 import site
 site
 <module 'site' from '/usr/lib/python2.7/site.pyc'>

This is my apache configuration file:

 #the following two directories must be both readable and writable by apache
 WSGISocketPrefix /var/run/apache2
 # this is a manually created folder: WSGIPythonEggs /var/www/example/eggs
 #the following directory must be readable by apache WSGIPythonHome
 /usr/lib/python2.7
 #NOTE: all urs below will need to be adjusted if
 #settings.FORUM_SCRIPT_ALIAS is anything other than empty string (e.g.
 = 'forum/')

 #replace with 127.0.0.1 with real IP address <VirtualHost 23.94.43.156:80>
 ServerAdmin [email removed]
 DocumentRoot /var/www/example3
 ServerName [link removed]
 #aliases to serve static media directly
 #will probably need adjustment
 Alias /m/ /var/www/example3/static/
 Alias /upfiles/ /var/www/example3/askbot/upfiles/
 <DirectoryMatch "/var/www/example3/askbot/skins/([^/]+)/media">
    Order deny,allow
    Allow from all
 </DirectoryMatch>
 <Directory "/var/www/example3/askbot/upfiles">
    Order deny,allow
    Allow from all
 </Directory>
 #must be a distinct name within your apache configuration
 WSGIDaemonProcess askbot2
 WSGIProcessGroup askbot2
 WSGIScriptAlias / /var/www/example3/django.wsgi
 <Directory "/var/www/example3">
    Order allow,deny
    Allow from all </Directory>
    #make all admin stuff except media go through secure connection
 <LocationMatch "/admin(?!/media)">
 RewriteEngine on
     RewriteRule /admin(.*)$ [link removed]$1> [L,R=301]
     </LocationMatch>
 CustomLog /var/log/apache2/access_log common
 ErrorLog /var/log/apache2/askbot/error_log
 LogLevel debug </VirtualHost>

Thanks for your help!