Operating System - HP-UX
1830919 Members
1775 Online
110017 Solutions
New Discussion

Re: Another PHP+Oracle Problem

 
Mike Moore_14
Occasional Advisor

Another PHP+Oracle Problem

I have been trying for several hours to find a solution, on this forum, for my problems, but I am at a loss... the answer is problably here and I am just missing it... but incase it isn't

I am using the HPWS package, and I have followed the instructions to install the PHP->Oracle modulues. But I am unable to get them to work. None of the functions (OCILogon, Ora_Logon) are found.
My
/opt/hpws/apache/logs/error_log lists

Error shl_load failed for: /opt/hpws/apache/php/lib/php/extensions/oci8.sl, [err
no 12: Not enough space]
Error shl_load failed for: /opt/hpws/apache/php/lib/php/extensions/oci8.sl, [err
no 12: Not enough space]
Error shl_load failed for: /opt/hpws/apache/php/lib/php/extensions/oci8.sl, [err
no 12: Not enough space]
/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/hpws/apache/php/lib/php/exten
sions/oci8.sl
/usr/lib/dld.sl: Not enough space
PHP Warning: Unknown(): Unable to load dynamic library '/opt/hpws/apache/php/li
b/php/extensions/oci8.sl' - Existing dependencies in Unknown on line 0

I am not sure where to go from here... I have made sure to update the /opt/hpws/apache/bin/envvars file with all of my oracle vars (SHLIB,ORACLE_BASE, ORACLE_HOME, TNS_ADMIN, SID...etc...)
Any help would be greatly appreciated.
Thanks
7 REPLIES 7
Victor Fridyev
Honored Contributor

Re: Another PHP+Oracle Problem

Hi,

It seems to me, you have a problem with your kernel parameters.
Could you please give values of the following parameters:
semmni, semmns, semmnu, semume, shmmax, shmmni, maxtsize, maxdsize

You can get all the values by
kmtune -q parameter_name
Entities are not to be multiplied beyond necessity - RTFM
Raj D.
Honored Contributor

Re: Another PHP+Oracle Problem

Hi Mike ,

Check your kernel parameters before procedding ,
here is our normal parameters running oracle 9i

SEMMAP=128
SEMMNS=32000
SEMMNI=128
SEMMSL=250
SEMOPM=250
SHMMAXPGS=65536
SHMMAX=1073741824
SHMMNI=4096
SHMSEG=4096

Victor its MAXTSIZ and MAXDSIZ , not SIZE.

Hope it may work ,
Raj D.
" If u think u can , If u think u cannot , - You are always Right . "
Mike Moore_14
Occasional Advisor

Re: Another PHP+Oracle Problem

Thanks for the replys, I appologize for the delays, I am in Tokyo
At any rate, here are my current Kernel Parameters

maxdsiz = 206385136
maxdsiz_64 = 206385136
maxtsiz = 1073741824
maxtsiz_64 = 1073741824


semmap = 16386
semmni = 32000
semmns = 16384
semmsl = 4092
semume = 10
shmmax = 1200000000
shmmni = 4096
shmseg = 4096

I appreciate the help, as I'm just scratching my head.
Mike M
Mike Moore_14
Occasional Advisor

Re: Another PHP+Oracle Problem

Is it possible that the problem exists because the oci8.sl was compiled with the 32 bit versions of oracle's C headers, and I am using 11.11 64bit...
I realize that there error indcates that I am running out of a resource, but I have tried to shut everything down limit down the number of oracle connections... and I am still having this problem. I have no problems with perl's DBD-Oracle, or PHP Postgres module, just this module.
I have tried to find out which resource is being taxed, but I just can see anything.
I guess my question is... should I try to compile PHP to my system?
Additionally is there any decent way for me to find out which parameter I am hitting? Kernel Logging?

Mike Moore_14
Occasional Advisor

Re: Another PHP+Oracle Problem

And thanks for the help!
Mike Moore_14
Occasional Advisor

Re: Another PHP+Oracle Problem

Well, looks like recompiling php worked, it may also have been the --enable-memory-limit option that I added

Here are the steps that I took.

I setup a 32bit oracle home directory, basically just links back to my standard oracle home directory, with the lib directory referencing the lib32, and the rdbms/lib directory referencing the rdbms/lib32

Here was my php configure line

./configure --prefix=/usr/local/php --enable-libgcc --with-apxs2=/opt/hpws/apache/bin/apxs --with-apache2=/opt/hpws/apache/ --with-servlet=/opt/oracle/product/9.0.1/Apache/Jsdk --enable-debug --with-gettext=/usr/local/bin --with-java=/opt/java1.4 --with-oci8=/opt/oracle/product/9.0.1-32-links --with-unixODBC=/usr/local --with-pgsql=/opt/iexpress/postgresql --enable-static=yes --enable-module=php4 --enable-module=so --enable-module=so --enable-module=sl --with-perl=/usr/local/bin/perl --with-ftp --enable-memory-limit --with-config-file-path=/opt/hpws/apache/conf

After the compile I added -fno-static-aliasing to my CFLAGS and CXXFLAGS in the Makefile.
I also modified the libtool setting
deplibs_check_method="pass_all"

Once you complete the make, and make install
then I complied my libphp4.sl
to do this I
cp /usr/local/php/lib/php/libphp4.sl /usr/local/php/lib/php/libphp4.so

then
/opt/hpws/apache/bin/apxs -i -a -n php4 /usr/local/php/lib/php/libphp4.so

I added my modified oracle_home as well as the remainder of my oracle env parms to the /opt/hpws/apache/bin/envvars file, and I updated the apachectl file.
Also you may want to check your httpd.conf as the apxs may have added a second libphp4.so module to load....

Anyway... it sucked trying to complie PHP so I home this helps some one...
Ohh I also have complied my own gcc, I'm sure that made the process much less painful.
Mike Moore_14
Occasional Advisor

Re: Another PHP+Oracle Problem

So my question now is the swpackage'd PHP built with the 32 or 64 bit versions of oracles libraries?
After going through the PHP build several times, this appears to be the case.
Could this have been causing my mmap() problems?
I find it difficult to believe that enabling memory-limiting, allows apache to start correctly.

Thanks for any responses that you offer... as I know I am not the only person who has fought with oracle / PHP .