Operating System - HP-UX
1821071 Members
2530 Online
109631 Solutions
New Discussion юеВ

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

 
Derek Whitten
Advisor

Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

Hello,
I am trying to compile apache-2.0.54 and php 4.3.0 on hpux 11.11 (pa-risc 2.0) and I am having issues with the static php module.

I have compiled php like this:

./configure --prefix=/usr/php4 --enable-mbstring--with-zlib --with-zlib-dir=/usr --with-gettext=/usr/local --with-iconv=/usr/local --with-openssl=/usr --with-apache2=../httpd-2.0.54 && /usr/local/bin/gmake && /usr/local/bin/gmake install

This leaves me with libphp4.a and libphp4.la in /path/to/php-src/libs/

I made a directory in the apache src tree called php4 under 'modules' and copied the two libphp4.* files to it.

Then i configured apache like this:

./configure --prefix=/usr/apache2 --with-ssl=/usr --with-z=/usr --enable-modules='speling cgi deflate mime-magic vhost-alias usertrack ssl headers rewrite http' --disable-shared --enable-static-support --with-module=php4:libphp4.a

when apache gets to make install, i get this error:

Making all in php4
Make: Don't know how to make mod_libphp4.a.lo. Stop.
*** Error exit code 1

This has been frustrating the hell out of me for the last few days, so I am asking the community for some assistance.

Thank you all in advance for any assistance provided.



10 REPLIES 10
Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

some more info:

gcc version 3.4.2

HP-UX d270 B.11.11 U 9000/861 2012487038 unlimited-user license

This is perl, v5.8.3 built for PA-RISC2.0

92453-07 linker command s800.sgs ld PA64 B.11.43 REL 050124
ld: 92453-07 linker linker ld B.11.43 050125

Ermin Borovac
Honored Contributor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

You should configure/install apache first and then configure php using apache's apxs (--with-apxs2).

Full instructions are at

http://www.php.net/manual/en/install.unix.apache2.php
Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

Interesting.. Everything i have read so far regarding php & hpux has said that php has to be compiled as a static module..

I will give that a try and post results..

Thx
Alex Lavrov.
Honored Contributor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

I don't know why r u trying to compile it, but here you have a ready one from HP:

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSATW211
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

This what i get trying to install php as a shared module..


Installing PHP CLI binary: /usr/php4/bin/
Installing PHP SAPI module
/usr/apache2/build/instdso.sh SH_LIBTOOL='/usr/apache2/build/libtool' libphp4.la /usr/apache2/modules
/usr/apache2/build/libtool --mode=install cp libphp4.la /usr/apache2/modules/
cp .libs/libphp4.lai /usr/apache2/modules/libphp4.la
cp .libs/libphp4.a /usr/apache2/modules/libphp4.a
ranlib /usr/apache2/modules/libphp4.a
chmod 644 /usr/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /usr/software/php-4.3.0/libs'
Warning! dlname not found in /usr/apache2/modules/libphp4.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/apache2/modules/libphp4.so
chmod: can't access /usr/apache2/modules/libphp4.so
apxs:Error: Command failed with rc=65536
.
gmake: *** [install-sapi] Error 1
Ermin Borovac
Honored Contributor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

It looks like PHP configure script thought that it could not build shared PHP module on your system, so it built archive version instead (libphp4.a).

Hard to tell why this happened without output from configure and gmake.
Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

Here are some log files..
Ermin Borovac
Honored Contributor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

The following errors are the what you need to fix. It's telling you that it couldn't find shared version of libz (zlib) and libcrypt (openssl). You only seem to have libz.a and libcrypt.a. In order to build shared version of php module it needs to have all dependendent libraries shared as well.

You can get zlib and openssl with shared libraries from http://hpux.cs.utah.edu.

*** Warning: This library needs some functionality provided by -lz.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This library needs some functionality provided by -lcrypt.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

OMFG.. I think i have finally figured it out!

configured apache 2.0.54 as:

./configure --prefix=/usr/apache2 --enable-rewrite --with-ssl=/usr/local --enable-ssl --enable-speling --enable-cgi --enable-http --enable-static-support --enable-deflate --enable-mime-magic --enable-headers --enable-usertrack --with-z=/usr/local

did normal 'gmake && gmake install'

configured php 4.3.0 as:

CFLAGS=-shared-libgcc ./configure --prefix=/usr/php4 --enable-libgcc --enable-mbstring --with-zlib=/usr/local --with-gettext=/usr/local --with-iconv=/usr/local --with-apxs2=/usr/apache2/bin/apxs --enable-shared --without-openssl

Then.. I had to edit /path/to/php-4.3.0/libtool at right around line 194

changed:
deplibs_check_method="file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library"

to:
deplibs_check_method="pass_all"


then 'gmake && gmake install'

output of 'gmake install':

Installing PHP CLI binary: /usr/php4/bin/
Installing PHP SAPI module
/usr/apache2/build/instdso.sh SH_LIBTOOL='/usr/apache2/build/libtool' libphp4.la /usr/apache2/modules
/usr/apache2/build/libtool --mode=install cp libphp4.la /usr/apache2/modules/
cp .libs/libphp4.sl /usr/apache2/modules/libphp4.sl
chmod 555 /usr/apache2/modules/libphp4.sl
cp .libs/libphp4.lai /usr/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish /usr/software/php-4.3.0/libs'
chmod 755 /usr/apache2/modules/libphp4.so
Installing shared extensions: /usr/php4/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment: /usr/php4/lib/php/
[PEAR] Archive_Tar - installed: 0.9
[PEAR] Console_Getopt - installed: 1.0
[PEAR] PEAR - installed: 1.0b3
[PEAR] DB - installed: 1.3
[PEAR] HTTP - installed: 1.2
[PEAR] Mail - installed: 1.0.1
[PEAR] Net_SMTP - installed: 1.0
[PEAR] Net_Socket - installed: 1.0.1
[PEAR] XML_Parser - installed: 1.0
[PEAR] XML_RPC - installed: 1.0.4
Installing build environment: /usr/php4/lib/php/build/
Installing header files: /usr/php4/include/php/
Installing helper programs: /usr/php4/bin/
program: phpize
program: php-config
program: phpextdist



then:


# ls -l /usr/apache2/modules/
total 7104
-rw-rw-rw- 1 root sys 8440 May 4 17:40 httpd.exp
-rwxr-xr-x 1 root sys 3617364 May 4 18:21 libphp4.so
#

Derek Whitten
Advisor

Re: Apache 2.0.54, PHP 4.3.0 and HP-UX 11.11

PHP Version 4.3.0

System HP-UX d270 B.11.11 U 9000/861
Build Date May 4 2005 09:04:32
Configure Command './configure' '--prefix=/usr/php4' '--enable-libgcc' '--enable-mbstring' '--with-zlib=/usr/local'
'--with-gettext=/usr/local' '--with-iconv=/usr/local' '--with-apxs2=/usr/apache2/bin/apxs' '--enable-shared' '--without-openssl'
Server API Apache 2.0 Filter
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/php4/lib
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies