Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Programming & Scripting > PHP ./configure cannot find httpd.h even though I can...

Forgot Password?
 Linux Programming & Scripting   C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-23-2003   #1 (permalink)
Just Joined!
 
adamdaughterson's Avatar
 
Join Date: Mar 2003
Location: Denver, Colorado, USA
Posts: 78
PHP ./configure cannot find httpd.h even though I can...

I am trying to configure/install php on a Slackware system (2.4.20 kernel). I've installed the httpd ver. 2.0.47 without a hitch.
When I run ./configure --with-apache=/usr/include/apache/ --with-mysql=/usr/local/mysql
this is the output:

...
checking for standard DES crypt... yes
checking for extended DES crypt... no
checking for MD5 crypt... yes
checking for Blowfish crypt... no
checking for Apache module support via DSO through APXS... no
checking whether to enable versioning... no
checking for Apache module support... no
configure: error: Invalid Apache directory - unable to find httpd.h under /usr/include/apache
root@USBOU1-LLOAN101:/usr/local/src/php-3.0.18#

So when I quadruple-check to make sure I am not crazy :o
I look for the file:

root@USBOU1-LLOAN101:/usr/local/src/php-3.0.18# ls /usr/include/apache/
ap.h ap_mm.h http_config.h os.h
ap_alloc.h ap_mmn.h http_core.h rfc1413.h
ap_compat.h ap_sha1.h http_log.h scoreboard.h
ap_config.h buff.h http_main.h util_date.h
ap_config_auto.h compat.h http_protocol.h util_md5.h
ap_ctx.h conf.h http_request.h util_script.h
ap_ctype.h explain.h http_vhost.h util_uri.h
ap_ebcdic.h fnmatch.h httpd.h xml/
ap_hook.h hsregex.h multithread.h
ap_md5.h http_conf_globals.h os-inline.c
root@USBOU1-LLOAN101:/usr/local/src/php-3.0.18#

...and there it is! I have tried downgrading the httpd version, tried up, and downgrading PHP to no avail. Has anyone else run into this? Am I just destined to be stuck with IIS/ASP forever?

Adam
adamdaughterson is offline  


Reply With Quote
Old 07-24-2003   #2 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
--with-apache is only for apache 1.x. Try --with-apxs2 instead.
Dolda2000 is offline   Reply With Quote
Old 07-24-2003   #3 (permalink)
Just Joined!
 
adamdaughterson's Avatar
 
Join Date: Mar 2003
Location: Denver, Colorado, USA
Posts: 78
OK...

So this seems to have worked to compile the source, but after the ./configure script ran the output stated that I had compiled the package for CGI. Does this mean that the PHP module wont work? Quite perplexing...
Adam
adamdaughterson is offline   Reply With Quote
Old 07-24-2003   #4 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
Can you post the exact output?
Dolda2000 is offline   Reply With Quote
Old 07-25-2003   #5 (permalink)
Just Joined!
 
adamdaughterson's Avatar
 
Join Date: Mar 2003
Location: Denver, Colorado, USA
Posts: 78
ahem...

After further review, I found one more step in the right direction. The Apache2 website had some good info, but now I have found a new barricade. Here is what happens. I run ./configure --with-apsx2=/usr/local/apache2/bin/apsx --with-mysql=/usr/local/mysql
Here is the output:

checking for a custom ODBC support... no
checking for iODBC support... no
checking for Easysoft ODBC-ODBC Bridge support... no
checking for unixODBC support... no
checking for OpenLink ODBC support... no
checking for DBMaker support... no
checking for Oracle-ORACLE support... no
checking whether to enable user-space object overloading support... yes
checking for Ovrimos SQL Server support... no
checking whether to enable pcntl support... no
checking for PCRE support... yes
sed: -e expression #1, char 36: Unterminated `s' command
checking for PDFlib support... no
checking for the location of libtiff... no
checking for Verisign Payflow Pro support... no
checking for PostgreSQL support... no
checking whether to enable POSIX-like functions... yes
checking for seteuid... (cached) yes
checking for setegid... (cached) yes
checking for setsid... (cached) yes
checking for getsid... (cached) yes
checking for setpgid... (cached) yes
checking for getpgid... (cached) yes
checking for ctermid... (cached) yes
checking for mkfifo... (cached) yes
checking for getrlimit... (cached) yes
checking for PSPELL support... no
checking for QtDOM support... no
checking for libedit readline replacement... no
checking for readline support... no
checking for recode support... no
checking whether to enable PHP sessions... yes
checking for mm support... no
checking whether pwrite works... (cached) yes
checking whether pread works... (cached) yes
checking whether to enable shmop support... no
checking for SNMP support... no
checking whether to enable UCD SNMP hack... no
checking whether to enable sockets support... no
checking for getcwd... (cached) yes
checking for getwd... (cached) yes
checking for asinh... (cached) yes
checking for acosh... (cached) yes
checking for atanh... (cached) yes
checking for log1p... (cached) yes
checking for hypot... (cached) yes
checking for crypt in -lcrypt... (cached) yes
checking for standard DES crypt... (cached) yes
checking for extended DES crypt... (cached) no
checking for MD5 crypt... (cached) yes
checking for Blowfish crypt... (cached) no
checking whether flush should be called explicitly after a bufferered io... (cached) no
checking for working fnmatch... (cached) yes
checking for glob... (cached) yes
checking for strfmon... (cached) yes
sed: can't read /usr/local/src/Apache: No such file or directory
sed: can't read PHP/php-4.3.2/ext/standard/Makefile.frag: No such file or directory
checking for libswf support... no
checking for Sybase support... no
checking for Sybase-CT support... no
checking whether to enable System V IPC support... no
checking whether to enable System V semaphore support... no
checking whether to enable System V shared memory support... no
checking whether to enable tokenizer support... yes
sed: can't read /usr/local/src/Apache: No such file or directory
sed: can't read PHP/php-4.3.2/ext/tokenizer/Makefile.frag: No such file or directory
checking whether to enable WDDX support... no
checking whether byte ordering is bigendian... (cached) no
checking whether to enable XML support... yes
checking external libexpat install dir... no
sed: -e expression #1, char 36: Unterminated `s' command
checking for XMLRPC-EPI support... no
checking libexpat dir for XMLRPC-EPI... yes
checking iconv dir for XMLRPC-EPI... yes
checking whether to enable xslt support... no
checking for XSLT Sablotron backend... no
checking for libexpat dir for Sablotron XSL support... no
checking for iconv dir for Sablotron XSL support... no
checking for JavaScript for Sablotron XSL support... no
checking for YAZ support... no
checking whether to include YP support... no
checking for ZIP support... no
checking whether to enable versioning... no
checking which regex library to use... php

Configuring Zend
checking bison version... 1.35 (ok)
checking for limits.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for signal.h... (cached) yes
checking for unix.h... (cached) no
checking for dlfcn.h... (cached) yes
checking for size_t... (cached) yes
checking return type of signal handlers... (cached) void
checking for uint... (cached) yes
checking for ulong... (cached) yes
checking for vprintf... (cached) yes
checking for 8-bit clean memcmp... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for memcpy... (cached) yes
checking for strdup... (cached) yes
checking for getpid... (cached) yes
checking for kill... (cached) yes
checking for strtod... (cached) yes
checking for strtol... (cached) yes
checking for finite... (cached) yes
checking for fpclass... (cached) no
checking whether sprintf is broken... (cached) no
checking for finite... (cached) yes
checking for isfinite... (cached) no
checking for isinf... (cached) yes
checking for isnan... (cached) yes
checking whether fp_except is defined... (cached) no
checking for dlfcn.h... (cached) yes
checking whether dlsym() requires a leading underscore in symbol names... no
checking whether to enable thread-safety... no
checking whether to enable inline optimization for GCC... yes
checking whether to enable a memory limit... no
checking whether to enable Zend debugging... no
checking whether to enable Zend multibyte... no
checking for inline... (cached) inline

Configuring TSRM
checking for stdarg.h... (cached) yes

Configuring libtool
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... (cached) /usr/i386-slackware-linux/bin/ld
checking if the linker (/usr/i386-slackware-linux/bin/ld) is GNU ld... (cached) yes
checking for /usr/i386-slackware-linux/bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/bin/nm -B
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking how to recognise dependent libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking command to parse /usr/bin/nm -B output... (cached) ok
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for objdir... .libs
checking for gcc option to produce PIC... (cached) -fPIC
checking if gcc PIC flag -fPIC works... (cached) yes
checking if gcc static flag -static works... (cached) yes
checking if gcc supports -c -o file.o... (cached) yes
checking if gcc supports -c -o file.lo... (cached) yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/i386-slackware-linux/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether -lc should be explicitly linked in... (cached) no
creating libtool

Generating files
sed: can't read PHP/php-4.3.2/scripts/Makefile.frag: No such file or directory
sed: can't read PHP/php-4.3.2/pear/Makefile.frag: No such file or directory
sed: can't read PHP/php-4.3.2/Makefile.frag: No such file or directory
cat: /usr/local/src/Apache: Is a directory
cat: PHP/php-4.3.2/Makefile.global: No such file or directory
updating cache ./config.cache
creating ./config.status
creating php4.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/php-config
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
cat: ./main/internal_functions.c.in: No such file or directory
creating main/internal_functions_cli.c
cat: ./main/internal_functions.c.in: No such file or directory
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
| *** NOTE *** |
| The default for register_globals is now OFF! |
| |
| If your application relies on register_globals being ON, you |
| should explicitly set it to on in your php.ini file. |
| Note that you are strongly encouraged to read |
| http://www.php.net/manual/en/securit...terglobals.php |
| about the implications of having register_globals set to on, and |
| avoid using it if possible. |
+--------------------------------------------------------------------+

Thank you for using PHP.

but when I try to make the package this is the output:
root@USBOU1-DROSHAMB:/usr/local/src/Apache PHP/php-4.3.2# make
make: *** No rule to make target `PHP/php-4.3.2/sapi/apache2handler/sapi_apache2.c', needed by `sapi/apache2handler/sapi_apache2.lo'. Stop.

Wierd stuff. I am thinking that I have tinkered this box to death, and may very well reinstall the OS from scratch to see if this problem has been caused by having too many changes made to it.
Any Ideas?
adamdaughterson is offline   Reply With Quote
Old 07-26-2003   #6 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
Considering the output from the file generating stage, there appears to be something wrong with the tarball that you got. Try downloading a somewhat older version and see if it works.
Dolda2000 is offline   Reply With Quote
Old 07-28-2003   #7 (permalink)
Just Joined!
 
adamdaughterson's Avatar
 
Join Date: Mar 2003
Location: Denver, Colorado, USA
Posts: 78
Got it this time!

I really wish that I had more time to work this all by itself. After much digging in the Apache.org, it became clear that the problem was in my ./configure. The exact command needed to be ./configure --with-apsx2=/usr/local/apache2/bin/apsx. for the PHP4 installation. To resolve the last issue, I needed to ./configure Apache with --enable-so, then recompile. It works OK now, except for something with phpinfo() which I think I shall create a new post for, as, this one is more related to my ignorance in compiling sources!
Thanks for all your help Dolda,
Adam
adamdaughterson is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:01 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2