免费注册 查看新帖 |

Chinaunix

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

php安装 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-03-19 16:57 |只看该作者 |倒序浏览
php安装








./configure --prefix=/usr/local/libxml2
make
make install

./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs  --with-libxml-dir=/usr/local/libxml2
make
make install

cp php.ini-recommended /usr/local/php5/lib/php.ini

vi /usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php .php


./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local/libxml2 --with-zlib



./configure
make
sudo make install

onfigure: error: Cannot find MySQL header files under /usr/local/src/mysql-5.1.14-beta-linux-i686-glibc23/include/.
Note that the MySQL client library is not bundled anymore!


1. 查看系统有没有安装mysql header
find / -name mysql.h
如果有。请指定--with-mysql=/跟正常路径。
如果没有。请看下一步。

2.redhat安装
rpm -ivh MySQL-devel-community-5.1.33-0.rhel5.i386.rpm

php的配置文件中有一行--with-mysql=/usr。安装的时候提示:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.

这是由于安装mysql时没有安装mysql头文件,或者是路径指定不正确,php找不到mysql的头文件引起的错误提示。

解决方法。
1. 查看你的系统有没有安装mysql header
   find / -name mysql.h
  如果有。请指定--with-mysql=/跟你的正常路径。
  如果没有。请看下一步。

2.redhat安装
  rpm -ivh MySQL-devel-4.1.12-1.i386.rpm

3.debian安装
  apt-get install libmysqlclient15-dev

4.最后一步php的配置选项添加--with-mysql=/usr即可!

  1. ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib
复制代码

论坛徽章:
0
2 [报告]
发表于 2012-03-19 16:57 |只看该作者
谢谢分享

论坛徽章:
0
3 [报告]
发表于 2012-09-01 13:21 |只看该作者
谢谢,收藏
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP