Issue Details (XML | Word | Printable)

Key: MODPYTHON-28
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Nicolas Lehuen
Reporter: Nicolas Lehuen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Add a standard test handler in the distribution

Created: 07/Mar/05 04:07 PM   Updated: 05/Mar/06 01:44 PM
Return to search
Component/s: None
Affects Version/s: 2.7.10, 3.1.4
Fix Version/s: 3.2.7

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works modpython2.tex-jg20050528-1.diff 2005-05-28 11:56 PM Jim Gallacher 1 kB

Resolution Date: 28/May/05 08:01 PM


 Description  « Hide
Improving the testing phase of the installation is crucial as we get a steady stream of question from new users who can't run the mptest or are confused about its meaning (for example, the fact that any URL ending with .py runs the mptest handler is misleading at first).

We should include a standard mptest handler in the distribution so that we can better help beginners, without making them struggle with a new file PYTHONPATH, syntax errors in the handler, etc. Ideally, the mptest handler should display useful informations both in the Apache log and in the result page ; this would help us check their environment and provide better help.

The information displayed could be (both in the log and the result page) :

- Apache version (+MPM type if this information can be queried at runtime)
- Python version
- mod_python version
- sys.path
- mod_python.publisher available yes/no
- mod_python.psp available yes/no

Of course, if anything goes wrong, it should be clearly stated in the Apache log (no misleading 404 errors, please !).

The testing phase of the installation would then be : 1) set "SetHandler mod_python.mptest" directive and 2) watch the results. This would be far less messy as it is currently.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham Dumpleton added a comment - 08/Mar/05 07:18 PM
Most of the time the problem is that people using 2.7.X follow the instructions
for 3.1.X. Adding a test module in a future version will not change that. One
may be better off adding notes within the documentation of the latest version
on the web site where the mptest example is given, highlighting that it is only
valid for 3.1 and later and that people should check which version they are
using and refer to older documentation if they are using an older version. That
would stop a reasonable number of the questions.

Nicolas Lehuen added a comment - 01/May/05 09:04 PM
OK, the handler is named mod_python.testhandler and display a whole range of information about the configuration. Now we need a little bit of documentation on how to use it.

Nicolas Lehuen added a comment - 01/May/05 09:23 PM
I've also added a warning in the documentation, so that people using mod_python 2.7.x do not follow the 3.x testing instructions.

Nicolas Lehuen added a comment - 28/May/05 08:01 PM
I've added a bit of documentation about testing and using the testhandler. Despite my efforts, I did not manage to install a proper LaTeX environnement to check my modifications, so I hope everything is OK.

Jim Gallacher added a comment - 28/May/05 11:55 PM
You got the LaTex mostly right. There is one error (a stray backslash) which I've corrected in the attached patch.

As for the testing documentation itself, in section 2.4 item 7 you mention the need to "use a higher level handler such as mod_python publisher (see 3.1), mpservlets or Vampire". It may not be obvious to the reader that mpservlets and Vampire are not included with mod_python.

Maybe add somthing at the end of section 2.4 such:

\begin{seealso}
  \seeurl{http://home.comcast.net/~d.popowich/mpservlets}{mpservlets}
  \seeurl{http://www.dscpl.com.au/projects/vampire}{Vampire}
\end{seealso}

Jim Gallacher added a comment - 28/May/05 11:56 PM
A few small documentation fixes.

Nicolas Lehuen added a comment - 31/May/05 11:21 PM
OK, I have integrated your fixes.