Hi all together.

Since a few weeks i have a problem with database access in my django
installation.

On views, which use some Database related actions (mysql as backend) i
get a "Zero Sized Reply" Message from my local proxy. That means that
there it is simply an empty Response. The confusing thing is, that I
only get this on pages with Database access but without any Error
Messages and no HTTP500 Error. Misteriously I can access the Database
correctly through the shell using the "manage.py shell" command.
Through a few tests I located the reason of the explained effect
somewhere in the django.db.backends.mysql.base.DatabaseWrapper.cursor
method in following line:

django/db/backends/mysql/base.py
[90]        self.connection = Database.connect(**kwargs)
(Database is the same as the MySQLdb module)

I know that this must be the critical line because the following view
function also result in a Zero Sized Reply:

def test(request):
   import MySQLdb as Database
   a = Database.connect(host='localhost', user='root',
passwd='**************')
   return HttpResponse('Hello World')


But if I import the MySQLdb module in the "manage.py shell" shell and
connect the Database it works ...


Some Infos about my configuration:
Django 0.95
Python 2.3.5
Apache 2.0.54
mod_python 3.1.3
MySQL 4.1.11a
Debian Sarge


I hope really that someone of you could help me, because i'm lacking so
much with my timetable for hosted homepages ... :-/

Many many thanks at this point and a big SORRY for my very bad english
:-)

Bye and Greetings,
Gregor Müllegger


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to