Sunday 15 September 2013

premature end of script of django app on justhost

premature end of script of django app on justhost

I am following this tutorial on creating a django app on justhost:
http://flailingmonkey.com/install-django-justhost
During the last step, I did python mysite.fcgi and status said "200 OK"
and page content was printed. But when I visit
http://summitsense.com/test_django/ I got following errors:
[Sun Sep 15 16:21:40 2013] [warn] [client 67.194.35.87] (104)Connection
reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Sep 15 16:21:40 2013] [error] [client 67.194.35.87] Premature end of
script headers: test_django.fcgi
[Sun Sep 15 16:21:40 2013] [error] [client 67.194.35.87] SoftException in
Application.cpp:256: File "/home5/summitse/public_html/500.php" is
writeable by group
[Sun Sep 15 16:21:40 2013] [error] [client 67.194.35.87] Premature end of
script headers: 500.php
Other info:
cat .htaccess
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ test_django.fcgi/$1 [QSA,L]
cat test_django.fcgi
import sys, os
# Where /home/your_username is the path to your home directory
sys.path.insert(0, "/home/summitse/python")
sys.path.insert(13, "/home/summitse/django-projects/test_django")
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_django.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
cat 500.php
<!-- PHP Wrapper - 500 Server Error -->
<html><head><title>500 Server Error</title></head>
<body bgcolor=white>
<h1>500 Server Error</h1>
A misconfiguration on the server caused a hiccup.
Check the server logs, fix the problem, then try again.
<hr>
<?
echo "URL: http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."<br>\n";
$fixer = "checksuexec
".escapeshellarg($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']);
echo `$fixer`;
?>
</body></html>
Is there something obvious that I missed?

No comments:

Post a Comment