Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Fix mod_perl print() output' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Fix mod_perl print() output
Authored by: brainspiral on Jan 07, '04 07:03:30PM

I came across a broken mod_perl in the distributed versions of both 10.3 & 10.3 Server. I really needed mod_perl to run a calendar program that otherwise is terribly slow in plain cgi.

After having looked all over for solutions, I never really found what I was looking for. Nothing worked. I tried all sorts of things - changing entries in httpd.conf, moving around files, starting/stopping processes, etc. Nothing.

Finally, I decided to rebuild MOD_PERL from source. I really wanted to avoid it - the distributed versions of certain modules are easily broken by updates and I didn't want to go about making drastic changes to a rather complexly installed httpd (with hfs, webdav, calendar, etc modules already configured for use).

So, I found a fairly clean solution that so far has been working great. Here are the steps:

1) Make sure the Panther Developer Tools are installed. You'll need make,gcc & the Perl header files to rebuild mod_perl.

2) Choose a place to build mod_perl. I picked out /usr/src - but anywhere will do. No need to sudo/su yet. Just make sure the user you're logged in as has rwx rights to the folder you download the source to.

3) Get the mod_perl source. I downloaded version 1.29 from:
http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz

If you issue the following command from the command line:
ftp http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
The file will be downloaded automatically to the current directly.

4) Unzip it:

tar -zxvf mod_perl-1.0-current.tar.gz

5) Install the CPAN mod_perl libraries (I'm not 100% sure if this step is optional or not)
sudo perl -MCPAN -e 'install("Bundle::Apache")'
(Choose the defaults for install questions)

6) Change directories to the mod_perl source.

cd /usr/src/mod_perl-1.29

7) Issue the configure command. By building mod_perl as a DSO integrated with APXS, I avoided having to rebuild & reconfigure apache.

perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/sbin/apxs EVERYTHING=1 NO_HTTPD=1

8) sudo make

9) sudo make test (make sure all the tests that run pass successfully)

10) sudo make install

11) Stop & Start Apache (either apachectl stop/apachectl start, in Server Admin, or in the 'Sharing' System Preference.

12) Enjoy!

13) FYI: mod_perl does still need to be enabled & configured (in some cases) in httpd.conf.

hunter greene
brainspiral technologies
http://www.brainspiral.com



[ Reply to This | # ]