By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,363 Members | 3,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,363 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?

Jun 24 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
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.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 25 '06 #2

P: n/a
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-

Jun 25 '06 #3

P: n/a
David Haynes wrote:
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-


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.
js*******@attglobal.net
==================
Jun 25 '06 #4

P: n/a

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.


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.
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 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?

Jun 25 '06 #5

P: n/a

Jerry Stuckle wrote:
David Haynes wrote:
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-


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.


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?

Jun 25 '06 #6

P: n/a
lawrence k wrote:
Jerry Stuckle wrote:
David Haynes wrote:
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-

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.


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?

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-

Jun 25 '06 #7

P: n/a
lawrence k wrote:
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.

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.

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 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?


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.
js*******@attglobal.net
==================
Jun 25 '06 #8

P: n/a
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.configuration group, they have
some heavy hitters there.

Hope this helps...

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?


Jun 26 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.