首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 編程語言 >  >> 網頁程式設計 >> PHP 程式設計 >> PHP 相關知識

Windows 7 手動安裝 Apache 2.2 與 PHP 5.4 環境建置筆記

     編輯:PHP 相關知識

Windows 7 手動安裝 Apache 2.2 與 PHP 5.4 環境建置筆記

目錄規劃

  • D:\www:Web 根目錄
  • D:\www\logs:日誌目錄
  • D:\www\apache2.2:Apache 安裝路徑
  • D:\www\php-5.4.21:PHP 解壓路徑(需下載 VC9 x86 Thread Safe 版)

Apache 設定 (httpd.conf)

LoadModule php5_module "D:/www/php-5.4.21/php5apache2_2.dll"
LoadFile D:/www/php-5.4.21/php5ts.dll
LoadFile D:/www/php-5.4.21/ssleay32.dll
PHPIniDir "D:/www/php-5.4.21"
AddType application/x-httpd-php .php

虛擬主機 (httpd-vhosts.conf)

NameVirtualHost *:80

    ServerName www.example.com
    DocumentRoot "E:/www/www.example.com"
    
        Options Indexes FollowSymLinks Includes
        AllowOverride All
        Order allow,deny
        Allow from all
    

PHP 設定 (php.ini)

log_errors = On
error_log = D:\www\logs\php_error.log
extension_dir = "D:\www\php-5.4.21\ext"
extension=php_mysql.dll
extension=php_curl.dll
short_open_tag = On
date.timezone = "Asia/Shanghai"
error_reporting = E_ALL & ~E_NOTICE

常見問題

APC 3.1.13 在 PHP 5.4 下可能產生 apc_cache_find 等 Notice,建議改用 Zend Opcache 或 APCu。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved