10.6.13
When I try to build PHP using
There are three things to check here. First, for some reason
when Apache builds the apxs Perl script, it sometimes ends up
getting built without the proper compiler and flags variables.
Find your apxs script (try the command
which apxs
),
it's sometimes found in
/usr/local/apache/bin/apxs
or
/usr/sbin/apxs
.
Open it and check for lines similar to these:
my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = ' '; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
If this is what you see, you have found your problem. They may
contain just spaces or other incorrect values, such as 'q()'. Change
these lines to say:
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
The second possible problem should only be an issue on Red Hat 6.1
and 6.2. The apxs script Red Hat ships is broken. Look for this line:
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
If you see the above line, change it to this:
my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install
Last, if you reconfigure/reinstall Apache, add a
make clean
to the process after
./configure
and before
make
.
|