On Wed, Aug 16, 2006, Michael Varlik wrote:

> I need to build apache2 with mod_php. I have installed both apache2
> and php4 inside my openpkg environment. Unfortunatly the mod_php is
> not built. I had to modify the apache2 src.rpm to add an additional
> parameter (with this, mod_php is created). What is the proper way to
> enable php support in openpkg's apache2?

Well, if you really want to use Apache 2 with PHP 4 you have two major
problems. First, we already switched to PHP 5 and second, Apache 2 is
not our primary Apache package. We are focusing on Apache 1.3 (package
"apache") as Apache 2 in 98% of all situations doesn't provide a real
benefit on Unix platforms, our Apache 1.3 package provides lots of more
build options and even the PHP support is more rock solid there, too. So
I strongly recommend you to run Apache 1.3 with PHP 5.1 or if you really
need PHP use the suPHP feature with PHP 4.

But anyway, if you really want Apache 2 with PHP 4 here is what have
to be done. You have to build PHP with the --with-apxs2 option as a
DSO as this is AFAIK the only supported way to build PHP for Apache 2.
Unfortunately for this you first have to get an apxs installed from
Apache 2. So, I guess you would need to hack a "apache2-php4" package
which depends on the "apache2" package and builds PHP 4 with this
--with-apxs2 option.

Nevetheless I strongly recommend you to do yourself a favor and try out
Apache 1.3 with PHP 5 or even PHP 4. This is a lot more straight-forward
with the existing packages and I'm sure you will see no difference.

With OpenPKG-CURRENT or OpenPKG-2-STABLE just use...

$ openpkg build -D with_mod_php=yes apache | sh

...to install an Apache 1.3 with a built-in PHP 5.1. Or use...

$ openpkg build -D apache::with_mod_suphp=yes apache php4 | sh

...to install an Apache 1.3 with an external PHP 4.4 (don't forget to
add "AddHandler x-httpd-php .php" to the "apache.conf" file, too).

> Besides, I found out, that many (all?) openpkg packages are configured
> with the "--disable-shared" option which causes them not to produce
> any shared library. What is the reason for that?

That's because there is no _portable_ way to build and link applications
against shared libraries _AND_ make sure that those applications really
load the correct libraries under run-time in case you have multiple
installations on a single platform (OpenPKG's major multiple-instance
feature). I know that there is GNU libtool and on ELF based platforms
one can hard-code an "rpath" into executables, etc. But that's lots
of hacking and would fail horribly for most packages whose build
environment isn't already fully GNU libtool based.

> With this configure option the build of samba with LDAP support fails
> because the ldap library is not available.

This I do not understand. I tried out the "with_ldap=yes" option of the
OpenPKG "samba" package from OpenPKG-CURRENT and it built fine against
the OpenPKG "openldap" package. It even told me:

| [...]
| Using libraries:
|     LIBS = -lcrypt  -lssl -lcrypto -liconv
|     LDAP_LIBS = -lldap -llber
|     AUTH_LIBS = -lcrypt
| [...]

It certainly is not related to shared vs. static libraries, I think. Can
you be more specific (particular package versions and resulting error
message!), so we can better help you?

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to