php/apache install

Matt Fuerst fuerstma@msu.edu
Sun, 26 Aug 2001 12:06:57 -0400


Greetings all,

I got the compile to work so I thought I would share with the class what I
did.. and of course things still aren't working as well as I would hope.. so
I was hoping for someone else maybe to pitch in.

To fix the compilation error, I went into the apache-src/src directory and
edited the Makefile. In there there was a line that started with "LIBS1="
with a whole bunch of directives. I added -lz to the end of them, and the
compile happened magically! I did the few additional configures, makes, and
make installs and I had a libphp4.so module! Yippie!

I edited the conf/httpd.conf to make sure that it was loading both
libphp4.so and my already compiled libssl.so as modules, and added the
handler for the type... those look something like this in my httpd.conf:

-------------BEGIN HTTPD.CONF SNIPPET-----------------------------
<IfDefine SSL>
LoadModule ssl_module         libexec/libssl.so
</IfDefine>
LoadModule php4_module        libexec/libphp4.so

#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
AddModule mod_php4.c
-------------END HTTPD.CONF SNIPPET-----------------------------

Additionally below I have got some AddType commands going to the effect of:

-------------BEGIN HTTPD.CONF SNIPPET-----------------------------

# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml

-------------END HTTPD.CONF SNIPPET-----------------------------

There are a few others active, but the ones I am most interested in are .php
and .shtml files. I cannot get either to work correctly. I had an already
existing pagea located in my htdocs directory and now the Server Side
Includes (.shtml) files don't work at all. When I load up my front page
index.shtml I get a blank page, when I view the source I see all of my

<!--#include virtual="/header.html"-->
<!--#include virtual="/navbar.html" -->
<!--#include virtual="/footer.html"-->

Additionally, I made a test.php on my server. Essentially it just contains
the command:

<?phpinfo()?> (I tried it this way and with a colon after the (), neither
works.)

I checked my error_log, and apache is starting up fine. I don't understand
how apache is starting supposedly with SSI (mod_include is compiled in
statically) and PHP (which is a DSO) working and I'm getting nothing.
Arrgghhh!

Flat HTML files serve up fine, as do .txt files.

Any help? Experiences?

Thanks so much for any ideas!

Matt

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Matt Fuerst
fuerstma@msu.edu
----- Original Message -----
From: "Matthew Ryan Fuerst" <fuerstma@pilot.msu.edu>
To: <linux-user@egr.msu.edu>
Sent: Saturday, August 25, 2001 9:46 PM
Subject: php/apache install


> Greetings,
>
> I am trying to do a PHP/Apache install. I am following the directions I
found
> on DevShed at http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/
>
> I have been doing this since 12 pm... I think I am very close. I am doing
the
> apache install step right now (not for the first time, mind you, but I
think I
> have almost got it...)
>
> Basically, I cd-ed to my apache source directory. I have done my configure
> succesfully with a command similar to:
> SSL_BASE=../openssl-0.9.6b \
> ./configure \
> --enable-module=ssl \
> --activate-module=src/modules/php4/libphp4.a \
> --enable-module=php4 \
> --prefix=/usr/local/apache \
> --enable-shared=ssl
>
> That all works great.... I think do my make..
>
> Here is the output of the tail of my make...
>
> /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function
> 'my_compress_alloc':
> my_compress.o(.text+0x12a): undefined referece to 'compress'
> collect2: ld returned 1 exit status
> mak[2]: *** [target_static] Error 1
> make[1]: *** [build-std] Error 2
> make: *** [build] Error 2
>
> I did a google on this error and it looked like a few other people were
getting
> this error, someone responded to do this:
>
> Change /usr/lib/mysql/libmysqlclient.a to -L/usr/lib/mysql -lmysqllient
(if
> you have shared library) or add -lz (or /usr/lib/libz.a )
>
> I really am not too sure what that means.
>
> I am trying to install apache 1.3.20, php 4.06, openssl 0.9.6b, mod_ssl
2.8,
> thats about it...
>
> additional, i left my mail client at home on, so this any responses will
get
> sucked down at home.. could you cc mdshield@oakland.edu that is my cohort
who I
> am trying to set this up with....
>
> Thanks so much for ANY help!
>
> matt
>
>
>    -- Matt Fuerst
>
> fuerstma@msu.edu
> Computer Guru
> http://www.msu.edu/~fuerstma
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user