Re: Apache 2.2 released - apparently breaks the mod API compatibility
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Re: Apache 2.2 released - apparently breaks the mod API compatibility




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: Apache 2.2 released - apparently breaks the mod API compatibility  
Jorey Bump


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-03-05 10:46 PM

Nicolas Lehuen wrote:
> http://httpd.apache.org/download.cgi
>
> "Apache 2.2 add-in modules are not compatible with Apache 2.0 or 1.3
> modules. If you are running third party add-in modules, you will need to
> obtain new modules written for Apache 2.2 from that third party before
> you attempt to upgrade from Apache 2.0."
>
> Great, now we're having to support three separate version : mod_python
> 2.7 for Apache 1.3.x (though it's a bit unsupported now, isn't it ?),
> mod_python 3.2 for Apache 2.0.x and mod_python 3.2.x for Apache 2.2...
> It's not a big surprise, though, since we already have this issue :
>
> http://issues.apache.org/jira/browse/MODPYTHON-78
>
> Does anyone knows anything about the API changes ?

I've attached a source tree patch against 3.2.5b that will work with
apache 2.2.0. It still fails one test in the test suite, but seems to
load fine in apache and run modules in Publisher.

To apply the patch, move into the source code directory and issue the
following command:

patch -p1 < /path/to/mod_python-3.2.5b.patch

Sorry, I don't do Apache on Windows. Could someone follow up with
instructions for that platform (beyond "install Cygwin")? 

Here are some key points:

APR_STATUS_IS_SUCCESS is gone.
apr_sockaddr_port_get is gone.
mod_auth is now mod_auth_basic.
auth_module is now auth_basic_module.

Affected files are:

src/connobject.c
src/filterobject.c
test/test.py

To fix the APR_STATUS_IS_SUCCESS issue, I deleted the code that used it,
without replacement. That may be suboptimal, if the code serves a useful
purpose. 

To fix the apr_sockaddr_port_get issue, I restored makesockaddr from
connobject.c in 3.2.1b. This was obviously replaced for a reason in
later versions, with the unfortunate choice of a deprecated function
from the API. The original issue needs to be revisited to determine a
more compatible solution.

I'm unable to diagnose the remaining failure in the test suite:

* Testing internally (status messages go to error_log)
F
 ========================================
==============================
FAIL: test_internal (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test.py", line 1249, in test_internal
self.fail("Some tests failed, see error_log")
AssertionError: Some tests failed, see error_log

----------------------------------------------------------------------
Ran 43 tests in 61.161s

FAILED (failures=1)
F  Stopping Apache...
/usr/local/apache2.2.0/bin/httpd -k stop -f
/home/jorey/src/mod_python-3.2.5b/test/conf/test.conf

 ========================================
==============================
FAIL: testPerRequestTests (__main__.PerInstanceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test.py", line 1805, in testPerRequestTests
self.failUnless(result.wasSuccessful())
AssertionError

----------------------------------------------------------------------
Ran 6 tests in 107.536s

FAILED (failures=1)

The error log includes this line at the end:

logs/error_log:[Sat Dec 03 15:31:15 2005] [error] [client 127.0.
0.1]
......F. \n======================================
===========================
=====\nFAIL:
test_server_members
(tests.SimpleTestCase)\n----------------------------------------------------
------------------\nTraceback
(most recent call last):\n  File
"/home/jorey/src/mod_python-3.2.5b/test/htdocs/tests.py", line 446, in
test_server_members\n    self.fail("server.keep_alive_timeout should be
15.0")\nAssertionError: server.keep_alive_timeout should be
15.0\n\n--------------------------------------------------------------------
--\nRan
8 tests in 0.336s\n\nFAILED (failures=1)\n






Attachment: mod_python-3.2.5b.patch
This has been downloaded 0 time(s).



[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:21 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register