Operating System - HP-UX
1753366 Members
6092 Online
108792 Solutions
New Discussion юеВ

Re: Add PHP extensions (Mysqli, Mcrypt and MM) to HP-UX Apache-based Web Server v.3.01 on IA64

 
Omar De la Torre C.
Occasional Contributor

Add PHP extensions (Mysqli, Mcrypt and MM) to HP-UX Apache-based Web Server v.3.01 on IA64

Hello,

I already install HP-UX Apache-based Web Server v.3.01 on RX6600 successfully.

But I need to add some PHP extensions to my installation. I can not find information about these PHP extensions on IA64.

Can you kindly to help to find the best way to do this?

* I have already installed
HP C++, and HP gcc
* I have already downloaded
mcrypt-2.6.8.tar
mm-1.3.1 .tar

I really appreciate your help.

Regards.
3 REPLIES 3
dirk dierickx
Honored Contributor

Re: Add PHP extensions (Mysqli, Mcrypt and MM) to HP-UX Apache-based Web Server v.3.01 on IA64

those 'extensions' come in source and they include specific build instructions. best would be to read those, they should generally work on all supported platforms. it's probably going to be a PITA to get going though...
Shinji Teragaito_1
Respected Contributor

Re: Add PHP extensions (Mysqli, Mcrypt and MM) to HP-UX Apache-based Web Server v.3.01 on IA64

I have not built mysqli.so and mcrypt.so as PHP extentions so far.

It looks like you need to build libmcrypt and mhash at least as
64-bit (NOTE: I suppose your HP-UX Apached-based Web Server is
64-bit). Also you may need m4, autoconf and much more which
depends on your development environment. It would be better to
recreate the configure script in libmcrypt-2.5.8/libltdl using
the latest autoconf and m4. because you will encounter an error
caused by the out-of-date configure in libmcrypt-2.5.8/libltdl
when launching libmcrypt-2.5.8/configure.

* libmcrypt-2.5.8

% cd libltdl
% cp -p configure configure.orig
% autoconf
% cd ..
% env CC=cc CFLAGS="+O2 +DD64 -I/usr/local/include" \
LDFLAGS="-L/usr/local/lib/hpux64" ./configure \
--libdir=/usr/local/lib/hpux64 --enable-dynamic-loading \
--enable-ltdl-install 2>&1 | tee configure.log
% vi config.h
#define realloc rpl_realloc
--
//#define realloc rpl_realloc
% make 2>&1 | tee make.log
# su
# make install 2>&1 | tee makeinstall.log

* mhash-0.9.9.9

% env CC=cc CFLAGS="+O2 +DD64 -I/usr/local/include" \
LDFLAGS="-L/usr/local/lib/hpux64" ./configure \
--libdir=/usr/local/lib/hpux64 2>&1 | tee configure.log

If you use gcc, skip the changes for src/Makefile:

% vi src/Makefile
< CFLAGS=... -Wall
--
> CFLAGS=...

% vi src/rfc2440.c
< a->d = (void*)a + sizeof *a;
--
< a->d = (USTRING*)a + sizeof *a;

Same changes are required for line 77 and 95.

% make 2>&1 | tee make.log
% su
# make install 2>&1 | tee makeinstall.log

I'm terribly sorry I have not verified if the above steps are
sufficient to build mcrypt.so as PHP extention. If some changes
are required in the steps I mentioned above, please correct them
and share them here in this forum.

Anyway, I think you need much more tasks to proceed to your
goal. The rest is up to you !!
Dennis Handly
Acclaimed Contributor

Re: Add PHP extensions (Mysqli, Mcrypt and MM) to HP-UX Apache-based Web Server v.3.01 on IA64

>Shinji: % make 2>&1 | tee make.log

FYI. I typically would never use tee for this purpose. I use tail -f:
make > make.log 2>&1 &

Then I can stop and start a tail -f and do something else.