LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2006, 04:55 PM   #1
happygiraffe98
LQ Newbie
 
Registered: Nov 2005
Location: Ohio
Distribution: Ubuntu Edgy
Posts: 14

Rep: Reputation: 0
Question Mod-python and apache troubles


Hello everyone,

I'm trying to run mod-python on Debian 3.1. I'm using an unofficial Debian package of mod-python 3.1.3.

Python2.4, Python2.3, and Apache2 have been installed. Apache2 has been configured to accept the python pages. When I type "python" at the command line, I get python2.3. If I type "python2.4" at the command line, I get python2.4 (duh )

As far as I can tell, everything is in place for mod-python. Mod_python.load is in /etc/apache2/mod-enabled. That refers apache to /usr/lib/apache2/modules/mod_python.so, which is also in place. Apache has also been configured to accept python pages.

Unfortunately, whenever I try to access a python page, I get "500:Internal server error". Error.log says:

[Wed Feb 22 22:46:09 2006] [error] make_obcallback: could not import mod_python.apache.\n

On startup, I get the following in error.log:

[Wed Feb 22 22:24:37 2006] [notice] Apache/2.0.54 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-16 configured -- resuming normal operations.



I have tirelessly searched messageboards and eaten all of Google's bandwith trying to find a solution. The only thing that seems out of place to me is the fact that Apache is (apparently) loading Python 2.3.5 instead of python 2.4. However, I don't know how to make Apache load python2.4 instead.

If I type "import apache" at the python2.4 command line, I get:
Traceback (most recent call last):
File "<stdin>", line 1 in ?
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 28, in ?
import _apache
ImportError: No module named _apache

Any help would be greatly appreciated.

Last edited by happygiraffe98; 02-22-2006 at 05:19 PM.
 
Old 02-24-2006, 02:26 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Maybe just try to build it from source (it works fine for me).
 
Old 02-24-2006, 08:26 AM   #3
happygiraffe98
LQ Newbie
 
Registered: Nov 2005
Location: Ohio
Distribution: Ubuntu Edgy
Posts: 14

Original Poster
Rep: Reputation: 0
Lightbulb Reply

OK, that's what I'm in the process of trying now.

Thanks for your comment
 
Old 02-24-2006, 04:12 PM   #4
happygiraffe98
LQ Newbie
 
Registered: Nov 2005
Location: Ohio
Distribution: Ubuntu Edgy
Posts: 14

Original Poster
Rep: Reputation: 0
Question More trouble :\

I'm having some trouble running mod_python3.2.8 and apache2.2.0 together. When I try to run apache, I get:

Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_python.so into server: /usr/local/apache2/modules/mod_python.so: undefined symbol: APR_STATUS_IS_SUCCESS

I am totally clueless as to what the problem could be.

Last edited by happygiraffe98; 02-25-2006 at 10:08 AM. Reason: To satisfy perfectionist tendencies
 
Old 03-07-2006, 08:24 PM   #5
happygiraffe98
LQ Newbie
 
Registered: Nov 2005
Location: Ohio
Distribution: Ubuntu Edgy
Posts: 14

Original Poster
Rep: Reputation: 0
Lightbulb

The error is caused by an incompatability between mod_python and httpd >= 2.2.0

More information can be found here: http://issues.apache.org/jira/browse/MODPYTHON-78 .

To fix the problem on my computer, I took the easy road and am simply using httpd 2.0 until the issue is resolved.
 
Old 03-07-2006, 09:39 PM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
happygiraffe98, what do you need mod_python for? (do you actually need it?)
 
Old 03-23-2006, 01:02 PM   #7
happygiraffe98
LQ Newbie
 
Registered: Nov 2005
Location: Ohio
Distribution: Ubuntu Edgy
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by spooon
happygiraffe98, what do you need mod_python for? (do you actually need it?)
It's for work purposes, so I have no choice.

It's working great now, however.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having troubles configuring mod-ssl with apache. shaly_c Linux - Software 1 01-23-2006 07:28 AM
[Debian] Mod-python not working freek sanders Debian 5 06-30-2005 04:35 PM
Apache + Mod SSL abhijeetudas Linux - Software 0 01-05-2005 02:34 PM
apache mod rewrite Robert0380 Linux - Software 5 07-31-2003 04:42 PM
Include mod for Apache Graanco Linux - Newbie 6 09-14-2001 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration