I am trying to install PHP 4.3.1 on a FreeBSD 4.9 server. When I run 'make install' from the ports collection, I am getting the following error:

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... configure: error: You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2
===> Script "configure" failed unexpectedly.
Please report the problem to dirk@FreeBSD.org [maintainer] and attach
the "/usr/ports/www/mod_php4/work/php-4.3.1/config.log" including the
output of the failure of your make command. Also, it might be a good
idea to provide an overview of all packages installed on your system
(e.g. an ls /var/db/pkg).
*** Error code 1

Stop in /usr/ports/www/mod_php4.
*** Error code 1

Stop in /usr/ports/www/mod_php4.

Any suggestions to correct this problem?

    Well, seems fairly straight forward. It's saying you have Apache 2 installed, but you configured php for Apache 1.x. When you do your ./configure, you should use --with-apxs2 instead of --with-apxs

      "Well, seems fairly straight forward. It's saying you have Apache 2 installed, but you configured php for Apache 1.x. When you do your ./configure, you should use --with-apxs2 instead of --with-apxs"

      I am trying to run the ./configure command; however, I am getting the error that states that ./configure is not a file or directory.

      ===[root] /usr/ports/www/mod_php4 # ./configure --wit-apxs2
      bash: ./configure: No such file or directory

      What directory should I be in to run the ./configure comamnd and when do I run it, before install or after? Also, are there any other switches that I need to be aware of? I am new to this whole thing, so please bear with me.

        There's a lot of switches. You should take a look at the list. configure should be run from your install directory. So if you downloaded the tarball, extracted it to /usr/local/php, you should be running ./configure in /usr/local/php. To see the list of switches, run ./configure --help.

          Write a Reply...