Problem with Python Server Pages (PSP)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • barun.saha04@gmail.com

    Problem with Python Server Pages (PSP)

    Hi,

    I am facing a very basic problem with PSP. I have installed mod_python
    (in fedora Core 1), added the lines required for loading Python
    modules and handling PSP pages. I have created a hello.psp page. But
    when I try to view this hello.psp page, all Python code are getting
    displayed.

    The said page is stored at /var/www/html/psp/hello.psp. I guess this
    is some configuration problem with Apache, but not able to figure out
    the exact problem. I have tried putting those configuration lines for
    psp in both httpd.conf and python.conf files. But still it is not
    working.

    The Python module (mod_python) is getting loaded. Because when I
    telnet to my server, I can find that in the headers.

    These are the versions of the softwares:
    Apache: 2.0.47
    Python: 2.2.3
    mod_python: 3.0.3

    Thnaks for all your suggestions.
  • Graham Dumpleton

    #2
    Re: Problem with Python Server Pages (PSP)

    On Jul 21, 9:42 pm, barun.sah...@gm ail.com wrote:
    Hi,
    >
    I am facing a very basic problem with PSP. I have installedmod_py thon
    (in fedora Core 1), added the lines required for loading Python
    modules and handling PSP pages. I have created a hello.psp page. But
    when I try to view this hello.psp page, all Python code are getting
    displayed.
    >
    The said page is stored at /var/www/html/psp/hello.psp. I guess this
    is some configuration problem with Apache, but not able to figure out
    the exact problem. I have tried putting those configuration lines for
    psp in both httpd.conf and python.conf files. But still it is not
    working.
    >
    The Python module (mod_python) is getting loaded. Because when I
    telnet to my server, I can find that in the headers.
    >
    These are the versions of the softwares:
    Apache: 2.0.47
    Python: 2.2.3mod_python : 3.0.3
    >
    Thnaks for all your suggestions.
    What is the Apache configuration snippet you are using to enable
    mod_python and PSP file handling?

    Graham

    Comment

    • barun.saha04@gmail.com

      #3
      Re: Problem with Python Server Pages (PSP)

      On Jul 22, 5:18 am, Graham Dumpleton <Graham.Dumple. ..@gmail.com>
      wrote:
      On Jul 21, 9:42 pm, barun.sah...@gm ail.com wrote:
      >
      >
      >
      >
      >
      Hi,
      >
      I am facing a very basic problem with PSP. I have installedmod_py thon
      (in fedora Core 1), added the lines required for loading Python
      modules and handling PSP pages. I have created a hello.psp page. But
      when I try to view this hello.psp page, all Python code are getting
      displayed.
      >
      The said page is stored at /var/www/html/psp/hello.psp. I guess this
      is some configuration problem with Apache, but not able to figure out
      the exact problem. I have tried putting those configuration lines for
      psp in both httpd.conf and python.conf files. But still it is not
      working.
      >
      The Python module (mod_python) is getting loaded. Because when I
      telnet to my server, I can find that in the headers.
      >
      These are the versions of the softwares:
      Apache: 2.0.47
      Python: 2.2.3mod_python : 3.0.3
      >
      Thnaks for all your suggestions.
      >
      What is the Apache configuration snippet you are using to enable
      mod_python and PSP file handling?
      >
      Graham- Hide quoted text -
      >
      - Show quoted text -
      Hi Graham,

      The configuration used in httpd.conf file looks like:
      <Directory /var/www/html/psp>
      AddHandler .psp .psp_
      PythonHandler modules/python
      PythonDebug On
      </Directory>

      Comment

      • Sebastian \lunar\ Wiesner

        #4
        Re: Problem with Python Server Pages (PSP)

        barun.saha04@gm ail.com <barun.saha04@g mail.com>:
        Hi,
        >
        I am facing a very basic problem with PSP. I have installed mod_python
        (in fedora Core 1), added the lines required for loading Python
        modules and handling PSP pages. I have created a hello.psp page. But
        when I try to view this hello.psp page, all Python code are getting
        displayed.
        Not directly related to this issue, but I wouldn't start developing with
        PSP. Modern web development is better done with a WSGI compatible
        framework like Django ...

        --
        Freedom is always the freedom of dissenters.
        (Rosa Luxemburg)

        Comment

        • barun.saha04@gmail.com

          #5
          Re: Problem with Python Server Pages (PSP)

          On Jul 22, 5:36 pm, "Sebastian \"lunar\" Wiesner"
          <basti.wies...@ gmx.netwrote:
          barun.sah...@gm ail.com <barun.sah...@g mail.com>:
          >
          Hi,
          >
          I am facing a very basic problem with PSP. I have installed mod_python
          (in fedora Core 1), added the lines required for loading Python
          modules and handling PSP pages. I have created a hello.psp page. But
          when I try to view this hello.psp page, all Python code are getting
          displayed.
          >
          Not directly related to this issue, but I wouldn't start developing with
          PSP. Modern web development is better done with a WSGI compatible
          framework like Django ...
          >
          --
          Freedom is always the freedom of dissenters.
          (Rosa Luxemburg)
          Thanks to all. But can someone suggest me what the possible cause/
          solution for this behaviour could be?

          Comment

          • Graham Dumpleton

            #6
            Re: Problem with Python Server Pages (PSP)

            On Jul 22, 1:54 pm, barun.sah...@gm ail.com wrote:
            On Jul 22, 5:18 am, Graham Dumpleton <Graham.Dumple. ..@gmail.com>
            wrote:
            >
            >
            >
            On Jul 21, 9:42 pm, barun.sah...@gm ail.com wrote:
            >
            Hi,
            >
            I am facing a very basic problem with PSP. I have installedmod_py thon
            (in fedora Core 1), added the lines required for loading Python
            modules and handling PSP pages. I have created a hello.psp page. But
            when I try to view this hello.psp page, all Python code are getting
            displayed.
            >
            The said page is stored at /var/www/html/psp/hello.psp. I guess this
            is some configuration problem with Apache, but not able to figure out
            the exact problem. I have tried putting those configuration lines for
            psp in both httpd.conf and python.conf files. But still it is not
            working.
            >
            The Python module (mod_python) is getting loaded. Because when I
            telnet to my server, I can find that in the headers.
            >
            These are the versions of the softwares:
            Apache: 2.0.47
            Python: 2.2.3mod_python : 3.0.3
            >
            Thnaks for all your suggestions.
            >
            What is the Apache configuration snippet you are using to enable
            mod_pythonand PSP file handling?
            >
            Graham- Hide quoted text -
            >
            - Show quoted text -
            >
            Hi Graham,
            >
            The configuration used in httpd.conf file looks like:
            <Directory /var/www/html/psp>
                AddHandler .psp .psp_
                PythonHandler modules/python
                PythonDebug On
            </Directory>
            Go read the documentation properly.



            What is PythonHandler set to?

            Graham

            Comment

            • barun.saha04@gmail.com

              #7
              Re: Problem with Python Server Pages (PSP)

              On Jul 23, 6:18 pm, Graham Dumpleton <Graham.Dumple. ..@gmail.com>
              wrote:
              On Jul 22, 1:54 pm, barun.sah...@gm ail.com wrote:
              >
              >
              >
              On Jul 22, 5:18 am, Graham Dumpleton <Graham.Dumple. ..@gmail.com>
              wrote:
              >
              On Jul 21, 9:42 pm, barun.sah...@gm ail.com wrote:
              >
              Hi,
              >
              I am facing a very basic problem with PSP. I have installedmod_py thon
              (in fedora Core 1), added the lines required for loading Python
              modules and handling PSP pages. I have created a hello.psp page. But
              when I try to view this hello.psp page, all Python code are getting
              displayed.
              >
              The said page is stored at /var/www/html/psp/hello.psp. I guess this
              is some configuration problem with Apache, but not able to figure out
              the exact problem. I have tried putting those configuration lines for
              psp in both httpd.conf and python.conf files. But still it is not
              working.
              >
              The Python module (mod_python) is getting loaded. Because when I
              telnet to my server, I can find that in the headers.
              >
              These are the versions of the softwares:
              Apache: 2.0.47
              Python: 2.2.3mod_python : 3.0.3
              >
              Thnaks for all your suggestions.
              >
              What is the Apache configuration snippet you are using to enable
              >mod_pythonan d PSP file handling?
              >
              Graham- Hide quoted text -
              >
              - Show quoted text -
              >
              Hi Graham,
              >
              The configuration used in httpd.conf file looks like:
              <Directory /var/www/html/psp>
              AddHandler .psp .psp_
              PythonHandler modules/python
              PythonDebug On
              </Directory>
              >
              Go read the documentation properly.
              >

              >
              What is PythonHandler set to?
              >
              Graham
              Hi Graham,

              I'm extremely sorry. I had typed wrongly the configuration. Following
              is the one I'm using:

              <Directory /var/www/html/psp>
              AddHandler mod_python .psp .psp_
              PythonHandler mod_python.psp
              PythonDebug On
              </Directory>

              Strange thing is, same thing is working in windows, but not in Linux.

              Comment

              Working...