Dear Matt, Markus,
I came across your names, email addresses on the archives list for PHP.
I have had similar experiences as Matt describes in his message. I still
have not found the answer. Like Matt, I can get httpd to start, however,
once started the only thing recorded in Apache's error_log file is:
[Fri Jan 19 17:08:35 2001] [info] created shared memory segment #1024
[Fri Jan 19 17:08:35 2001] [notice] Apache/1.3.14 (Unix) PHP/4.0.3pl1
configured -- resuming normal operations
[Fri Jan 19 17:08:35 2001] [info] Server built: Jan 19 2001 16:36:27
httpd comes up, but PHP scripts inside HTML files are NOT processed at all.
HTML works, but PHP doesn't. I can find no core dumps, nothing really wrong
with the setup of PHP. As with Matt's message, everything seemed to compile
just fine, but PHP doesn't work.
My environment:
Apache version: 1.3.14
PHP version: 4.0.3pl1
RedHat version: 6.1, linux kernel 2.2.12 (smp)
gcc version: egcs-2.91.66
My build configurations:
Apache build: (various attempts, depending on which literature I was
looking at..
almost every web (apache.org, php.net), file (README.configure,
etc.), and
print source has a different way to configure PHP for Apache which
makes it
all the more confusing.. anyway, I'll list two or three)
#1. ./configure --prefix=/usr/apache --enable-module=most
--enable-shared=max --activate-module=src/modules/php4/libphp4.a
#2. ./configure --prefix=/usr/apache
--activate-module=src/modules/php4/libphp4.a
MATT==> I think your problem may be solved by looking at the actual names of
the library's PATH and NAME. I found that the default settings in some
literature
and in the httpd.conf file INCORRECTLY assume the name of the library to
be 'libphp4.so'.
Apache actually renames it in the Makefile in the 'src/modules/php4'
directory. Have
a perusal to be sure and compare what's in httpd to point to the correct
files. Also, Apache
did NOT put the library in the PREFIX/libexec directory. You may also
have a 'core' dump
in your / root directory from the httpd not starting. I found it there,
but like you said, nothing
else is written to error_log or anywhere else one would hope to find
error messages.
PHP build:
#1. ./configure --with-apache=/oracle/apache --with-xml
--enable-track-vars --with-oracle=/oracle/CR1/816_32 --enable-sigchild
Notes: my source and build directory are beneath /oracle while my install
directory is
under /usr/apache. I don't think this matters much.
Httpd.conf definitions (with respect to PHP - again many different thoughts
depending on the
source as to how these should be defined):
#Added by Mark Brown to enable PHP scripting.
#
AddModule mod_php4.c
#AddModule mod_php3.c
#AddModule mod_perl.c
#LoadModule php4_module /oracle/apache/src/modules/php4/mod_php4.so
#LoadModule php4_module /oracle/apache/src/modules/php4/libphp4.a
#LoadModule php4_module /oracle/apache/src/modules/php4/libmodphp4.a
#LoadModule perl_module modules/libperl.so
AddType application/x-httpd-php .php
#############################################
MATT==> Notice I too uncommented the Load Module definitions for
PHP. If I uncomment the one which points to any existing php4 module,
I get the following error message from 'apachectl start':
[root@lstyo209 php4]# /usr/apache/bin/apachectl start
Syntax error on line 967 of /usr/apache/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module
not included in the server configuration
/usr/apache/bin/apachectl start: httpd could not be started
If I leave the 'LoadModule' lines commented out;
[root@lstyo209 php4]# /usr/apache/bin/apachectl start
/usr/apache/bin/apachectl start: httpd started
--but then I cannot use PHP scripting.
Sorry for the long message, but I cannot post this to the message board, my
Netscape browser is broken on this NT workstation - thanks Bill G. - so if
one of you could post it for me, I'd be greatful. Also, let me know if you
can
resolve the situation. I've subscribed to the php-install mailing list, but
I
could not figure out how to post messages to the list; the information on
the
website says I may post messages to the newsgroup, but I haven't figured out
how to do that with IE yet.
Best Rgds,
Mark Brown
SAP Japan.
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]