Jump to content

Alex Boyce

Members
  • Posts

    18
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Alex Boyce's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. My account is not suspended. The link above works for me. I can give you a valid sign-on for testing if you want, but I would have to send it privately.
  2. This was working previously (prior to power outage). I could access all the admin pages. Now, I can access www.klickfu.com/admin, but if I click on any of the links, I get a 404 error. A google search showed someone asked this same question on stackoverflow.com and their solution was to reinstall Django. Did something happen to johnny's django install when it went down? Can anyone else access their admin site pages on johnny?
  3. Alex Boyce

    Power Failure

    Any idea when Johnny will be back? It's been two days now.
  4. Thanks for the reference, but none of it seems to be applicable to this situation. 1) Server load is less than 4 2) If don't have control over the permissions for the django folders, but they were correct two days ago and pieces of it work, so I assume they are still correct. 3) I am not running any other processes on my site. What I really need is a way to get the actual exception thrown to be displayed in the error log or on the screen.
  5. I don't understand what happened. On Thursday, I tested my site and everything was working. I was able to log into the Django admin site (www.klickfu.com/admin) and do everything. On Saturday, my colleague said that he couldn't get in. I checked and he was correct. All references to the admin site result in an exception which tries to display a 500.shtml page (which I didn't make, so it turns into a 404 error). None of the files changed, so I don't understand why it broke and I have no way to see the actual exception. The site error log simply states that the WSGI script threw an exception. The only admin link that does work is www.klickfu.com/admin/logout. It seems to work and logs me out, and if I try to log in from the subsequent screen, I get the log in prompt. But as soon as I enter my credentials and click Login, I get the 500 error. Any suggestions on how to figure this out?
  6. Thank you very much for the fast response. I really appreciate it. It works now.
  7. I think so. How can I verify it? The url for CPanel is http://johnny.heliohost.org:2082/frontend/x3/index.html Is that sufficient? Where are you picking up MySQLdb from? Maybe I have a path problem. My python2.7 path is: ['/home/aboyce/public_html/cgi-bin', '/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python2.7/site-packages/bottle-0.9.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/django_simple_captcha-0.3.0-py2.7.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages'] and the site-packages folder looks like this: ['setuptools-0.6c11-py2.7.egg', 'README', 'django', 'setuptools.pth', 'django_simple_captcha-0.3.0-py2.7.egg', 'easy-install.pth', 'bottle-0.9.2-py2.7.egg', 'Django-1.3-py2.7.egg-info'] which is no where near as much as the python 2.4 site-packages folder. For reference, python 2.4 has this path: ['/home/aboyce/public_html/cgi-bin', '/usr/lib/python2.4/site-packages/hashlib-20081119-py2.4-linux-x86_64.egg', '/usr/lib/python2.4/site-packages/elementtree-1.2.7_20070827_preview-py2.4.egg', '/usr/lib/python2.4/site-packages/psycopg2-2.2.1-py2.4-linux-x86_64.egg', '/usr/lib/python2.4/site-packages/ipython-0.10-py2.4.egg', '/usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-x86_64.egg', '/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/PIL', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages'] and its site-packages folder contains: ['libusermodule.so', 'psycopg2-2.2.1-py2.4-linux-x86_64.egg', '_snackmodule.so', 'elementtree-1.2.7_20070827_preview-py2.4.egg', 'yum', 'django', 'setuptools', 'site.pyc', 'easy_install.pyo', 'iniparse', 'hashlib-20081119-py2.4-linux-x86_64.egg', 'elementtree', 'pkg_resources.pyc', 'site.py', 'cracklibmodule.so', 'snack.pyc', 'MySQL_python-1.2.3-py2.4-linux-x86_64.egg', 'setuptools-0.6c7-py2.4.egg-info', 'urlgrabber', 'snack.py', 'easy-install.pth', 'pkg_resources.py', 'ipython-0.10-py2.4.egg', 'rpmUtils', 'easy_install.py', 'pkg_resources.pyo', 'oddjobmodule.so', 'site.pyo', 'web', 'sos', 'easy_install.pyc', 'facebook.py', 'snack.pyo']
  8. I can connect to my MySQL database from a simple python script in the cgi-bin folder when it uses version 2.4 (the default). But when I use Python 2.7, it fails to import MySQLdb (which would explain my Django exceptions). I looked in the site-packages folders for both versions, /usr/lib/python2.4/site-packages and /usr/local/lib/python2.7/site-packages, and only Python 2.4 has the MySQL package. I know that Django uses Python 2.7 and I can't change it. So is MySQL supported with DJango on Heliohost? It doesn't appear to be installed. Also, why is the path for Python 2.7 /usr/local/lib and for Python 2.4 it is /usr/lib. Is that the problem?
  9. Alright, I have figured out a few things. First, the reason adding "import django.db.backends" resolved the exception was because it was executed before I set the DATABASES variable so it defaulted to not set. So it didn't solve the problem, it masked it. Second, I can connect to my MySQL database from a simple python script in the cgi-bin folder when it uses version 2.4 (the default). But when I use Python 2.7 is fails to import MySQLdb (which would explain my Django exceptions). I looked in the site-packages folders for both, /usr/lib/python2.4/site-packages and /usr/local/lib/python2.7/site-packages, and only Python 2.4 has the MySQL package. Is MySQL supported with DJango on Heliohost? It doesn't appear to be installed. Also, why is the path for Python 2.7 /usr/local/lib and for Python 2.4 it is /usr/lib. Is that the problem?
  10. I have tried that. I started with the old style configuration and during my research, I came upon the new style and tried it. I have used either and both at the same time. They all result in the same thing.
  11. Here is a link that will show all the info about the error: Admin Page Stack Trace: Environment: Request Method: GET Request URL: http://www.klickfu.com/admin/ Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', 'promos'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') Traceback: File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 178. response = middleware_method(request, response) File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/middleware.py" in process_response 36. request.session.save() File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py" in save 56. session_key = self.session_key, File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in _get_session_key 175. self._session_key = self._get_new_session_key() File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in _get_new_session_key 167. if not self.exists(session_key): File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py" in exists 29. Session.objects.get(session_key=session_key) File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py" in get 132. return self.get_query_set().get(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in get 344. num = len(clone) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__ 82. self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator 273. for row in compiler.results_iter(): File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter 680. for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 725. sql, params = self.as_sql() File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in as_sql 59. out_cols = self.get_columns(with_col_aliases) File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in get_columns 188. col_aliases) File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in get_default_columns 276. r = '%s.%s' % (qn(alias), qn2(field.column)) File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in quote_name_unless_alias 43. r = self.connection.ops.quote_name(name) File "/usr/local/lib/python2.7/site-packages/django/db/backends/dummy/base.py" in complain 15. raise ImproperlyConfigured("You haven't set the database ENGINE setting yet.") Exception Type: ImproperlyConfigured at /admin/ Exception Value: You haven't set the database ENGINE setting yet. Settings: USE_L10N False USE_THOUSAND_SEPARATOR False LANGUAGE_CODE 'en-us' ROOT_URLCONF 'urls' MANAGERS (('Alex Boyce', 'alex@klickfu.com'),) DEFAULT_CHARSET 'utf-8' STATIC_ROOT '' TEST_DATABASE_CHARSET None MESSAGE_STORAGE 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage' DATABASE_HOST '' IGNORABLE_404_STARTS ('/cgi-bin/', '/_vti_bin', '/_vti_inf') SEND_BROKEN_LINK_EMAILS False URL_VALIDATOR_USER_AGENT 'Django/1.3 (http://www.djangoproject.com)' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') SESSION_COOKIE_DOMAIN None SESSION_COOKIE_NAME 'sessionid' COMMENTS_MODERATORS_GROUP None TIME_INPUT_FORMATS ('%H:%M:%S', '%H:%M') DATABASES {'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': '', 'NAME': 'aboyce_klickfu', 'PASSWORD': '********************', 'PORT': '', 'USER': 'aboyce_klickfu'}} TEST_DATABASE_NAME None FILE_UPLOAD_PERMISSIONS None FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') DEFAULT_CONTENT_TYPE 'text/html' APPEND_SLASH True LOCALE_PATHS () DATABASE_ROUTERS [] YEAR_MONTH_FORMAT 'F Y' STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}} SERVER_EMAIL 'root@localhost' SESSION_COOKIE_PATH '/' IGNORABLE_404_ENDS ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php') MIDDLEWARE_CLASSES ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') USE_I18N True THOUSAND_SEPARATOR ',' SECRET_KEY '********************' LANGUAGE_COOKIE_NAME 'django_language' FILE_UPLOAD_TEMP_DIR None TRANSACTIONS_MANAGED False LOGGING_CONFIG 'django.utils.log.dictConfig' TEMPLATE_LOADERS ('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source') FIRST_DAY_OF_WEEK 0 TEMPLATE_DEBUG True AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',) TEST_DATABASE_COLLATION None FORCE_SCRIPT_NAME None CACHE_BACKEND 'locmem://' SESSION_COOKIE_SECURE False CSRF_COOKIE_DOMAIN None FILE_CHARSET 'utf-8' DEBUG True SESSION_FILE_PATH None DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', 'promos'] LANGUAGES (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) DATABASE_ENGINE '' DATABASE_NAME '' COMMENTS_FIRST_FEW 0 PREPEND_WWW False SESSION_COOKIE_HTTPONLY False DATABASE_PORT '' DEBUG_PROPAGATE_EXCEPTIONS False MONTH_DAY_FORMAT 'F j' LOGIN_URL '/accounts/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE False TIME_FORMAT 'P' DATE_INPUT_FORMATS ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') CSRF_COOKIE_NAME 'csrftoken' EMAIL_HOST_PASSWORD '********************' PASSWORD_RESET_TIMEOUT_DAYS '********************' CACHE_MIDDLEWARE_ALIAS 'default' SESSION_SAVE_EVERY_REQUEST False ADMIN_MEDIA_PREFIX '/media/' NUMBER_GROUPING 0 SESSION_ENGINE 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' COMMENTS_SKETCHY_USERS_GROUP None LOGIN_REDIRECT_URL '/accounts/profile/' LOGGING {'disable_existing_loggers': False, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} CACHE_MIDDLEWARE_KEY_PREFIX '' PROJECT_PATH '/home/aboyce/public_html' TEMPLATE_STRING_IF_INVALID '' COMMENTS_ALLOW_PROFANITIES False LOGOUT_URL '/accounts/logout/' EMAIL_USE_TLS False TEMPLATE_DIRS ('/home/aboyce/public_html/templates',) FIXTURE_DIRS () EMAIL_HOST 'localhost' DATE_FORMAT 'N j, Y' MEDIA_ROOT '/home/aboyce/public_html/static/media/' ADMINS (('Alex Boyce', 'alex@klickfu.com'),) FORMAT_MODULE_PATH None DEFAULT_FROM_EMAIL 'webmaster@localhost' STATICFILES_DIRS () MEDIA_URL 'http://www.klickfu.heliohost.org/static/media/' DATETIME_FORMAT 'N j, Y, P' EMAIL_SUBJECT_PREFIX '[Django] ' SITE_ID 1 DISALLOWED_USER_AGENTS () ALLOWED_INCLUDE_ROOTS () DECIMAL_SEPARATOR '.' SHORT_DATE_FORMAT 'm/d/Y' DATABASE_USER '' TEST_RUNNER 'django.test.simple.DjangoTestSuiteRunner' TIME_ZONE 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE '' TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.contrib.messages.context_processors.messages') SESSION_COOKIE_AGE 1209600 SETTINGS_MODULE 'settings' USE_ETAGS False LANGUAGES_BIDI ('he', 'ar', 'fa') DEFAULT_INDEX_TABLESPACE '' INTERNAL_IPS () STATIC_URL None EMAIL_PORT 25 SHORT_DATETIME_FORMAT 'm/d/Y P' ABSOLUTE_URL_OVERRIDES {} DATABASE_OPTIONS {} CACHE_MIDDLEWARE_SECONDS 600 BANNED_IPS () DATETIME_INPUT_FORMATS ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y') DATABASE_PASSWORD '********************' ADMIN_FOR () COMMENTS_BANNED_USERS_GROUP None EMAIL_HOST_USER '' PROFANITIES_LIST '********************'
  12. It was an accident. My browser appeared hung, so I cancelled it and clicked post a second time. I couldn't find a way to delete the post myself. UPDATE: I did get past the exception. I was missing an import line in the settings.py file. Now the pages load, but if I need to access the database, it still says that the database ENGINE is not configured. I am missing something simple. Can some please show me a working settings.py file that points to a MySQL database?
  13. I am having a problem getting Python/Django and MySQL to place nice together. I got the database set up (correctly, I believe). If I do not set the database engine in the settings.py file, most of my views work properly. If I try to access a view that requires the database, I get a nice Django exception page telling me that I did not set the database engine, which is expected. If I set the database engine as follows: (password line omitted) DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'aboyce_klickfu' # Or path to database file if using sqlite3. DATABASE_USER = 'aboyce_klickfu' # Not used with sqlite3. I just get a 500 error on all my pages telling me that the wsgi script threw an exception, but no details as to what the actual problem is. CPanel username: aboyce Site: www.klickfu.heliohost.org Any help would be appreciated. Regards, Alex Boyce
  14. I am having a problem getting Python/Django and MySQL to place nice together. I got the database set up (correctly, I believe). If I do not set the database engine in the settings.py file, most of my views work properly. If I try to access a view that requires the database, I get a nice Django exception page telling me that I did not set the database engine, which is expected. If I set the database engine as follows: (password line omitted) DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'aboyce_klickfu' # Or path to database file if using sqlite3. DATABASE_USER = 'aboyce_klickfu' # Not used with sqlite3. I just get a 500 error on all my pages telling me that the wsgi script threw an exception, but no details as to what the actual problem is. CPanel username: aboyce Site: www.klickfu.heliohost.org Any help would be appreciated. Regards, Alex Boyce
×
×
  • Create New...