Home > Article > Backend Development > I get strange error messages when compiling PHP with --with-apxs_PHP Tutorial
There are two ways to check. First, when Apache built the apxs Perl program, for some reason, it did not include the correct compilation parameters. Edit your apxs (in /usr/local/apache/bin/apxs or /usr/sbin/apxs) and check the following lines:
my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl
my $ CFG_LD_SHLIB = ' '; # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = ' '; The line looks like:
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 cause only occurs on RedHat 6.1. There is a problem with the apxs configuration on RedHat, as follows:
my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install
If you see the above line, you should change it to the following line:
my $ CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install