Php 安装参考文章:
http://cn2.php.net/manual/en/install.unix.apache2.php
在linux 下安装php遇到的问题汇总
1. php编译错误Note that the MySQL client library is not bundled anymore!
原因:找不到 mysql.h文件。
解决办法:下载mysql-devel-XXX.rpm包并安装。
参考文章:http://blog.youkuaiyun.com/monkey_d_meng/article/details/5574310
2. Configure: error: Cannot find libmysqlclientunder /usr.
原因:找不到libmysqlclient.so
解决办法:下载MySQL-shared-XXXX.rpm 包并安装
参考文章:
http://xok.la/2008/08/configure_error_cannot_find_libmysqlclient_under.html
PHP 安装成功提示信息如下:
Generatingfiles
updatingcache ./config.cache
creating./config.status
creatingphp5.spec
creatingmain/build-defs.h
creatingscripts/phpize
creatingscripts/man1/phpize.1
creatingscripts/php-config
creatingscripts/man1/php-config.1
creatingsapi/cli/php.1
creatingmain/php_config.h
creatingmain/internal_functions.c
creatingmain/internal_functions_cli.c
+--------------------------------------------------------------------+
|License: |
|This software is subject to the PHP License, available in this |
|distribution in the file LICENSE. Bycontinuing this installation |
|process, you are bound by the terms of this license agreement. |
|If you do not agree with the terms of this license, you must abort |
|the installation process at this point. |
+--------------------------------------------------------------------+
Thankyou for using PHP.
<FilesMatch \.php$>
SetHandlerapplication/x-httpd-php
</FilesMatch>
3. You don't have permission to access/wiki/yq.html on this server.
没权限
原因:不能在apache2/htdocs/ 文件夹中添加软连接连到其他目录。
解决办法:把wiki 目录文件直接COPY到apache2/htdocs目录中
4. apache 不能处理php文件,访问wiki首页时提示“If you are reading this in your web browser, your server is probably not configured correctly to run PHP applications!
原因:apache没有配置处理的PHP文件的信息
解决办法:在apache2/conf/httpd.conf 总添加如下信息:
AddTypeapplication/x-httpd-php .php
参考文章:
http://wangzebin.blog.51cto.com/653300/131788
http://cn2.php.net/manual/en/faq.installation.php#faq.installation.processing
本文汇总了在Linux环境下安装MediaWiki过程中遇到的PHP编译错误和Apache配置问题。针对'Note that the MySQL client library is not bundled anymore!'错误,需要安装mysql-devel包。对于'Cannot find libmysqlclient under /usr.',解决方法是安装MySQL-shared包。安装成功后,Apache配置需添加处理PHP文件的指令。最后,解决'You don't have permission'错误的方法包括复制wiki目录到Apache的htdocs目录或修改Apache配置。
1654

被折叠的 条评论
为什么被折叠?



