- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Unable to load shared library gettext in php
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 03:23 AM - last edited on тАО11-20-2012 06:04 PM by Maiko-I
тАО03-27-2008 03:23 AM - last edited on тАО11-20-2012 06:04 PM by Maiko-I
Unable to load shared library gettext in php
I am using a HP-UX with apache version 2.0.58
and with php 5.2
I compiled and installed the gettext extension
On apache startup I get the warning
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/hpws/apache/php/
lib/php/extensions/gettext.sl' - '/opt/hpws/apache/php/lib/php/extensions/gettex
t.sl' is not a valid load module: Bad magic number in Unknown on line 0
Please help
P.S. This thread has been moved from HP-UX > General to HP-UX > languages - HP Forumas Moderator
- Tags:
- Apache
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:05 AM
тАО03-27-2008 06:05 AM
Re: Unable to load shared library gettext in php
Check that the files it is complaining about actually exist and have the correct file time.
file filename.
If possible compare size and type to a system that is working.
The complaint seems to be either the library is inaccessible or invalid, I lean toward invalde based on the meaningful, magical error message.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 09:20 PM
тАО03-27-2008 09:20 PM
Re: Unable to load shared library gettext in php
and the php.ini file.
I actually created the gettext.sl by following commands in the php-5.2.5/ext/gettext directory.
I first copied config.sub,config.guess and ltmain.sh from /usr/local/share/libtool/config directory to gettext source directory.
# phpize
# ./configure --enable-gettext --with-php-config=/opt/hpws/apache/php/bin/php-config
# make
# make install
# cd /opt/hpws/apache/php/lib/php/extensions
# mv no-debug-zts-20060613/gettext.so gettext.sl
# apachectl restart
When I checked the error log of apache I got the above mensioned magic number error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 10:57 PM
тАО03-27-2008 10:57 PM
Re: Unable to load shared library gettext in php
# file libphp5.so
ELF-64 IA-64
# file gettext.sl
ELF-32 IA-64
I think the mixing up of 32bit and 64bit libraries the root cause of problem.
Can any body help with how i can build 64 bit
libraries?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 11:23 PM
тАО03-27-2008 11:23 PM
Re: Unable to load shared library gettext in php
That's useless. You also need to check what type of file it is. Use a linker tool:
$ chatr gettext.sl
You could have PA vs IPF conflicts. Or +DD32 vs +DD64. And it must be a shared lib.
>SEP: I lean toward invalid based on the meaningful, magical error message.
Exactly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 11:51 PM
тАО03-27-2008 11:51 PM
Re: Unable to load shared library gettext in php
# chatr gettext.sl
32-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
internal name:
gettext.so
shared library list:
libintl.sl.1
libc.so.1
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 04000000 z---c- D (default)
8 data 40010000 ---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
and for libphp5.so
#chatr libphp5.so
/opt/hpws/apache/modules/libphp5.so:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /lib
internal name:
libphp5.so
shared library list:
libm.so.1
libnsl.so.1
libc.so.1
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
Can libphp5.so load the shared library gettext.sl??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 12:05 AM
тАО03-28-2008 12:05 AM
Re: Unable to load shared library gettext in php
32-bit ELF shared library
#chatr libphp5.so
64-bit ELF shared library
>Can libphp5.so load the shared library gettext.sl??
No. An application can either be 32 bit or 64 bit.
>I compiled and installed the gettext extension
You will have to port? and compile this to 64 bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 12:19 AM
тАО03-28-2008 12:19 AM
Re: Unable to load shared library gettext in php
ie what are the compiler and linker flags to do so
I tried
# ./configure CC='cc -m64' LD='ld -melfppc64'
# make
# make install
Still I am getting a 32 bit library..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 12:30 AM
тАО03-28-2008 12:30 AM
Re: Unable to load shared library gettext in php
> ./configure CC='cc -m64' LD='ld -melfppc64'
If you are using a real compiler you just use +DD64. The gcc option is -mlp64.
The linker will automatically figure out the right thing. But you should be using cc instead: LD='cc +DD64'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 01:00 AM
тАО03-28-2008 01:00 AM
Re: Unable to load shared library gettext in php
Problem is that when i try to compile gettext php extension as 64 bit elf i get error that 64 bit gettext library not found.
So i think i should install gettext library as 64 bit.
How can this be done.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 01:16 AM
тАО03-28-2008 01:16 AM
Re: Unable to load shared library gettext in php
Does it exist at the porting center? If not, you will have to build and port it yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2008 01:56 AM
тАО03-30-2008 01:56 AM
Re: Unable to load shared library gettext in php
Thanks to all