环境配置完毕,中途遇到了问题,备份解决方案。
原料:
Apache service Monitor
PHP 5.2
Mysql 5.5
以上全部安装
一、<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">配置<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">Apache
首先修改Apache的配置文件。Apache配置文件在Apache安装目录的conf目录下的httpd.conf。
1、让Apache解析php文件
在配置文件中找到 #LoadModule vhost_alias_module modules/mod_vhost_alias.so 在一行添加
LoadModule php5_module "D:/WebServer/php/php5Apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/WebServer/php"
2、配置起始页
DirectoryIndex index.html 改为 DirectoryIndex index.php index.html
3、修改Apache站点目,项目存放的空间
DocumentRoot "D:/Develop/Apache2.2/htdocs":网站存放网页的位置,与IIS中的"主目录"一样改为
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test"
<Directory
"D:/Develop/Apache2.2/htdocs">:对主站点的目录进行访问控制,改为
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/www.lizhonghongyun.com">
<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; line-height:28px; text-align:justify"><spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; line-height:28px; text-align:justify">二、<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">配置PHP
php.ini-development改名为php.ini
修改php.ini
extension_dir = "ext" 改为 extension_dir = "D:/WebServer/php/ext";
以下项去;号
;extension=php_curl.dll
;extension=php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_xmlrpc.dll
修改日期
;date.timezone =改为date.timezone = Asia/Shanghai
<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">三、php开启curl扩展的方法
<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">
1、将PHP文件夹下的三个文件php_curl.dll,libeay32.dll,ssleay32.dll复制到system32下;
2、将php.ini(c:WINDOWS目录下)中的;extension=php_curl.dll中的分号去掉;
3、重启Apache或者IIS。
<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">
<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">四、无法加载php_<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px">mcrypt.dll、php_mysql.dll<spanMicrosoft Yahei',微软雅黑,arial,宋体,sans-serif; font-size:16px; line-height:28px; text-align:justify">
解决方法将libmcrypt.dll,libmysql.dll复制到system32下;
以上就介绍了Apache+PHP+Mysql 配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!