[PHP-DEV] Bug #374 is indeed a bug From: Kristoffer Dyrkorn (kristofd <email protected>)
Date: 06/04/98

The bug #374 is indeed a bug. (At least in RC5.)

When compiling php-RC5 (by typing "make"), the process stops with the
complaints:

ar: Error: functions/adabasd.o cannot open
ar: Error: functions/apache.o cannot open
ar: Error: functions/fhttpd.o cannot open
ar: Error: functions/basic_functions.o cannot open
ar: Error: functions/crypt.o cannot open
...
...
...
ar: Error: functions/zlib.o cannot open

ar expects that all the .o files are placed in the functions/ directory.
However, after compiling, they are _not_ (except for number.o). They all
lie in the root directory for the installation, /(something)/php-3.0RC5/
in my case.

By copying/moving the right .o files to functions/, the library is
correctly built.

Note: I intend to use php with Apache (1.3b5), so everything was set up
with configure --with-apache=/(something)/apache_1.3b5.

The .a file being built has the name libmodphp3.a. However, the file
name referenced in the INSTALL file (as a parameter for AddModule) is
libphp3.a. This turned up having no consequences, but a note in the
INSTALL file could be added to clear things up.

Also, the file mod_php3.c in /(something)/apache_1.3b5/src/modules/php3
has a variable of type module named php3_module. The source code line
is:

module MODULE_VAR_EXPORT php3_module;

However, this does _not_ match the reference to this module in the
/(something)/apache_1.3b5/src/modules.c, where it is called

modphp3_module

several places. Editing either the modules.c or the mod_php3.c, so that
the names match, fixes the problem.

When building the apache server, there will be a missing -lm parameter
in the link line. This is a result of the math wrappers (in math.c) in
php. Adding -lm to the end of the end of the last "command" like

cc (stuff) -o httpd (more stuff, references to php3) -lm

finally produces the right httpd executable. This could also be
mentioned in the INSTALL file.