Operating System - HP-UX
1833494 Members
2648 Online
110052 Solutions
New Discussion

Apache 2 + HP-UX 11.11 + php 4.x install

 
Weerts
New Member

Apache 2 + HP-UX 11.11 + php 4.x install

Hi there,
I'm trying to install Apache 2.0.43 & php 4.x under HP-UX as DSO.

Versions:
gcc: 2.95.2
flex: 2.5.4a
bison: 1875
apache 2.0.43
libtool 1.4
make : unknown HP make

I've checked out already the whole HP forums about this issue, but either the threads are closed already or they stop where I stay right now.
So far:
-I managed to build apache without problem
-to compile php4.2.3 with some warnings.

at current I receive from apache the following error:
Cannot load /opt/apache2/modules/libphp4.so into server: Unresolved symbol: __eprintf (code) from /opt/apache2/modules/libphp4.so
./apachectl start: httpd could not be started

PHP builds o.k., but no matter which apache I use always the above error comes up. So it must be related with php I guess ??

According patches (PHSS-26560,PHCO27434) are installed.
Path setting, I assume, are O.K.

Also apache doesn't start when I do NOT set LD_PRELOAD variable before startup to /usr/lib/libcl.2

The EXTRA_LIBS for PHP are:
EXTRA_LIBS = -lpam -lcrypt -lm -lnsl -lpthread -lcrypt -l:libcl.a -l:librt.sl -l:libnss_dns.1 -l:libdld.sl -lclntsh

being set by "configure"

Any Ideas ?

Thanks a lot in advance !
9 REPLIES 9
Ross Zubritski
Trusted Contributor

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Did you enable mod_so when you compiled apache?

benoit Bruckert
Honored Contributor

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi,
What is the exact configure line for PHP ?
What kind of warning do you have during the make ?
I succeded to run APache2 + php as DSO on HPUX11.00, it should be the same with 11.11.
May the trouble is with a php module and not with php core !!! That's why I need the configure line !!!

hth
Benoit
_______
"Quand une femme se tait, c'est qu'elle va dire quelque chose."
Une application mal pansée aboutit à une usine à gaze (GHG)
Weerts
New Member

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi there,
thanks for your replies.

Yes, mod_so has been enabled during apache compile and "httpd -l" also shows this module to be compiled in.

My PHP configure line is:
./configure --with-apxs2=/www/apache2/bin/apxs --without-mysql --with-oci8=$ORACLE_HOME --without-mcrypt --enable-track-vars --enable-bcmath

The make warnings are:
for string.h & strnatcmp.c:
In file included from base64.c:20:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.2/include/string.h:29: warning: conflicting types for built-in function `memcmp'
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.2/include/string.h:85: warning: conflicting types for built-in function `memcpy'
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.2/include/string.h:87: warning: conflicting types for built-in function `memset'

as well as

*** Warning: This library needs some functionality provided by -l:libcl.a.
*** Warning: This library needs some functionality provided by -l:librt.sl.
*** Warning: This library needs some functionality provided by -l:libnss_dns.1.
*** Warning: This library needs some functionality provided by -l:libdld.sl.

$ORACLE_HOME is set properly.

I found that the problem seems to be with gcc 2.95.2. It defines a function "__eprintf" which is said to be an "undefined symbol" on loading of the PHP-module on apache startup apache. This function is defined in assert.h-file from gcc and it seems to "excludeable" by using the appropriate CFLAGS. Any ideas or know how there ?
(I'm using the make from HP, NOT gnu-make. Could this be the reason ?)

Thanks in advance
benoit Bruckert
Honored Contributor

Re: Apache 2 + HP-UX 11.11 + php 4.x install

HI,
I think the trouble is with bcmath or oci8 (I didn't compile with it). I think it should be solved with the proper EXTRA_LIBS, but wich one ?? that's the question.
YOu can try to buil one php without these options and check if it's working. If no, then it's could be in the core !
I'm looking for on my side if there's something about these options and HP-UX...
hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
benoit Bruckert
Honored Contributor

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Another question :
Have you got libgcc in your libpath ??
And more surely, try gnumake instead of the basic HP's make..

hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Weerts
New Member

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi there,
I tried what you suggested, but unfortunately I had no luck. The errors abot the missing shared libraries are gone if I do not use the oracle module, but the eprint error stays the same. Until now I had no luck to find the correct gcc settings for this HP-OS. Still searching for a solution.
Thanks so far. If you have any hint please let me know.
Weerts
New Member

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi there,
I tried what you suggested, but unfortunately I had no luck. The errors abot the missing shared libraries are gone if I do not use the oracle module, but the eprint error stays the same. Until now I had no luck to find the correct gcc settings for this HP-OS. Still searching for a solution.
Thanks so far. If you have any hint please let me know.
By the way: where must I set the CFLAGS or EXTRA_LIBS so that they are distributed to the sub-makefiles if I invoke the configure script. I already searched various files , but whenever I invoke configure it uses the "old" options.
benoit Bruckert
Honored Contributor

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi,
I'm quite sure now that there something about libgcc, you can compile and link but not run .
Did you already used gcc on your host ? Is it working ?
The best way I think is to install again gcc (may the 3.1 release).
You can dowload binaries of gcc on
http://hpux.connect.org.uk
You should also use gmake instead of HP's make !
hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Weerts
New Member

Re: Apache 2 + HP-UX 11.11 + php 4.x install

Hi there ,
sorry for my absence during the last two day. I tried now several combinations of php+apache+gcc+gmake.
-gmake doesn't work at all
- gcc > 2.95 (means 3.1 or 3.2) gives a socklen_t error about different types of declaration which is in fact true because HP defines it as size_t and php as uint.
-gcc 2.95.2 still has the unresolved sysmbol eprintf from gcc's - assert.h header

So I don't have any more ideas, patience and time on this. I will be out of office for the next two weeks, not pretty sure if I have internet access. If yes I will check for news.
My solution for now will be to take a linux machine and connect my php-application remotly because I'm in a little hurry with that.

Thanks so far . If I will succeed in the future I will let you know how I did it.

Thanks again and feel free to give me some more info if you have it. I really wou??d appreciate it.
Thanks