473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
Jul 18 '05 #1
7 10038
"Patrick Useldinger" <p.**********@myrealbox.com> wrote in message
news:ku********************************@4ax.com...
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
Jul 18 '05 #2
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
Jul 18 '05 #3
On Thu, 11 Sep 2003 18:48:56 GMT, "Dave Benjamin" <da**@3dex.com> 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
Jul 18 '05 #4
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

Jul 18 '05 #5
Thank you for the info. I had the same problem.
M-a-S

"Patrick Useldinger" <p.**********@myrealbox.com> wrote in message news:1e********************************@4ax.com...
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

Jul 18 '05 #6
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

Jul 18 '05 #7
"Kai Thomsen" <ka********@gmx.de> wrote in message news:bk*************@news.t-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
Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rolfe | last post by:
Has anyone had success getting mod_python to run on Apache on Win2K? I'm writing up instructions on how to do this and need your help. When completed, the instructions at the mod_python website and...
1
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on...
2
by: Dan Gottlieb | last post by:
Hi, I realize that this is somewhat vague, but I'm not really sure what to do next. I'm trying to get Apache and mod_python set up on my windows XP box for testing purposes. I installed the...
1
by: wolf | last post by:
i would like to briefly share my experiences with installing mod_python on a w2000 box. i must say that i believe the installation process to be unnecessarily complicated by the simple fact that...
6
by: Piet | last post by:
Hi there, I cannot install mod_python v3.1.3 on either Win2k/ActivePython 2.3.2 or WinMe/Python 2.3.4. When I run the Windows installer, I get the following error message: Traceback (most recent...
0
by: tt | last post by:
My mod_python 3.1.4 installation works when Apache 2.0.54 is run in standalone mode (apache -k standalone) but refuses to operate when run as a service (apache -k restart). Logs yield the usual...
1
by: boney | last post by:
hello All, I am totally unknown to python language.. i need to install mod_python to embed python interpreter with the Apache server, in order to use Trac with Apache Web Server i am using...
2
by: m.banaouas | last post by:
I installed Apache 2.2.3 and mod_python 3.2.10 on WinXP plateform I configured mod_python via httpd.conf: LoadModule python_module modules/mod_python.so but my script folder configuration...
1
by: arorap | last post by:
Hi, I recently setup mod_python successfully and things work smooth. However, I do not remember telling mod_python where to find Python installation. There's not environment variable which gives...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.