Operating System - HP-UX
1846204 Members
3774 Online
110255 Solutions
New Discussion

Re: HPWS: Apache 2 + PHP 5 + DOM problem

 
Korvin
Frequent Advisor

HPWS: Apache 2 + PHP 5 + DOM problem

Hello.

I could not activate dom support for HPWS PHP.

I installed libxml2 and libxslt to server
[root@ bin]# swlist -l fileset | grep xml
# libxml2 2.6.32 libxml2
libxml2.libxml2-INC
libxml2.libxml2-RUN
[root@ bin]# swlist -l fileset | grep xslt
# libxslt 1.1.24 libxslt
libxslt.libxslt-INC
libxslt.libxslt-RUN

At php.ini uncomment dom.sl extension.

But when i try to run php script with php domxml function, i get next error:
Fatal error: Call to undefined function domxml_open_file()

In apache error log i have next entry:
[Wed Oct 01 11:37:55 2008] [notice] caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/dom.sl' - Unable to find library 'libexslt.so'. in Unknown on line 0
[Wed Oct 01 11:37:58 2008] [notice] Apache/2.0.58 HP-UX_Apache-based_Web_Server (Unix) mod_perl/1.99_16 Perl/v5.8.8 DAV/2 PHP/5.2.0 configured -- resuming normal operations

Adding path to libexslt.so (/usr/local/lib/hpux32) to SHLIB_PATH in apachectl was not helped.

How i can add DOM support to HPWS PHP?
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

That does "chatr /opt/hpws/apache/php/lib/php/extensions/dom.sl" show?
Is this a 32 bit shlib?
Korvin
Frequent Advisor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

# chatr /opt/hpws/apache/php/lib/php/extensions/dom.sl
/opt/hpws/apache/php/lib/php/extensions/dom.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/local/lib:/usr/local/lib:/usr/local/lib:/hpapache/apinteg/apinteg_hpws_2.17_1123_IA_64/CLO/Components/MOD_PHP5/OpenSourceLibs/ia64_64/libxslt/lib:/hpapache/apinteg/apinteg_hpws_2.17_1123_IA_64/CLO/Components/MOD_PHP5/OpenSourceLibs/ia64_64/libxslt/lib:/hpapache/apinteg/apinteg_hpws_2.17_1123_IA_64/CLO/Components/MOD_PHP5/OpenSourceLibs/ia64_64/libxml2/lib
internal name:
dom.so
shared library list:
libexslt.so
libxslt.so
libxml2.so.8
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
6 text 4000000000000000 z---c- D (default)
7 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
address space model: default
caliper dynamic instrumentation disabled

So i need to install 64 bit version of libxml2 and libxslt?

Do you know where i can get this 64 bit libraries?
Dennis Handly
Acclaimed Contributor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

>So I need to install 64 bit version of libxml2 and libxslt?

Yes. Or you need a 32 bit version of apache.

>Do you know where I can get this 64 bit libraries?

Do you already have them in /usr/local/lib/hpux64?
Korvin
Frequent Advisor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

> Do you already have them in /usr/local/lib/hpux64?

No, i installed libraries from this package http://hpux.connect.org.uk/hppd/hpux/Gnome/libxml2-2.6.32/

It`s 32 bit version only :(
Shinji Teragaito_1
Respected Contributor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

HP-UX Web Server Suite v.2.20 or later will resolve your issue because
the PHP extensions except for oci8.sl have none of dependencies with
some HP-UX non-default libraries such as libxslt, libexslt and so on.

Please look at the following download page:
http://h20392.www2.hp.com/portal/swdepot/displayProductsList.do?category=NSM

I hope this helps you.
Korvin
Frequent Advisor

Re: HPWS: Apache 2 + PHP 5 + DOM problem

Thank you.

I installed HPWS 3.0 and DOM exstansion successfully loaded.

But i have another problem with encoding support.
When i try to load any xml file with encoding different UTF-8, i have next PHP warning:

Warning: DOMDocument::load() [domdocument.load]: Unsupported encoding windows-1251 in /opt/hpws22/apache/htdocs/test.xml, line: 1 in /opt/hpws22/apache/htdocs/test_xml.php on line 6

Does HPWS support non-UTF8 encoding?
How I can add non-UTF8 encoding (for example, windows-1251 or iso-8859-5)?