Hi folks

I need help from anyone who has installed PHP.

Installing the Apache Dynamic module has been unsuccessful so far and I've
exhausted all the help files I can find around the web.

The problem is with finding the apxs script after running
./configure --with-mysql --with-apxs

mod_so is enabled as the compiled-in modules contains http_core.c and
mod_so.c

--with-apxs tells me that it can't find the apxs script. This seems to be
common as it mentions to use the absolute path if this occurs. However it's
not in /usr/local/apache/bin where it usually should be and doing find
/ -name apxs -ls returns no results.

There is a file called apxs.pl but this is located in
/usr/local/etc/httpd/compile/src/support/apxs.pl
Also I had to make this file executable as well as change the path to perl
at the top.

Running
./configure --with-mysql --with-apxs=/usr/local/etc/httpd/compile/src/suppor
t/apxs.pl returns the following

loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... i686-pc-linux-gnu
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.27 (ok)
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for flex... flex
checking for flex... (cached) flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for working const... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache module support via DSO through APXS...
Usage: apxs -g [-S <var>=<val>] -n <modname>
apxs -q [-S <var>=<val>] <query> ...
apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
[-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
[-Wl,<flags>] <files> ...
apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
configure: error: Sorry, I cannot run apxs. Either you need to install Perl
or you need to pass the absolute path of apxs by
using --with-apxs=/absolute/path/to/apxs

I can't get past step 2a in the install file because this apxs script that
I'm supposed to be enabling in the configuring of the PHP install is not
doing the job properly. I'm not even sure it's the correct apxs file.

This is confusing to me as I thought that I could do the DSO (Dynamic)
module install as I had the necessary compiled-in modules. However I think I
need the --with-apxs included in order to run it as DSO.

Anyone who has installed PHP themselves would know what I'm talking about so
if anyone can help me out that would be much appreciated as I really don't
know where to go to from now.

Regards,
Darren.

    You're pointing to the wrong place. You want to point to the apxs script where it was installed to, not from.

    If you installed apache to /usr/local/apache, then it would be --with-apxs=/usr/local/apache/bin/apxs

      I had the same problem when I just installed Red Hat 7. You may be able to do the same thing...

      I installed RH7 and the Apache RPM, and for some reason this build didn't seem to include the apxs file. (Anyone know why?)

      I simply uninstalled the RPM, downloaded the Apache source, and built my own version. APXS appeared as expected (as /usr/local/apache/bin/apxs), and I could then build PHP.

      I'm sure that there's a better way to do it than this, but I don't know one. But the benefit is that you can configure Apache exactly how you want it. :o)

      Tim.

        Hi Scott

        Thanks for taking the time to reply.

        I did mention that I searched for the apxs script and it was nowhere to be found.
        I know that it should most likely be in /usr/local/apache/bin/apxs but as I said, it is not there.

        I ran your suggestion anyway but as expected here is the second part of the results:

        Configuring SAPI modules
        checking for AOLserver support... no
        checking for Apache module support via DSO through APXS...
        ./configure: /usr/local/apache/bin/apxs: No such file or directory
        configure: error: Sorry, I cannot run apxs. Either you need to install Perl or y
        ou need to pass the absolute path of apxs by using --with-apxs=/absolute/path/to
        /apxs

        Regards
        Darren.

          Thanks for your help Tim.

          Red Hat and Apache were both preinstalled by DigitalNation on the dedicated server and my best bet may be to contact them as I'm not familiar with this process.

          I have something to take to them now.

          Thanks again,
          Darren.

            All you really probably need is the apache_devel rpm installed, and that should add the apxs script (not sure where, but it's there somewhere... :) as well as all the apache header files and such.

              3 months later

              I was having the same problem Darren was with Red Hat 6.2 and Apache. I loaded the apache_devel rpm and recompiled with no problems with apxs. This is the fix!!

                6 months later
                Write a Reply...