PHP Development Environment Configuration Record _php Tutorial

Source: Internet
Author: User
"Apache Installation"
Copy CodeThe code is as follows:
Httpd.exe-k install-n "apache2.2.15"
Httpd.exe-k start-n "apache2.2.15"

"Apache Uninstall"
Copy CodeThe code is as follows:
Httpd.exe-k stop-n "apache2.2.15"
Httpd.exe-k uninstall-n "apache2.2.15"

"Httpd.conf configuration Key"
Copy CodeThe code is as follows:
ServerRoot "d:/apm/apache2.2.15"
Listen 80
# Compress content sent to client gzip support
#LoadModule Deflate_module modules/mod_deflate.so
# LoadModule Cgi_module modules/mod_cgi.so
# fastcgi
LoadModule Fcgid_module modules/mod_fcgid.so
LoadModule Rewrite_module modules/mod_rewrite.so
DocumentRoot "D:/apm/apache2.2.15/htdocs"
# Support PHP Script
# fastcgi mode will comment on this line
# Configure each site to use a different version of PHP or a different CGI directly in the virtual host
#Include conf/extra/httpd-php.conf
# Fancy Directory Listings Gorgeous catalogue listing
Include conf/extra/httpd-autoindex.conf
# Virtual hosts web Hosting
#Include conf/extra/httpd-vhosts.conf
# fastcgi Mode Virtual Host
Include conf/extra/httpd-vhosts-fcgid.conf
# Various default Settings footer displays version information accessfilename. htaccess
Include conf/extra/httpd-default.conf

"Httpd-php.conf Reference"
Copy CodeThe code is as follows:
#
# Find/apm/php-5.2.12-win32 Replacement
#
SETENV PHPRC "/apm/php-5.2.12-win32"
SETENV tmp "/tmp"
# unsetenv Perl5lib
# Loading DLLs eliminates the addition of PHP paths in path
#LoadFile "/apm/php-5.2.12-win32/libpq.dll"
LoadFile "/apm/php-5.2.12-win32/libmysql.dll"
LoadFile "/apm/php-5.2.12-win32/libmcrypt.dll"
LoadFile "/apm/php-5.2.12-win32/libmhash.dll"
LoadFile "/apm/php-5.2.12-win32/libeay32.dll"
Loadfile/apm/php-5.2.12-win32/ssleay32.dll
#
# Php-module Setup
#
LoadFile "/apm/php-5.2.12-win32/php5ts.dll"
LoadModule php5_module "/apm/php-5.2.12-win32/php5apache2_2.dll"
SetHandler application/x-httpd-php
SetHandler Application/x-httpd-php-source
# Load PHP.ini File Dir
Phpinidir "/apm/php-5.2.12-win32"
AddType text/html. php. Phps

"Httpd-vhosts.conf Reference"
Copy CodeThe code is as follows:
Namevirtualhost *:80
#文档目录
DocumentRoot "/vhosts/localhost"
#名字 such as Www.php.net
ServerName localhost
#别名 such as Php.net
Serveralias 127.0.0.1
#错误日志文件
Errorlog "Logs/dummy-host.localhost-error_log"
#目录访问规则
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
#目录索引文件
DirectoryIndex index.html index.htm index.php
[HTML]
"Httpd-vhosts-fcgid.conf Reference"
[Code]
#FcgidInitialEnv PHPRC "/apm/php5210"
#FcgidInitialEnv PATH "/apm/php5210; C:/windows/system32; C:/windows; C:/windows/system32/wbem; "
#FcgidInitialEnv SystemRoot "C:/windows"
#FcgidInitialEnv systemdrive "C:"
#FcgidInitialEnv TEMP "C:/windows/temp"
#FcgidInitialEnv TMP "C:/windows/temp"
#FcgidInitialEnv windir "C:/windows"
Fcgidiotimeout 64
Fcgidconnecttimeout 16
Fcgidmaxrequestsperprocess 500
Namevirtualhost *:80
DocumentRoot "/vhosts/localhost"
ServerName localhost
Serveralias 127.0.0.1
Errorlog "Logs/dummy-host.localhost-error_log"
Options Indexes followsymlinks execcgi
#Options +execcgi
AllowOverride All
#AddHandler fcgid-script. php
#FCGIWrapper/apm/php5210/php-cgi.exe. php
#"
AddHandler fcgid-script. php
Fcgidwrapper "/apm/php-5.2.13-nts-win32/php-cgi.exe". php
#FcgidWrapper "/apm/php-5.3.2-nts-win32-vc6-x86/php-cgi.exe". php
#
Order Allow,deny
Allow from all
DirectoryIndex index.html index.htm index.php

"MySQL Installation"
Copy CodeThe code is as follows:
Mysqld-nt.exe--install mysql5.0.45-community-nt--defaults-file=d:\apm\mysql5.0.45\my.ini
net start mysql5.0.45-community-nt

"MySQL Uninstall"
Copy CodeThe code is as follows:
net stop Mysql5.0.45-community-nt
Mysqld-nt.exe--remove Mysql5.0.45-community-nt

"My.ini Reference"
Copy CodeThe code is as follows:
[Mysqld]
Basedir= "D:\APM\mysql5.0.45\"
Datadir= "D:\APM\mysql5.0.45\Data\"
Tmpdir= "D:\APM\mysql5.0.45\tmp\"
# log= "D:\APM\mysql5.0.45\tmp\mysql.log"
Default-character-set=utf8
port=3306
Interactive_timeout=5
Wait_timeout=5
Skip-locking
Skip-innodb
Skip-bdb
Ft_min_word_len=1
[Mysqld]
port=3306
Basedir= "d:/mysql/"
Datadir= "d:/mysql/data/"
Tmpdir= "d:/mysql/tmp/"
Default-character-set=utf8
Default-storage-engine=myisam
Skip-bdb
Skip-innodb
Skip-locking
key_buffer=16m
max_allowed_packet=1m
table_cache=128
Thread_cache=8
join_buffer_size=512k
sort_buffer=512k
record_buffer=512k
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=3000
Long_query_time=1
max_heap_table_size=16m
Tmp_table_size=8m
Thread_concurrency=8
Myisam_sort_buffer_size=8m
myisam_sort_buffer_size=4m
Low_priority_updates=1
Ft_min_word_len=1

"PHP.ini Configuration Reference"
Copy CodeThe code is as follows:
Output_buffering = On
Disable_functions = System,passthru,shell_exec,exec,popen,proc_open
ENABLE_DL = Off

Upload_tmp_dir = "d:/tmp/uploadtemp/"
Session.save_path = "d:/tmp/sessiondata/"
Date.timezone = "etc/gmt-8"; means gmt+8.
Mbstring.language = Neutral; Set default language to Neutral (UTF-8) (default)
mbstring.internal_encoding = UTF-8; Set internal encoding to UTF-8

Cgi.force_redirect = 0
Cgi.fix_pathinfo = 1
Fastcgi.impersonate = 1

[Eaccelerator]
; zend_extension= "/apm/ext/eaccelerator_v0_9_6_for_v5_2_13-vc6/eaccelerator.dll"
; zend_extension= "/apm/ext/eaccelerator_v1_0_svn412_for_v5_2_13-vc6/eaccelerator.dll"
Eaccelerator.shm_size= "16"
Eaccelerator.cache_dir= "/tmp/eaccelerator"
eaccelerator.enable= "1"
Eaccelerator.optimizer= "1"
Eaccelerator.check_mtime= "1"
eaccelerator.debug= "0"
; eaccelerator.log_file= "/var/log/httpd/eaccelerator_log"
Eaccelerator.filter= ""
eaccelerator.shm_max= "0"
Eaccelerator.shm_ttl= "300"
eaccelerator.shm_prune_period= "0"
eaccelerator.shm_only= "0"
eaccelerator.compress= "1"
Eaccelerator.compress_level= "9"

[Zend]
Zend_optimizer.optimization_level=15
Zend_optimizer.encoder_loader=0
; zend_extension_ts= "/apm/ext/zendoptimizer-3.3.0/lib/optimizer-3.3.0/php-5.2.x/zendoptimizer.dll"
; zend_extension= "/apm/ext/zendoptimizer_nts.dll"
; zend_extension= "/apm/ext/zendoptimizerplus.dll"

; The following is a reference configuration using the ZendExtensionManager.dll
; zend_extension_manager.optimizer_ts= "/apm/zend/zendoptimizer-3.3.0/lib/optimizer-3.3.0"
; zend_extension_ts= "/apm/zend/zendoptimizer-3.3.0/lib/zendextensionmanager.dll"
; zend_extension_manager.debug_server_ts= "/apm/zend/zendoptimizer-3.3.0/lib/zenddebugger-5.2.13-cygwin_nt-i386"
; zend_debugger.expose_remotely=always
; zend_debugger.allow_hosts=127.0.0.1/32
; zend_debugger.allow_tunnel=127.0.0.1/32
[Zenddebugger]
; Put it in the back and load it with zend_optimizer simultaneously.
; zend_extension_ts= "/apm/ext/zenddebugger-5.2.15rc1-cygwin_nt-i386/php-5.2.x/zenddebugger.dll"

[Xcache-common]
; zend_extension= "D:/apm/ext/xcache-1.3.0-php-5.2.10-nts-win32-vc6-x86/php_xcache.dll"
; Extension = Php_xcache.dll

[Xcache.admin]
Xcache.admin.enable_auth = Off
Xcache.admin.user = "MOo"
; Xcache.admin.pass = MD5 ($ your password)
Xcache.admin.pass = ""

[XCache]
; Most of the options here can be modified only in the INI, the default values are listed here, unless otherwise noted
; Select Low Level shm/allocator scheme implemenation
Xcache.shm_scheme = "Mmap"
; Disabled: xcache.size=0
; Enable: xcache.size=64m (value of any >0) also note your system Mmap upper limit
Xcache.size = 0
; Recommended set to number of CPUs (Cat/proc/cpuinfo |grep-c processor)
Xcache.count = 1
; Just a reference value, you can safely store more than this number of items (PHP script/variable)
Xcache.slots = 8K
; TTL of cached items, 0 = Permanent
Xcache.ttl = 0
; Time interval for scanning expired items, 0 = Not scanned, other values in seconds
Xcache.gc_interval = 60

; Ditto, just for variable cache settings
Xcache.var_size = 1M
Xcache.var_count = 1
Xcache.var_slots = 8K
; Default, allow Ini_set ()
Xcache.var_ttl = 0
; Maximum TTL value
Xcache.var_maxttl = 0
Xcache.var_gc_interval = 300

; For testing only
Xcache.test = Off
; Invalid when/dev/zero
Xcache.readonly_protection = Off
; For *nix Systems, Xcache.mmap_path is a file path instead of a directory (which can be nonexistent but must be created).
; If you expect to enable readonlyprotection, you can use a similar "/tmp/xcache"
; 2 php groups do not share the same/tmp/xcache
; For the WIN32 system, xcache.mmap_path= anonymous map name, not the file path. It is recommended to use XCache Word to avoid conflicts with other software
Xcache.mmap_path = "XCache"

; For *nix Systems only
; Set to null (disabled) or similar to "/tmp/phpcore/"
; Note that the directory should be able to be written by PHP (not related to Open_basedir)
Xcache.coredump_directory = ""

Xcache.cacher = On
Xcache.stat = On
Xcache.optimizer = Off

[Xcache.coverager]

; This setting is OFF automatically if xcache.coveragedump_directory is set to null
Xcache.coverager = Off

; Please ensure that this directory can be read by Coverage Viewer script (note open_basedir)
; dependent on the Xcache.coverager=on
Xcache.coveragedump_directory = ""

[Xdebug]
Xdebug.var_display_max_depth = 10
; Xdebug.remote_autostart = 1
; xdebug.remote_enable=1
; XDEBUG.REMOTE_HANDLER=DBGP
; xdebug.remote_host=127.0.0.1
; xdebug.remote_mode=req
; Xdebug.idekey=default
; xdebug.remote_log= "/xdebug.log"
; xdebug.remote_port=9000
Xdebug.auto_trace=off
; xdebug.collect_params=on
; xdebug.collect_return=on
Xdebug.trace_output_dir= "/tmp/xdebug"
Xdebug.profiler_enable=off
Xdebug.profiler_output_dir= "/tmp/xdebug"
; zend_extension_ts= "/apm/ext/xdebug/php_xdebug-2.0.5-5.2.dll"
; zend_extension= "/apm/ext/xdebug/php_xdebug-2.0.5-5.2-nts.dll"
zend_extension= "/apm/ext/xdebug/php_xdebug-2.1.0beta3-5.2-vc6-nts.dll"

"IIS ISAPI"
Copy CodeThe code is as follows:
Add environment variable phprc=d:\php This is the path that notifies IIS to read the php.ini file.
Adding D:\PHP in Path can read the relevant dynamic link library.
Add a new Web service extension PHP d:\php\php5isapi.dll
Add Application extension Mapping executable file d:\php\php5isapi.dll extension. php
Restarting IIS PHP is ready for use.

"IIS FastCGI PHP"
Copy CodeThe code is as follows:
This does not add an environment variable and modify the path variable.
Install fastcgi First, and the installer will automatically add
Web Service Extensions-FastCGI Handler
C:\windows\system32\inetsrv\fcgiext.dll
and set to allow.
Modify C:\windows\system32\inetsrv\fcgiext.ini
[Types]
php=php
[PHP]
Exepath=d:\php\php-cgi.exe
instancemaxrequests=10000
environmentvars=php_fcgi_max_requests:10000
Add Application extension Mapping executable file c:\windows\system32\inetsrv\fcgiext.dll extension. php
Restarting IIS is all right.

"Isapi_rewrite Reference"
Copy CodeThe code is as follows:
Rewriteengine on
Rewritebase/

Rewritecond%{http_host} ^03188.net [NC]
Rewriterule ^ (. *) $ http://www.03188.net/$1 [l,r=301]

# # # # Rewritecond%{request_uri} ^[a-z]{3,9}\/index\.php\ HTTP/
# Rewriterule ^index\. (php|htm|html) $ http://www.03188.net/[r=301,l]

Rewriterule ^ ([a-z]+)/(. *)/(. *)/(. *) \.htm$ index.php?action=$1&option=$2&extent=$3&info=$4 [L]
Rewriterule ^ ([a-z]+)/(. *)/(. *) \.htm$ index.php?action=$1&option=$2&extent=$3&info=$3 [L]
Rewriterule ^ ([a-z]+)/(. *) \.htm$ index.php?action=$1&option=$2 [L]
Rewriterule ^ ([a-z]+) \.htm$ index.php?action=$1 [L]

# rewriterule ^ (. *) \.asp$ http://www.03188.net [l,r=301]
# Modify the crawled URL in full mode to make it valid
# Rewriterule ^index\.php/([a-z]+)/(. *)/(. *) \.htm$ $1/$2/$3\.htm [l,r=301]
# Rewriterule ^index\.php/([a-z]+)/(. *) \.htm$ $1/$2\.htm [l,r=301]

# Changes to the forum after the move appears no input file specified.
# Rewriterule ^bbs/(. *) $ http://bbs.03188.net/$1 [l,r=301]

# Edit HR HR
# Rewriterule ^hr/(. *) $ http://hr.03188.net/$1 [l,r=301]

http://www.bkjia.com/PHPjc/322833.html www.bkjia.com true http://www.bkjia.com/PHPjc/322833.html techarticle the "Apache Installation" copy code code is as follows: Httpd.exe-k install-n "apache2.2.15" httpd.exe-k start-n "apache2.2.15" "Apache Unload" copy code as follows : Httpd.exe-k ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.