国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Apache > 正文

apache php模塊整合操作指南

2024-08-27 18:25:43
字體:
供稿:網(wǎng)友
apache的版本:
httpd-2.2.21-win32-x86-no_ssl
php的版本:
php-5[1].3.8-Win32-VC9-x86
(一) 準(zhǔn)備工作
1.先找在D:/amp/php中找到php.ini-development這個文件,然后把它改成php.ini這個文件名
2.用記事本,或editplus將其打開
(二)操作步驟:
1.告訴php所用的擴(kuò)展模塊所在位置
807行 extension_dir = "D:/amp/php/ext" 點我查看
2. 告訴php所用的時區(qū) 998行 點我查看代碼
date.timezone = PRC
3.讓apache引入php解釋引擎 點我查看
4. 如果要用php中引入相應(yīng)模塊 點我查看
注意當(dāng)在PHP中引入extension=php_curl.dll這個模塊時apache2.2就會提示找到相應(yīng)模塊。如下圖
 
這時在apache2.2的配置文件pttd.conf中加入: 點我查看
LoadFile "D:/amp/php/libeay32.dll"
LoadFile "D:/amp/php/ssleay32.dll"
5.如果整合PHP后,apache不能啟動,且測試配置文件的結(jié)果類似于下圖
 
這是因為系統(tǒng)上沒有相應(yīng)的vc編譯器的庫文件和頭文件.安裝相應(yīng)的庫文件即可.以vc9為例, 安裝 vcredist_x86.exe,即可解決
以下是在apache2.2中的操作
1):加載php模塊
例:在loadModule 語句下面,添加一行
LoadModule php5_module "D:/amp/php/php5apache2_2.dll"
2):通過聲明,讓apache能夠識別.php程序
在Addtyp 系列行附近,添加一行
AddType application/x-httpd-php .php
3):聲明php.ini配置文件的位置,使apache能夠讀取php運行的相關(guān)參數(shù).
在apache的主記錄行里(非<if Module>這樣的配置段),添加一行
PHPIniDir "D:/amp/php"
4): 重啟apache 測試效果.
代碼展示:
復(fù)制代碼 代碼如下:
[PHP]

; About php.ini ;

; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (C:/windows or C:/winnt)
; See the PHP docs for more specific information.
; http://php.net/configuration.file
; The syntax of the file is extremely simple. Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
; Directives following the section heading [PATH=/www/mysite] only
; apply to PHP files in the /www/mysite directory. Directives
; following the section heading [HOST=www.example.com] only apply to
; PHP files served from www.example.com. Directives set in these
; special sections cannot be overridden by user-defined INI files or
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 萝北县| 广河县| 长沙县| 黄大仙区| 苏尼特左旗| 东港市| 东丽区| 和田县| 蓝山县| 腾冲县| 上杭县| 温州市| 中超| 开原市| 沂水县| 营口市| 大名县| 高台县| 普洱| 图木舒克市| 泽库县| 乌兰县| 秦皇岛市| 太原市| 榕江县| 河北省| 金门县| 彭山县| 东海县| 伊川县| 若尔盖县| 平顶山市| 永济市| 嘉兴市| 上虞市| 通江县| 修水县| 梁河县| 都兰县| 镇原县| 延长县|