can't install PHP - keep getting "Invalid directory" error regarding the path to Apache httpd.h

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lawrence k

    can't install PHP - keep getting "Invalid directory" error regarding the path to Apache httpd.h

    I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
    to install PHP 5.1.4. I can not get the ./configure command to work. I
    keep getting this error:

    configure: error: Invalid Apache directory - unable to find httpd.h
    under /usr/local/apache/include

    So then I run this command:

    find / -name httpd.h

    which should find every file on my machine with the name "httpd.h".
    These are the results I get:

    /usr/local/apache/include/httpd.h
    /home/shelley/apache_1.3.36/src/include/httpd.h

    So I've rerun the ./configure command, using this first:

    --with-apache=/usr/local/apche/include

    and since that didn't work:

    --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h

    but I get the "Invalid directory" error with both addresses.

    What am I missing?

  • Jerry Stuckle

    #2
    Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

    lawrence k wrote:[color=blue]
    > I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
    > to install PHP 5.1.4. I can not get the ./configure command to work. I
    > keep getting this error:
    >
    > configure: error: Invalid Apache directory - unable to find httpd.h
    > under /usr/local/apache/include
    >
    > So then I run this command:
    >
    > find / -name httpd.h
    >
    > which should find every file on my machine with the name "httpd.h".
    > These are the results I get:
    >
    > /usr/local/apache/include/httpd.h
    > /home/shelley/apache_1.3.36/src/include/httpd.h
    >
    > So I've rerun the ./configure command, using this first:
    >
    > --with-apache=/usr/local/apche/include
    >
    > and since that didn't work:
    >
    > --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
    >
    > but I get the "Invalid directory" error with both addresses.
    >
    > What am I missing?
    >[/color]

    Check the installation documentation. It's looking the base directory for
    Apache - not the Apache include directory or an include file.

    You must also have the Apache development code installed on your system. Sorry,
    I don't use RedHat so I don't know which RPM you need.


    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • David Haynes

      #3
      Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

      Jerry Stuckle wrote:[color=blue]
      > lawrence k wrote:[color=green]
      >> I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
      >> to install PHP 5.1.4. I can not get the ./configure command to work. I
      >> keep getting this error:
      >>
      >> configure: error: Invalid Apache directory - unable to find httpd.h
      >> under /usr/local/apache/include
      >>
      >> So then I run this command:
      >>
      >> find / -name httpd.h
      >>
      >> which should find every file on my machine with the name "httpd.h".
      >> These are the results I get:
      >>
      >> /usr/local/apache/include/httpd.h
      >> /home/shelley/apache_1.3.36/src/include/httpd.h
      >>
      >> So I've rerun the ./configure command, using this first:
      >>
      >> --with-apache=/usr/local/apche/include
      >>
      >> and since that didn't work:
      >>
      >> --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
      >>
      >> but I get the "Invalid directory" error with both addresses.
      >>
      >> What am I missing?
      >>[/color]
      >
      > Check the installation documentation. It's looking the base directory
      > for Apache - not the Apache include directory or an include file.
      >
      > You must also have the Apache development code installed on your
      > system. Sorry, I don't use RedHat so I don't know which RPM you need.
      >
      >[/color]

      I don't think you need to use --with-apache.
      I think you need to use --with-apxs2 instead.
      At least that works on my Fedora Core 4 system.

      -david-

      Comment

      • Jerry Stuckle

        #4
        Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

        David Haynes wrote:[color=blue]
        > Jerry Stuckle wrote:
        >[color=green]
        >> lawrence k wrote:
        >>[color=darkred]
        >>> I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
        >>> to install PHP 5.1.4. I can not get the ./configure command to work. I
        >>> keep getting this error:
        >>>
        >>> configure: error: Invalid Apache directory - unable to find httpd.h
        >>> under /usr/local/apache/include
        >>>
        >>> So then I run this command:
        >>>
        >>> find / -name httpd.h
        >>>
        >>> which should find every file on my machine with the name "httpd.h".
        >>> These are the results I get:
        >>>
        >>> /usr/local/apache/include/httpd.h
        >>> /home/shelley/apache_1.3.36/src/include/httpd.h
        >>>
        >>> So I've rerun the ./configure command, using this first:
        >>>
        >>> --with-apache=/usr/local/apche/include
        >>>
        >>> and since that didn't work:
        >>>
        >>> --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
        >>>
        >>> but I get the "Invalid directory" error with both addresses.
        >>>
        >>> What am I missing?
        >>>[/color]
        >>
        >> Check the installation documentation. It's looking the base directory
        >> for Apache - not the Apache include directory or an include file.
        >>
        >> You must also have the Apache development code installed on your
        >> system. Sorry, I don't use RedHat so I don't know which RPM you need.
        >>
        >>[/color]
        >
        > I don't think you need to use --with-apache.
        > I think you need to use --with-apxs2 instead.
        > At least that works on my Fedora Core 4 system.
        >
        > -david-
        >[/color]

        David,

        You're right - it's been a while since I compiled PHP - and I have a script to
        do it now.

        Except in his case it should be --with-apxs as he's using Apache 1.x.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • lawrence k

          #5
          Re: can't install PHP - keep getting "Invali d directory" error regarding the path to Apache httpd.h


          Jerry Stuckle wrote:[color=blue]
          > lawrence k wrote:[color=green]
          > > I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
          > > to install PHP 5.1.4. I can not get the ./configure command to work. I
          > > keep getting this error:
          > >
          > > configure: error: Invalid Apache directory - unable to find httpd.h
          > > under /usr/local/apache/include
          > >
          > > So then I run this command:
          > >
          > > find / -name httpd.h
          > >
          > > which should find every file on my machine with the name "httpd.h".
          > > These are the results I get:
          > >
          > > /usr/local/apache/include/httpd.h
          > > /home/shelley/apache_1.3.36/src/include/httpd.h
          > >
          > > So I've rerun the ./configure command, using this first:
          > >
          > > --with-apache=/usr/local/apche/include
          > >
          > > and since that didn't work:
          > >
          > > --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
          > >
          > > but I get the "Invalid directory" error with both addresses.
          > >
          > > What am I missing?
          > >[/color]
          >
          > Check the installation documentation. It's looking the base directory for
          > Apache - not the Apache include directory or an include file.[/color]

          I believe all the only installation documentation that exists is here:



          I've been trying to follow the directions closely, but with no luck.


          [color=blue]
          > You must also have the Apache development code installed on your system. Sorry,
          > I don't use RedHat so I don't know which RPM you need.[/color]

          I just downloaded the 1.3.36 source code 2 days ago and built Apache
          from scratch. That part seemed to go well. Since it is a brand new
          installation, I assume that everything I need is included. How would I
          check otherwise?

          Comment

          • lawrence k

            #6
            Re: can't install PHP - keep getting "Invali d directory" error regarding the path to Apache httpd.h


            Jerry Stuckle wrote:[color=blue]
            > David Haynes wrote:[color=green]
            > > Jerry Stuckle wrote:
            > >[color=darkred]
            > >> lawrence k wrote:
            > >>
            > >>> I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
            > >>> to install PHP 5.1.4. I can not get the ./configure command to work. I
            > >>> keep getting this error:
            > >>>
            > >>> configure: error: Invalid Apache directory - unable to find httpd.h
            > >>> under /usr/local/apache/include
            > >>>
            > >>> So then I run this command:
            > >>>
            > >>> find / -name httpd.h
            > >>>
            > >>> which should find every file on my machine with the name "httpd.h".
            > >>> These are the results I get:
            > >>>
            > >>> /usr/local/apache/include/httpd.h
            > >>> /home/shelley/apache_1.3.36/src/include/httpd.h
            > >>>
            > >>> So I've rerun the ./configure command, using this first:
            > >>>
            > >>> --with-apache=/usr/local/apche/include
            > >>>
            > >>> and since that didn't work:
            > >>>
            > >>> --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
            > >>>
            > >>> but I get the "Invalid directory" error with both addresses.
            > >>>
            > >>> What am I missing?
            > >>>
            > >>
            > >> Check the installation documentation. It's looking the base directory
            > >> for Apache - not the Apache include directory or an include file.
            > >>
            > >> You must also have the Apache development code installed on your
            > >> system. Sorry, I don't use RedHat so I don't know which RPM you need.
            > >>
            > >>[/color]
            > >
            > > I don't think you need to use --with-apache.
            > > I think you need to use --with-apxs2 instead.
            > > At least that works on my Fedora Core 4 system.
            > >
            > > -david-
            > >[/color]
            >
            > David,
            >
            > You're right - it's been a while since I compiled PHP - and I have a script to
            > do it now.
            >
            > Except in his case it should be --with-apxs as he's using Apache 1.x.[/color]

            Okay, I'm now ending my configure command with this line:

            --with-apxs=/usr/local/apache

            and I get this error:

            "The output of /usr/local/apache follows
            ../configure: line 4219: /usr/local/apache: is a directory
            configure: error: Aborting"

            I also tried:

            --with-apxs=/usr/local/apache/include/httpd.h

            but I got a "Permission denied" error, which I don't take seriously
            since I didn't get it before, and, anyway, I'm logged in as root

            What should --with-apxs be pointing to, while I'm installing PHP 5.1.4
            on Apache 1.3.36?

            Comment

            • David Haynes

              #7
              Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

              lawrence k wrote:[color=blue]
              > Jerry Stuckle wrote:[color=green]
              >> David Haynes wrote:[color=darkred]
              >>> Jerry Stuckle wrote:
              >>>
              >>>> lawrence k wrote:
              >>>>
              >>>>> I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
              >>>>> to install PHP 5.1.4. I can not get the ./configure command to work. I
              >>>>> keep getting this error:
              >>>>>
              >>>>> configure: error: Invalid Apache directory - unable to find httpd.h
              >>>>> under /usr/local/apache/include
              >>>>>
              >>>>> So then I run this command:
              >>>>>
              >>>>> find / -name httpd.h
              >>>>>
              >>>>> which should find every file on my machine with the name "httpd.h".
              >>>>> These are the results I get:
              >>>>>
              >>>>> /usr/local/apache/include/httpd.h
              >>>>> /home/shelley/apache_1.3.36/src/include/httpd.h
              >>>>>
              >>>>> So I've rerun the ./configure command, using this first:
              >>>>>
              >>>>> --with-apache=/usr/local/apche/include
              >>>>>
              >>>>> and since that didn't work:
              >>>>>
              >>>>> --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
              >>>>>
              >>>>> but I get the "Invalid directory" error with both addresses.
              >>>>>
              >>>>> What am I missing?
              >>>>>
              >>>> Check the installation documentation. It's looking the base directory
              >>>> for Apache - not the Apache include directory or an include file.
              >>>>
              >>>> You must also have the Apache development code installed on your
              >>>> system. Sorry, I don't use RedHat so I don't know which RPM you need.
              >>>>
              >>>>
              >>> I don't think you need to use --with-apache.
              >>> I think you need to use --with-apxs2 instead.
              >>> At least that works on my Fedora Core 4 system.
              >>>
              >>> -david-
              >>>[/color]
              >> David,
              >>
              >> You're right - it's been a while since I compiled PHP - and I have a script to
              >> do it now.
              >>
              >> Except in his case it should be --with-apxs as he's using Apache 1.x.[/color]
              >
              > Okay, I'm now ending my configure command with this line:
              >
              > --with-apxs=/usr/local/apache
              >
              > and I get this error:
              >
              > "The output of /usr/local/apache follows
              > ./configure: line 4219: /usr/local/apache: is a directory
              > configure: error: Aborting"
              >
              > I also tried:
              >
              > --with-apxs=/usr/local/apache/include/httpd.h
              >
              > but I got a "Permission denied" error, which I don't take seriously
              > since I didn't get it before, and, anyway, I'm logged in as root
              >
              > What should --with-apxs be pointing to, while I'm installing PHP 5.1.4
              > on Apache 1.3.36?
              >[/color]
              apxs is a program.
              Assuming you do not supply --prefix= in your configuration, it would be
              in /usr/local/bin and the configuration line would be:
              --with-apxs=/usr/local/bin/apxs

              -david-

              Comment

              • Jerry Stuckle

                #8
                Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

                lawrence k wrote:[color=blue]
                > Jerry Stuckle wrote:
                >[color=green]
                >>lawrence k wrote:
                >>[color=darkred]
                >>>I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
                >>>to install PHP 5.1.4. I can not get the ./configure command to work. I
                >>>keep getting this error:
                >>>
                >>>configure: error: Invalid Apache directory - unable to find httpd.h
                >>>under /usr/local/apache/include
                >>>
                >>>So then I run this command:
                >>>
                >>>find / -name httpd.h
                >>>
                >>>which should find every file on my machine with the name "httpd.h".
                >>>These are the results I get:
                >>>
                >>>/usr/local/apache/include/httpd.h
                >>>/home/shelley/apache_1.3.36/src/include/httpd.h
                >>>
                >>>So I've rerun the ./configure command, using this first:
                >>>
                >>>--with-apache=/usr/local/apche/include
                >>>
                >>>and since that didn't work:
                >>>
                >>>--with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
                >>>
                >>>but I get the "Invalid directory" error with both addresses.
                >>>
                >>>What am I missing?
                >>>[/color]
                >>
                >>Check the installation documentation. It's looking the base directory for
                >>Apache - not the Apache include directory or an include file.[/color]
                >
                >
                > I believe all the only installation documentation that exists is here:
                >
                > http://us3.php.net/manual/en/install.unix.php
                >
                > I've been trying to follow the directions closely, but with no luck.
                >
                >
                >
                >[color=green]
                >>You must also have the Apache development code installed on your system. Sorry,
                >>I don't use RedHat so I don't know which RPM you need.[/color]
                >
                >
                > I just downloaded the 1.3.36 source code 2 days ago and built Apache
                > from scratch. That part seemed to go well. Since it is a brand new
                > installation, I assume that everything I need is included. How would I
                > check otherwise?
                >[/color]

                Did you check the directory where you decompressed the files? There are all
                kinds of document files in there. Some of them even cover how to compile PHP.

                You can even do ./configure --help to get a list of all options and their
                parameters. I recommend redirecting the output to a file - as there are a lot
                of options.


                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                • Double Echo

                  #9
                  Re: can't install PHP - keep getting "Invali d directory" error regardingthe path to Apache httpd.h

                  Lawrence,

                  I hope the vast majority of the responses didn't discourage you from
                  coming back here looking for more answers. I was surprised nobody
                  recommended a better version of the Apache web server. 1.x is so old
                  now compared to the new versions that you really should install a 2.x
                  version.

                  Apache -- http://httpd.apache.org/

                  Apache 2.2.2 Docs -- http://httpd.apache.org/docs/2.2/new_features_2_2.html

                  There are a whole host of reasons why you should consider a newer version,
                  which I won't go into here. The biggest reason you should use a newer
                  version is the built in support for mod_ssl, and the configs are even easier
                  now--compared to the dinosaur 1.x version. You should only use the 1.x
                  version if you have no choice. You will have to add on so many mods to 1.x
                  it really gets painful.

                  One other important note, RPM versions, whether on SuSE, RedHat, or other
                  distro, and .deb versions typically will install Apache in a different
                  pattern compared to the download version directly from Apache. They will
                  try to 'help' you by putting the httpd.conf in /etc/httpd and other variations
                  so that you can find and configure the web server more conveniently. But it
                  also means that if you want your own version instead of the RPM that you
                  have to figure out what the RPM command line was that the distro people used
                  to build apache using the ./config command-line or get it as close as you
                  can on your own. You are probably better off just installing the default
                  in /usr/local/apache2, and just having everything in one place until you
                  can spend the time to mimic the distro version. This also means you will
                  have to bootstrap Apache on your own, i.e

                  /usr/local/apache2/bin/apachectl start|stop

                  which is not a bad thing, but it also means you might end up with two
                  different versions at bootup. You can overcome this by creating your own
                  /etc/init.d/Apache2 script, or you can install Webmin and create one in their
                  interface, and it will also set it up for autostart on machine boot. Then
                  you can also disable the RPM version from autostarting when your machine
                  starts up. But this also means if you have other applications that depend
                  on the RPM Apache, that they may complain on upgrades if Apache isn't in the
                  RPM database. To overcome this, you can create an RPM of your /usr/local/apache2/
                  version before installation, then install it as an RPM. I've never done that
                  so I can't help you on that. I'm somewhat a combination of lazy and a purist
                  who likes everything under one directory, so I don't split out the config
                  over to /etc/httpd etc. I'm sure it's just because I'm lazy and afraid I'll
                  install over something that some other app was depending on and make a mess
                  of things.

                  You might also post over in the alt.apache.conf iguration group, they have
                  some heavy hitters there.

                  Hope this helps...



                  lawrence k wrote:[color=blue]
                  > I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
                  > to install PHP 5.1.4. I can not get the ./configure command to work. I
                  > keep getting this error:
                  >
                  > configure: error: Invalid Apache directory - unable to find httpd.h
                  > under /usr/local/apache/include
                  >
                  > So then I run this command:
                  >
                  > find / -name httpd.h
                  >
                  > which should find every file on my machine with the name "httpd.h".
                  > These are the results I get:
                  >
                  > /usr/local/apache/include/httpd.h
                  > /home/shelley/apache_1.3.36/src/include/httpd.h
                  >
                  > So I've rerun the ./configure command, using this first:
                  >
                  > --with-apache=/usr/local/apche/include
                  >
                  > and since that didn't work:
                  >
                  > --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h
                  >
                  > but I get the "Invalid directory" error with both addresses.
                  >
                  > What am I missing?
                  >[/color]

                  Comment

                  Working...