依赖模块libdb2.a(shro .o)无法加载。

时间:2023-02-06 12:22:48

I have been trying to connect to DB2 from PHP script.

我一直试图从PHP脚本连接到DB2。

When I include the right ibm_db2.so files in php.ini and restart apache following this, it would not load the modules.

当我包含右ibm_db2时。所以在php文件。ini和重启apache之后,它将不会加载模块。

Also in apache error log I see some messages like:

在apache错误日志中,我看到一些消息:

PHP Warning: PHP Startup: Unable to load dynamic library 
'/opt/freeware/lib/php/modules/ibm_db2_5.2.1.so' -/t0509-022 
Cannot load module '/opt/freeware/lib/php/modules/ibm_db2_5.2.1.so' \n\t0509-150
Dependent module libdb2.a(shr.o) could not be loaded. \n\t0509-022

Any help with this problem is too much appreciated.

对这个问题的任何帮助都太感谢了。

Thank you.

谢谢你!

1 个解决方案

#1


0  

Can you paste the output of:

你能粘贴吗?

dump -H /opt/freeware/lib/php/modules/ibm_db2_5.2.1.so

转储- h / opt /免费软件/ lib / php /模块/ ibm_db2_5.2.1.so

You will see a lines like:

你会看到一条线:

INDEX  PATH                          BASE                MEMBER              
0      /usr/lib:/lib:/usr/lpp/xlC/lib                                         
1 ...

The 0th entry is used to look for a file called libdb2.a with a member of shr.o. This is if LIBPATH is not set. If LIBPATH is set, then the components in LIBPATH are used. The loaded is not finding that file.

第0项用于查找名为libdb2的文件。a和一名神龛成员。这是如果没有设置LIBPATH,如果设置LIBPATH,则使用LIBPATH中的组件。加载的没有找到那个文件。

Or... it can find it but can not load it. If you can find it and its in a place that the loader should see, then extract that piece:

还是……它可以找到它,但不能装载它。如果你能找到它和它的位置,加载器应该看到,然后提取那块:

ar x libdb2.a shr.o

then do:

然后做:

dump -H shr.o

rinse and repeat... i.e. find that it depends upon and see if those dependencies exist. There is also the chance that shr.o is not the same bitsize. i.e. you have a 64 bit application and shr.o is a 32 bit object file. That would surprise me but its possible (if I recall correctly). To check the bit size do:

清洗和重复的…即发现它依赖于并查看这些依赖关系是否存在。也有可能是shr。o不是同样的位码。也就是说,你有一个64位的应用程序和shr。o是一个32位的对象文件。这将使我感到惊讶,但这是可能的(如果我没记错的话)。检查钻头尺寸:

file shr.o

and it will have "64 bit" in the description if it is a 64 bit binary and it will not have it if it is a 32 bit binary.

如果它是64位二进制,它会有“64位”,如果它是32位二进制,它就不会有。

Good luck

祝你好运

#1


0  

Can you paste the output of:

你能粘贴吗?

dump -H /opt/freeware/lib/php/modules/ibm_db2_5.2.1.so

转储- h / opt /免费软件/ lib / php /模块/ ibm_db2_5.2.1.so

You will see a lines like:

你会看到一条线:

INDEX  PATH                          BASE                MEMBER              
0      /usr/lib:/lib:/usr/lpp/xlC/lib                                         
1 ...

The 0th entry is used to look for a file called libdb2.a with a member of shr.o. This is if LIBPATH is not set. If LIBPATH is set, then the components in LIBPATH are used. The loaded is not finding that file.

第0项用于查找名为libdb2的文件。a和一名神龛成员。这是如果没有设置LIBPATH,如果设置LIBPATH,则使用LIBPATH中的组件。加载的没有找到那个文件。

Or... it can find it but can not load it. If you can find it and its in a place that the loader should see, then extract that piece:

还是……它可以找到它,但不能装载它。如果你能找到它和它的位置,加载器应该看到,然后提取那块:

ar x libdb2.a shr.o

then do:

然后做:

dump -H shr.o

rinse and repeat... i.e. find that it depends upon and see if those dependencies exist. There is also the chance that shr.o is not the same bitsize. i.e. you have a 64 bit application and shr.o is a 32 bit object file. That would surprise me but its possible (if I recall correctly). To check the bit size do:

清洗和重复的…即发现它依赖于并查看这些依赖关系是否存在。也有可能是shr。o不是同样的位码。也就是说,你有一个64位的应用程序和shr。o是一个32位的对象文件。这将使我感到惊讶,但这是可能的(如果我没记错的话)。检查钻头尺寸:

file shr.o

and it will have "64 bit" in the description if it is a 64 bit binary and it will not have it if it is a 32 bit binary.

如果它是64位二进制,它会有“64位”,如果它是32位二进制,它就不会有。

Good luck

祝你好运