Operating System - HP-UX
1836487 Members
2462 Online
110101 Solutions
New Discussion

PHP configuration on HPUX ia64 11.23

 
Nikhil Porwal
Occasional Advisor

PHP configuration on HPUX ia64 11.23

We are trying to configure PHP (5.2.5) + OCI8 (oracle 64 bit instant client 10.2) with Apache2 (2.0.58) on HPUX 11.23 ia64 machine. We have been given with the HP Apache Based webserver package installed with PHP (5.2.0). But enabling oci extension is not detecting the instant client and oci functions gives error.

So I am trying to re-configure and fresh build PHP, to enable oci8 instant client support. For this I installed below software from depots which are required to successfully configure PHP:

Libgcc, zlib, libiconv, libxml2, libxslt, libpng, freetype, bzip2, curl, imap, bison and flex, gcc, libgcc from the HP source site!

Now after getting it successfully configured, when I try to run the make command, it failed initially on the oci library, where it was not able to recognize oraub8 structure in php oci8 extension directory. So I updated the oracle instant client header file to recognize this structure.

But now when the above is resolved gmake command is getting stuck on the below error:

#gmake
.
.
.
/bin/sh /.../php-5.2.5/libtool --silent --preserve-dup-deps --mode=link /.../php-5.2.5/meta_ccld -DPHP_ATOM_INC -I/.../php-5.2.5/include -I/.../php-5.2.5/main -I/.../php-5.2.5 -I/usr/local/include/libxml2 -I/.../php-5.2.5/ext/date/lib -I/opt/.../oracle/sdk/include -I/.../php-5.2.5/TSRM -I/.../php-5.2.5/Zend -D_REENTRANT -mthreads -DZTS -o ext/oci8/oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath /.../php-5.2.5/modules -avoid-version -module -L/usr/local/lib/hpux32 ext/oci8/oci8.lo ext/oci8/oci8_lob.lo ext/oci8/oci8_statement.lo ext/oci8/oci8_collection.lo ext/oci8/oci8_interface.lo -L/opt/webhost_sw/oracle -L/opt/webhost_sw/oracle -lclntsh
ld: Can't find library or mismatched ABI for -lclntsh
Fatal error.
gmake: *** [ext/oci8/oci8.la] Error 1


It seems to me like an error with the conflict b/w 32 bit and the 64 bit library files, but I am not sure about this!

Appriciate any help on resolving this!
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: PHP configuration on HPUX ia64 11.23

(You need to get the latest linker patch where it tells you exactly what the problem is, not giving you a confusing choice.)

Is your application 32 bit or 64? You need to pass the right -L path to get the correct libclntsh. (If you give both the 32 bit and 64 bit paths, the linker will take the right one.)
Nikhil Porwal
Occasional Advisor

Re: PHP configuration on HPUX ia64 11.23

Thanks Dennis,

I am able to resolve the linker issue by changing the configuration file to look for .so lib instead of sl, and now oracle library is getting compiled, but later on in the compilation of sapi/cli/php i am getting the below error:

#gmake
.
.
_default_classes.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/php_cli_readline.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lrt -lm -lnsl -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -o sapi/cli/php
(Bundled) cc: warning 901: unknown option: `-hreads': use +help for online documentation.
(Bundled) cc: warning 922: "+O2" is unsupported in the bundled compiler, ignored.
(Bundled) cc: warning 901: unknown option: `-hreads': use +help for online documentation.
ld: Unsatisfied symbol "executor_globals_id" in file ext/standard/.libs/info.o
ld: Unsatisfied symbol "ts_resource_ex" in file ext/standard/.libs/info.o
ld: Unsatisfied symbol "php_dom_create_object" in file ext/xmlreader/php_xmlreader.o
ld: Unsatisfied symbol "sapi_globals_id" in file ext/standard/.libs/info.o
4 errors.
gmake: *** [sapi/cli/php] Error 1



I am still unsure on how to get this resolve!

Appriciate any guideline in resolving this, or any workaround. I was able to complile this with disabling CLI, but then apache won't start! :O
Dennis Handly
Acclaimed Contributor

Re: PHP configuration on HPUX ia64 11.23

>in the compilation of sapi/cli/php i am getting the below error:

(This is linking, not compiling.)

(Bundled) cc: warning 901: unknown option: `-hreads'

This isn't a valid option. The driver will eat up letters and leave you with "-threads". What was the beginning of the option?

ld: Unsatisfied symbol "executor_globals_id" in file info.o
ts_resource_ex php_dom_create_object sapi_globals_id
>I am still unsure on how to get this resolve!

Where are these 4 symbols suppose to be defined?

You can search libs by doing:
$ nm -pxAN *.o *.a *.so *.sl *.lo | grep -e ts_resource_ex -e sapi_globals_id