Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to configure PHP4 for Apache

Status
Not open for further replies.

gmail2

Programmer
Jun 15, 2005
987
0
0
IE
I've recnetly installed Red Hat 9 and during installation I installed Apache also. However, now I want to install PHP4 but when I run the confiugre line:
Code:
./configure --with-apache=/usr/sbin --with-mysql=/usr/sbin
I get the following error:
configure: error: Invalid Apache directory - unable to find httpd.h under /usr/sbin

I searched for httpd.h but it's not found. I'm half guessing here, but am I correct in saying that httpd.h would be created if you compiled apache rather than installing from RPM? If so then how can I get around this without re-installing apache from source code? I now I could install PHP from RPM but I'd like to learn how to do this this way. However I don't want to re-install apache from source unless I have to as I have some files in the doc root that I don't want to loose
 
then just install the source for Apache without compile it.

Cheers.

Chacal, Inc.[wavey]
 
I've never tried to compile PHP, but I suspect you're giving the wrong paths in the --with-apache and --with-mysql options. In general, --with build options expect to get a prefix, not a binary directory. In other words, it's looking for the directory tree under which Apache is installed, not the directory where the executable is located. If the Apache binary is in /usr/sbin, then you want to give it the value /usr. It will then look for binaries under /usr/sbin, include files under /usr/include, and so forth.

As for the httpd.h file, you would definitely have this if you installed from source, but that's probably not necessary. If you check your installation media or package repositories, you'll probably find a package named apache-dev, or something like that, with the development headers for building Apache modules. It is quites common for the header files to be in a different package from the binaries, so try that first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top