Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Apache w/ PHP4 and mod_perl Docs
By bakednotfried , Section Help! []
Posted on Tue Feb 20, 2001 at 12:00:00 PM PST
The toughest part of getting scoop to work for me was getting php and mod_perl to behave with each other in apache. Here is the story of how I learned to build apache with php4 and mod_perl in order to run scoop.

We'll assume /usr/src as top of the build tree and apache_1.3.17, php-4.0.3pl1 and mod_perl-1.25.

The first step is to prep the apache source tree for php and mod_perl. Both php and mod_perl need to install files into the apache source tree, but you have to start the apache build process before you can install either mod_perl or php.

Inside /usr/src/apache_1.3.17/ run the configure script with your prefix.

[michaelc@linux apache_1.3.17]$ ./configure \
--prefix=/your/apache/prefix

Then, inside /usr/src/mod_perl-1.25 build mod_perl with the following

[michaelc@linux mod_perl-1.25]$ perl Makefile.PL \
APACHE_SRC=../apache_1.3.17/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
The important part here is the PREP_HTTPD=1 part. Normally, the modperl installation script tries to compile apache for you. This stops that feature so you can compile and install both mod_perl and php before compiling apache yourself.

Then, make and make install.

You will also need to make sure all the perl mudules are installed that are required to run scoop. See the scoop INSTALL file for more info.

Next its php, so inside the php build directory compile php with

[michaelc@linux php-4.0.3pl1]$ ./configure \
--enable-track-vars \
--with-mysql=/usr/local \
--with-apache=/usr/src/apache_1.3.17
The interesting option here is with-mysql=/usr/local. php wants to use its own set of mysql libraries. Since you are also using perl to access mysql, you must tell php to use mysql libraries. I set this to the directoty where lib/ exists. Adjust this to match your environment

Again, make and make install.

Then, go back to the apache build directory and run the full install process.

[michaelc@linux php-4.0.3pl1]$ ./configure \
--prefix=/var/www \
--activate-module=src/modules/php4/libphp4.a \
--activate-module=src/modules/perl/libperl.a
And of course, make and make install.

for php you may also need to copy php.ini-dist to /usr/local/lib/php.ini from the php build directory.

Hope this helps folks. Constructive criticism welcome.

mike

< Editing Articles Resets Polls | email interface >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· Scoop
· More on Docs
· Also by bakednotfried

Story Views
  19 Scoop users have viewed this story.

Display: Sort:
Apache w/ PHP4 and mod_perl | 3 comments (3 topical, 0 hidden)
I had... (none / 0) (#1)
by Smirks on Tue Feb 20, 2001 at 09:25:59 AM PST

.... a tough time trying to figure this out when I did it a few months ago. Now, I can use this as a reference if I ever have to do it again. Thanks!

[ InTune ]


Excellent reference. (none / 0) (#2)
by hoarycripple on Thu May 31, 2001 at 11:33:51 PM PST

I recently built apache/mod_perl so that I could install scoop but in doing so, I had to nuke my other website which was php-based. I just could not get php-4.0.5 to work properly.

Thanks to your very clear directions, I will try this again. Can you think of any pitfalls in going from static to dso with respect to my current Scoop installation? I would really hate to trash that installation because it took me so damn long to set up.

Anyway, thanks again for the reference.

--Hoarycripple



thanks! (none / 0) (#3)
by jbay on Wed May 01, 2002 at 07:57:36 PM PST

I used your instructions to build a new installation...your post was a godsend!



Apache w/ PHP4 and mod_perl | 3 comments (3 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search