The following applies to Unix:
If you are crazy and DO decide to compile Apache with php4 (with mysql support) and mod_perl (as a DSO), make damn sure you use your own mysql library and header files. If you installed mysql from binary or source rpms, the required files are in /usr/include/mysql and /usr/lib/mysql, so you tell php:
./configure --with-mysql='/usr'
and it's able to find everything it needs. If you use the mysql headers/libs included with the php source, you may witness unexplainable segfaults when trying to use modperl DBI connects to a mysql server. Here's my build script in case you're interested...
#!/bin/sh
#
# build_apache.sh
#
# -------install Apache using DSOs--------
#
# first, untar apache, mod_perl, and php in a common dir.
# my tree looks like this:
# /tmp/apache
# |
# ./apache_1.3.14/
# ./apache_1.3.14.tar.gz
# ./build_apache.sh
# ./mod_perl-1.24/
# ./mod_perl-1.24.tar.gz
# ./php-4.0.3pl1/
# ./php-4.0.3pl1.tar.gz
###########################################################
# prebuild apache for php
cd apache_1.3.14
rm -rf config.cache
make clean
./configure --prefix='/usr/local/apache'
cd ..
###########################################################
# build php
cd php-4.0.3pl1
rm -rf config.cache
make clean
./configure --with-mysql='/usr' --enable-track-vars \
--with-apache='../apache_1.3.14'
# mysql header files in /usr/include/mysql
# mysql library files in /usr/lib/mysql
# (this is the default from an rpm install of mysql)
make
make install
cd ..
###########################################################
# build mod_perl
cd mod_perl-1.24_01
rm -rf config.cache
make clean
perl Makefile.PL \
APACHE_PREFIX='/usr/local/apache' \
APACHE_SRC='../apache_1.3.14' \
NO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
make
make install
cd ..
###########################################################
# build apache
cd apache_1.3.14
rm -rf config.cache
make clean
./configure --prefix='/usr/local/apache' \
--enable-module=rewrite \
--enable-module=proxy \
--activate-module='src/modules/perl/libperl.a' \
--activate-module='src/modules/php4/libphp4.a' \
--enable-shared=perl
make
make install
cd ..
###########################################################
# fin
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|