[Win服务器] Windows Server 2016 PHP运行环境安装配置

602 0
王子 2022-10-19 15:02:59 | 显示全部楼层 |阅读模式


1、下载PHP
官网地址:
http://php.net/
下载地址:
http://php.net/downloads.php






2、下载Windows Service Wrapper
官网地址:
https://github.com/kohsuke/winsw/
下载地址:
http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/








3、解压PHP压缩包文件到C盘根目录,并且重命名为php


4、将"winsw-1.19-bin.exe"重命名为"php-service.exe",并且复制到PHP根目录


5、在PHP根目录编写php-service.xml文件


php-service.xml文件内容
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <service>
  3. <id>PHP</id>
  4. <name>PHP</name>
  5. <description>本服务用于加载PHP服务,请确保开机启动。</description>
  6. <logpath>C:\php\logs</logpath>
  7. <executable>php-cgi.exe</executable>
  8. <arguments>-b 127.0.0.1:9000 -c php.ini</arguments>
  9. <logmode>rotate</logmode>
  10. </service>
复制代码
6、创建服务日志目录
在PHP根目录创建网站目录,命名为"logs"。


7、配置PHP
配置PHP环境变量
按下Win+X+Y键
进入Win系统界面
点击"高级系统设置"—>"高级"—>"环境变量"







在环境变量中,设置三个属性,分别为:
PHP_HOME,Path
(大小写无所谓),若已存在则点击"编辑",不存在则点击"新建"。
a、设置PHP_HOME
变量名:PHP_HOME
变量值:C:\php(PHP安装路径)



b、设置Path
变量名:Path
变量值:%PHP_HOME%



环境变量配置完成之后测试是否成功
按下Win+X+C键
打开命令提示符
输入:php -v
看到如下图,说明已经配置成功了。


8、安装PHP系统服务或者卸载PHP系统服务
8.1、安装PHP系统服务
按下Win+X+A键
打开命令提示符(管理员)
输入:
C:\php\php-service.exe install




8.2、卸载PHP系统服务
按下Win+X+A键
打开命令提示符(管理员)
输入:
C:\php\php-service.exe uninstall


9、查看系统服务
9.1、进入服务

运行Win+R输入:
services.msc




9.2、PHP系统服务属性


10、编辑PHP配置文件
PHP配置文件目录:
C:\php


10.1、将"php.ini-production"文件重命名为"php.ini"。
10.2、编辑PHP配置文件php.ini
  1. [PHP]
  2. ;;;;;;;;;;;;;;;;;;;
  3. ; About php.ini  ;
  4. ;;;;;;;;;;;;;;;;;;;
  5. ; PHP's initialization file, generally called php.ini, is responsible for
  6. ; configuring many of the aspects of PHP's behavior.
  7. ; PHP attempts to find and load this configuration from a number of locations.
  8. ; The following is a summary of its search order:
  9. ; 1. SAPI module specific location.
  10. ; 2. The PHPRC environment variable. (As of PHP 5.2.0)
  11. ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
  12. ; 4. Current working directory (except CLI)
  13. ; 5. The web server's directory (for SAPI modules), or directory of PHP
  14. ; (otherwise in Windows)
  15. ; 6. The directory from the --with-config-file-path compile time option, or the
  16. ; Windows directory (C:\windows or C:\winnt)
  17. ; See the PHP docs for more specific information.
  18. ; [url=http://php.net/configuration.file]http://php.net/configuration.file[/url]
  19. ; The syntax of the file is extremely simple. Whitespace and lines
  20. ; beginning with a semicolon are silently ignored (as you probably guessed).
  21. ; Section headers (e.g. [Foo]) are also silently ignored, even though
  22. ; they might mean something in the future.
  23. ; Directives following the section heading [PATH=/www/mysite] only
  24. ; apply to PHP files in the /www/mysite directory. Directives
  25. ; following the section heading [HOST=www.example.com] only apply to
  26. ; PHP files served from [url=http://www.example.com.]www.example.com.[/url] Directives set in these
  27. ; special sections cannot be overridden by user-defined INI files or
  28. ; at runtime. Currently, [PATH=] and [HOST=] sections only work under
  29. ; CGI/FastCGI.
  30. ; [url=http://php.net/ini.sections]http://php.net/ini.sections[/url]
  31. ; Directives are specified using the following syntax:
  32. ; directive = value
  33. ; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
  34. ; Directives are variables used to configure PHP or PHP extensions.
  35. ; There is no name validation. If PHP can't find an expected
  36. ; directive because it is not set or is mistyped, a default value will be used.
  37. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
  38. ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
  39. ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
  40. ; previously set variable or directive (e.g. ${foo})
  41. ; Expressions in the INI file are limited to bitwise operators and parentheses:
  42. ; | bitwise OR
  43. ; ^ bitwise XOR
  44. ; & bitwise AND
  45. ; ~ bitwise NOT
  46. ; ! boolean NOT
  47. ; Boolean flags can be turned on using the values 1, On, True or Yes.
  48. ; They can be turned off using the values 0, Off, False or No.
  49. ; An empty string can be denoted by simply not writing anything after the equal
  50. ; sign, or by using the None keyword:
  51. ; foo =     ; sets foo to an empty string
  52. ; foo = None  ; sets foo to an empty string
  53. ; foo = "None" ; sets foo to the string 'None'
  54. ; If you use constants in your value, and these constants belong to a
  55. ; dynamically loaded extension (either a PHP extension or a Zend extension),
  56. ; you may only use these constants *after* the line that loads the extension.
  57. ;;;;;;;;;;;;;;;;;;;
  58. ; About this file ;
  59. ;;;;;;;;;;;;;;;;;;;
  60. ; PHP comes packaged with two INI files. One that is recommended to be used
  61. ; in production environments and one that is recommended to be used in
  62. ; development environments.
  63. ; php.ini-production contains settings which hold security, performance and
  64. ; best practices at its core. But please be aware, these settings may break
  65. ; compatibility with older or less security conscience applications. We
  66. ; recommending using the production ini in production and testing environments.
  67. ; php.ini-development is very similar to its production variant, except it is
  68. ; much more verbose when it comes to errors. We recommend using the
  69. ; development version only in development environments, as errors shown to
  70. ; application users can inadvertently leak otherwise secure information.
  71. ; This is php.ini-production INI file.
  72. ;;;;;;;;;;;;;;;;;;;
  73. ; Quick Reference ;
  74. ;;;;;;;;;;;;;;;;;;;
  75. ; The following are all the settings which are different in either the production
  76. ; or development versions of the INIs with respect to PHP's default behavior.
  77. ; Please see the actual settings later in the document for more details as to why
  78. ; we recommend these changes in PHP's behavior.
  79. ; display_errors
  80. ;  Default Value: On
  81. ;  Development Value: On
  82. ;  Production Value: Off
  83. ; display_startup_errors
  84. ;  Default Value: Off
  85. ;  Development Value: On
  86. ;  Production Value: Off
  87. ; error_reporting
  88. ;  Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
  89. ;  Development Value: E_ALL
  90. ;  Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
  91. ; html_errors
  92. ;  Default Value: On
  93. ;  Development Value: On
  94. ;  Production value: On
  95. ; log_errors
  96. ;  Default Value: Off
  97. ;  Development Value: On
  98. ;  Production Value: On
  99. ; max_input_time
  100. ;  Default Value: -1 (Unlimited)
  101. ;  Development Value: 60 (60 seconds)
  102. ;  Production Value: 60 (60 seconds)
  103. ; output_buffering
  104. ;  Default Value: Off
  105. ;  Development Value: 4096
  106. ;  Production Value: 4096
  107. ; register_argc_argv
  108. ;  Default Value: On
  109. ;  Development Value: Off
  110. ;  Production Value: Off
  111. ; request_order
  112. ;  Default Value: None
  113. ;  Development Value: "GP"
  114. ;  Production Value: "GP"
  115. ; session.gc_divisor
  116. ;  Default Value: 100
  117. ;  Development Value: 1000
  118. ;  Production Value: 1000
  119. ; session.hash_bits_per_character
  120. ;  Default Value: 4
  121. ;  Development Value: 5
  122. ;  Production Value: 5
  123. ;开启短标签
  124. short_open_tag
  125. Default Value: On
  126. Development Value: Off
  127. Production Value: Off
  128. ; track_errors
  129. ;  Default Value: Off
  130. ;  Development Value: On
  131. ;  Production Value: Off
  132. ; url_rewriter.tags
  133. ;  Default Value: "a=href,area=href,frame=src,form=,fieldset="
  134. ;  Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
  135. ;  Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
  136. ; variables_order
  137. ;  Default Value: "EGPCS"
  138. ;  Development Value: "GPCS"
  139. ;  Production Value: "GPCS"
  140. ;;;;;;;;;;;;;;;;;;;;
  141. ; php.ini Options ;
  142. ;;;;;;;;;;;;;;;;;;;;
  143. ; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
  144. ;user_ini.filename = ".user.ini"
  145. ; To disable this feature set this option to empty value
  146. ;user_ini.filename =
  147. ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
  148. ;user_ini.cache_ttl = 300
  149. ;;;;;;;;;;;;;;;;;;;;
  150. ; Language Options ;
  151. ;;;;;;;;;;;;;;;;;;;;
  152. ; Enable the PHP scripting language engine under Apache.
  153. ; [url=http://php.net/engine]http://php.net/engine[/url]
  154. engine = On
  155. ; This directive determines whether or not PHP will recognize code between
  156. ; <? and ?> tags as PHP source which should be processed as such. It is
  157. ; generally recommended that <?php and ?> should be used and that this feature
  158. ; should be disabled, as enabling it may result in issues when generating XML
  159. ; documents, however this remains supported for backward compatibility reasons.
  160. ; Note that this directive does not control the <?= shorthand tag, which can be
  161. ; used regardless of this directive.
  162. ; Default Value: On
  163. ; Development Value: Off
  164. ; Production Value: Off
  165. ; [url=http://php.net/short-open-tag]http://php.net/short-open-tag[/url]
  166. ;开启短语标签
  167. short_open_tag = On
  168. ; The number of significant digits displayed in floating point numbers.
  169. ; [url=http://php.net/precision]http://php.net/precision[/url]
  170. precision = 14
  171. ; Output buffering is a mechanism for controlling how much output data
  172. ; (excluding headers and cookies) PHP should keep internally before pushing that
  173. ; data to the client. If your application's output exceeds this setting, PHP
  174. ; will send that data in chunks of roughly the size you specify.
  175. ; Turning on this setting and managing its maximum buffer size can yield some
  176. ; interesting side-effects depending on your application and web server.
  177. ; You may be able to send headers and cookies after you've already sent output
  178. ; through print or echo. You also may see performance benefits if your server is
  179. ; emitting less packets due to buffered output versus PHP streaming the output
  180. ; as it gets it. On production servers, 4096 bytes is a good setting for performance
  181. ; reasons.
  182. ; Note: Output buffering can also be controlled via Output Buffering Control
  183. ;  functions.
  184. ; Possible Values:
  185. ;  On = Enabled and buffer is unlimited. (Use with caution)
  186. ;  Off = Disabled
  187. ;  Integer = Enables the buffer and sets its maximum size in bytes.
  188. ; Note: This directive is hardcoded to Off for the CLI SAPI
  189. ; Default Value: Off
  190. ; Development Value: 4096
  191. ; Production Value: 4096
  192. ; [url=http://php.net/output-buffering]http://php.net/output-buffering[/url]
  193. output_buffering = 4096
  194. ; You can redirect all of the output of your scripts to a function. For
  195. ; example, if you set output_handler to "mb_output_handler", character
  196. ; encoding will be transparently converted to the specified encoding.
  197. ; Setting any output handler automatically turns on output buffering.
  198. ; Note: People who wrote portable scripts should not depend on this ini
  199. ;  directive. Instead, explicitly set the output handler using ob_start().
  200. ;  Using this ini directive may cause problems unless you know what script
  201. ;  is doing.
  202. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
  203. ;  and you cannot use both "ob_gzhandler" and "zlib.output_compression".
  204. ; Note: output_handler must be empty if this is set 'On' !!!!
  205. ;  Instead you must use zlib.output_handler.
  206. ; [url=http://php.net/output-handler]http://php.net/output-handler[/url]
  207. ;output_handler =
  208. ; Transparent output compression using the zlib library
  209. ; Valid values for this option are 'off', 'on', or a specific buffer size
  210. ; to be used for compression (default is 4KB)
  211. ; Note: Resulting chunk size may vary due to nature of compression. PHP
  212. ;  outputs chunks that are few hundreds bytes each as a result of
  213. ;  compression. If you prefer a larger chunk size for better
  214. ;  performance, enable output_buffering in addition.
  215. ; Note: You need to use zlib.output_handler instead of the standard
  216. ;  output_handler, or otherwise the output will be corrupted.
  217. ; [url=http://php.net/zlib.output-compression]http://php.net/zlib.output-compression[/url]
  218. zlib.output_compression = Off
  219. ; [url=http://php.net/zlib.output-compression-level]http://php.net/zlib.output-compression-level[/url]
  220. ;zlib.output_compression_level = -1
  221. ; You cannot specify additional output handlers if zlib.output_compression
  222. ; is activated here. This setting does the same as output_handler but in
  223. ; a different order.
  224. ; [url=http://php.net/zlib.output-handler]http://php.net/zlib.output-handler[/url]
  225. ;zlib.output_handler =
  226. ; Implicit flush tells PHP to tell the output layer to flush itself
  227. ; automatically after every output block. This is equivalent to calling the
  228. ; PHP function flush() after each and every call to print() or echo() and each
  229. ; and every HTML block. Turning this option on has serious performance
  230. ; implications and is generally recommended for debugging purposes only.
  231. ; [url=http://php.net/implicit-flush]http://php.net/implicit-flush[/url]
  232. ; Note: This directive is hardcoded to On for the CLI SAPI
  233. implicit_flush = Off
  234. ; The unserialize callback function will be called (with the undefined class'
  235. ; name as parameter), if the unserializer finds an undefined class
  236. ; which should be instantiated. A warning appears if the specified function is
  237. ; not defined, or if the function doesn't include/implement the missing class.
  238. ; So only set this entry, if you really want to implement such a
  239. ; callback-function.
  240. unserialize_callback_func =
  241. ; When floats & doubles are serialized store serialize_precision significant
  242. ; digits after the floating point. The default value ensures that when floats
  243. ; are decoded with unserialize, the data will remain the same.
  244. serialize_precision = 17
  245. ; open_basedir, if set, limits all file operations to the defined directory
  246. ; and below. This directive makes most sense if used in a per-directory
  247. ; or per-virtualhost web server configuration file.
  248. ; [url=http://php.net/open-basedir]http://php.net/open-basedir[/url]
  249. ;open_basedir =
  250. ; This directive allows you to disable certain functions for security reasons.
  251. ; It receives a comma-delimited list of function names.
  252. ; [url=http://php.net/disable-functions]http://php.net/disable-functions[/url]
  253. disable_functions =
  254. ; This directive allows you to disable certain classes for security reasons.
  255. ; It receives a comma-delimited list of class names.
  256. ; [url=http://php.net/disable-classes]http://php.net/disable-classes[/url]
  257. disable_classes =
  258. ; Colors for Syntax Highlighting mode. Anything that's acceptable in
  259. ; <span style="color: ???????"> would work.
  260. ; [url=http://php.net/syntax-highlighting]http://php.net/syntax-highlighting[/url]
  261. ;highlight.string = #DD0000
  262. ;highlight.comment = #FF9900
  263. ;highlight.keyword = #007700
  264. ;highlight.default = #0000BB
  265. ;highlight.html  = #000000
  266. ; If enabled, the request will be allowed to complete even if the user aborts
  267. ; the request. Consider enabling it if executing long requests, which may end up
  268. ; being interrupted by the user or a browser timing out. PHP's default behavior
  269. ; is to disable this feature.
  270. ; [url=http://php.net/ignore-user-abort]http://php.net/ignore-user-abort[/url]
  271. ;ignore_user_abort = On
  272. ; Determines the size of the realpath cache to be used by PHP. This value should
  273. ; be increased on systems where PHP opens many files to reflect the quantity of
  274. ; the file operations performed.
  275. ; [url=http://php.net/realpath-cache-size]http://php.net/realpath-cache-size[/url]
  276. ;realpath_cache_size = 16k
  277. ; Duration of time, in seconds for which to cache realpath information for a given
  278. ; file or directory. For systems with rarely changing files, consider increasing this
  279. ; value.
  280. ; [url=http://php.net/realpath-cache-ttl]http://php.net/realpath-cache-ttl[/url]
  281. ;realpath_cache_ttl = 120
  282. ; Enables or disables the circular reference collector.
  283. ; [url=http://php.net/zend.enable-gc]http://php.net/zend.enable-gc[/url]
  284. zend.enable_gc = On
  285. ; If enabled, scripts may be written in encodings that are incompatible with
  286. ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such
  287. ; encodings. To use this feature, mbstring extension must be enabled.
  288. ; Default: Off
  289. ;zend.multibyte = Off
  290. ; Allows to set the default encoding for the scripts. This value will be used
  291. ; unless "declare(encoding=...)" directive appears at the top of the script.
  292. ; Only affects if zend.multibyte is set.
  293. ; Default: ""
  294. ;zend.script_encoding =
  295. ;;;;;;;;;;;;;;;;;
  296. ; Miscellaneous ;
  297. ;;;;;;;;;;;;;;;;;
  298. ; Decides whether PHP may expose the fact that it is installed on the server
  299. ; (e.g. by adding its signature to the Web server header). It is no security
  300. ; threat in any way, but it makes it possible to determine whether you use PHP
  301. ; on your server or not.
  302. ; [url=http://php.net/expose-php]http://php.net/expose-php[/url]
  303. expose_php = On
  304. ;;;;;;;;;;;;;;;;;;;
  305. ; Resource Limits ;
  306. ;;;;;;;;;;;;;;;;;;;
  307. ; Maximum execution time of each script, in seconds
  308. ; [url=http://php.net/max-execution-time]http://php.net/max-execution-time[/url]
  309. ; Note: This directive is hardcoded to 0 for the CLI SAPI
  310. ;PHP页面运行的最大时间值
  311. max_execution_time = 600
  312. ; Maximum amount of time each script may spend parsing request data. It's a good
  313. ; idea to limit this time on productions servers in order to eliminate unexpectedly
  314. ; long running scripts.
  315. ; Note: This directive is hardcoded to -1 for the CLI SAPI
  316. ; Default Value: -1 (Unlimited)
  317. ; Development Value: 60 (60 seconds)
  318. ; Production Value: 60 (60 seconds)
  319. ; [url=http://php.net/max-input-time]http://php.net/max-input-time[/url]
  320. ;PHP脚本解析请求数据所用的时间
  321. max_input_time = 600
  322. ; Maximum input variable nesting level
  323. ; [url=http://php.net/max-input-nesting-level]http://php.net/max-input-nesting-level[/url]
  324. ;max_input_nesting_level = 64
  325. ; How many GET/POST/COOKIE input variables may be accepted
  326. ; max_input_vars = 1000
  327. ; Maximum amount of memory a script may consume (128MB)
  328. ; [url=http://php.net/memory-limit]http://php.net/memory-limit[/url]
  329. memory_limit = 128M
  330. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  331. ; Error handling and logging ;
  332. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  333. ; This directive informs PHP of which errors, warnings and notices you would like
  334. ; it to take action for. The recommended way of setting values for this
  335. ; directive is through the use of the error level constants and bitwise
  336. ; operators. The error level constants are below here for convenience as well as
  337. ; some common settings and their meanings.
  338. ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
  339. ; those related to E_NOTICE and E_STRICT, which together cover best practices and
  340. ; recommended coding standards in PHP. For performance reasons, this is the
  341. ; recommend error reporting setting. Your production server shouldn't be wasting
  342. ; resources complaining about best practices and coding standards. That's what
  343. ; development servers and development settings are for.
  344. ; Note: The php.ini-development file has this setting as E_ALL. This
  345. ; means it pretty much reports everything which is exactly what you want during
  346. ; development and early testing.
  347. ;
  348. ; Error Level Constants:
  349. ; E_ALL       - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
  350. ; E_ERROR      - fatal run-time errors
  351. ; E_RECOVERABLE_ERROR - almost fatal run-time errors
  352. ; E_WARNING     - run-time warnings (non-fatal errors)
  353. ; E_PARSE      - compile-time parse errors
  354. ; E_NOTICE     - run-time notices (these are warnings which often result
  355. ;           from a bug in your code, but it's possible that it was
  356. ;           intentional (e.g., using an uninitialized variable and
  357. ;           relying on the fact it is automatically initialized to an
  358. ;           empty string)
  359. ; E_STRICT     - run-time notices, enable to have PHP suggest changes
  360. ;           to your code which will ensure the best interoperability
  361. ;           and forward compatibility of your code
  362. ; E_CORE_ERROR   - fatal errors that occur during PHP's initial startup
  363. ; E_CORE_WARNING  - warnings (non-fatal errors) that occur during PHP's
  364. ;           initial startup
  365. ; E_COMPILE_ERROR  - fatal compile-time errors
  366. ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
  367. ; E_USER_ERROR   - user-generated error message
  368. ; E_USER_WARNING  - user-generated warning message
  369. ; E_USER_NOTICE   - user-generated notice message
  370. ; E_DEPRECATED   - warn about code that will not work in future versions
  371. ;           of PHP
  372. ; E_USER_DEPRECATED - user-generated deprecation warnings
  373. ;
  374. ; Common Values:
  375. ;  E_ALL (Show all errors, warnings and notices including coding standards.)
  376. ;  E_ALL & ~E_NOTICE (Show all errors, except for notices)
  377. ;  E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
  378. ;  E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
  379. ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
  380. ; Development Value: E_ALL
  381. ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
  382. ; [url=http://php.net/error-reporting]http://php.net/error-reporting[/url]
  383. ;消除警告
  384. error_reporting = E_ALL & ~E_NOTICE
  385. ; This directive controls whether or not and where PHP will output errors,
  386. ; notices and warnings too. Error output is very useful during development, but
  387. ; it could be very dangerous in production environments. Depending on the code
  388. ; which is triggering the error, sensitive information could potentially leak
  389. ; out of your application such as database usernames and passwords or worse.
  390. ; For production environments, we recommend logging errors rather than
  391. ; sending them to STDOUT.
  392. ; Possible Values:
  393. ;  Off = Do not display any errors
  394. ;  stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
  395. ;  On or stdout = Display errors to STDOUT
  396. ; Default Value: On
  397. ; Development Value: On
  398. ; Production Value: Off
  399. ; [url=http://php.net/display-errors]http://php.net/display-errors[/url]
  400. display_errors = Off
  401. ; The display of errors which occur during PHP's startup sequence are handled
  402. ; separately from display_errors. PHP's default behavior is to suppress those
  403. ; errors from clients. Turning the display of startup errors on can be useful in
  404. ; debugging configuration problems. We strongly recommend you
  405. ; set this to 'off' for production servers.
  406. ; Default Value: Off
  407. ; Development Value: On
  408. ; Production Value: Off
  409. ; [url=http://php.net/display-startup-errors]http://php.net/display-startup-errors[/url]
  410. display_startup_errors = Off
  411. ; Besides displaying errors, PHP can also log errors to locations such as a
  412. ; server-specific log, STDERR, or a location specified by the error_log
  413. ; directive found below. While errors should not be displayed on productions
  414. ; servers they should still be monitored and logging is a great way to do that.
  415. ; Default Value: Off
  416. ; Development Value: On
  417. ; Production Value: On
  418. ; [url=http://php.net/log-errors]http://php.net/log-errors[/url]
  419. log_errors = On
  420. ; Set maximum length of log_errors. In error_log information about the source is
  421. ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
  422. ; [url=http://php.net/log-errors-max-len]http://php.net/log-errors-max-len[/url]
  423. log_errors_max_len = 1024
  424. ; Do not log repeated messages. Repeated errors must occur in same file on same
  425. ; line unless ignore_repeated_source is set true.
  426. ; [url=http://php.net/ignore-repeated-errors]http://php.net/ignore-repeated-errors[/url]
  427. ignore_repeated_errors = Off
  428. ; Ignore source of message when ignoring repeated messages. When this setting
  429. ; is On you will not log errors with repeated messages from different files or
  430. ; source lines.
  431. ; [url=http://php.net/ignore-repeated-source]http://php.net/ignore-repeated-source[/url]
  432. ignore_repeated_source = Off
  433. ; If this parameter is set to Off, then memory leaks will not be shown (on
  434. ; stdout or in the log). This has only effect in a debug compile, and if
  435. ; error reporting includes E_WARNING in the allowed list
  436. ; [url=http://php.net/report-memleaks]http://php.net/report-memleaks[/url]
  437. report_memleaks = On
  438. ; This setting is on by default.
  439. ;report_zend_debug = 0
  440. ; Store the last error/warning message in $php_errormsg (boolean). Setting this value
  441. ; to On can assist in debugging and is appropriate for development servers. It should
  442. ; however be disabled on production servers.
  443. ; Default Value: Off
  444. ; Development Value: On
  445. ; Production Value: Off
  446. ; [url=http://php.net/track-errors]http://php.net/track-errors[/url]
  447. track_errors = Off
  448. ; Turn off normal error reporting and emit XML-RPC error XML
  449. ; [url=http://php.net/xmlrpc-errors]http://php.net/xmlrpc-errors[/url]
  450. ;xmlrpc_errors = 0
  451. ; An XML-RPC faultCode
  452. ;xmlrpc_error_number = 0
  453. ; When PHP displays or logs an error, it has the capability of formatting the
  454. ; error message as HTML for easier reading. This directive controls whether
  455. ; the error message is formatted as HTML or not.
  456. ; Note: This directive is hardcoded to Off for the CLI SAPI
  457. ; Default Value: On
  458. ; Development Value: On
  459. ; Production value: On
  460. ; [url=http://php.net/html-errors]http://php.net/html-errors[/url]
  461. html_errors = On
  462. ; If html_errors is set to On *and* docref_root is not empty, then PHP
  463. ; produces clickable error messages that direct to a page describing the error
  464. ; or function causing the error in detail.
  465. ; You can download a copy of the PHP manual from [url=http://php.net/docs]http://php.net/docs[/url]
  466. ; and change docref_root to the base URL of your local copy including the
  467. ; leading '/'. You must also specify the file extension being used including
  468. ; the dot. PHP's default behavior is to leave these settings empty, in which
  469. ; case no links to documentation are generated.
  470. ; Note: Never use this feature for production boxes.
  471. ; [url=http://php.net/docref-root]http://php.net/docref-root[/url]
  472. ; Examples
  473. ;docref_root = "/phpmanual/"
  474. ; [url=http://php.net/docref-ext]http://php.net/docref-ext[/url]
  475. ;docref_ext = .html
  476. ; String to output before an error message. PHP's default behavior is to leave
  477. ; this setting blank.
  478. ; [url=http://php.net/error-prepend-string]http://php.net/error-prepend-string[/url]
  479. ; Example:
  480. ;error_prepend_string = "<span style='color: #ff0000'>"
  481. ; String to output after an error message. PHP's default behavior is to leave
  482. ; this setting blank.
  483. ; [url=http://php.net/error-append-string]http://php.net/error-append-string[/url]
  484. ; Example:
  485. ;error_append_string = "</span>"
  486. ; Log errors to specified file. PHP's default behavior is to leave this value
  487. ; empty.
  488. ; [url=http://php.net/error-log]http://php.net/error-log[/url]
  489. ; Example:
  490. ;error_log = php_errors.log
  491. ; Log errors to syslog (Event Log on Windows).
  492. ;error_log = syslog
  493. ;windows.show_crt_warning
  494. ; Default value: 0
  495. ; Development value: 0
  496. ; Production value: 0
  497. ;;;;;;;;;;;;;;;;;
  498. ; Data Handling ;
  499. ;;;;;;;;;;;;;;;;;
  500. ; The separator used in PHP generated URLs to separate arguments.
  501. ; PHP's default setting is "&".
  502. ; [url=http://php.net/arg-separator.output]http://php.net/arg-separator.output[/url]
  503. ; Example:
  504. ;arg_separator.output = "&"
  505. ; List of separator(s) used by PHP to parse input URLs into variables.
  506. ; PHP's default setting is "&".
  507. ; NOTE: Every character in this directive is considered as separator!
  508. ; [url=http://php.net/arg-separator.input]http://php.net/arg-separator.input[/url]
  509. ; Example:
  510. ;arg_separator.input = ";&"
  511. ; This directive determines which super global arrays are registered when PHP
  512. ; starts up. G,P,C,E & S are abbreviations for the following respective super
  513. ; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
  514. ; paid for the registration of these arrays and because ENV is not as commonly
  515. ; used as the others, ENV is not recommended on productions servers. You
  516. ; can still get access to the environment variables through getenv() should you
  517. ; need to.
  518. ; Default Value: "EGPCS"
  519. ; Development Value: "GPCS"
  520. ; Production Value: "GPCS";
  521. ; [url=http://php.net/variables-order]http://php.net/variables-order[/url]
  522. variables_order = "GPCS"
  523. ; This directive determines which super global data (G,P & C) should be
  524. ; registered into the super global array REQUEST. If so, it also determines
  525. ; the order in which that data is registered. The values for this directive
  526. ; are specified in the same manner as the variables_order directive,
  527. ; EXCEPT one. Leaving this value empty will cause PHP to use the value set
  528. ; in the variables_order directive. It does not mean it will leave the super
  529. ; globals array REQUEST empty.
  530. ; Default Value: None
  531. ; Development Value: "GP"
  532. ; Production Value: "GP"
  533. ; [url=http://php.net/request-order]http://php.net/request-order[/url]
  534. request_order = "GP"
  535. ; This directive determines whether PHP registers $argv & $argc each time it
  536. ; runs. $argv contains an array of all the arguments passed to PHP when a script
  537. ; is invoked. $argc contains an integer representing the number of arguments
  538. ; that were passed when the script was invoked. These arrays are extremely
  539. ; useful when running scripts from the command line. When this directive is
  540. ; enabled, registering these variables consumes CPU cycles and memory each time
  541. ; a script is executed. For performance reasons, this feature should be disabled
  542. ; on production servers.
  543. ; Note: This directive is hardcoded to On for the CLI SAPI
  544. ; Default Value: On
  545. ; Development Value: Off
  546. ; Production Value: Off
  547. ; [url=http://php.net/register-argc-argv]http://php.net/register-argc-argv[/url]
  548. register_argc_argv = Off
  549. ; When enabled, the ENV, REQUEST and SERVER variables are created when they're
  550. ; first used (Just In Time) instead of when the script starts. If these
  551. ; variables are not used within a script, having this directive on will result
  552. ; in a performance gain. The PHP directive register_argc_argv must be disabled
  553. ; for this directive to have any affect.
  554. ; [url=http://php.net/auto-globals-jit]http://php.net/auto-globals-jit[/url]
  555. auto_globals_jit = On
  556. ; Whether PHP will read the POST data.
  557. ; This option is enabled by default.
  558. ; Most likely, you won't want to disable this option globally. It causes $_POST
  559. ; and $_FILES to always be empty; the only way you will be able to read the
  560. ; POST data will be through the php://input stream wrapper. This can be useful
  561. ; to proxy requests or to process the POST data in a memory efficient fashion.
  562. ; [url=http://php.net/enable-post-data-reading]http://php.net/enable-post-data-reading[/url]
  563. ;enable_post_data_reading = Off
  564. ; Maximum size of POST data that PHP will accept.
  565. ; Its value may be 0 to disable the limit. It is ignored if POST data reading
  566. ; is disabled through enable_post_data_reading.
  567. ; [url=http://php.net/post-max-size]http://php.net/post-max-size[/url]
  568. ;表单POST给PHP的所能接收的最大值
  569. post_max_size = 100M
  570. ; Automatically add files before PHP document.
  571. ; [url=http://php.net/auto-prepend-file]http://php.net/auto-prepend-file[/url]
  572. auto_prepend_file =
  573. ; Automatically add files after PHP document.
  574. ; [url=http://php.net/auto-append-file]http://php.net/auto-append-file[/url]
  575. auto_append_file =
  576. ; By default, PHP will output a media type using the Content-Type header. To
  577. ; disable this, simply set it to be empty.
  578. ;
  579. ; PHP's built-in default media type is set to text/html.
  580. ; [url=http://php.net/default-mimetype]http://php.net/default-mimetype[/url]
  581. default_mimetype = "text/html"
  582. ; PHP's default character set is set to UTF-8.
  583. ; [url=http://php.net/default-charset]http://php.net/default-charset[/url]
  584. default_charset = "UTF-8"
  585. ; PHP internal character encoding is set to empty.
  586. ; If empty, default_charset is used.
  587. ; [url=http://php.net/internal-encoding]http://php.net/internal-encoding[/url]
  588. ;internal_encoding =
  589. ; PHP input character encoding is set to empty.
  590. ; If empty, default_charset is used.
  591. ; [url=http://php.net/input-encoding]http://php.net/input-encoding[/url]
  592. ;input_encoding =
  593. ; PHP output character encoding is set to empty.
  594. ; If empty, default_charset is used.
  595. ; See also output_buffer.
  596. ; [url=http://php.net/output-encoding]http://php.net/output-encoding[/url]
  597. ;output_encoding =
  598. ;;;;;;;;;;;;;;;;;;;;;;;;;
  599. ; Paths and Directories ;
  600. ;;;;;;;;;;;;;;;;;;;;;;;;;
  601. ; UNIX: "/path1:/path2"
  602. ;include_path = ".:/php/includes"
  603. ;
  604. ; Windows: "\path1;\path2"
  605. ;include_path = ".;c:\php\includes"
  606. ;
  607. ; PHP's default setting for include_path is ".;/path/to/php/pear"
  608. ; [url=http://php.net/include-path]http://php.net/include-path[/url]
  609. ; The root of the PHP pages, used only if nonempty.
  610. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
  611. ; if you are running php as a CGI under any web server (other than IIS)
  612. ; see documentation for security issues. The alternate is to use the
  613. ; cgi.force_redirect configuration below
  614. ; [url=http://php.net/doc-root]http://php.net/doc-root[/url]
  615. doc_root =
  616. ; The directory under which PHP opens the script using /~username used only
  617. ; if nonempty.
  618. ; [url=http://php.net/user-dir]http://php.net/user-dir[/url]
  619. user_dir =
  620. ; Directory in which the loadable extensions (modules) reside.
  621. ; [url=http://php.net/extension-dir]http://php.net/extension-dir[/url]
  622. ; extension_dir = "./"
  623. ; On windows:
  624. ;模块路径
  625. extension_dir = "C:\php\ext"
  626. ; Directory where the temporary files should be placed.
  627. ; Defaults to the system default (see sys_get_temp_dir)
  628. ; sys_temp_dir = "/tmp"
  629. ; Whether or not to enable the dl() function. The dl() function does NOT work
  630. ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
  631. ; disabled on them.
  632. ; [url=http://php.net/enable-dl]http://php.net/enable-dl[/url]
  633. ;允许用户在运行时加载PHP扩展,即在脚本运行期间加载。
  634. enable_dl = Off
  635. ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
  636. ; most web servers. Left undefined, PHP turns this on by default. You can
  637. ; turn it off here AT YOUR OWN RISK
  638. ; **You CAN safely turn this off for IIS, in fact, you MUST.**
  639. ; [url=http://php.net/cgi.force-redirect]http://php.net/cgi.force-redirect[/url]
  640. ;以fast—CGI模式运行PHP
  641. cgi.force_redirect = 0
  642. ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
  643. ; every request. PHP's default behavior is to disable this feature.
  644. ;cgi.nph = 1
  645. ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
  646. ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
  647. ; will look for to know it is OK to continue execution. Setting this variable MAY
  648. ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
  649. ; [url=http://php.net/cgi.redirect-status-env]http://php.net/cgi.redirect-status-env[/url]
  650. ;cgi.redirect_status_env =
  651. ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
  652. ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
  653. ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
  654. ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
  655. ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
  656. ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
  657. ; [url=http://php.net/cgi.fix-pathinfo]http://php.net/cgi.fix-pathinfo[/url]
  658. ;cgi.fix_pathinfo=1
  659. ; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside
  660. ; of the web tree and people will not be able to circumvent .htaccess security.
  661. ; [url=http://php.net/cgi.dicard-path]http://php.net/cgi.dicard-path[/url]
  662. ;cgi.discard_path=1
  663. ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
  664. ; security tokens of the calling client. This allows IIS to define the
  665. ; security context that the request runs under. mod_fastcgi under Apache
  666. ; does not currently support this feature (03/17/2002)
  667. ; Set to 1 if running under IIS. Default is zero.
  668. ; [url=http://php.net/fastcgi.impersonate]http://php.net/fastcgi.impersonate[/url]
  669. fastcgi.impersonate = 1
  670. ; Disable logging through FastCGI connection. PHP's default behavior is to enable
  671. ; this feature.
  672. ;fastcgi.logging = 0
  673. ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
  674. ; use when sending HTTP response code. If set to 0, PHP sends Status: header that
  675. ; is supported by Apache. When this option is set to 1, PHP will send
  676. ; RFC2616 compliant header.
  677. ; Default is zero.
  678. ; [url=http://php.net/cgi.rfc2616-headers]http://php.net/cgi.rfc2616-headers[/url]
  679. cgi.rfc2616_headers = 1
  680. ; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #!
  681. ; (shebang) at the top of the running script. This line might be needed if the
  682. ; script support running both as stand-alone script and via PHP CGI<. PHP in CGI
  683. ; mode skips this line and ignores its content if this directive is turned on.
  684. ; [url=http://php.net/cgi.check-shebang-line]http://php.net/cgi.check-shebang-line[/url]
  685. ;cgi.check_shebang_line=1
  686. ;;;;;;;;;;;;;;;;
  687. ; File Uploads ;
  688. ;;;;;;;;;;;;;;;;
  689. ; Whether to allow HTTP file uploads.
  690. ; [url=http://php.net/file-uploads]http://php.net/file-uploads[/url]
  691. file_uploads = On
  692. ; Temporary directory for HTTP uploaded files (will use system default if not
  693. ; specified).
  694. ; [url=http://php.net/upload-tmp-dir]http://php.net/upload-tmp-dir[/url]
  695. ;文件临时目录
  696. upload_tmp_dir ="C:\wwwroot\tmp"
  697. ; Maximum allowed size for uploaded files.
  698. ; [url=http://php.net/upload-max-filesize]http://php.net/upload-max-filesize[/url]
  699. ;上传文件最大值
  700. upload_max_filesize = 50M
  701. ; Maximum number of files that can be uploaded via a single request
  702. max_file_uploads = 20
  703. ;;;;;;;;;;;;;;;;;;
  704. ; Fopen wrappers ;
  705. ;;;;;;;;;;;;;;;;;;
  706. ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
  707. ; [url=http://php.net/allow-url-fopen]http://php.net/allow-url-fopen[/url]
  708. allow_url_fopen = On
  709. ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
  710. ; [url=http://php.net/allow-url-include]http://php.net/allow-url-include[/url]
  711. allow_url_include = Off
  712. ; Define the anonymous ftp password (your email address). PHP's default setting
  713. ; for this is empty.
  714. ; [url=http://php.net/from]http://php.net/from[/url]
  715. ;from="john@doe.com"
  716. ; Define the User-Agent string. PHP's default setting for this is empty.
  717. ; [url=http://php.net/user-agent]http://php.net/user-agent[/url]
  718. ;user_agent="PHP"
  719. ; Default timeout for socket based streams (seconds)
  720. ; [url=http://php.net/default-socket-timeout]http://php.net/default-socket-timeout[/url]
  721. default_socket_timeout = 60
  722. ; If your scripts have to deal with files from Macintosh systems,
  723. ; or you are running on a Mac and need to deal with files from
  724. ; unix or win32 systems, setting this flag will cause PHP to
  725. ; automatically detect the EOL character in those files so that
  726. ; fgets() and file() will work regardless of the source of the file.
  727. ; [url=http://php.net/auto-detect-line-endings]http://php.net/auto-detect-line-endings[/url]
  728. ;auto_detect_line_endings = Off
  729. ;;;;;;;;;;;;;;;;;;;;;;
  730. ; Dynamic Extensions ;
  731. ;;;;;;;;;;;;;;;;;;;;;;
  732. ; If you wish to have an extension loaded automatically, use the following
  733. ; syntax:
  734. ;
  735. ;  extension=modulename.extension
  736. ;
  737. ; For example, on Windows:
  738. ;
  739. ;  extension=msql.dll
  740. ;
  741. ; ... or under UNIX:
  742. ;
  743. ;  extension=msql.so
  744. ;
  745. ; ... or with a path:
  746. ;
  747. ;  extension=/path/to/extension/msql.so
  748. ;
  749. ; If you only provide the name of the extension, PHP will look for it in its
  750. ; default extension directory.
  751. ;
  752. ; Windows Extensions
  753. ; Note that ODBC support is built in, so no dll is needed for it.
  754. ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
  755. ; extension folders as well as the separate PECL DLL download (PHP 5+).
  756. ; Be sure to appropriately set the extension_dir directive.
  757. ;
  758. extension=php_bz2.dll
  759. extension=php_curl.dll
  760. extension=php_fileinfo.dll
  761. extension=php_ftp.dll
  762. extension=php_gd2.dll
  763. extension=php_gettext.dll
  764. extension=php_gmp.dll
  765. extension=php_intl.dll
  766. extension=php_imap.dll
  767. ;extension=php_interbase.dll
  768. extension=php_ldap.dll
  769. extension=php_mbstring.dll
  770. ;extension=php_exif.dll   ; Must be after mbstring as it depends on it
  771. extension=php_mysqli.dll
  772. ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
  773. extension=php_openssl.dll
  774. ;extension=php_pdo_firebird.dll
  775. extension=php_pdo_mysql.dll
  776. ;extension=php_pdo_oci.dll
  777. extension=php_pdo_odbc.dll
  778. extension=php_pdo_pgsql.dll
  779. extension=php_pdo_sqlite.dll
  780. extension=php_pgsql.dll
  781. extension=php_shmop.dll
  782. ; The MIBS data available in the PHP distribution must be installed.
  783. ; See [url=http://www.php.net/manual/en/snmp.installation.php]http://www.php.net/manual/en/snmp.installation.php[/url]
  784. ;extension=php_snmp.dll
  785. extension=php_soap.dll
  786. extension=php_sockets.dll
  787. extension=php_sqlite3.dll
  788. extension=php_tidy.dll
  789. extension=php_xmlrpc.dll
  790. extension=php_xsl.dll
  791. ;;;;;;;;;;;;;;;;;;;
  792. ; Module Settings ;
  793. ;;;;;;;;;;;;;;;;;;;
  794. [CLI Server]
  795. ; Whether the CLI web server uses ANSI color coding in its terminal output.
  796. cli_server.color = On
  797. [Date]
  798. ; Defines the default timezone used by the date functions
  799. ; [url=http://php.net/date.timezone]http://php.net/date.timezone[/url]
  800. ;时区
  801. date.timezone =Asia/Shanghai
  802. ; [url=http://php.net/date.default-latitude]http://php.net/date.default-latitude[/url]
  803. ;date.default_latitude = 31.7667
  804. ; [url=http://php.net/date.default-longitude]http://php.net/date.default-longitude[/url]
  805. ;date.default_longitude = 35.2333
  806. ; [url=http://php.net/date.sunrise-zenith]http://php.net/date.sunrise-zenith[/url]
  807. ;date.sunrise_zenith = 90.583333
  808. ; [url=http://php.net/date.sunset-zenith]http://php.net/date.sunset-zenith[/url]
  809. ;date.sunset_zenith = 90.583333
  810. [filter]
  811. ; [url=http://php.net/filter.default]http://php.net/filter.default[/url]
  812. ;filter.default = unsafe_raw
  813. ; [url=http://php.net/filter.default-flags]http://php.net/filter.default-flags[/url]
  814. ;filter.default_flags =
  815. [iconv]
  816. ; Use of this INI entry is deprecated, use global input_encoding instead.
  817. ; If empty, default_charset or input_encoding or iconv.input_encoding is used.
  818. ; The precedence is: default_charset < intput_encoding < iconv.input_encoding
  819. ;iconv.input_encoding =
  820. ; Use of this INI entry is deprecated, use global internal_encoding instead.
  821. ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
  822. ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
  823. ;iconv.internal_encoding =
  824. ; Use of this INI entry is deprecated, use global output_encoding instead.
  825. ; If empty, default_charset or output_encoding or iconv.output_encoding is used.
  826. ; The precedence is: default_charset < output_encoding < iconv.output_encoding
  827. ; To use an output encoding conversion, iconv's output handler must be set
  828. ; otherwise output encoding conversion cannot be performed.
  829. ;iconv.output_encoding =
  830. [intl]
  831. ;intl.default_locale =
  832. ; This directive allows you to produce PHP errors when some error
  833. ; happens within intl functions. The value is the level of the error produced.
  834. ; Default is 0, which does not produce any errors.
  835. ;intl.error_level = E_WARNING
  836. ;intl.use_exceptions = 0
  837. [sqlite3]
  838. ;sqlite3.extension_dir =
  839. [Pcre]
  840. ;PCRE library backtracking limit.
  841. ; [url=http://php.net/pcre.backtrack-limit]http://php.net/pcre.backtrack-limit[/url]
  842. ;pcre.backtrack_limit=100000
  843. ;PCRE library recursion limit.
  844. ;Please note that if you set this value to a high number you may consume all
  845. ;the available process stack and eventually crash PHP (due to reaching the
  846. ;stack size limit imposed by the Operating System).
  847. ; [url=http://php.net/pcre.recursion-limit]http://php.net/pcre.recursion-limit[/url]
  848. ;pcre.recursion_limit=100000
  849. ;Enables or disables JIT compilation of patterns. This requires the PCRE
  850. ;library to be compiled with JIT support.
  851. ;pcre.jit=1
  852. [Pdo]
  853. ; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
  854. ; [url=http://php.net/pdo-odbc.connection-pooling]http://php.net/pdo-odbc.connection-pooling[/url]
  855. ;pdo_odbc.connection_pooling=strict
  856. ;pdo_odbc.db2_instance_name
  857. [Pdo_mysql]
  858. ; If mysqlnd is used: Number of cache slots for the internal result set cache
  859. ; [url=http://php.net/pdo_mysql.cache_size]http://php.net/pdo_mysql.cache_size[/url]
  860. pdo_mysql.cache_size = 2000
  861. ; Default socket name for local MySQL connects. If empty, uses the built-in
  862. ; MySQL defaults.
  863. ; [url=http://php.net/pdo_mysql.default-socket]http://php.net/pdo_mysql.default-socket[/url]
  864. pdo_mysql.default_socket=
  865. [Phar]
  866. ; [url=http://php.net/phar.readonly]http://php.net/phar.readonly[/url]
  867. ;phar.readonly = On
  868. ; [url=http://php.net/phar.require-hash]http://php.net/phar.require-hash[/url]
  869. ;phar.require_hash = On
  870. ;phar.cache_list =
  871. [mail function]
  872. ; For Win32 only.
  873. ; [url=http://php.net/smtp]http://php.net/smtp[/url]
  874. SMTP = localhost
  875. ; [url=http://php.net/smtp-port]http://php.net/smtp-port[/url]
  876. smtp_port = 25
  877. ; For Win32 only.
  878. ; [url=http://php.net/sendmail-from]http://php.net/sendmail-from[/url]
  879. ;sendmail_from = [url=mailto:me@example.com]me@example.com[/url]
  880. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  881. ; [url=http://php.net/sendmail-path]http://php.net/sendmail-path[/url]
  882. ;sendmail_path =
  883. ; Force the addition of the specified parameters to be passed as extra parameters
  884. ; to the sendmail binary. These parameters will always replace the value of
  885. ; the 5th parameter to mail().
  886. ;mail.force_extra_parameters =
  887. ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
  888. mail.add_x_header = On
  889. ; The path to a log file that will log all mail() calls. Log entries include
  890. ; the full path of the script, line number, To address and headers.
  891. ;mail.log =
  892. ; Log mail to syslog (Event Log on Windows).
  893. ;mail.log = syslog
  894. [SQL]
  895. ; [url=http://php.net/sql.safe-mode]http://php.net/sql.safe-mode[/url]
  896. sql.safe_mode = Off
  897. [ODBC]
  898. ; [url=http://php.net/odbc.default-db]http://php.net/odbc.default-db[/url]
  899. ;odbc.default_db  = Not yet implemented
  900. ; [url=http://php.net/odbc.default-user]http://php.net/odbc.default-user[/url]
  901. ;odbc.default_user = Not yet implemented
  902. ; [url=http://php.net/odbc.default-pw]http://php.net/odbc.default-pw[/url]
  903. ;odbc.default_pw  = Not yet implemented
  904. ; Controls the ODBC cursor model.
  905. ; Default: SQL_CURSOR_STATIC (default).
  906. ;odbc.default_cursortype
  907. ; Allow or prevent persistent links.
  908. ; [url=http://php.net/odbc.allow-persistent]http://php.net/odbc.allow-persistent[/url]
  909. odbc.allow_persistent = On
  910. ; Check that a connection is still valid before reuse.
  911. ; [url=http://php.net/odbc.check-persistent]http://php.net/odbc.check-persistent[/url]
  912. odbc.check_persistent = On
  913. ; Maximum number of persistent links. -1 means no limit.
  914. ; [url=http://php.net/odbc.max-persistent]http://php.net/odbc.max-persistent[/url]
  915. odbc.max_persistent = -1
  916. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  917. ; [url=http://php.net/odbc.max-links]http://php.net/odbc.max-links[/url]
  918. odbc.max_links = -1
  919. ; Handling of LONG fields. Returns number of bytes to variables. 0 means
  920. ; passthru.
  921. ; [url=http://php.net/odbc.defaultlrl]http://php.net/odbc.defaultlrl[/url]
  922. odbc.defaultlrl = 4096
  923. ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
  924. ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
  925. ; of odbc.defaultlrl and odbc.defaultbinmode
  926. ; [url=http://php.net/odbc.defaultbinmode]http://php.net/odbc.defaultbinmode[/url]
  927. odbc.defaultbinmode = 1
  928. ;birdstep.max_links = -1
  929. [Interbase]
  930. ; Allow or prevent persistent links.
  931. ibase.allow_persistent = 1
  932. ; Maximum number of persistent links. -1 means no limit.
  933. ibase.max_persistent = -1
  934. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  935. ibase.max_links = -1
  936. ; Default database name for ibase_connect().
  937. ;ibase.default_db =
  938. ; Default username for ibase_connect().
  939. ;ibase.default_user =
  940. ; Default password for ibase_connect().
  941. ;ibase.default_password =
  942. ; Default charset for ibase_connect().
  943. ;ibase.default_charset =
  944. ; Default timestamp format.
  945. ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
  946. ; Default date format.
  947. ibase.dateformat = "%Y-%m-%d"
  948. ; Default time format.
  949. ibase.timeformat = "%H:%M:%S"
  950. [MySQLi]
  951. ; Maximum number of persistent links. -1 means no limit.
  952. ; [url=http://php.net/mysqli.max-persistent]http://php.net/mysqli.max-persistent[/url]
  953. mysqli.max_persistent = -1
  954. ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
  955. ; [url=http://php.net/mysqli.allow_local_infile]http://php.net/mysqli.allow_local_infile[/url]
  956. ;mysqli.allow_local_infile = On
  957. ; Allow or prevent persistent links.
  958. ; [url=http://php.net/mysqli.allow-persistent]http://php.net/mysqli.allow-persistent[/url]
  959. mysqli.allow_persistent = On
  960. ; Maximum number of links. -1 means no limit.
  961. ; [url=http://php.net/mysqli.max-links]http://php.net/mysqli.max-links[/url]
  962. mysqli.max_links = -1
  963. ; If mysqlnd is used: Number of cache slots for the internal result set cache
  964. ; [url=http://php.net/mysqli.cache_size]http://php.net/mysqli.cache_size[/url]
  965. mysqli.cache_size = 2000
  966. ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
  967. ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
  968. ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
  969. ; at MYSQL_PORT.
  970. ; [url=http://php.net/mysqli.default-port]http://php.net/mysqli.default-port[/url]
  971. mysqli.default_port = 3306
  972. ; Default socket name for local MySQL connects. If empty, uses the built-in
  973. ; MySQL defaults.
  974. ; [url=http://php.net/mysqli.default-socket]http://php.net/mysqli.default-socket[/url]
  975. mysqli.default_socket =
  976. ; Default host for mysql_connect() (doesn't apply in safe mode).
  977. ; [url=http://php.net/mysqli.default-host]http://php.net/mysqli.default-host[/url]
  978. mysqli.default_host =
  979. ; Default user for mysql_connect() (doesn't apply in safe mode).
  980. ; [url=http://php.net/mysqli.default-user]http://php.net/mysqli.default-user[/url]
  981. mysqli.default_user =
  982. ; Default password for mysqli_connect() (doesn't apply in safe mode).
  983. ; Note that this is generally a *bad* idea to store passwords in this file.
  984. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
  985. ; and reveal this password! And of course, any users with read access to this
  986. ; file will be able to reveal the password as well.
  987. ; [url=http://php.net/mysqli.default-pw]http://php.net/mysqli.default-pw[/url]
  988. mysqli.default_pw =
  989. ; Allow or prevent reconnect
  990. mysqli.reconnect = Off
  991. [mysqlnd]
  992. ; Enable / Disable collection of general statistics by mysqlnd which can be
  993. ; used to tune and monitor MySQL operations.
  994. ; [url=http://php.net/mysqlnd.collect_statistics]http://php.net/mysqlnd.collect_statistics[/url]
  995. mysqlnd.collect_statistics = On
  996. ; Enable / Disable collection of memory usage statistics by mysqlnd which can be
  997. ; used to tune and monitor MySQL operations.
  998. ; [url=http://php.net/mysqlnd.collect_memory_statistics]http://php.net/mysqlnd.collect_memory_statistics[/url]
  999. mysqlnd.collect_memory_statistics = Off
  1000. ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
  1001. ; [url=http://php.net/mysqlnd.net_cmd_buffer_size]http://php.net/mysqlnd.net_cmd_buffer_size[/url]
  1002. ;mysqlnd.net_cmd_buffer_size = 2048
  1003. ; Size of a pre-allocated buffer used for reading data sent by the server in
  1004. ; bytes.
  1005. ; [url=http://php.net/mysqlnd.net_read_buffer_size]http://php.net/mysqlnd.net_read_buffer_size[/url]
  1006. ;mysqlnd.net_read_buffer_size = 32768
  1007. [OCI8]
  1008. ; Connection: Enables privileged connections using external
  1009. ; credentials (OCI_SYSOPER, OCI_SYSDBA)
  1010. ; [url=http://php.net/oci8.privileged-connect]http://php.net/oci8.privileged-connect[/url]
  1011. ;oci8.privileged_connect = Off
  1012. ; Connection: The maximum number of persistent OCI8 connections per
  1013. ; process. Using -1 means no limit.
  1014. ; [url=http://php.net/oci8.max-persistent]http://php.net/oci8.max-persistent[/url]
  1015. ;oci8.max_persistent = -1
  1016. ; Connection: The maximum number of seconds a process is allowed to
  1017. ; maintain an idle persistent connection. Using -1 means idle
  1018. ; persistent connections will be maintained forever.
  1019. ; [url=http://php.net/oci8.persistent-timeout]http://php.net/oci8.persistent-timeout[/url]
  1020. ;oci8.persistent_timeout = -1
  1021. ; Connection: The number of seconds that must pass before issuing a
  1022. ; ping during oci_pconnect() to check the connection validity. When
  1023. ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
  1024. ; pings completely.
  1025. ; [url=http://php.net/oci8.ping-interval]http://php.net/oci8.ping-interval[/url]
  1026. ;oci8.ping_interval = 60
  1027. ; Connection: Set this to a user chosen connection class to be used
  1028. ; for all pooled server requests with Oracle 11g Database Resident
  1029. ; Connection Pooling (DRCP). To use DRCP, this value should be set to
  1030. ; the same string for all web servers running the same application,
  1031. ; the database pool must be configured, and the connection string must
  1032. ; specify to use a pooled server.
  1033. ;oci8.connection_class =
  1034. ; High Availability: Using On lets PHP receive Fast Application
  1035. ; Notification (FAN) events generated when a database node fails. The
  1036. ; database must also be configured to post FAN events.
  1037. ;oci8.events = Off
  1038. ; Tuning: This option enables statement caching, and specifies how
  1039. ; many statements to cache. Using 0 disables statement caching.
  1040. ; [url=http://php.net/oci8.statement-cache-size]http://php.net/oci8.statement-cache-size[/url]
  1041. ;oci8.statement_cache_size = 20
  1042. ; Tuning: Enables statement prefetching and sets the default number of
  1043. ; rows that will be fetched automatically after statement execution.
  1044. ; [url=http://php.net/oci8.default-prefetch]http://php.net/oci8.default-prefetch[/url]
  1045. ;oci8.default_prefetch = 100
  1046. ; Compatibility. Using On means oci_close() will not close
  1047. ; oci_connect() and oci_new_connect() connections.
  1048. ; [url=http://php.net/oci8.old-oci-close-semantics]http://php.net/oci8.old-oci-close-semantics[/url]
  1049. ;oci8.old_oci_close_semantics = Off
  1050. [PostgreSQL]
  1051. ; Allow or prevent persistent links.
  1052. ; [url=http://php.net/pgsql.allow-persistent]http://php.net/pgsql.allow-persistent[/url]
  1053. pgsql.allow_persistent = On
  1054. ; Detect broken persistent links always with pg_pconnect().
  1055. ; Auto reset feature requires a little overheads.
  1056. ; [url=http://php.net/pgsql.auto-reset-persistent]http://php.net/pgsql.auto-reset-persistent[/url]
  1057. pgsql.auto_reset_persistent = Off
  1058. ; Maximum number of persistent links. -1 means no limit.
  1059. ; [url=http://php.net/pgsql.max-persistent]http://php.net/pgsql.max-persistent[/url]
  1060. pgsql.max_persistent = -1
  1061. ; Maximum number of links (persistent+non persistent). -1 means no limit.
  1062. ; [url=http://php.net/pgsql.max-links]http://php.net/pgsql.max-links[/url]
  1063. pgsql.max_links = -1
  1064. ; Ignore PostgreSQL backends Notice message or not.
  1065. ; Notice message logging require a little overheads.
  1066. ; [url=http://php.net/pgsql.ignore-notice]http://php.net/pgsql.ignore-notice[/url]
  1067. pgsql.ignore_notice = 0
  1068. ; Log PostgreSQL backends Notice message or not.
  1069. ; Unless pgsql.ignore_notice=0, module cannot log notice message.
  1070. ; [url=http://php.net/pgsql.log-notice]http://php.net/pgsql.log-notice[/url]
  1071. pgsql.log_notice = 0
  1072. [bcmath]
  1073. ; Number of decimal digits for all bcmath functions.
  1074. ; [url=http://php.net/bcmath.scale]http://php.net/bcmath.scale[/url]
  1075. bcmath.scale = 0
  1076. [browscap]
  1077. ; [url=http://php.net/browscap]http://php.net/browscap[/url]
  1078. ;browscap = extra/browscap.ini
  1079. [Session]
  1080. ; Handler used to store/retrieve data.
  1081. ; [url=http://php.net/session.save-handler]http://php.net/session.save-handler[/url]
  1082. session.save_handler = files
  1083. ; Argument passed to save_handler. In the case of files, this is the path
  1084. ; where data files are stored. Note: Windows users have to change this
  1085. ; variable in order to use PHP's session functions.
  1086. ;
  1087. ; The path can be defined as:
  1088. ;
  1089. ;   session.save_path = "N;/path"
  1090. ;
  1091. ; where N is an integer. Instead of storing all the session files in
  1092. ; /path, what this will do is use subdirectories N-levels deep, and
  1093. ; store the session data in those directories. This is useful if
  1094. ; your OS has problems with many files in one directory, and is
  1095. ; a more efficient layout for servers that handle many sessions.
  1096. ;
  1097. ; NOTE 1: PHP will not create this directory structure automatically.
  1098. ;     You can use the script in the ext/session dir for that purpose.
  1099. ; NOTE 2: See the section on garbage collection below if you choose to
  1100. ;     use subdirectories for session storage
  1101. ;
  1102. ; The file storage module creates files using mode 600 by default.
  1103. ; You can change that by using
  1104. ;
  1105. ;   session.save_path = "N;MODE;/path"
  1106. ;
  1107. ; where MODE is the octal representation of the mode. Note that this
  1108. ; does not overwrite the process's umask.
  1109. ; [url=http://php.net/session.save-path]http://php.net/session.save-path[/url]
  1110. ;session.save_path = "/tmp"
  1111. ; Whether to use strict session mode.
  1112. ; Strict session mode does not accept uninitialized session ID and regenerate
  1113. ; session ID if browser sends uninitialized session ID. Strict mode protects
  1114. ; applications from session fixation via session adoption vulnerability. It is
  1115. ; disabled by default for maximum compatibility, but enabling it is encouraged.
  1116. ; [url=https://wiki.php.net/rfc/strict_sessions]https://wiki.php.net/rfc/strict_sessions[/url]
  1117. session.use_strict_mode = 0
  1118. ; Whether to use cookies.
  1119. ; [url=http://php.net/session.use-cookies]http://php.net/session.use-cookies[/url]
  1120. session.use_cookies = 1
  1121. ; [url=http://php.net/session.cookie-secure]http://php.net/session.cookie-secure[/url]
  1122. ;session.cookie_secure =
  1123. ; This option forces PHP to fetch and use a cookie for storing and maintaining
  1124. ; the session id. We encourage this operation as it's very helpful in combating
  1125. ; session hijacking when not specifying and managing your own session id. It is
  1126. ; not the be-all and end-all of session hijacking defense, but it's a good start.
  1127. ; [url=http://php.net/session.use-only-cookies]http://php.net/session.use-only-cookies[/url]
  1128. session.use_only_cookies = 1
  1129. ; Name of the session (used as cookie name).
  1130. ; [url=http://php.net/session.name]http://php.net/session.name[/url]
  1131. session.name = PHPSESSID
  1132. ; Initialize session on request startup.
  1133. ; [url=http://php.net/session.auto-start]http://php.net/session.auto-start[/url]
  1134. session.auto_start = 0
  1135. ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
  1136. ; [url=http://php.net/session.cookie-lifetime]http://php.net/session.cookie-lifetime[/url]
  1137. session.cookie_lifetime = 0
  1138. ; The path for which the cookie is valid.
  1139. ; [url=http://php.net/session.cookie-path]http://php.net/session.cookie-path[/url]
  1140. session.cookie_path = /
  1141. ; The domain for which the cookie is valid.
  1142. ; [url=http://php.net/session.cookie-domain]http://php.net/session.cookie-domain[/url]
  1143. session.cookie_domain =
  1144. ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
  1145. ; [url=http://php.net/session.cookie-httponly]http://php.net/session.cookie-httponly[/url]
  1146. session.cookie_httponly =
  1147. ; Handler used to serialize data. php is the standard serializer of PHP.
  1148. ; [url=http://php.net/session.serialize-handler]http://php.net/session.serialize-handler[/url]
  1149. session.serialize_handler = php
  1150. ; Defines the probability that the 'garbage collection' process is started
  1151. ; on every session initialization. The probability is calculated by using
  1152. ; gc_probability/gc_divisor. Where session.gc_probability is the numerator
  1153. ; and gc_divisor is the denominator in the equation. Setting this value to 1
  1154. ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
  1155. ; the gc will run on any give request.
  1156. ; Default Value: 1
  1157. ; Development Value: 1
  1158. ; Production Value: 1
  1159. ; [url=http://php.net/session.gc-probability]http://php.net/session.gc-probability[/url]
  1160. session.gc_probability = 1
  1161. ; Defines the probability that the 'garbage collection' process is started on every
  1162. ; session initialization. The probability is calculated by using the following equation:
  1163. ; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
  1164. ; session.gc_divisor is the denominator in the equation. Setting this value to 1
  1165. ; when the session.gc_divisor value is 100 will give you approximately a 1% chance
  1166. ; the gc will run on any give request. Increasing this value to 1000 will give you
  1167. ; a 0.1% chance the gc will run on any give request. For high volume production servers,
  1168. ; this is a more efficient approach.
  1169. ; Default Value: 100
  1170. ; Development Value: 1000
  1171. ; Production Value: 1000
  1172. ; [url=http://php.net/session.gc-divisor]http://php.net/session.gc-divisor[/url]
  1173. session.gc_divisor = 1000
  1174. ; After this number of seconds, stored data will be seen as 'garbage' and
  1175. ; cleaned up by the garbage collection process.
  1176. ; [url=http://php.net/session.gc-maxlifetime]http://php.net/session.gc-maxlifetime[/url]
  1177. session.gc_maxlifetime = 1440
  1178. ; NOTE: If you are using the subdirectory option for storing session files
  1179. ;    (see session.save_path above), then garbage collection does *not*
  1180. ;    happen automatically. You will need to do your own garbage
  1181. ;    collection through a shell script, cron entry, or some other method.
  1182. ;    For example, the following script would is the equivalent of
  1183. ;    setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
  1184. ;     find /path/to/sessions -cmin +24 -type f | xargs rm
  1185. ; Check HTTP Referer to invalidate externally stored URLs containing ids.
  1186. ; HTTP_REFERER has to contain this substring for the session to be
  1187. ; considered as valid.
  1188. ; [url=http://php.net/session.referer-check]http://php.net/session.referer-check[/url]
  1189. session.referer_check =
  1190. ; How many bytes to read from the file.
  1191. ; [url=http://php.net/session.entropy-length]http://php.net/session.entropy-length[/url]
  1192. ;session.entropy_length = 32
  1193. ; Specified here to create the session id.
  1194. ; [url=http://php.net/session.entropy-file]http://php.net/session.entropy-file[/url]
  1195. ; Defaults to /dev/urandom
  1196. ; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom
  1197. ; If neither are found at compile time, the default is no entropy file.
  1198. ; On windows, setting the entropy_length setting will activate the
  1199. ; Windows random source (using the CryptoAPI)
  1200. ;session.entropy_file = /dev/urandom
  1201. ; Set to {nocache,private,public,} to determine HTTP caching aspects
  1202. ; or leave this empty to avoid sending anti-caching headers.
  1203. ; [url=http://php.net/session.cache-limiter]http://php.net/session.cache-limiter[/url]
  1204. session.cache_limiter = nocache
  1205. ; Document expires after n minutes.
  1206. ; [url=http://php.net/session.cache-expire]http://php.net/session.cache-expire[/url]
  1207. session.cache_expire = 180
  1208. ; trans sid support is disabled by default.
  1209. ; Use of trans sid may risk your users' security.
  1210. ; Use this option with caution.
  1211. ; - User may send URL contains active session ID
  1212. ;  to other person via. email/irc/etc.
  1213. ; - URL that contains active session ID may be stored
  1214. ;  in publicly accessible computer.
  1215. ; - User may access your site with the same session ID
  1216. ;  always using URL stored in browser's history or bookmarks.
  1217. ; [url=http://php.net/session.use-trans-sid]http://php.net/session.use-trans-sid[/url]
  1218. session.use_trans_sid = 0
  1219. ; Select a hash function for use in generating session ids.
  1220. ; Possible Values
  1221. ;  0 (MD5 128 bits)
  1222. ;  1 (SHA-1 160 bits)
  1223. ; This option may also be set to the name of any hash function supported by
  1224. ; the hash extension. A list of available hashes is returned by the hash_algos()
  1225. ; function.
  1226. ; [url=http://php.net/session.hash-function]http://php.net/session.hash-function[/url]
  1227. session.hash_function = 0
  1228. ; Define how many bits are stored in each character when converting
  1229. ; the binary hash data to something readable.
  1230. ; Possible values:
  1231. ;  4 (4 bits: 0-9, a-f)
  1232. ;  5 (5 bits: 0-9, a-v)
  1233. ;  6 (6 bits: 0-9, a-z, A-Z, "-", ",")
  1234. ; Default Value: 4
  1235. ; Development Value: 5
  1236. ; Production Value: 5
  1237. ; [url=http://php.net/session.hash-bits-per-character]http://php.net/session.hash-bits-per-character[/url]
  1238. session.hash_bits_per_character = 5
  1239. ; The URL rewriter will look for URLs in a defined set of HTML tags.
  1240. ; form/fieldset are special; if you include them here, the rewriter will
  1241. ; add a hidden <input> field with the info which is otherwise appended
  1242. ; to URLs. If you want XHTML conformity, remove the form entry.
  1243. ; Note that all valid entries require a "=", even if no value follows.
  1244. ; Default Value: "a=href,area=href,frame=src,form=,fieldset="
  1245. ; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
  1246. ; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
  1247. ; [url=http://php.net/url-rewriter.tags]http://php.net/url-rewriter.tags[/url]
  1248. url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
  1249. ; Enable upload progress tracking in $_SESSION
  1250. ; Default Value: On
  1251. ; Development Value: On
  1252. ; Production Value: On
  1253. ; [url=http://php.net/session.upload-progress.enabled]http://php.net/session.upload-progress.enabled[/url]
  1254. ;session.upload_progress.enabled = On
  1255. ; Cleanup the progress information as soon as all POST data has been read
  1256. ; (i.e. upload completed).
  1257. ; Default Value: On
  1258. ; Development Value: On
  1259. ; Production Value: On
  1260. ; [url=http://php.net/session.upload-progress.cleanup]http://php.net/session.upload-progress.cleanup[/url]
  1261. ;session.upload_progress.cleanup = On
  1262. ; A prefix used for the upload progress key in $_SESSION
  1263. ; Default Value: "upload_progress_"
  1264. ; Development Value: "upload_progress_"
  1265. ; Production Value: "upload_progress_"
  1266. ; [url=http://php.net/session.upload-progress.prefix]http://php.net/session.upload-progress.prefix[/url]
  1267. ;session.upload_progress.prefix = "upload_progress_"
  1268. ; The index name (concatenated with the prefix) in $_SESSION
  1269. ; containing the upload progress information
  1270. ; Default Value: "PHP_SESSION_UPLOAD_PROGRESS"
  1271. ; Development Value: "PHP_SESSION_UPLOAD_PROGRESS"
  1272. ; Production Value: "PHP_SESSION_UPLOAD_PROGRESS"
  1273. ; [url=http://php.net/session.upload-progress.name]http://php.net/session.upload-progress.name[/url]
  1274. ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
  1275. ; How frequently the upload progress should be updated.
  1276. ; Given either in percentages (per-file), or in bytes
  1277. ; Default Value: "1%"
  1278. ; Development Value: "1%"
  1279. ; Production Value: "1%"
  1280. ; [url=http://php.net/session.upload-progress.freq]http://php.net/session.upload-progress.freq[/url]
  1281. ;session.upload_progress.freq = "1%"
  1282. ; The minimum delay between updates, in seconds
  1283. ; Default Value: 1
  1284. ; Development Value: 1
  1285. ; Production Value: 1
  1286. ; [url=http://php.net/session.upload-progress.min-freq]http://php.net/session.upload-progress.min-freq[/url]
  1287. ;session.upload_progress.min_freq = "1"
  1288. ; Only write session data when session data is changed. Enabled by default.
  1289. ; [url=http://php.net/session.lazy-write]http://php.net/session.lazy-write[/url]
  1290. ;session.lazy_write = On
  1291. [Assertion]
  1292. ; Switch whether to compile assertions at all (to have no overhead at run-time)
  1293. ; -1: Do not compile at all
  1294. ; 0: Jump over assertion at run-time
  1295. ; 1: Execute assertions
  1296. ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
  1297. ; Default Value: 1
  1298. ; Development Value: 1
  1299. ; Production Value: -1
  1300. ; [url=http://php.net/zend.assertions]http://php.net/zend.assertions[/url]
  1301. zend.assertions = -1
  1302. ; Assert(expr); active by default.
  1303. ; [url=http://php.net/assert.active]http://php.net/assert.active[/url]
  1304. ;assert.active = On
  1305. ; Throw an AssertationException on failed assertions
  1306. ; [url=http://php.net/assert.exception]http://php.net/assert.exception[/url]
  1307. ;assert.exception = On
  1308. ; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active)
  1309. ; [url=http://php.net/assert.warning]http://php.net/assert.warning[/url]
  1310. ;assert.warning = On
  1311. ; Don't bail out by default.
  1312. ; [url=http://php.net/assert.bail]http://php.net/assert.bail[/url]
  1313. ;assert.bail = Off
  1314. ; User-function to be called if an assertion fails.
  1315. ; [url=http://php.net/assert.callback]http://php.net/assert.callback[/url]
  1316. ;assert.callback = 0
  1317. ; Eval the expression with current error_reporting(). Set to true if you want
  1318. ; error_reporting(0) around the eval().
  1319. ; [url=http://php.net/assert.quiet-eval]http://php.net/assert.quiet-eval[/url]
  1320. ;assert.quiet_eval = 0
  1321. [COM]
  1322. ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
  1323. ; [url=http://php.net/com.typelib-file]http://php.net/com.typelib-file[/url]
  1324. ;com.typelib_file =
  1325. ; allow Distributed-COM calls
  1326. ; [url=http://php.net/com.allow-dcom]http://php.net/com.allow-dcom[/url]
  1327. ;com.allow_dcom = true
  1328. ; autoregister constants of a components typlib on com_load()
  1329. ; [url=http://php.net/com.autoregister-typelib]http://php.net/com.autoregister-typelib[/url]
  1330. ;com.autoregister_typelib = true
  1331. ; register constants casesensitive
  1332. ; [url=http://php.net/com.autoregister-casesensitive]http://php.net/com.autoregister-casesensitive[/url]
  1333. ;com.autoregister_casesensitive = false
  1334. ; show warnings on duplicate constant registrations
  1335. ; [url=http://php.net/com.autoregister-verbose]http://php.net/com.autoregister-verbose[/url]
  1336. ;com.autoregister_verbose = true
  1337. ; The default character set code-page to use when passing strings to and from COM objects.
  1338. ; Default: system ANSI code page
  1339. ;com.code_page=
  1340. [mbstring]
  1341. ; language for internal character representation.
  1342. ; This affects mb_send_mail() and mbstring.detect_order.
  1343. ; [url=http://php.net/mbstring.language]http://php.net/mbstring.language[/url]
  1344. ;mbstring.language = Japanese
  1345. ; Use of this INI entry is deprecated, use global internal_encoding instead.
  1346. ; internal/script encoding.
  1347. ; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*)
  1348. ; If empty, default_charset or internal_encoding or iconv.internal_encoding is used.
  1349. ; The precedence is: default_charset < internal_encoding < iconv.internal_encoding
  1350. ;mbstring.internal_encoding =
  1351. ; Use of this INI entry is deprecated, use global input_encoding instead.
  1352. ; http input encoding.
  1353. ; mbstring.encoding_traslation = On is needed to use this setting.
  1354. ; If empty, default_charset or input_encoding or mbstring.input is used.
  1355. ; The precedence is: default_charset < intput_encoding < mbsting.http_input
  1356. ; [url=http://php.net/mbstring.http-input]http://php.net/mbstring.http-input[/url]
  1357. ;mbstring.http_input =
  1358. ; Use of this INI entry is deprecated, use global output_encoding instead.
  1359. ; http output encoding.
  1360. ; mb_output_handler must be registered as output buffer to function.
  1361. ; If empty, default_charset or output_encoding or mbstring.http_output is used.
  1362. ; The precedence is: default_charset < output_encoding < mbstring.http_output
  1363. ; To use an output encoding conversion, mbstring's output handler must be set
  1364. ; otherwise output encoding conversion cannot be performed.
  1365. ; [url=http://php.net/mbstring.http-output]http://php.net/mbstring.http-output[/url]
  1366. ;mbstring.http_output =
  1367. ; enable automatic encoding translation according to
  1368. ; mbstring.internal_encoding setting. Input chars are
  1369. ; converted to internal encoding by setting this to On.
  1370. ; Note: Do _not_ use automatic encoding translation for
  1371. ;    portable libs/applications.
  1372. ; [url=http://php.net/mbstring.encoding-translation]http://php.net/mbstring.encoding-translation[/url]
  1373. ;mbstring.encoding_translation = Off
  1374. ; automatic encoding detection order.
  1375. ; "auto" detect order is changed according to mbstring.language
  1376. ; [url=http://php.net/mbstring.detect-order]http://php.net/mbstring.detect-order[/url]
  1377. ;mbstring.detect_order = auto
  1378. ; substitute_character used when character cannot be converted
  1379. ; one from another
  1380. ; [url=http://php.net/mbstring.substitute-character]http://php.net/mbstring.substitute-character[/url]
  1381. ;mbstring.substitute_character = none
  1382. ; overload(replace) single byte functions by mbstring functions.
  1383. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
  1384. ; etc. Possible values are 0,1,2,4 or combination of them.
  1385. ; For example, 7 for overload everything.
  1386. ; 0: No overload
  1387. ; 1: Overload mail() function
  1388. ; 2: Overload str*() functions
  1389. ; 4: Overload ereg*() functions
  1390. ; [url=http://php.net/mbstring.func-overload]http://php.net/mbstring.func-overload[/url]
  1391. ;mbstring.func_overload = 0
  1392. ; enable strict encoding detection.
  1393. ; Default: Off
  1394. ;mbstring.strict_detection = On
  1395. ; This directive specifies the regex pattern of content types for which mb_output_handler()
  1396. ; is activated.
  1397. ; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
  1398. ;mbstring.http_output_conv_mimetype=
  1399. [gd]
  1400. ; Tell the jpeg decode to ignore warnings and try to create
  1401. ; a gd image. The warning will then be displayed as notices
  1402. ; disabled by default
  1403. ; [url=http://php.net/gd.jpeg-ignore-warning]http://php.net/gd.jpeg-ignore-warning[/url]
  1404. ;gd.jpeg_ignore_warning = 0
  1405. [exif]
  1406. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
  1407. ; With mbstring support this will automatically be converted into the encoding
  1408. ; given by corresponding encode setting. When empty mbstring.internal_encoding
  1409. ; is used. For the decode settings you can distinguish between motorola and
  1410. ; intel byte order. A decode setting cannot be empty.
  1411. ; [url=http://php.net/exif.encode-unicode]http://php.net/exif.encode-unicode[/url]
  1412. ;exif.encode_unicode = ISO-8859-15
  1413. ; [url=http://php.net/exif.decode-unicode-motorola]http://php.net/exif.decode-unicode-motorola[/url]
  1414. ;exif.decode_unicode_motorola = UCS-2BE
  1415. ; [url=http://php.net/exif.decode-unicode-intel]http://php.net/exif.decode-unicode-intel[/url]
  1416. ;exif.decode_unicode_intel  = UCS-2LE
  1417. ; [url=http://php.net/exif.encode-jis]http://php.net/exif.encode-jis[/url]
  1418. ;exif.encode_jis =
  1419. ; [url=http://php.net/exif.decode-jis-motorola]http://php.net/exif.decode-jis-motorola[/url]
  1420. ;exif.decode_jis_motorola = JIS
  1421. ; [url=http://php.net/exif.decode-jis-intel]http://php.net/exif.decode-jis-intel[/url]
  1422. ;exif.decode_jis_intel  = JIS
  1423. [Tidy]
  1424. ; The path to a default tidy configuration file to use when using tidy
  1425. ; [url=http://php.net/tidy.default-config]http://php.net/tidy.default-config[/url]
  1426. ;tidy.default_config = /usr/local/lib/php/default.tcfg
  1427. ; Should tidy clean and repair output automatically?
  1428. ; WARNING: Do not use this option if you are generating non-html content
  1429. ; such as dynamic images
  1430. ; [url=http://php.net/tidy.clean-output]http://php.net/tidy.clean-output[/url]
  1431. tidy.clean_output = Off
  1432. [soap]
  1433. ; Enables or disables WSDL caching feature.
  1434. ; [url=http://php.net/soap.wsdl-cache-enabled]http://php.net/soap.wsdl-cache-enabled[/url]
  1435. soap.wsdl_cache_enabled=1
  1436. ; Sets the directory name where SOAP extension will put cache files.
  1437. ; [url=http://php.net/soap.wsdl-cache-dir]http://php.net/soap.wsdl-cache-dir[/url]
  1438. soap.wsdl_cache_dir="/tmp"
  1439. ; (time to live) Sets the number of second while cached file will be used
  1440. ; instead of original one.
  1441. ; [url=http://php.net/soap.wsdl-cache-ttl]http://php.net/soap.wsdl-cache-ttl[/url]
  1442. soap.wsdl_cache_ttl=86400
  1443. ; Sets the size of the cache limit. (Max. number of WSDL files to cache)
  1444. soap.wsdl_cache_limit = 5
  1445. [sysvshm]
  1446. ; A default size of the shared memory segment
  1447. ;sysvshm.init_mem = 10000
  1448. [ldap]
  1449. ; Sets the maximum number of open links or -1 for unlimited.
  1450. ldap.max_links = -1
  1451. [mcrypt]
  1452. ; For more information about mcrypt settings see [url=http://php.net/mcrypt-module-open]http://php.net/mcrypt-module-open[/url]
  1453. ; Directory where to load mcrypt algorithms
  1454. ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
  1455. ;mcrypt.algorithms_dir=
  1456. ; Directory where to load mcrypt modes
  1457. ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
  1458. ;mcrypt.modes_dir=
  1459. [dba]
  1460. ;dba.default_handler=
  1461. [opcache]
  1462. ;加载Zend OPCache模块
  1463. zend_extension = php_opcache.dll
  1464. ;启用Zend OPCache模块
  1465. opcache.enable=1
  1466. ; Determines if Zend OPCache is enabled for the CLI version of PHP
  1467. opcache.enable_cli=1
  1468. ;OPcache共享内存存储大小
  1469. opcache.memory_consumption=128
  1470. ;在mb内存实际字符串的数量
  1471. opcache.interned_strings_buffer=8
  1472. ; 最大数量OPcache哈希表中的键
  1473. ; Only numbers between 200 and 100000 are allowed.
  1474. opcache.max_accelerated_files=4096
  1475. ; The maximum percentage of "wasted" memory until a restart is scheduled.
  1476. ;opcache.max_wasted_percentage=5
  1477. ; When this directive is enabled, the OPcache appends the current working
  1478. ; directory to the script key, thus eliminating possible collisions between
  1479. ; files with the same name (basename). Disabling the directive improves
  1480. ; performance, but may break existing applications.
  1481. ;opcache.use_cwd=1
  1482. ; When disabled, you must reset the OPcache manually or restart the
  1483. ; webserver for changes to the filesystem to take effect.
  1484. ;opcache.validate_timestamps=1
  1485. ; How often (in seconds) to check file timestamps for changes to the shared
  1486. ; memory storage allocation. ("1" means validate once per second, but only
  1487. ; once per request. "0" means always validate)
  1488. opcache.revalidate_freq=60
  1489. ; Enables or disables file search in include_path optimization
  1490. ;opcache.revalidate_path=0
  1491. ; If disabled, all PHPDoc comments are dropped from the code to reduce the
  1492. ; size of the optimized code.
  1493. ;opcache.save_comments=1
  1494. ; If enabled, a fast shutdown sequence is used for the accelerated code
  1495. opcache.fast_shutdown=1
  1496. ; Allow file existence override (file_exists, etc.) performance feature.
  1497. ;opcache.enable_file_override=0
  1498. ; A bitmask, where each bit enables or disables the appropriate OPcache
  1499. ; passes
  1500. opcache.optimization_level=1
  1501. ;opcache.inherited_hack=1
  1502. ;opcache.dups_fix=0
  1503. ; The location of the OPcache blacklist file (wildcards allowed).
  1504. ; Each OPcache blacklist file is a text file that holds the names of files
  1505. ; that should not be accelerated. The file format is to add each filename
  1506. ; to a new line. The filename may be a full path or just a file prefix
  1507. ; (i.e., /var/www/x blacklists all the files and directories in /var/www
  1508. ; that start with 'x'). Line starting with a ; are ignored (comments).
  1509. ;opcache.blacklist_filename=
  1510. ; Allows exclusion of large files from being cached. By default all files
  1511. ; are cached.
  1512. ;opcache.max_file_size=0
  1513. ; Check the cache checksum each N requests.
  1514. ; The default value of "0" means that the checks are disabled.
  1515. ;opcache.consistency_checks=0
  1516. ; How long to wait (in seconds) for a scheduled restart to begin if the cache
  1517. ; is not being accessed.
  1518. ;opcache.force_restart_timeout=180
  1519. ; OPcache error_log file name. Empty string assumes "stderr".
  1520. ;opcache.error_log=
  1521. ; All OPcache errors go to the Web server log.
  1522. ; By default, only fatal errors (level 0) or errors (level 1) are logged.
  1523. ; You can also enable warnings (level 2), info messages (level 3) or
  1524. ; debug messages (level 4).
  1525. ;opcache.log_verbosity_level=1
  1526. ; Preferred Shared Memory back-end. Leave empty and let the system decide.
  1527. ;opcache.preferred_memory_model=
  1528. ; Protect the shared memory from unexpected writing during script execution.
  1529. ; Useful for internal debugging only.
  1530. ;opcache.protect_memory=0
  1531. ; Allows calling OPcache API functions only from PHP scripts which path is
  1532. ; started from specified string. The default "" means no restriction
  1533. ;opcache.restrict_api=
  1534. ; Mapping base of shared memory segments (for Windows only). All the PHP
  1535. ; processes have to map shared memory into the same address space. This
  1536. ; directive allows to manually fix the "Unable to reattach to base address"
  1537. ; errors.
  1538. ;opcache.mmap_base=
  1539. ; Enables and sets the second level cache directory.
  1540. ; It should improve performance when SHM memory is full, at server restart or
  1541. ; SHM reset. The default "" disables file based caching.
  1542. ;opcache.file_cache=
  1543. ; Enables or disables opcode caching in shared memory.
  1544. ;opcache.file_cache_only=0
  1545. ; Enables or disables checksum validation when script loaded from file cache.
  1546. ;opcache.file_cache_consistency_checks=1
  1547. ; Implies opcache.file_cache_only=1 for a certain process that failed to
  1548. ; reattach to the shared memory (for Windows only). Explicitly enabled file
  1549. ; cache is required.
  1550. ;opcache.file_cache_fallback=1
  1551. ; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
  1552. ; This should improve performance, but requires appropriate OS configuration.
  1553. ;opcache.huge_code_pages=1
  1554. [curl]
  1555. ; A default value for the CURLOPT_CAINFO option. This is required to be an
  1556. ; absolute path.
  1557. ;curl.cainfo =
  1558. [openssl]
  1559. ; The location of a Certificate Authority (CA) file on the local filesystem
  1560. ; to use when verifying the identity of SSL/TLS peers. Most users should
  1561. ; not specify a value for this directive as PHP will attempt to use the
  1562. ; OS-managed cert stores in its absence. If specified, this value may still
  1563. ; be overridden on a per-stream basis via the "cafile" SSL stream context
  1564. ; option.
  1565. ;openssl.cafile=
  1566. ; If openssl.cafile is not specified or if the CA file is not found, the
  1567. ; directory pointed to by openssl.capath is searched for a suitable
  1568. ; certificate. This value must be a correctly hashed certificate directory.
  1569. ; Most users should not specify a value for this directive as PHP will
  1570. ; attempt to use the OS-managed cert stores in its absence. If specified,
  1571. ; this value may still be overridden on a per-stream basis via the "capath"
  1572. ; SSL stream context option.
  1573. ;openssl.capath=
  1574. ; Local Variables:
  1575. ; tab-width: 4
  1576. ; End:
复制代码
11、创建网站根目录
11.1、在C盘根目录创建网站目录,命名为"wwwroot"。



11.2、在网站根目录创建PHP网站临时目录,命名为"tmp"。


11.3、在网站根目录放入站点目录,命名为"php"。


11.4、在站点目创建一个页面文件,命名为"index.php"。


index.php文件内容
  1. <?php
  2. phpinfo();
  3. ?>
复制代码
12、编辑Nginx虚拟主机配置文件vhosts.conf
  1. #PHP演示站点
  2. server {
  3.     listen    80;
  4.     server_name 127.0.0.1;
  5.     root  "C:/wwwroot/php";
  6.     location / {
  7.       index index.html index.htm index.php;
  8.       #autoindex on;
  9.     }
  10.     location ~ \.php(.*)$ {
  11.       fastcgi_pass  127.0.0.1:9000;
  12.       fastcgi_index index.php;
  13.       fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
  14.       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  15.       fastcgi_param PATH_INFO $fastcgi_path_info;
  16.       fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  17.       include    fastcgi_params;
  18.     }
  19. }
复制代码
13、用命令方式启动、关闭Nginx服务
13.1、启动Nginx服务
按下Win+X+A键
打开命令提示符(管理员)
输入:net start php


13.2、关闭Nginx服务
按下Win+X+A键
打开命令提示符(管理员)
输入:net stop php


14、浏览网页
在IE浏览器中输入:http://127.0.0.1/

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行