mod_python installation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Useldinger

    mod_python installation

    Hi,
    I have the following configuration:

    - Apache 2.0.47 (win32)
    - mod_python 3.0.3 win32
    - python 2.3

    I have added the loadModule command for mod_python: "LoadModule
    python_module modules/mod_python.so", and the file is there.

    Apache won't start anymore. No error message is in Apache's log file.
    Uncommenting the loadModule command makes apache start correctly.

    Where can I get more information regarding the origin of the problem?

    -PU
  • Dave Benjamin

    #2
    Re: mod_python installation

    "Patrick Useldinger" <p.useldinger@m yrealbox.com> wrote in message
    news:kue1mv4fer 2lncl8r17q2vmhi 30drvme2k@4ax.c om...[color=blue]
    > I have added the loadModule command for mod_python: "LoadModule
    > python_module modules/mod_python.so", and the file is there.
    >
    > Apache won't start anymore. No error message is in Apache's log file.
    > Uncommenting the loadModule command makes apache start correctly.[/color]

    This might be a dumb question, but did you check the error log or the access
    log? What happens when you try to start apache from the command line? (is
    that possible in Windows? I've never tried...)

    Good luck,
    Dave


    Comment

    • John Dean

      #3
      Re: mod_python installation

      Once you have done that you can write your handler. The name of the file
      must be the same as the name you used above in the PythonHandler directive
      i.e. test.py
      Inside test.py you must have a function called handler e.g.
      def handler(req)
      req.content_typ e = 'text/html'
      req.send_http_h eader()
      req.write('some-html-formatted-text')
      return apache.OK

      May I suggest that you visit http://www.modpython.org and download the docs.
      The docs will tell you how to write dynamic handlers, how to use the
      publisher handler and lots more interesting and advanced stuff.
      BTW I have only just figured out how to set up Apache myself (today), with
      the help of two very kind people, namely Dave Benjamin and Steve Holden .
      All the best and I wish you luck.


      --
      Best Regards
      John

      Comment

      • Patrick Useldinger

        #4
        Re: mod_python installation

        On Thu, 11 Sep 2003 18:48:56 GMT, "Dave Benjamin" <dave@3dex.co m> wrote:
        [color=blue]
        >This might be a dumb question, but did you check the error log or the access
        >log? What happens when you try to start apache from the command line? (is
        >that possible in Windows? I've never tried...)[/color]

        I looked at the error log.

        In the Windows Event Log, I found the following:
        =============== =============== =========
        Application log:

        The Apache service named reported the following error:
        Cannot load C:/Programs/Apache/Apache2/modules/mod_python.so into
        server: The specified module could not be found. .

        The Apache service named reported the following error:
        Syntax error on line 173 of C:/Programs/Apache/Apache2/conf/httpd.conf:

        [Line 173 is "LoadModule python_module modules/mod_python.so"]
        =============== =============== ==========
        System log:.

        The Apache2 service terminated with service-specific error 1 (0x1).
        =============== =============== ==========

        My modules folder looks like this:
        Directory of C:\Programs\Apa che\Apache2\mod ules

        11/09/2003 21:48 <DIR> .
        11/09/2003 21:48 <DIR> ..
        08/07/2003 22:02 24 653 mod_access.so
        08/07/2003 22:02 24 658 mod_actions.so
        08/07/2003 22:02 24 656 mod_alias.so
        08/07/2003 22:02 24 658 mod_asis.so
        08/07/2003 22:02 24 651 mod_auth.so
        08/07/2003 22:02 24 656 mod_auth_anon.s o
        08/07/2003 22:02 24 655 mod_auth_dbm.so
        08/07/2003 22:02 32 850 mod_auth_digest .so
        08/07/2003 22:02 32 857 mod_auth_ldap.s o
        08/07/2003 22:02 32 855 mod_autoindex.s o
        08/07/2003 22:02 28 757 mod_cache.so
        08/07/2003 22:02 24 661 mod_cern_meta.s o
        08/07/2003 22:02 28 753 mod_cgi.so
        08/07/2003 22:02 24 668 mod_charset_lit e.so
        08/07/2003 22:02 77 903 mod_dav.so
        08/07/2003 22:02 45 136 mod_dav_fs.so
        08/07/2003 22:02 57 426 mod_deflate.so
        08/07/2003 22:02 24 654 mod_dir.so
        08/07/2003 22:02 24 666 mod_disk_cache. so
        08/07/2003 22:02 24 655 mod_env.so
        08/07/2003 22:02 24 659 mod_expires.so
        08/07/2003 22:02 28 757 mod_ext_filter. so
        08/07/2003 22:02 24 659 mod_file_cache. so
        08/07/2003 22:02 24 659 mod_headers.so
        08/07/2003 22:02 28 751 mod_imap.so
        08/07/2003 22:02 41 042 mod_include.so
        08/07/2003 22:02 24 658 mod_info.so
        08/07/2003 22:02 32 851 mod_isapi.so
        08/07/2003 22:02 24 656 mod_logio.so
        08/07/2003 22:02 28 757 mod_log_config. so
        08/07/2003 22:02 24 665 mod_mem_cache.s o
        08/07/2003 22:02 28 748 mod_mime.so
        08/07/2003 22:02 32 854 mod_mime_magic. so
        08/07/2003 22:02 36 950 mod_negotiation .so
        08/07/2003 22:02 41 038 mod_proxy.so
        08/07/2003 22:02 20 566 mod_proxy_conne ct.so
        08/07/2003 22:02 28 754 mod_proxy_ftp.s o
        08/07/2003 22:02 24 659 mod_proxy_http. so
        14/03/2003 13:06 110 592 mod_python.so
        08/07/2003 22:02 57 426 mod_rewrite.so
        08/07/2003 22:02 24 660 mod_setenvif.so
        08/07/2003 22:02 24 658 mod_speling.so
        08/07/2003 22:02 28 756 mod_status.so
        08/07/2003 22:02 24 661 mod_unique_id.s o
        08/07/2003 22:02 24 658 mod_userdir.so
        08/07/2003 22:02 24 661 mod_usertrack.s o
        08/07/2003 22:02 24 662 mod_vhost_alias .so
        08/07/2003 22:02 36 949 util_ldap.so
        48 File(s) 1 535 794 bytes
        2 Dir(s) 38 969 270 272 bytes free

        Regards,
        -PU

        Comment

        • Patrick Useldinger

          #5
          Re: mod_python installation

          Just found in the mailing list archives that mod_python 3.0.* is *not*
          Python 2.3 compatible, and that upgrading to Py2.3 should be postponed
          until mod_python 3.1.* is available :-(

          -pu

          Comment

          • M-a-S

            #6
            Re: mod_python installation

            Thank you for the info. I had the same problem.
            M-a-S

            "Patrick Useldinger" <p.useldinger@m yrealbox.com> wrote in message news:1el1mvopho md4t0hh5ckci0t1 72afk00gu@4ax.c om...[color=blue]
            > Just found in the mailing list archives that mod_python 3.0.* is *not*
            > Python 2.3 compatible, and that upgrading to Py2.3 should be postponed
            > until mod_python 3.1.* is available :-(
            >
            > -pu
            >[/color]


            Comment

            • Kai Thomsen

              #7
              Re: mod_python installation

              Patrick Useldinger wrote:[color=blue]
              > Just found in the mailing list archives that mod_python 3.0.* is *not*
              > Python 2.3 compatible, and that upgrading to Py2.3 should be postponed
              > until mod_python 3.1.* is available :-(
              >
              > -pu
              >[/color]
              I don't know iff it is really not compatible. You can find a patch at
              the mod_python page that you have to apply to use it with Python 2.3.
              mod_python needs to be recompiled naturally, but I have it working on a
              couple of Apache boxes (Linux and W2K) without any problems so far.

              Kai

              Comment

              • M-a-S

                #8
                Re: mod_python installation

                "Kai Thomsen" <kaithomsen@gmx .de> wrote in message news:bk1fi9$bun $02$1@news.t-online.com...[color=blue]
                > Patrick Useldinger wrote:[color=green]
                > > Just found in the mailing list archives that mod_python 3.0.* is *not*
                > > Python 2.3 compatible, and that upgrading to Py2.3 should be postponed
                > > until mod_python 3.1.* is available :-(
                > >
                > > -pu
                > >[/color]
                > I don't know iff it is really not compatible. You can find a patch at
                > the mod_python page that you have to apply to use it with Python 2.3.
                > mod_python needs to be recompiled naturally, but I have it working on a
                > couple of Apache boxes (Linux and W2K) without any problems so far.
                >
                > Kai
                >[/color]

                What patch? At what page? The latest release of mod_python for Windows,
                that I could find, is 3.1.0a, which doesn't start with Apache 2.0.43/Windows XP.
                Is the patched mod_python available anywhere for downloading? Can you share it?
                Thank you,
                M-a-S


                Comment

                Working...