mod_python installation

Discussion in 'Python' started by Patrick Useldinger, Sep 11, 2003.

  1. 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
    Patrick Useldinger, Sep 11, 2003
    #1
    1. Advertising

  2. "Patrick Useldinger" <> wrote in message
    news:...
    > 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.


    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
    Dave Benjamin, Sep 11, 2003
    #2
    1. Advertising

  3. Patrick Useldinger

    John Dean Guest

    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_type = 'text/html'
    req.send_http_header()
    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
    John Dean, Sep 11, 2003
    #3
  4. On Thu, 11 Sep 2003 18:48:56 GMT, "Dave Benjamin" <> wrote:

    >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...)


    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\Apache\Apache2\modules

    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.so
    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.so
    08/07/2003 22:02 32 855 mod_autoindex.so
    08/07/2003 22:02 28 757 mod_cache.so
    08/07/2003 22:02 24 661 mod_cern_meta.so
    08/07/2003 22:02 28 753 mod_cgi.so
    08/07/2003 22:02 24 668 mod_charset_lite.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.so
    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_connect.so
    08/07/2003 22:02 28 754 mod_proxy_ftp.so
    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.so
    08/07/2003 22:02 24 658 mod_userdir.so
    08/07/2003 22:02 24 661 mod_usertrack.so
    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
    Patrick Useldinger, Sep 11, 2003
    #4
  5. 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
    Patrick Useldinger, Sep 11, 2003
    #5
  6. Patrick Useldinger

    M-a-S Guest

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

    "Patrick Useldinger" <> wrote in message news:...
    > 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
    >
    M-a-S, Sep 12, 2003
    #6
  7. Patrick Useldinger

    Kai Thomsen Guest

    Patrick Useldinger wrote:
    > 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
    >

    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
    Kai Thomsen, Sep 14, 2003
    #7
  8. Patrick Useldinger

    M-a-S Guest

    "Kai Thomsen" <> wrote in message news:bk1fi9$bun$02$-online.com...
    > Patrick Useldinger wrote:
    > > 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
    > >

    > 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
    >


    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
    M-a-S, Sep 16, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rolfe
    Replies:
    2
    Views:
    345
    Rolfe
    Sep 26, 2003
  2. Rolfe
    Replies:
    2
    Views:
    375
    Rolfe
    Sep 29, 2003
  3. Piet
    Replies:
    6
    Views:
    1,200
    David Fraser
    Sep 2, 2004
  4. Andrea Fiore

    Mod_python installation: apache Warning

    Andrea Fiore, Mar 16, 2005, in forum: Python
    Replies:
    0
    Views:
    356
    Andrea Fiore
    Mar 16, 2005
  5. blbmdsmith
    Replies:
    1
    Views:
    643
    Graham Dumpleton
    Dec 14, 2006
Loading...

Share This Page