Midgard-php4 can be installed either as a static module or a dynamically loaded module. While the static module is said to offer efficiency benefits, dynamic modules are easier to install and upgrade.
We use the apxs method to compile Midgard-php4 as a dynamic shared object of Apache. Configure PHP with whatever other options you want but be sure to include the --with-midgard and --with-system-regex options. The former tells the configure script where to locate the required Midgard libraries and headers. The latter tells the configure script not to use the bundled regex. If this option is left out, PHP does not compile.
The configure script needs to know where httpd.conf is located and you should point it the root Apache directory. It also needs to know where apxs is located and you have to point it to the exact location of the apxs file.
Use ./configure --help to examine the options that are available to you for configuring Midgard-php4. The --enable-versioning option lets you install multiple versions of PHP.
$ cd midgard-php-1.4 (directory containing midgard-php source) $ ./configure --with-apxs=/usr/local/apache/bin/apxs [--enable-versioning] --with-mysql=/usr/local/mysql --with-system-regex --with-xml --with-midgard=/usr/local/midgard [--enable-track-vars] $ make # make install # [cp php4.ini-dist /usr/local/apache/conf/php4.ini] # [chown -R <apacheuser>.<apachegroup> /usr/local/apache] |