First time here? Check out the FAQ!

Hering's profile - activity

2015-10-29 09:13:04 -0500 received badge Notable Question (source)
2015-10-27 08:42:40 -0500 received badge Notable Question (source)
2015-10-10 05:46:02 -0500 received badge Popular Question (source)
2015-09-27 08:51:23 -0500 received badge Popular Question (source)
2015-09-26 07:51:03 -0500 received badge Famous Question (source)
2015-09-26 03:17:01 -0500 asked a question Installation error

Hello again
I tried to install Askbot again on a fresh Ubuntu 14.04 LTS following this list of commands:

sudo su
mkdir /var/www/html/askbot-devel  
cd /var/www/html/askbot-devel  
git clone git://github.com/ASKBOT/askbot-devel.git .
virtualenv .
./bin/pip install --upgrade setuptools
./bin/pip install -r askbot_requirements_dev.txt
./bin/python setup.py install develop

Unfortunately the setup doesnt finish due to an error:

Using /var/www/html/askbot-devel/lib/python2.7/site-packages
Finished processing dependencies for askbot==0.7.53
running develop
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: 'build/bdist.linux-x86_64/egg/test-easy-install-36074.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    build/bdist.linux-x86_64/egg

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

If I try to add --install-dir or --prefix I recieve the same error. Also if I create the folder manually and run the setup.py again it will just delete it and throw the same error again.

Is there any way to fix this?

2015-09-25 03:51:38 -0500 received badge Famous Question (source)
2015-09-23 04:48:31 -0500 commented answer mod_wsgi - Error

I integrated the old version inside our PHP-Application which is designed for the use with Apache ;) Therefore I cant use nginx or others. But as I said in my previous comment if I use 'runserver' it works perfectly fine. The fun part is that the old version is still working good with exactly the same configuration in apache on the same server with the same python. I didnt even touch the VirtualHost just changed the files to test it. I will try to search for the error and hopefully track it down but if someone knows the exact reason I would be really happy too ;)

2015-09-22 09:34:37 -0500 commented answer mod_wsgi - Error

If I run "python manage.py runserver 127.0.0.1:8500" it displays "Validating models... 0 errors found September 22, 2015 - 16:31:26 Django version 1.5, using settings 'askbot-devel.settings' Development server is running"

2015-09-22 09:29:35 -0500 answered a question Memcached best practice

Hello,
I have used this configuration so far with a very frequently used installation (~400 Users active per day) and so far had no problems with it:

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
        'TIMEOUT': 60,
        'KEY_PREFIX': 'askbot',
    }
}
LIVESETTINGS_CACHE_TIMEOUT = CACHES['default']['TIMEOUT']
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
2015-09-22 07:42:15 -0500 answered a question mod_wsgi - Error

Yes I fixed this extra.css -Error by simpy adding it and running python manage.py collectstatic again.
According to /usr/local/lib/python2.7/dist-packages (which are the same as pip list says) I have these requirements installed:

askbot-0.7.53
mod_wsgi-4.4.13.dist-info
psycopg2-2.6.1-info
virtualenv-13.1.2.dist-info

akismet-0.2.0
django_avatar-2.1.1
beautifulsoup4-4.4.0
Coffin-0.3.8.dist-info
django_compressor-1.2
Django-1.5
django_countries-3.3.dist-info
django_transaction_signals-1.0.0
django_celery-3.0.11
celery-3.1.18
django_kombu-0.9.4.dist-info
djkombu
django_followit-0.0.7
html5lib-0.90
Jinja2-2.8
jsonfield-1.0.3
longerusername-0.4
markdown2-2.3.0
_markerlib
MarkupSafe-0.23-linux-x86_64
mock-1.0.1
oauth2-1.9.0.post1
python_openid-2.2.5
django_picklefield-0.3.0
PyJWT-1.4.0
django_recaptcha_works-0.3.4
django_robots-1.0.dist-info
sanction-0.3.1
South-1.0.2
django_threaded_multihost-1.4_1
django_tinymce-1.5.1b2
Unidecode-0.04.18

Looking at the given list that should be alright, right?
I installed via these commands after cloning it into a folder:

python setup.py develop
virtualenv .
askbot-setup #Filling out all the stuff (Database exists and got filled)
python manage.py syncdb
python manage.py migrate askbot
python manage.py migrate django_authopenid
python manage.py collectstatic
chown -R www-data:www-data .

I have a feeling it got something to do with a wrong configuration in the virtual host or maybe the wrong mod_wsgi-Version but I am not sure.

2015-09-21 17:01:15 -0500 asked a question mod_wsgi - Error

Hello, I cloned Askbot 0.7.53 from github and deployed it under /var/www/html/askbot-devel on a system running Ubuntu 14.04 with Python 2.7.6.
Then I used pip install -r askbot_requirements.txt and followed the documentation about installing Askbot. When I run python manage.py runserver 127.0.0.1:8500 now everything seems to be fine except these messages in the error log:

/var/www/html/askbot-devel/askbot/skins/utils.py TIME: 2015-09-21 23:36:16,762 MSG: utils.py:get_media_url:159 missing media resource style/extra.css in skin default

Now I am trying to make it run with mod_wsgi. Therefore I compiled mod_wsgi with the installed python to make sure the versions match and added these lines to my 000-default.config for apache:

<VirtualHost *:80>
        ServerName askbot.localhost

        DocumentRoot /var/www/html/askbot-devel
        <Directory /var/www/html/askbot-devel>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>

        ##Askbot
        Alias /m/ /var/www/html/askbot-devel/static/
        Alias /upfiles/ /var/www/html/askbot-devel/askbot/upfiles/
        <DirectoryMatch "/var/www/html/askbot-devel/askbot/skins/([^/]+)/media">
            Order deny,allow
            Allow from all
        </DirectoryMatch>
        <DirectoryMatch "/var/www/html/askbot-devel/askbot/upfiles">
            Order deny,allow
            Allow from all
        </DirectoryMatch>
        WSGIDaemonProcess askbot
        WSGIProcessGroup askbot
        WSGIScriptAliasMatch / /var/www/html/askbot-devel/django.wsgi

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
 </VirtualHost>

This is what my settings.py looks like:

import os.path
import logging
import sys
import askbot
import site

sys.stderr.write('\n'.join(sorted(sys.path)) + '\n')

ASKBOT_ROOT = os.path.abspath(os.path.dirname(askbot.__file__))
site.addsitedir(os.path.join(ASKBOT_ROOT, 'deps'))

DEBUG = True
TEMPLATE_DEBUG = False
INTERNAL_IPS = ('127.0.0.1',)
ALLOWED_HOSTS = ['*',]

ADMINS = (
    ('Admins', 'bla@bla.bla'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': '#####',
        'USER': '#####',
        'PASSWORD': '#####',
        'HOST': '',
        'PORT': '', 
        'TEST_CHARSET': 'utf8',
        'TEST_COLLATION': 'utf8_general_ci',
    }
}

SERVER_EMAIL = ''
DEFAULT_FROM_EMAIL = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX = ''
EMAIL_HOST=''
EMAIL_PORT=''
EMAIL_USE_TLS=False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

IMAP_HOST = ''
IMAP_HOST_USER = ''
IMAP_HOST_PASSWORD = ''
IMAP_PORT = ''
IMAP_USE_TLS = False

TIME_ZONE = 'Europe/Berlin'

SITE_ID = 1

USE_I18N = True
LANGUAGE_CODE = 'de'

MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles')
MEDIA_URL = '/upfiles/'
STATIC_URL = '/m/'

PROJECT_ROOT = os.path.dirname(__file__)
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')

ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'

SECRET_KEY = '###########################'

TEMPLATE_LOADERS = (
    'askbot.skins.loaders.Loader',
    'django.template.loaders.app_directories.Loader',
    'django.template.loaders.filesystem.Loader',
)


MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
    'askbot.middleware.forum_mode.ForumModeMiddleware',
    'askbot.middleware.cancel.CancelActionMiddleware',
    'django.middleware.transaction.TransactionMiddleware',
    'askbot.middleware.view_log.ViewLogMiddleware',
    'askbot.middleware.spaceless.SpacelessMiddleware',
    'askbot.middleware.csrf.CsrfViewMiddleware',
)

ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls'

FILE_UPLOAD_TEMP_DIR = os.path.join(
                                os.path.dirname(__file__),
                                'tmp'
                            ).replace('\\','/')

FILE_UPLOAD_HANDLERS = (
    'django.core.files.uploadhandler.MemoryFileUploadHandler',
    'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
ASKBOT_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
ASKBOT_MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.request',
    'askbot.context.application_settings',
    'askbot.user_messages.context_processors.user_messages',
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.csrf',
    'askbot.deps.group_messaging.context.group_messaging_context ...
(more)
2014-07-23 04:27:34 -0500 received badge Famous Question (source)
2014-04-16 11:03:38 -0500 asked a question Email with Postfix

Hello,
I m running Askbot on CentOS with apache and mod_wsgi.
Its running almost perfectly fine right now but the emails wont work...
I have postfix installed which is also used by an PHP application on the same server and is working.
But I dont know how to configure Askbot properly to use it.
Right now I m using this configuration in the settings.py:

SERVER_EMAIL         = 'my@e.mail.com'
DEFAULT_FROM_EMAIL   = 'my@e.mail.com'
EMAIL_HOST_USER      = ''
EMAIL_HOST_PASSWORD  = ''
EMAIL_SUBJECT_PREFIX = '[MySite Askbot]'
EMAIL_HOST           = '127.0.0.1'
EMAIL_PORT           = '25'
EMAIL_USE_TLS        = FALSE
EMAIL_BACKEND        = 'django.core.mail.backends.smtp.EmailBackend'

Does anyone know why its not working and how to make it work?

Greetings
Hering

Edit: I'm also using SELinux on this server

2014-04-16 09:26:33 -0500 received badge Enthusiast
2014-03-28 08:21:09 -0500 received badge Organizer (source)
2014-03-28 08:20:21 -0500 received badge Editor (source)
2014-03-28 07:55:07 -0500 asked a question Install Askbot in subfolder

Hello, I m currently trying to install askbot in a subfolder using apache. So I followed the documentation here

#Install the software
git clone git://github.com/ASKBOT/askbot-devel.git <project_path>
sudo python <project_path>/setup.py develop
virtualenv <project_path>

##Create database
pip install psycopg2
create role <askbot_user> with createdb login encrypted password <askbot_password>;
create database <askbot_db> with owner=<askbot_user>;
->pg_hba.conf add "local <askbot_db> <askbot_user> md5" as first line

##Initial Configuration
mkdir <installation_path>
askbot-setup -n <installation_path> -e 1 -d <askbot_db> -u <askbot_user> -p <askbot_password>
sudo python <installation_path>/manage.py collectstatic

##Initialization and upgrade of the database
sudo python <installation_path>/manage.py syncdb
sudo python <installation_path>/manage.py migrate askbot
sudo python <installation_path>/manage.py migrate django_authopenid

##Apache
-> <installation_path>/log/            Write access for apache
-> <installation_path>/askbot/upfiles  Write access for apache
sudo apt-get install libapache2-mod-wsgi
-> /etc/apache2/sites-enabled/000-default.conf -> Add following text
<VirtualHost *:80>
    DocumentRoot <installation_path>
    Alias /m/ <installation_path>/static/
        Alias /upfiles/ <installation_path>/askbot/upfiles/
        <DirectoryMatch "<installation_path>/askbot/skins/([^/]+)/media">
            Order deny,allow
            Allow from all
        </DirectoryMatch>
        <Directory "<installation_path>/askbot/upfiles">
            Order deny,allow
            Allow from all
        </Directory>
        WSGIDaemonProcess askbot2
        WSGIProcessGroup askbot2
        WSGIScriptAlias / <installation_path>/django.wsgi
</VirtualHost>

### Starting
sudo service apache2 restart
sudo service postgresql restart

So if I install it using the "/var/www/" directory as installation_path everything works fine and I can use the site via localhost/questions in my browser.

But because I want to integrate it into my PHP-application I have to use "/var/www/bla/forum_askbot" as installation_path and I have to change the domain to sth like "localhost/bla/askbot". I tried adding "ServerName http://.lvho.st//askbot" and "ServerAlias http://.lvho.st//askbot" but it doesn't work. I only get python-errors saying the following:

Page not found (404)  
Request Method: Get  
Request URL: localhost/var/www/tkurs/index.php?forum_askbot/django.wsgi/askbot

So how do I do it?

Greetings Hering

2014-03-15 17:41:19 -0500 asked a question Multiple websites with single askbot

Hello,
I am trying to run different web pages using Askbot on the same server with Apache.
To minimize disk-space usage I want to have only one Askbot installation and dynamically load the "settings.py" from the web page folder.
So the root would be something like this:
/
/askbot_forum
/page1
/page1/settings.py
/page1/upfiles
/page1/...
/page2 /page2/settings.py
/page2/upfiles
/page2/...

Is that possible? I did it with phpbb3 before where i load the config-files like this and it works great.
And how do I run Askbot on Apache using mod_rewrite instead of mod_wsgi and adding all that <virtualhost>-stuff?
Because the pages are added dynamically and I cant let the users always wait for me or the admin to add it there. So a .htacess would be much better.</virtualhost>

I hope someone can help.

Greetings
Hering

P.s.: All the webpages (page1, page2, ...) are written in PHP (no Django/Python)

P.p.s.: Please support table prefixes, that would save a lot of work and makes it much easier to customize because multiple instances could use the same database instead of having 100000 in the end....