免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: ruiruigz
打印 上一主题 下一主题

[配置] linux下自带PHP不支持mysql,怎么办? [复制链接]

论坛徽章:
0
21 [报告]
发表于 2005-11-30 12:04 |只看该作者
建议你重装源代码安装apache+php

另外,

你找不到apxs,是因为你没有安装

在安装光盘上,找到httpd-devel.XXXX.rpm  (好象是这个,没有的话,找apache-devel)

rpm -ivh httpd-devel.xxx.rpm

就会有apxs

论坛徽章:
0
22 [报告]
发表于 2008-12-17 11:19 |只看该作者
不行 安装了 httpd-devel和其相关的依赖包,编译php还是提示

  1. ./configure --prefix=/usr/local/php5 --with-config-file-path=/etc/php/ --with-apxs2=/usr/sbin/apxs --with-gd --with-jpeg-dir --with-ttf --with-zlib-dir --with-png-dir --with-mysql
复制代码

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...

Sorry, I cannot run apxs.  Possible reasons follow:

1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/sbin/apxs follows:
cannot open /httpd/build/config_vars.mk: No such file or directory at /usr/sbin/apxs line 201.
configure: error: Aborting

论坛徽章:
0
23 [报告]
发表于 2008-12-17 18:24 |只看该作者
这个解决了,是我的系统不正常

但又出新问题

./configure --prefix=/usr/local/php  --with-mysql=/usr --with-apxs2=/usr/sbin/apxs

正常

  1. +--------------------------------------------------------------------+
  2. | License:                                                           |
  3. | This software is subject to the PHP License, available in this     |
  4. | distribution in the file LICENSE.  By continuing this installation |
  5. | process, you are bound by the terms of this license agreement.     |
  6. | If you do not agree with the terms of this license, you must abort |
  7. | the installation process at this point.                            |
  8. +--------------------------------------------------------------------+

  9. Thank you for using PHP.
复制代码


make

  1. main/output.o: In function `php_ob_init_named':
  2. /root/lamp/php-5.2.8/main/output.c:440: undefined reference to `php_ob_gzhandler_check'
  3. collect2: ld returned 1 exit status
  4. make: *** [sapi/cli/php] Error 1
复制代码

[ 本帖最后由 yuhuohu 于 2008-12-17 21:44 编辑 ]

论坛徽章:
0
24 [报告]
发表于 2008-12-17 18:32 |只看该作者
php 5.2.8



php 5.1.6

都试过了 都一样的问题

[ 本帖最后由 yuhuohu 于 2008-12-17 21:44 编辑 ]

论坛徽章:
0
25 [报告]
发表于 2008-12-17 18:51 |只看该作者
现在的新问题是
在apache的配置文件httpd.conf中加入

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

....


启动apache报错


  1. Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: undefined symbol: sapi_globals
复制代码


很接近成功了,各路高手帮忙看看撒~

论坛徽章:
0
26 [报告]
发表于 2008-12-17 19:27 |只看该作者
都google到日本人的论坛去了 晕菜

[ 本帖最后由 yuhuohu 于 2008-12-17 21:45 编辑 ]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-07-22 06:20:00
27 [报告]
发表于 2013-01-26 21:34 |只看该作者
21楼是正解。
“你找不到apxs,是因为你没有安装

在安装光盘上,找到httpd-devel.XXXX.rpm  (好象是这个,没有的话,找apache-devel)

rpm -ivh httpd-devel.xxx.rpm

就会有apxs”
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP