免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2297 | 回复: 2
打印 上一主题 下一主题

php 增加oracle支持 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-18 00:36 |只看该作者 |倒序浏览
5可用积分
系统Rhel 5.3 安装了oracle 11g,rpm包安装apache及php,

用phpize增加了oci支持,重启apache的时有错误日志:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oci8.so' - /usr/lib/php/modules/oci8.so: undefined symbol: OCITypeByRef in Unknown on line 0

现在php中的oci函数都用不了,帮分析下原因,先谢了.

论坛徽章:
0
2 [报告]
发表于 2009-05-18 09:38 |只看该作者

回复 #1 ningniu 的帖子

It sounds like it is missing the Oracle Instant Client libraries.

Zend Core for Oracle can be installed into an existing Apache environment and will not overwrite your existing PHP installation. I would recommend installing it as it will come with these libraries.
http://www.zend.com/forums/index.php?t=msg&goto=8101#msg_8101

论坛徽章:
0
3 [报告]
发表于 2009-05-18 23:16 |只看该作者
谢谢楼上,已经解决,是SELINUX惹的祸
检查audit日志时发现有一条:type=AVC msg=audit(1242605710.676:1935): avc:  denied  { execmod } for  pid=3492 comm="perl" path="/ora11g/product/11.1.0/db_1/lib/libclntsh.so.11.1" dev=dm-2 ino=748666 scontext=user_u:system_r:unconfined_t:s0 tcontext=user_ubject_r:default_t:s0 tclass=file

应该是用phpize生成oci8.so时产生的,后来才想起来,oracle11g安装好后没有生成客户端所需的库文件,需要的时候才用genclntst生成的,没有去改类型了
chcon -t textrel_shlib_t /ora11g/product/11.1.0/db_1/lib/libclntsh.so.11.1

重新生成oci8.so就可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP