Even when i gave the full path, no luck.

This is my current code, modified :-

#!/usr/bin/env python

import os, re, sys
import lxml.html

class Handler:
     def do(self, environ, start_response):
         doc = lxml.html.parse('/home/dev/wsgi-script/index.py')
         form = doc.forms[0]

         name = form.input['name']
         paswd1 = form.input['paswd1']
         hiqual = form.input['hiqual']
         html = 'name is '
         html += name
         html += ' and password is '
         html += paswd1
         html += '<br> Highest Qualification is : '+ hiqual
         #html += hiqual
         output = html
         mimeType = "text/html"

         status = "200 OK"
         response_headers = [("Content-type", mimeType),
                        ("Content-length", str(len(output)))]

         start_response(status, response_headers)
         return [output]

# wsgi entry point
def application(environ, start_response):
    handler = Handler()
    return handler.do(environ, start_response)

----------------------------------------------------------------------------------------------------------
My "httpd.conf"

NameVirtualHost 192.168.1.6:80
<VirtualHost 192.168.1.6:80>
    ServerName www.healthcare.in
    ServerAlias healthcare.in
    Redirect / https://www.healthcare.in/index.py
    WSGIDaemonProcess healthcare.in processes=6 threads=15 display-name=%{GROUP}
    WSGIProcessGroup healthcare.in
    WSGIScriptAlias / /home/dev/wsgi-scripts/index.py
    <Directory /home/dev/wsgi-scripts>
       Options MultiViews +FollowSymLinks
       Order allow,deny
       Allow from all
    </Directory>
</VirtualHost>

Listen 192.168.1.6:443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache        "shmcb:/tmp/ssl_scache(512000)"
SSLSessionCacheTimeout  300
SSLMutex  "file:/tmp/ssl_mutex"

<VirtualHost 192.168.1.6:443>
        DocumentRoot "/home/dev/wsgi-scripts/"
        ServerName www.healthcare.in
        ServerAdmin [email protected]
        SSLEngine on
        SSLCipherSuite 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile "/etc/cups/ssl/server.crt"
        SSLCertificateKeyFile "/etc/cups/ssl/server.key"
        <FilesMatch "\.(cgi|shtml|phtml|php|py|pyc)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
    <Directory /home/dev/wsgi-scripts>
        Options MultiViews +FollowSymLinks
        Order allow,deny
        Allow from all
        SSLOptions +StdEnvVars
        Options ExecCGI
        SetHandler wsgi-script
        WSGIProcessGroup healthcare.in
    </Directory>
        BrowserMatch ".*MSIE.*" \
                         nokeepalive ssl-unclean-shutdown \
                         downgrade-1.0 force-response-1.0
</VirtualHost>
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
----------------------------------------------------------------------------------------------
My form , from "index.py", is displayed (works), THE ERROR from ApAcHe
error_logs

[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9] mod_wsgi
(pid=1331): Exception occurred processing WSGI script
'/home/dev/wsgi-scripts/response.py'.
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9] Traceback
(most recent call last):

[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"/home/dev/wsgi-scripts/response.py", line 33, in application
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]     return
handler.do(environ, start_response)

[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"/home/dev/wsgi-scripts/response.py", line 8, in do

[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]     doc =
lxml.html.parse('/home/dev/wsgi-script/index.py')

[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"/usr/lib/python2.6/dist-packages/lxml/html/__init__.py", line 661, in
parse
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]     return
etree.parse(filename_or_url, parser, base_url=base_url, **kw)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"lxml.etree.pyx", line 2692, in lxml.etree.parse
(src/lxml/lxml.etree.c:49594)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 1500, in lxml.etree._parseDocument
(src/lxml/lxml.etree.c:71364)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 1529, in lxml.etree._parseDocumentFromURL
(src/lxml/lxml.etree.c:71647)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 1429, in lxml.etree._parseDocFromFile
(src/lxml/lxml.etree.c:70742)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 975, in lxml.etree._BaseParser._parseDocFromFile
(src/lxml/lxml.etree.c:67740)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 539, in
lxml.etree._ParserContext._handleParseResultDoc
(src/lxml/lxml.etree.c:63824)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 625, in lxml.etree._handleParseResult
(src/lxml/lxml.etree.c:64745)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9]   File
"parser.pxi", line 563, in lxml.etree._raiseParseError
(src/lxml/lxml.etree.c:64060)
[Wed Jun 08 19:55:15 2011] [error] [client 192.168.1.9] IOError: Error
reading file '/home/dev/wsgi-script/index.py': failed to load external
entity "/home/dev/wsgi-script/index.py"

--------------------------------------------------------------------------------------------------------
-rwxrwxrwx  1 dev  dev  2.0K 2011-06-02 15:21 index.py

-rwxrwxrwx  1 dev  dev   864 2011-06-06 23:22 response.py

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to