百度空间 | 百度首页 
 
查看文章
 
cent os 5.0 编译php连接mssql
2008-04-14 11:53

先是win下面的思维 查找mssql.so或是dll,失败!

可能是能编译出.so文件出来,但是怎么编译又是一回事,所以不是简单的php.ini 的配置

找资料,必须安装freetds插件,安装成功,成功访问mssql数据库,但是只能在命令行下,php还是不动声色。。。。

要想支持必须重新编译,怎么办??只能重新安装php

不行还得先卸载php,必须先卸载apache,安装。。。

失败,原来apache没有卸载成功,rpm -qa一下果然,rpm-e失败,想到相关联的全部rpm-e 最后安装成功

安装php失败!!@!。。怎么回事需要libxml支持又是找了一上午,最后终于下到了,安装了,中间出了libxml2—devden,全卸了安装,安装devden时需要zlib—deven支持,又是一阵忙乱后,强行安装libxml2—deven安装php编译通过,一阵make&make install

又出问题了 apache重启不支持php5——module,libphp5.so不是一直很好支持吗》?郁闷 原来是selinux的原因

原文

Fedora Core 2开始就已经有了SELinux (Security-Enhanced Linux )这个东西,不过在 FC2下是默认不打开的,从FC3开始就默认打开了,但是打开了是很安全,但是很多操作也不能操作了。
比如再FC4下装Apache + PHP,手工编译的,但是去无法解析PHP,看错误提示,都是什么:
[root@localhost ~]# /usr/local/apache/bin/apachectl start Syntax error on line 232 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp4.so into server: /usr/local/apache/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied
郁闷了,总是无法加载libphp4.so这个包,想了半天没有结果,搜索一下,原来是SELinux再搞鬼,哼,把你给关了。
使用文本编辑工具打开 /etc/selinux/config,找到这段:
找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:SELINUX=disabled
保存,关闭。
重启系统,然后看看我们的Apache已经能够运行PHP了。呵呵。
如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
哪应该是SELinux的问题,可以考虑把它关闭。

http://www.whpisces.com/simple/index.php?t390.html


类别:岁月泪痕 | 添加到搜藏 | 浏览() | 评论 (0)
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     
 
精彩相册
   
     

©2009 Baidu