Heim  >  Artikel  >  php教程  >  APACHE2.02+PHP5+mysql5配置

APACHE2.02+PHP5+mysql5配置

WBOY
WBOYOriginal
2016-06-06 19:43:30898Durchsuche

机器前些天格式化重装,so the environment which had configured before is damaged,and I need to rebuilt it. 从网上copy过来配置过程以备后用: (一)http.conf 把PHP直接作为apache的一个模块运行: LoadModule php5_module C:/php/php5apache2.dll //

机器前些天格式化重装,so the environment which had configured before is damaged,and I need to rebuilt it.

从网上copy过来配置过程以备后用:

  (一)http.conf
  把PHP直接作为apache的一个模块运行:
  LoadModule php5_module "C:/php/php5apache2.dll"   //这里设定为php5apache2.dll所在目录,当前假定在c:/php
  AddType application/x-httpd-php .php
  
    在Apache目录下建立了一个www的目录用于存放站点文件,在http.conf里:
  把DocumentRoot "D:/Apache2/htdocs"改成了DocumentRoot "D:/Apache2/www"
  直接列目录:
  Options FollowSymLinks
  AllowOverride None
  改为:  
  Options Indexes FollowSymLinks
  AllowOverride None
  设置默认字符为中文简体:
  AddDefaultCharset GB2312
  重新启动apache
  
  (二)php.ini  
  把php.ini-dist复制到C:/windows 下改名为 php.ini
  extension_dir = "C:/php/ext"   //php_mysql.dll等扩展存放的目录
        去掉以下分号,以支持mysql:
  ;extension=php_mysql.dll
  把php目录下的 libmysql.dll 和 libmysqli.dll 复制到windows/system32下。
  重新启动apache

2.如何显示详细错误

修改php.ini更改error_reporting  =  E_ALL

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn