PHP builds but doesn't run
| From: | Derek Slye | Date: | Tue, 14 Nov 2000 00:36:18 +0000 |
| Subject: | PHP builds but doesn't run | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-763@lists.php.net to get a copy of this message | ||
I have successfully built PHP4.0.3pl1 as a static module in Apache 1.3.12. Platform is MacOS X
(darwin1.2)
./configure --prefix=/usr/local \
--with-xml \
--with-apache=/Users/dslye/apache-640/apache \
--without-mysql
make and make install are fine.
In apache directory:
setenv TARGET apache
./configure --with-layout=Mac OS X Server \
--enable-module=most \
--enable-shared=max \
--activate-module=src/modules/php4/libphp4.a
Note: I altered the MacOS X Server layout to reflect the somewhat different directory structure of
MacOS X (darwin). In addition, I have called the target apache, not httpd. These modifications are
known to work fine and are done to conform to Apple's unique naming conventions. make and make
install work fine.
I have verified that the executable in /usr/sbin is the one I just built and that it contains php:
[devious:/usr/sbin] root# ./apache -l
Compiled-in modules:
http_core.c
mod_so.c
mod_php4.c
suexec: disabled; invalid wrapper /usr/sbin/suexec
The error line about suexec occurred before I ever compiled anything into apache; so it's not
specific to php. I'm not sure what it means, but apache starts up fine as root and spawns its
additional processes as user www.
I have copied the php.ini-dist to /usr/local/lib/php.ini just fine.
I have uncommented the proper lines in the apache configuration file:
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Indeed, the browser doesn't know what to do with this mime type; so I know this step worked.
In performing my tests, I tried starting apache with the apachectl script and by hand (both as
root). In either case startup was normal with no error messages. The page I tried to display was:
<html>
<head>
<title>Test of PHP4</title>
</head>
<body bgcolor="#ffffff">
<p>This is a test of PHP4:</p>
<p></p>
<?php phpinfo() ?>
</body>
</html>
From here how do I get the PHP parser to interpret this code? Please tell me I haven't left
out some obvious step.
-----------------------------------------------------
Derek Slye
NASA/Jet Propulsion Laboratory
Mission Software Systems Section
(818) 354-4119