Operating System - HP-UX
1849114 Members
7712 Online
104041 Solutions
New Discussion

Apache + PHP - unable to load extension (Oracle)

 
SOLVED
Go to solution
Ladislav Kostal
Advisor

Apache + PHP - unable to load extension (Oracle)

Hello all,

After installation of latest HPWS I get this error, when trying to start Apache + PHP with Oracle support:

/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/hpws/apache/php/lib/php/extensions/oci8.sl
/usr/lib/dld.sl: Not enough space
PHP Warning: Unknown(): Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/oci8.sl' - (null) in Unknown on line 0

I tried various steps, but nothing helped.

ORACLE variables are set correctly, SHLIB_PATH also, Oracle is 64-bit, increasing shmmax made no difference, swap utilization is low:

#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 376 648 37% 0 - 1 /dev/vg00/lvol2
dev 8000 375 7625 5% 0 - 1 /dev/vg00/lvswap
dev 12276 0 12276 0% 0 - 2 /dev/vg00/lvswap2
reserve - 5999 -5999
memory 1515 366 1149 24%
total 22815 7116 15699 31% - 0 -

Do you have some ideas?

Thanks

Ladislav Kostal
13 REPLIES 13
bhavin asokan
Honored Contributor

Re: Apache + PHP - unable to load extension (Oracle)

hi,

try by increasing maxdsiz,maxdsiz_64bit,maxssiz,maxssiz_64bit
parameters in kernel.

regds,
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

I would rather try some solution that doesn't require reboot. It is last possibility for me :) Thanks anyway.
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

Current values:

shmmax 0x400000000
maxdsiz 0x40000000
maxdsiz_64bit 0x100000000
maxssiz 0x800000
maxssiz_64bit 0x800000
bhavin asokan
Honored Contributor

Re: Apache + PHP - unable to load extension (Oracle)

hi,

on my test server it is (through sam)

maxdsiz 67108864
maxdsiz_64bit 1073741824
maxssiz 8388608
maxssiz_64bit 8388608

this is the calculated value.just compare with your systems values.

regds,




Ermin Borovac
Honored Contributor

Re: Apache + PHP - unable to load extension (Oracle)

Does your SHLIB_PATH contain $ORACLE_HOME/lib? If so, read on.

Apache is 32-bit and your Oracle installation is 64-bit. oci8.sl is linked with libclntsh.sl and dld may be trying to load 64-bit version of libclntsh.sl which won't work.

Please make sure your SHLIB_PATH contains $ORACLE_HOME/lib32 instead of $ORACLE_HOME/lib.
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

Thanks for tip, but it didn't help. Still same :(
Olivier Decorse
Respected Contributor

Re: Apache + PHP - unable to load extension (Oracle)

Hi,
just a question : dld.sl says "Not enough space". Is there any filesystem without space left (verify with bdf) ?

Olivier.
They say "install windows 2k, xp or better", so i install unix !
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

No, each fs is under 100%. After tracing with tucs I've got exact number of error in mmap call:

[ENOMEM]
MAP_FIXED was specified, and the range [addr, addr+len] exceeds that allowed for the address space of a process; or if MAP_FIXED was not specified and there is insufficient room in the address space to effect the mapping.
Olivier Decorse
Respected Contributor

Re: Apache + PHP - unable to load extension (Oracle)

Can you take a look at this thread ?
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6ee4a848deccd61190050090279cd0f9,00.html

Olivier.
They say "install windows 2k, xp or better", so i install unix !
Olivier Decorse
Respected Contributor

Re: Apache + PHP - unable to load extension (Oracle)

Hope it helps :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=215171

Olivier.
They say "install windows 2k, xp or better", so i install unix !
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

I already red these threads before, but leaving reboot with kernel parameter change as last chance.
Ermin Borovac
Honored Contributor
Solution

Re: Apache + PHP - unable to load extension (Oracle)

Oracle php extension may be linked with libclntsh.sl.8.0, whereas your Oracle installation has libclntsh.sl.9.

Please run the following to check

# export SHLIB_PATH=$ORACLE_HOME/lib32
# ldd /opt/hpws/apache/php/lib/php/extensions/oci8.sl

If it returns the following error, then in $ORACLE_HOME/lib32 you can create a symbolic link named libclntsh.sl.8.0 that points to libclntsh.sl.9

/usr/lib/dld.sl: Can't find path for shared library: libclntsh.sl.8.0
/usr/lib/dld.sl: No such file or directory
Ladislav Kostal
Advisor

Re: Apache + PHP - unable to load extension (Oracle)

Yes, that was the reason!

Current status (after linking):

#ll $ORACLE_HOME/lib32/libclntsh.sl*
libclntsh.sl -> libclntsh.sl.9.0
libclntsh.sl.8.0 -> libclntsh.sl.9.0
libclntsh.sl.9.0

And error message has gone. Thanks much :)