LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2052|回复: 5

php-cgi占用很多内存。。怎么回事?

[复制链接]
发表于 2010-10-21 08:50:08 | 显示全部楼层 |阅读模式
大家帮我看看配置。。。买的256M的VPS
现在用的是php-fpm nginx+php+mysql+eAccelerator
现在内存可用内存很低。。还需要做什么优化?


  1. [root@localhost ~]# df -h
  2. Filesystem            Size  Used Avail Use% Mounted on
  3. /dev/mapper/VolGroup00-LogVol00
  4.                        19G  3.0G   15G  17% /
  5. /dev/sda1              99M   19M   76M  20% /boot
  6. tmpfs                 125M     0  125M   0% /dev/shm
复制代码

nginx
  1. user  www www;
  2. worker_processes 1;
  3. error_log  /home/wwwlogs/nginx_error.log  crit;
  4. pid        /usr/local/nginx/logs/nginx.pid;
  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;
  7. events
  8.         {
  9.                 use epoll;
  10.                 worker_connections 51200;
  11.         }
  12. http
  13.         {
  14.                 include       mime.types;
  15.                 default_type  application/octet-stream;
  16.                 server_names_hash_bucket_size 128;
  17.                 client_header_buffer_size 32k;
  18.                 large_client_header_buffers 4 32k;
  19.                 client_max_body_size 8m;
  20.                 sendfile on;
  21.                 tcp_nopush     on;
  22.                 keepalive_timeout 60;
  23.                 tcp_nodelay on;
  24.                 fastcgi_connect_timeout 300;
  25.                 fastcgi_send_timeout 300;
  26.                 fastcgi_read_timeout 300;
  27.                 fastcgi_buffer_size 64k;
  28.                 fastcgi_buffers 4 64k;
  29.                 fastcgi_busy_buffers_size 128k;
  30.                 fastcgi_temp_file_write_size 256k;
  31.                 
  32.                 gzip on;
  33.                 gzip_min_length  1k;
  34.                 gzip_buffers     4 16k;
  35.                 gzip_http_version 1.0;
  36.                 gzip_comp_level 2;
  37.                 gzip_types       text/plain application/x-javascript text/css application/xml;
  38.                 gzip_vary on;
  39.                 #limit_zone  crawler  $binary_remote_addr  10m;
  40. server
  41.         {
  42.                 listen       80 default;
  43.                 return 500;
  44.                index  index.html index.htm index.php;
  45.                 location ~ .*\.(php|php5)?$
  46.                         {
  47.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  48.                                 fastcgi_index index.php;
  49.                                 include fcgi.conf;
  50.                         }
  51.                 location /status {
  52.                         stub_status on;
  53.                         access_log   off;
  54.                 }
  55.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  56.                         {
  57.                                 expires      30d;
  58.                         }
  59.                 location ~ .*\.(js|css)?$
  60.                         {
  61.                                 expires      12h;
  62.                         }
  63.                 log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  64.              '$status $body_bytes_sent "$http_referer" '
  65.              '"$http_user_agent" $http_x_forwarded_for';
  66.                 access_log  /home/wwwlogs/access.log  access;
  67.         }
  68. include vhost/*.conf;
  69. }
复制代码

php-fpm
  1. <configuration>
  2.   All relative paths in this config are relative to php's install prefix   
  3.   <section name="global_options">
  4.     Pid file   
  5.     <value name="pid_file">/usr/local/php/logs/php-fpm.pid</value>
  6.     Error log file   
  7.     <value name="error_log">/usr/local/php/logs/php-fpm.log</value>
  8.     Log level   
  9.     <value name="log_level">notice</value>
  10.     When this amount of php processes exited with SIGSEGV or SIGBUS ...   
  11.     <value name="emergency_restart_threshold">10</value>
  12.     ... in a less than this interval of time, a graceful restart will be initiated.   
  13.     Useful to work around accidental curruptions in accelerator's shared memory.   
  14.     <value name="emergency_restart_interval">1m</value>
  15.     Time limit on waiting child's reaction on signals from master   
  16.     <value name="process_control_timeout">5s</value>
  17.     Set to 'no' to debug fpm   
  18.     <value name="daemonize">yes</value>
  19.   </section>
  20.   <workers>
  21.     <section name="pool">
  22.       Name of pool. Used in logs and stats.   
  23.       <value name="name">default</value>
  24.       Address to accept fastcgi requests on.   
  25.       Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'   
  26.       <value name="listen_address">/tmp/php-cgi.sock</value>
  27.       <value name="listen_options">
  28.         Set listen(2) backlog   
  29.         <value name="backlog">-1</value>
  30.         Set permissions for unix socket, if one used.   
  31.         In Linux read/write permissions must be set in order to allow connections from web server.   
  32.         Many BSD-derrived systems allow connections regardless of permissions.   
  33.         <value name="owner"></value>
  34.         <value name="group"></value>
  35.         <value name="mode">0666</value>
  36.       </value>
  37.       Additional php.ini defines, specific to this pool of workers.   
  38.       <value name="php_defines">
  39.         <value name="sendmail_path">/usr/sbin/sendmail -t -i</value>
  40.         <value name="display_errors">1</value>
  41.       </value>
  42.       Unix user of processes   
  43.         <value name="user">www</value>
  44.       Unix group of processes   
  45.         <value name="group">www</value>
  46.       Process manager settings   
  47.       <value name="pm">
  48.         Sets style of controling worker process count.   
  49.         Valid values are 'static' and 'apache-like'   
  50.         <value name="style">static</value>
  51.         Sets the limit on the number of simultaneous requests that will be served.   
  52.         Equivalent to Apache MaxClients directive.   
  53.         Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi   
  54.         Used with any pm_style.   
  55.         <value name="max_children">5</value>
  56.         Settings group for 'apache-like' pm style   
  57.         <value name="apache_like">
  58.           Sets the number of server processes created on startup.   
  59.           Used only when 'apache-like' pm_style is selected   
  60.           <value name="StartServers">20</value>
  61.           Sets the desired minimum number of idle server processes.   
  62.           Used only when 'apache-like' pm_style is selected   
  63.           <value name="MinSpareServers">5</value>
  64.           Sets the desired maximum number of idle server processes.   
  65.           Used only when 'apache-like' pm_style is selected   
  66.           <value name="MaxSpareServers">35</value>
  67.         </value>
  68.       </value>
  69.       The timeout (in seconds) for serving a single request after which the worker process will be terminated   
  70.       Should be used when 'max_execution_time' ini option does not stop script execution for some reason   
  71.       '0s' means 'off'   
  72.       <value name="request_terminate_timeout">0s</value>
  73.       The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file   
  74.       '0s' means 'off'   
  75.       <value name="request_slowlog_timeout">0s</value>
  76.       The log file for slow requests   
  77.       <value name="slowlog">logs/slow.log</value>
  78.       Set open file desc rlimit   
  79.       <value name="rlimit_files">51200</value>
  80.       Set max core size rlimit   
  81.       <value name="rlimit_core">0</value>
  82.       Chroot to this directory at the start, absolute path   
  83.       <value name="chroot"></value>
  84.       Chdir to this directory at the start, absolute path   
  85.       <value name="chdir"></value>
  86.       Redirect workers' stdout and stderr into main error log.   
  87.       If not set, they will be redirected to /dev/null, according to FastCGI specs   
  88.       <value name="catch_workers_output">yes</value>
  89.       How much requests each process should execute before respawn.   
  90.       Useful to work around memory leaks in 3rd ***** libraries.   
  91.       For endless request processing please specify 0   
  92.       Equivalent to PHP_FCGI_MAX_REQUESTS   
  93.       <value name="max_requests">10240</value>
  94.       Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect.   
  95.       Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+)   
  96.       Makes sense only with AF_INET listening socket.   
  97.       <value name="allowed_clients">127.0.0.1</value>
  98.       Pass environment variables like LD_LIBRARY_PATH   
  99.       All $VARIABLEs are taken from current environment   
  100.       <value name="environment">
  101.         <value name="HOSTNAME">$HOSTNAME</value>
  102.         <value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
  103.         <value name="TMP">/tmp</value>
  104.         <value name="TMPDIR">/tmp</value>
  105.         <value name="TEMP">/tmp</value>
  106.         <value name="OSTYPE">$OSTYPE</value>
  107.         <value name="MACHTYPE">$MACHTYPE</value>
  108.         <value name="MALLOC_CHECK_">2</value>
  109.       </value>
  110.     </section>
  111.   </workers>
  112. </configuration>
复制代码

mysql
  1. # Example MySQL config file for medium systems.
  2. #
  3. # This is for a system with little memory (32M - 64M) where MySQL plays
  4. # an important part, or systems up to 128M where MySQL is used together with
  5. # other programs (such as a web server)
  6. #
  7. # You can copy this file to
  8. # /etc/my.cnf to set global options,
  9. # mysql-data-dir/my.cnf to set server-specific options (in this
  10. # installation this directory is /usr/local/mysql/var) or
  11. # ~/.my.cnf to set user-specific options.
  12. #
  13. # In this file, you can use all long options that a program supports.
  14. # If you want to know which options a program supports, run the program
  15. # with the "--help" option.
  16. # The following options will be passed to all MySQL clients
  17. [client]
  18. #password        = your_password
  19. port                = 3306
  20. socket                = /tmp/mysql.sock
  21. # Here follows entries for some specific programs
  22. # The MySQL server
  23. [mysqld]
  24. port                = 3306
  25. socket                = /tmp/mysql.sock
  26. #skip-bdb
  27. #skip-innodb
  28. skip-locking
  29. key_buffer_size = 16M
  30. max_allowed_packet = 1M
  31. table_open_cache = 64
  32. sort_buffer_size = 512K
  33. net_buffer_length = 8K
  34. read_buffer_size = 256K
  35. read_rnd_buffer_size = 512K
  36. myisam_sort_buffer_size = 8M
  37. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  38. # if all processes that need to connect to mysqld run on the same host.
  39. # All interaction with mysqld must be made via Unix sockets or named pipes.
  40. # Note that using this option without enabling named pipes on Windows
  41. # (via the "enable-named-pipe" option) will render mysqld useless!
  42. #
  43. #skip-networking
  44. # Replication Master Server (default)
  45. # binary logging is required for replication
  46. #log-bin=mysql-bin
  47. # binary logging format - mixed recommended
  48. #binlog_format=mixed
  49. # required unique id between 1 and 2^32 - 1
  50. # defaults to 1 if master-host is not set
  51. # but will not function as a master if omitted
  52. server-id        = 1
  53. # Replication Slave (comment out master section to use this)
  54. #
  55. # To configure this host as a replication slave, you can choose between
  56. # two methods :
  57. #
  58. # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  59. #    the syntax is:
  60. #
  61. #    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  62. #    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  63. #
  64. #    where you replace <host>, <user>, <password> by quoted strings and
  65. #    <port> by the master's port number (3306 by default).
  66. #
  67. #    Example:
  68. #
  69. #    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  70. #    MASTER_USER='joe', MASTER_PASSWORD='secret';
  71. #
  72. # OR
  73. #
  74. # 2) Set the variables below. However, in case you choose this method, then
  75. #    start replication for the first time (even unsuccessfully, for example
  76. #    if you mistyped the password in master-password and the slave fails to
  77. #    connect), the slave will create a master.info file, and any later
  78. #    change in this file to the variables' values below will be ignored and
  79. #    overridden by the content of the master.info file, unless you shutdown
  80. #    the slave server, delete master.info and restart the slaver server.
  81. #    For that reason, you may want to leave the lines below untouched
  82. #    (commented) and instead use CHANGE MASTER TO (see above)
  83. #
  84. # required unique id between 2 and 2^32 - 1
  85. # (and different from the master)
  86. # defaults to 2 if master-host is set
  87. # but will not function as a slave if omitted
  88. #server-id       = 2
  89. #
  90. # The replication master for this slave - required
  91. #master-host     =   <hostname>
  92. #
  93. # The username the slave will use for authentication when connecting
  94. # to the master - required
  95. #master-user     =   <username>
  96. #
  97. # The password the slave will authenticate with when connecting to
  98. # the master - required
  99. #master-password =   <password>
  100. #
  101. # The port the master is listening on.
  102. # optional - defaults to 3306
  103. #master-port     =  <port>
  104. #
  105. # binary logging - not required for slaves, but recommended
  106. #log-bin=mysql-bin
  107. # Point the following paths to different dedicated disks
  108. #tmpdir                = /tmp/               
  109. #log-update         = /path-to-dedicated-directory/hostname
  110. # Uncomment the following if you are using InnoDB tables
  111. #innodb_data_home_dir = /usr/local/mysql/var/
  112. #innodb_data_file_path = ibdata1:10M:autoextend
  113. #innodb_log_group_home_dir = /usr/local/mysql/var/
  114. # You can set .._buffer_pool_size up to 50 - 80 %
  115. # of RAM but beware of setting memory usage too high
  116. #innodb_buffer_pool_size = 16M
  117. #innodb_additional_mem_pool_size = 2M
  118. # Set .._log_file_size to 25 % of buffer pool size
  119. #innodb_log_file_size = 5M
  120. #innodb_log_buffer_size = 8M
  121. #innodb_flush_log_at_trx_commit = 1
  122. #innodb_lock_wait_timeout = 50
  123. [mysqldump]
  124. quick
  125. max_allowed_packet = 16M
  126. [mysql]
  127. no-auto-rehash
  128. # Remove the next comment character if you are not familiar with SQL
  129. #safe-updates
  130. [myisamchk]
  131. key_buffer_size = 20M
  132. sort_buffer_size = 20M
  133. read_buffer = 2M
  134. write_buffer = 2M
  135. [mysqlhotcopy]
  136. interactive-timeout
复制代码

php.ini
  1. [PHP]
  2. ;;;;;;;;;;;
  3. ; WARNING ;
  4. ;;;;;;;;;;;
  5. ; This is the default settings file for new PHP installations.
  6. ; By default, PHP installs itself with a configuration suitable for
  7. ; development purposes, and *NOT* for production purposes.
  8. ; For several security-oriented considerations that should be taken
  9. ; before going online with your site, please consult php.ini-recommended
  10. ; and http://php.net/manual/en/security.php.
  11. ;;;;;;;;;;;;;;;;;;;
  12. ; About php.ini   ;
  13. ;;;;;;;;;;;;;;;;;;;
  14. ; This file controls many aspects of PHP's behavior.  In order for PHP to
  15. ; read it, it must be named 'php.ini'.  PHP looks for it in the current
  16. ; working directory, in the path designated by the environment variable
  17. ; PHPRC, and in the path that was defined in compile time (in that order).
  18. ; Under Windows, the compile-time path is the Windows directory.  The
  19. ; path in which the php.ini file is looked for can be overridden using
  20. ; the -c argument in command line mode.
  21. ;
  22. ; The syntax of the file is extremely simple.  Whitespace and Lines
  23. ; beginning with a semicolon are silently ignored (as you probably guessed).
  24. ; Section headers (e.g. [Foo]) are also silently ignored, even though
  25. ; they might mean something in the future.
  26. ;
  27. ; Directives are specified using the following syntax:
  28. ; directive = value
  29. ; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
  30. ;
  31. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
  32. ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
  33. ; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
  34. ;
  35. ; Expressions in the INI file are limited to bitwise operators and parentheses:
  36. ; |        bitwise OR
  37. ; &        bitwise AND
  38. ; ~        bitwise NOT
  39. ; !        boolean NOT
  40. ;
  41. ; Boolean flags can be turned on using the values 1, On, True or Yes.
  42. ; They can be turned off using the values 0, Off, False or No.
  43. ;
  44. ; An empty string can be denoted by simply not writing anything after the equal
  45. ; sign, or by using the None keyword:
  46. ;
  47. ;  foo =         ; sets foo to an empty string
  48. ;  foo = none    ; sets foo to an empty string
  49. ;  foo = "none"  ; sets foo to the string 'none'
  50. ;
  51. ; If you use constants in your value, and these constants belong to a
  52. ; dynamically loaded extension (either a PHP extension or a Zend extension),
  53. ; you may only use these constants *after* the line that loads the extension.
  54. ;
  55. ;
  56. ;;;;;;;;;;;;;;;;;;;
  57. ; About this file ;
  58. ;;;;;;;;;;;;;;;;;;;
  59. ; All the values in the php.ini-dist file correspond to the builtin
  60. ; defaults (that is, if no php.ini is used, or if you delete these lines,
  61. ; the builtin defaults will be identical).
  62. ;;;;;;;;;;;;;;;;;;;;
  63. ; Language Options ;
  64. ;;;;;;;;;;;;;;;;;;;;
  65. ; Enable the PHP scripting language engine under Apache.
  66. engine = On
  67. ; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
  68. zend.ze1_compatibility_mode = Off
  69. ; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
  70. ; NOTE: Using short tags should be avoided when developing applications or
  71. ; libraries that are meant for redistribution, or deployment on PHP
  72. ; servers which are not under your control, because short tags may not
  73. ; be supported on the target server. For portable, redistributable code,
  74. ; be sure not to use short tags.
  75. short_open_tag = On
  76. ; Allow ASP-style <% %> tags.
  77. asp_tags = Off
  78. ; The number of significant digits displayed in floating point numbers.
  79. precision    =  12
  80. ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
  81. y2k_compliance = On
  82. ; Output buffering allows you to send header lines (including cookies) even
  83. ; after you send body content, at the price of slowing PHP's output layer a
  84. ; bit.  You can enable output buffering during runtime by calling the output
  85. ; buffering functions.  You can also enable output buffering for all files by
  86. ; setting this directive to On.  If you wish to limit the size of the buffer
  87. ; to a certain size - you can use a maximum number of bytes instead of 'On', as
  88. ; a value for this directive (e.g., output_buffering=4096).
  89. output_buffering = On
  90. ; You can redirect all of the output of your scripts to a function.  For
  91. ; example, if you set output_handler to "mb_output_handler", character
  92. ; encoding will be transparently converted to the specified encoding.
  93. ; Setting any output handler automatically turns on output buffering.
  94. ; Note: People who wrote portable scripts should not depend on this ini
  95. ;       directive. Instead, explicitly set the output handler using ob_start().
  96. ;       Using this ini directive may cause problems unless you know what script
  97. ;       is doing.
  98. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
  99. ;       and you cannot use both "ob_gzhandler" and "zlib.output_compression".
  100. ; Note: output_handler must be empty if this is set 'On' !!!!
  101. ;       Instead you must use zlib.output_handler.
  102. ;output_handler =
  103. ; Transparent output compression using the zlib library
  104. ; Valid values for this option are 'off', 'on', or a specific buffer size
  105. ; to be used for compression (default is 4KB)
  106. ; Note: Resulting chunk size may vary due to nature of compression. PHP
  107. ;       outputs chunks that are few hundreds bytes each as a result of
  108. ;       compression. If you prefer a larger chunk size for better
  109. ;       performance, enable output_buffering in addition.
  110. ; Note: You need to use zlib.output_handler instead of the standard
  111. ;       output_handler, or otherwise the output will be corrupted.
  112. zlib.output_compression = Off
  113. ;zlib.output_compression_level = -1
  114. ; You cannot specify additional output handlers if zlib.output_compression
  115. ; is activated here. This setting does the same as output_handler but in
  116. ; a different order.
  117. ;zlib.output_handler =
  118. ; Implicit flush tells PHP to tell the output layer to flush itself
  119. ; automatically after every output block.  This is equivalent to calling the
  120. ; PHP function flush() after each and every call to print() or echo() and each
  121. ; and every HTML block.  Turning this option on has serious performance
  122. ; implications and is generally recommended for debugging purposes only.
  123. implicit_flush = Off
  124. ; The unserialize callback function will be called (with the undefined class'
  125. ; name as parameter), if the unserializer finds an undefined class
  126. ; which should be instantiated.
  127. ; A warning appears if the specified function is not defined, or if the
  128. ; function doesn't include/implement the missing class.
  129. ; So only set this entry, if you really want to implement such a
  130. ; callback-function.
  131. unserialize_callback_func=
  132. ; When floats & doubles are serialized store serialize_precision significant
  133. ; digits after the floating point. The default value ensures that when floats
  134. ; are decoded with unserialize, the data will remain the same.
  135. serialize_precision = 100
  136. ; Whether to enable the ability to force arguments to be passed by reference
  137. ; at function call time.  This method is deprecated and is likely to be
  138. ; unsupported in future versions of PHP/Zend.  The encouraged method of
  139. ; specifying which arguments should be passed by reference is in the function
  140. ; declaration.  You're encouraged to try and turn this option Off and make
  141. ; sure your scripts work properly with it in order to ensure they will work
  142. ; with future versions of the language (you will receive a warning each time
  143. ; you use this feature, and the argument will be passed by value instead of by
  144. ; reference).
  145. allow_call_time_pass_reference = On
  146. ;
  147. ; Safe Mode
  148. ;
  149. safe_mode = Off
  150. ; By default, Safe Mode does a UID compare check when
  151. ; opening files. If you want to relax this to a GID compare,
  152. ; then turn on safe_mode_gid.
  153. safe_mode_gid = Off
  154. ; When safe_mode is on, UID/GID checks are bypassed when
  155. ; including files from this directory and its subdirectories.
  156. ; (directory must also be in include_path or full path must
  157. ; be used when including)
  158. safe_mode_include_dir =
  159. ; When safe_mode is on, only executables located in the safe_mode_exec_dir
  160. ; will be allowed to be executed via the exec family of functions.
  161. safe_mode_exec_dir =
  162. ; Setting certain environment variables may be a potential security breach.
  163. ; This directive contains a comma-delimited list of prefixes.  In Safe Mode,
  164. ; the user may only alter environment variables whose names begin with the
  165. ; prefixes supplied here.  By default, users will only be able to set
  166. ; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
  167. ;
  168. ; Note:  If this directive is empty, PHP will let the user modify ANY
  169. ; environment variable!
  170. safe_mode_allowed_env_vars = PHP_
  171. ; This directive contains a comma-delimited list of environment variables that
  172. ; the end user won't be able to change using putenv().  These variables will be
  173. ; protected even if safe_mode_allowed_env_vars is set to allow to change them.
  174. safe_mode_protected_env_vars = LD_LIBRARY_PATH
  175. ; open_basedir, if set, limits all file operations to the defined directory
  176. ; and below.  This directive makes most sense if used in a per-directory
  177. ; or per-virtualhost web server configuration file. This directive is
  178. ; *NOT* affected by whether Safe Mode is turned On or Off.
  179. ;open_basedir =
  180. ; This directive allows you to disable certain functions for security reasons.
  181. ; It receives a comma-delimited list of function names. This directive is
  182. ; *NOT* affected by whether Safe Mode is turned On or Off.
  183. disable_functions =
  184. ; This directive allows you to disable certain classes for security reasons.
  185. ; It receives a comma-delimited list of class names. This directive is
  186. ; *NOT* affected by whether Safe Mode is turned On or Off.
  187. disable_classes =
  188. ; Colors for Syntax Highlighting mode.  Anything that's acceptable in
  189. ; <span style="color: ???????"> would work.
  190. ;highlight.string  = #DD0000
  191. ;highlight.comment = #FF9900
  192. ;highlight.keyword = #007700
  193. ;highlight.bg      = #FFFFFF
  194. ;highlight.default = #0000BB
  195. ;highlight.html    = #000000
  196. ; If enabled, the request will be allowed to complete even if the user aborts
  197. ; the request. Consider enabling it if executing long request, which may end up
  198. ; being interrupted by the user or a browser timing out.
  199. ; ignore_user_abort = On
  200. ; Determines the size of the realpath cache to be used by PHP. This value should
  201. ; be increased on systems where PHP opens many files to reflect the quantity of
  202. ; the file operations performed.
  203. ; realpath_cache_size=16k
  204. ; Duration of time, in seconds for which to cache realpath information for a given
  205. ; file or directory. For systems with rarely changing files, consider increasing this
  206. ; value.
  207. ; realpath_cache_ttl=120
  208. ;
  209. ; Misc
  210. ;
  211. ; Decides whether PHP may expose the fact that it is installed on the server
  212. ; (e.g. by adding its signature to the Web server header).  It is no security
  213. ; threat in any way, but it makes it possible to determine whether you use PHP
  214. ; on your server or not.
  215. expose_php = On
  216. ;;;;;;;;;;;;;;;;;;;
  217. ; Resource Limits ;
  218. ;;;;;;;;;;;;;;;;;;;
  219. max_execution_time = 30     ; Maximum execution time of each script, in seconds
  220. max_input_time = 60        ; Maximum amount of time each script may spend parsing request data
  221. ;max_input_nesting_level = 64 ; Maximum input variable nesting level
  222. memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)
  223. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  224. ; Error handling and logging ;
  225. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  226. ; error_reporting is a bit-field.  Or each number up to get desired error
  227. ; reporting level
  228. ; E_ALL             - All errors and warnings (doesn't include E_STRICT)
  229. ; E_ERROR           - fatal run-time errors
  230. ; E_RECOVERABLE_ERROR  - almost fatal run-time errors
  231. ; E_WARNING         - run-time warnings (non-fatal errors)
  232. ; E_PARSE           - compile-time parse errors
  233. ; E_NOTICE          - run-time notices (these are warnings which often result
  234. ;                     from a bug in your code, but it's possible that it was
  235. ;                     intentional (e.g., using an uninitialized variable and
  236. ;                     relying on the fact it's automatically initialized to an
  237. ;                     empty string)
  238. ; E_STRICT          - run-time notices, enable to have PHP suggest changes
  239. ;                     to your code which will ensure the best interoperability
  240. ;                     and forward compatibility of your code
  241. ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
  242. ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
  243. ;                     initial startup
  244. ; E_COMPILE_ERROR   - fatal compile-time errors
  245. ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
  246. ; E_USER_ERROR      - user-generated error message
  247. ; E_USER_WARNING    - user-generated warning message
  248. ; E_USER_NOTICE     - user-generated notice message
  249. ;
  250. ; Examples:
  251. ;
  252. ;   - Show all errors, except for notices and coding standards warnings
  253. ;
  254. ;error_reporting = E_ALL & ~E_NOTICE
  255. ;
  256. ;   - Show all errors, except for notices
  257. ;
  258. ;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
  259. ;
  260. ;   - Show only errors
  261. ;
  262. ;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
  263. ;
  264. ;   - Show all errors except for notices and coding standards warnings
  265. ;
  266. error_reporting = E_ALL & ~E_NOTICE
  267. ; Print out errors (as a part of the output).  For production web sites,
  268. ; you're strongly encouraged to turn this feature off, and use error logging
  269. ; instead (see below).  Keeping display_errors enabled on a production web site
  270. ; may reveal security information to end users, such as file paths on your Web
  271. ; server, your database schema or other information.
  272. ;
  273. ; possible values for display_errors:
  274. ;
  275. ; Off        - Do not display any errors
  276. ; stderr     - Display errors to STDERR (affects only CGI/CLI binaries!)
  277. ;
  278. ;display_errors = "stderr"
  279. ;
  280. ; stdout (On) - Display errors to STDOUT
  281. ;
  282. display_errors = On
  283. ; Even when display_errors is on, errors that occur during PHP's startup
  284. ; sequence are not displayed.  It's strongly recommended to keep
  285. ; display_startup_errors off, except for when debugging.
  286. display_startup_errors = Off
  287. ; Log errors into a log file (server-specific log, stderr, or error_log (below))
  288. ; As stated above, you're strongly advised to use error logging in place of
  289. ; error displaying on production web sites.
  290. log_errors = Off
  291. ; Set maximum length of log_errors. In error_log information about the source is
  292. ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
  293. log_errors_max_len = 1024
  294. ; Do not log repeated messages. Repeated errors must occur in same file on same
  295. ; line unless ignore_repeated_source is set true.
  296. ignore_repeated_errors = Off
  297. ; Ignore source of message when ignoring repeated messages. When this setting
  298. ; is On you will not log errors with repeated messages from different files or
  299. ; source lines.
  300. ignore_repeated_source = Off
  301. ; If this parameter is set to Off, then memory leaks will not be shown (on
  302. ; stdout or in the log). This has only effect in a debug compile, and if
  303. ; error reporting includes E_WARNING in the allowed list
  304. report_memleaks = On
  305. ;report_zend_debug = 0
  306. ; Store the last error/warning message in $php_errormsg (boolean).
  307. track_errors = Off
  308. ; Turn off normal error reporting and emit XML-RPC error XML
  309. ;xmlrpc_errors = 0
  310. ; An XML-RPC faultCode
  311. ;xmlrpc_error_number = 0
  312. ; Disable the inclusion of HTML tags in error messages.
  313. ; Note: Never use this feature for production boxes.
  314. ;html_errors = Off
  315. ; If html_errors is set On PHP produces clickable error messages that direct
  316. ; to a page describing the error or function causing the error in detail.
  317. ; You can download a copy of the PHP manual from http://www.php.net/docs.php
  318. ; and change docref_root to the base URL of your local copy including the
  319. ; leading '/'. You must also specify the file extension being used including
  320. ; the dot.
  321. ; Note: Never use this feature for production boxes.
  322. ;docref_root = "/phpmanual/"
  323. ;docref_ext = .html
  324. ; String to output before an error message.
  325. ;error_prepend_string = "<font color=#ff0000>"
  326. ; String to output after an error message.
  327. ;error_append_string = "</font>"
  328. ; Log errors to specified file.
  329. ;error_log = filename
  330. ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
  331. ;error_log = syslog
  332. ;;;;;;;;;;;;;;;;;
  333. ; Data Handling ;
  334. ;;;;;;;;;;;;;;;;;
  335. ;
  336. ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
  337. ; The separator used in PHP generated URLs to separate arguments.
  338. ; Default is "&".
  339. ;arg_separator.output = "&amp;"
  340. ; List of separator(s) used by PHP to parse input URLs into variables.
  341. ; Default is "&".
  342. ; NOTE: Every character in this directive is considered as separator!
  343. ;arg_separator.input = ";&"
  344. ; This directive describes the order in which PHP registers GET, POST, Cookie,
  345. ; Environment and Built-in variables (G, P, C, E & S respectively, often
  346. ; referred to as EGPCS or GPC).  Registration is done from left to right, newer
  347. ; values override older values.
  348. variables_order = "EGPCS"
  349. ; Whether or not to register the EGPCS variables as global variables.  You may
  350. ; want to turn this off if you don't want to clutter your scripts' global scope
  351. ; with user data.  This makes most sense when coupled with track_vars - in which
  352. ; case you can access all of the GPC variables through the $HTTP_*_VARS[],
  353. ; variables.
  354. ;
  355. ; You should do your best to write your scripts so that they do not require
  356. ; register_globals to be on;  Using form variables as globals can easily lead
  357. ; to possible security problems, if the code is not very well thought of.
  358. register_globals = Off
  359. ; Whether or not to register the old-style input arrays, HTTP_GET_VARS
  360. ; and friends.  If you're not using them, it's recommended to turn them off,
  361. ; for performance reasons.
  362. register_long_arrays = On
  363. ; This directive tells PHP whether to declare the argv&argc variables (that
  364. ; would contain the GET information).  If you don't use these variables, you
  365. ; should turn it off for increased performance.
  366. register_argc_argv = On
  367. ; When enabled, the SERVER and ENV variables are created when they're first
  368. ; used (Just In Time) instead of when the script starts. If these variables
  369. ; are not used within a script, having this directive on will result in a
  370. ; performance gain. The PHP directives register_globals, register_long_arrays,
  371. ; and register_argc_argv must be disabled for this directive to have any affect.
  372. auto_globals_jit = On
  373. ; Maximum size of POST data that PHP will accept.
  374. post_max_size = 50M
  375. ; Magic quotes
  376. ;
  377. ; Magic quotes for incoming GET/POST/Cookie data.
  378. magic_quotes_gpc = On
  379. ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
  380. magic_quotes_runtime = Off
  381. ; Use Sybase-style magic quotes (escape ' with '' instead of \').
  382. magic_quotes_sybase = Off
  383. ; Automatically add files before or after any PHP document.
  384. auto_prepend_file =
  385. auto_append_file =
  386. ; As of 4.0b4, PHP always outputs a character encoding by default in
  387. ; the Content-type: header.  To disable sending of the charset, simply
  388. ; set it to be empty.
  389. ;
  390. ; PHP's built-in default is text/html
  391. default_mimetype = "text/html"
  392. ;default_charset = "iso-8859-1"
  393. ; Always populate the $HTTP_RAW_POST_DATA variable.
  394. ;always_populate_raw_post_data = On
  395. ;;;;;;;;;;;;;;;;;;;;;;;;;
  396. ; Paths and Directories ;
  397. ;;;;;;;;;;;;;;;;;;;;;;;;;
  398. ; UNIX: "/path1:/path2"
  399. ;include_path = ".:/php/includes"
  400. ;
  401. ; Windows: "\path1;\path2"
  402. ;include_path = ".;c:\php\includes"
  403. ; The root of the PHP pages, used only if nonempty.
  404. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
  405. ; if you are running php as a CGI under any web server (other than IIS)
  406. ; see documentation for security issues.  The alternate is to use the
  407. ; cgi.force_redirect configuration below
  408. doc_root =
  409. ; The directory under which PHP opens the script using /~username used only
  410. ; if nonempty.
  411. user_dir =
  412. ; Directory in which the loadable extensions (modules) reside.
  413. extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
  414. ;extension = "memcache.so"
  415. extension = "pdo_mysql.so"
  416. ; Whether or not to enable the dl() function.  The dl() function does NOT work
  417. ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
  418. ; disabled on them.
  419. enable_dl = On
  420. ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
  421. ; most web servers.  Left undefined, PHP turns this on by default.  You can
  422. ; turn it off here AT YOUR OWN RISK
  423. ; **You CAN safely turn this off for IIS, in fact, you MUST.**
  424. ; cgi.force_redirect = 1
  425. ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
  426. ; every request.
  427. ; cgi.nph = 1
  428. ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
  429. ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
  430. ; will look for to know it is OK to continue execution.  Setting this variable MAY
  431. ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
  432. ; cgi.redirect_status_env = ;
  433. ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
  434. ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
  435. ; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
  436. ; this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
  437. ; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
  438. ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
  439. cgi.fix_pathinfo=0
  440. ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
  441. ; security tokens of the calling client.  This allows IIS to define the
  442. ; security context that the request runs under.  mod_fastcgi under Apache
  443. ; does not currently support this feature (03/17/2002)
  444. ; Set to 1 if running under IIS.  Default is zero.
  445. ; fastcgi.impersonate = 1;
  446. ; Disable logging through FastCGI connection
  447. ; fastcgi.logging = 0
  448. ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
  449. ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
  450. ; is supported by Apache. When this option is set to 1 PHP will send
  451. ; RFC2616 compliant header.
  452. ; Default is zero.
  453. ;cgi.rfc2616_headers = 0
  454. ;;;;;;;;;;;;;;;;
  455. ; File Uploads ;
  456. ;;;;;;;;;;;;;;;;
  457. ; Whether to allow HTTP file uploads.
  458. file_uploads = On
  459. ; Temporary directory for HTTP uploaded files (will use system default if not
  460. ; specified).
  461. ;upload_tmp_dir =
  462. ; Maximum allowed size for uploaded files.
  463. upload_max_filesize = 50M
  464. ; Maximum number of files that can be uploaded via a single request
  465. max_file_uploads = 20
  466. ;;;;;;;;;;;;;;;;;;
  467. ; Fopen wrappers ;
  468. ;;;;;;;;;;;;;;;;;;
  469. ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
  470. allow_url_fopen = On
  471. ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
  472. allow_url_include = Off
  473. ; Define the anonymous ftp password (your email address)
  474. ;from="john@doe.com"
  475. ; Define the User-Agent string
  476. ; user_agent="PHP"
  477. ; Default timeout for socket based streams (seconds)
  478. default_socket_timeout = 60
  479. ; If your scripts have to deal with files from Macintosh systems,
  480. ; or you are running on a Mac and need to deal with files from
  481. ; unix or win32 systems, setting this flag will cause PHP to
  482. ; automatically detect the EOL character in those files so that
  483. ; fgets() and file() will work regardless of the source of the file.
  484. ; auto_detect_line_endings = Off
  485. ;;;;;;;;;;;;;;;;;;;;;;
  486. ; Dynamic Extensions ;
  487. ;;;;;;;;;;;;;;;;;;;;;;
  488. ;
  489. ; If you wish to have an extension loaded automatically, use the following
  490. ; syntax:
  491. ;
  492. ;   extension=modulename.extension
  493. ;
  494. ; For example, on Windows:
  495. ;
  496. ;   extension=msql.dll
  497. ;
  498. ; ... or under UNIX:
  499. ;
  500. ;   extension=msql.so
  501. ;
  502. ; Note that it should be the name of the module only; no directory information
  503. ; needs to go here.  Specify the location of the extension with the
  504. ; extension_dir directive above.
  505. ; Windows Extensions
  506. ; Note that ODBC support is built in, so no dll is needed for it.
  507. ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
  508. ; extension folders as well as the separate PECL DLL download (PHP 5).
  509. ; Be sure to appropriately set the extension_dir directive.
  510. ;extension=php_bz2.dll
  511. ;extension=php_curl.dll
  512. ;extension=php_dba.dll
  513. ;extension=php_dbase.dll
  514. ;extension=php_exif.dll
  515. ;extension=php_fdf.dll
  516. ;extension=php_gd2.dll
  517. ;extension=php_gettext.dll
  518. ;extension=php_gmp.dll
  519. ;extension=php_ifx.dll
  520. ;extension=php_imap.dll
  521. ;extension=php_interbase.dll
  522. ;extension=php_ldap.dll
  523. ;extension=php_mbstring.dll
  524. ;extension=php_mcrypt.dll
  525. ;extension=php_mhash.dll
  526. ;extension=php_mime_magic.dll
  527. ;extension=php_ming.dll
  528. ;extension=php_msql.dll
  529. ;extension=php_mssql.dll
  530. ;extension=php_mysql.dll
  531. ;extension=php_mysqli.dll
  532. ;extension=php_oci8.dll
  533. ;extension=php_openssl.dll
  534. ;extension=php_pdo.dll
  535. ;extension=php_pdo_firebird.dll
  536. ;extension=php_pdo_mssql.dll
  537. ;extension=php_pdo_mysql.dll
  538. ;extension=php_pdo_oci.dll
  539. ;extension=php_pdo_oci8.dll
  540. ;extension=php_pdo_odbc.dll
  541. ;extension=php_pdo_pgsql.dll
  542. ;extension=php_pdo_sqlite.dll
  543. ;extension=php_pgsql.dll
  544. ;extension=php_pspell.dll
  545. ;extension=php_shmop.dll
  546. ;extension=php_snmp.dll
  547. ;extension=php_soap.dll
  548. ;extension=php_sockets.dll
  549. ;extension=php_sqlite.dll
  550. ;extension=php_sybase_ct.dll
  551. ;extension=php_tidy.dll
  552. ;extension=php_xmlrpc.dll
  553. ;extension=php_xsl.dll
  554. ;extension=php_zip.dll
  555. ;;;;;;;;;;;;;;;;;;;
  556. ; Module Settings ;
  557. ;;;;;;;;;;;;;;;;;;;
  558. [Date]
  559. ; Defines the default timezone used by the date functions
  560. date.timezone = PRC
  561. ;date.default_latitude = 31.7667
  562. ;date.default_longitude = 35.2333
  563. ;date.sunrise_zenith = 90.583333
  564. ;date.sunset_zenith = 90.583333
  565. [filter]
  566. ;filter.default = unsafe_raw
  567. ;filter.default_flags =
  568. [iconv]
  569. ;iconv.input_encoding = ISO-8859-1
  570. ;iconv.internal_encoding = ISO-8859-1
  571. ;iconv.output_encoding = ISO-8859-1
  572. [sqlite]
  573. ;sqlite.assoc_case = 0
  574. [Pcre]
  575. ;PCRE library backtracking limit.
  576. ;pcre.backtrack_limit=100000
  577. ;PCRE library recursion limit.
  578. ;Please note that if you set this value to a high number you may consume all
  579. ;the available process stack and eventually crash PHP (due to reaching the
  580. ;stack size limit imposed by the Operating System).
  581. ;pcre.recursion_limit=100000
  582. [Syslog]
  583. ; Whether or not to define the various syslog variables (e.g. $LOG_PID,
  584. ; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
  585. ; runtime, you can define these variables by calling define_syslog_variables().
  586. define_syslog_variables  = Off
  587. [mail function]
  588. ; For Win32 only.
  589. SMTP = localhost
  590. smtp_port = 25
  591. ; For Win32 only.
  592. ;sendmail_from = me@example.com
  593. ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
  594. ;sendmail_path =
  595. ; Force the addition of the specified parameters to be passed as extra parameters
  596. ; to the sendmail binary. These parameters will always replace the value of
  597. ; the 5th parameter to mail(), even in safe mode.
  598. ;mail.force_extra_parameters =
  599. [SQL]
  600. sql.safe_mode = Off
  601. [ODBC]
  602. ;odbc.default_db    =  Not yet implemented
  603. ;odbc.default_user  =  Not yet implemented
  604. ;odbc.default_pw    =  Not yet implemented
  605. ; Allow or prevent persistent links.
  606. odbc.allow_persistent = On
  607. ; Check that a connection is still valid before reuse.
  608. odbc.check_persistent = On
  609. ; Maximum number of persistent links.  -1 means no limit.
  610. odbc.max_persistent = -1
  611. ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
  612. odbc.max_links = -1
  613. ; Handling of LONG fields.  Returns number of bytes to variables.  0 means
  614. ; passthru.
  615. odbc.defaultlrl = 4096
  616. ; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
  617. ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
  618. ; of uodbc.defaultlrl and uodbc.defaultbinmode
  619. odbc.defaultbinmode = 1
  620. [MySQL]
  621. ; Allow or prevent persistent links.
  622. mysql.allow_persistent = On
  623. ; Maximum number of persistent links.  -1 means no limit.
  624. mysql.max_persistent = -1
  625. ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
  626. mysql.max_links = -1
  627. ; Default port number for mysql_connect().  If unset, mysql_connect() will use
  628. ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
  629. ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
  630. ; at MYSQL_PORT.
  631. mysql.default_port =
  632. ; Default socket name for local MySQL connects.  If empty, uses the built-in
  633. ; MySQL defaults.
  634. mysql.default_socket =
  635. ; Default host for mysql_connect() (doesn't apply in safe mode).
  636. mysql.default_host =
  637. ; Default user for mysql_connect() (doesn't apply in safe mode).
  638. mysql.default_user =
  639. ; Default password for mysql_connect() (doesn't apply in safe mode).
  640. ; Note that this is generally a *bad* idea to store passwords in this file.
  641. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
  642. ; and reveal this password!  And of course, any users with read access to this
  643. ; file will be able to reveal the password as well.
  644. mysql.default_password =
  645. ; Maximum time (in seconds) for connect timeout. -1 means no limit
  646. mysql.connect_timeout = 60
  647. ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
  648. ; SQL-Errors will be displayed.
  649. mysql.trace_mode = Off
  650. [MySQLi]
  651. ; Maximum number of links.  -1 means no limit.
  652. mysqli.max_links = -1
  653. ; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
  654. ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
  655. ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
  656. ; at MYSQL_PORT.
  657. mysqli.default_port = 3306
  658. ; Default socket name for local MySQL connects.  If empty, uses the built-in
  659. ; MySQL defaults.
  660. mysqli.default_socket =
  661. ; Default host for mysql_connect() (doesn't apply in safe mode).
  662. mysqli.default_host =
  663. ; Default user for mysql_connect() (doesn't apply in safe mode).
  664. mysqli.default_user =
  665. ; Default password for mysqli_connect() (doesn't apply in safe mode).
  666. ; Note that this is generally a *bad* idea to store passwords in this file.
  667. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
  668. ; and reveal this password!  And of course, any users with read access to this
  669. ; file will be able to reveal the password as well.
  670. mysqli.default_pw =
  671. ; Allow or prevent reconnect
  672. mysqli.reconnect = Off
  673. [mSQL]
  674. ; Allow or prevent persistent links.
  675. msql.allow_persistent = On
  676. ; Maximum number of persistent links.  -1 means no limit.
  677. msql.max_persistent = -1
  678. ; Maximum number of links (persistent+non persistent).  -1 means no limit.
  679. msql.max_links = -1
  680. [OCI8]
  681. ; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)
  682. ;oci8.privileged_connect = Off
  683. ; Connection: The maximum number of persistent OCI8 connections per
  684. ; process. Using -1 means no limit.
  685. ;oci8.max_persistent = -1
  686. ; Connection: The maximum number of seconds a process is allowed to
  687. ; maintain an idle persistent connection. Using -1 means idle
  688. ; persistent connections will be maintained forever.
  689. ;oci8.persistent_timeout = -1
  690. ; Connection: The number of seconds that must pass before issuing a
  691. ; ping during oci_pconnect() to check the connection validity. When
  692. ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
  693. ; pings completely.
  694. ;oci8.ping_interval = 60
  695. ; Tuning: This option enables statement caching, and specifies how
  696. ; many statements to cache. Using 0 disables statement caching.
  697. ;oci8.statement_cache_size = 20
  698. ; Tuning: Enables statement prefetching and sets the default number of
  699. ; rows that will be fetched automatically after statement execution.
  700. ;oci8.default_prefetch = 10
  701. ; Compatibility. Using On means oci_close() will not close
  702. ; oci_connect() and oci_new_connect() connections.
  703. ;oci8.old_oci_close_semantics = Off
  704. [PostgresSQL]
  705. ; Allow or prevent persistent links.
  706. pgsql.allow_persistent = On
  707. ; Detect broken persistent links always with pg_pconnect().
  708. ; Auto reset feature requires a little overheads.
  709. pgsql.auto_reset_persistent = Off
  710. ; Maximum number of persistent links.  -1 means no limit.
  711. pgsql.max_persistent = -1
  712. ; Maximum number of links (persistent+non persistent).  -1 means no limit.
  713. pgsql.max_links = -1
  714. ; Ignore PostgreSQL backends Notice message or not.
  715. ; Notice message logging require a little overheads.
  716. pgsql.ignore_notice = 0
  717. ; Log PostgreSQL backends Notice message or not.
  718. ; Unless pgsql.ignore_notice=0, module cannot log notice message.
  719. pgsql.log_notice = 0
  720. [Sybase]
  721. ; Allow or prevent persistent links.
  722. sybase.allow_persistent = On
  723. ; Maximum number of persistent links.  -1 means no limit.
  724. sybase.max_persistent = -1
  725. ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
  726. sybase.max_links = -1
  727. ;sybase.interface_file = "/usr/sybase/interfaces"
  728. ; Minimum error severity to display.
  729. sybase.min_error_severity = 10
  730. ; Minimum message severity to display.
  731. sybase.min_message_severity = 10
  732. ; Compatibility mode with old versions of PHP 3.0.
  733. ; If on, this will cause PHP to automatically assign types to results according
  734. ; to their Sybase type, instead of treating them all as strings.  This
  735. ; compatibility mode will probably not stay around forever, so try applying
  736. ; whatever necessary changes to your code, and turn it off.
  737. sybase.compatability_mode = Off
  738. [Sybase-CT]
  739. ; Allow or prevent persistent links.
  740. sybct.allow_persistent = On
  741. ; Maximum number of persistent links.  -1 means no limit.
  742. sybct.max_persistent = -1
  743. ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
  744. sybct.max_links = -1
  745. ; Minimum server message severity to display.
  746. sybct.min_server_severity = 10
  747. ; Minimum client message severity to display.
  748. sybct.min_client_severity = 10
  749. [bcmath]
  750. ; Number of decimal digits for all bcmath functions.
  751. bcmath.scale = 0
  752. [browscap]
  753. ;browscap = extra/browscap.ini
  754. [Informix]
  755. ; Default host for ifx_connect() (doesn't apply in safe mode).
  756. ifx.default_host =
  757. ; Default user for ifx_connect() (doesn't apply in safe mode).
  758. ifx.default_user =
  759. ; Default password for ifx_connect() (doesn't apply in safe mode).
  760. ifx.default_password =
  761. ; Allow or prevent persistent links.
  762. ifx.allow_persistent = On
  763. ; Maximum number of persistent links.  -1 means no limit.
  764. ifx.max_persistent = -1
  765. ; Maximum number of links (persistent + non-persistent).  -1 means no limit.
  766. ifx.max_links = -1
  767. ; If on, select statements return the contents of a text blob instead of its id.
  768. ifx.textasvarchar = 0
  769. ; If on, select statements return the contents of a byte blob instead of its id.
  770. ifx.byteasvarchar = 0
  771. ; Trailing blanks are stripped from fixed-length char columns.  May help the
  772. ; life of Informix SE users.
  773. ifx.charasvarchar = 0
  774. ; If on, the contents of text and byte blobs are dumped to a file instead of
  775. ; keeping them in memory.
  776. ifx.blobinfile = 0
  777. ; NULL's are returned as empty strings, unless this is set to 1.  In that case,
  778. ; NULL's are returned as string 'NULL'.
  779. ifx.nullformat = 0
  780. [Session]
  781. ; Handler used to store/retrieve data.
  782. session.save_handler = files
  783. ; Argument passed to save_handler.  In the case of files, this is the path
  784. ; where data files are stored. Note: Windows users have to change this
  785. ; variable in order to use PHP's session functions.
  786. ;
  787. ; As of PHP 4.0.1, you can define the path as:
  788. ;
  789. ;     session.save_path = "N;/path"
  790. ;
  791. ; where N is an integer.  Instead of storing all the session files in
  792. ; /path, what this will do is use subdirectories N-levels deep, and
  793. ; store the session data in those directories.  This is useful if you
  794. ; or your OS have problems with lots of files in one directory, and is
  795. ; a more efficient layout for servers that handle lots of sessions.
  796. ;
  797. ; NOTE 1: PHP will not create this directory structure automatically.
  798. ;         You can use the script in the ext/session dir for that purpose.
  799. ; NOTE 2: See the section on garbage collection below if you choose to
  800. ;         use subdirectories for session storage
  801. ;
  802. ; The file storage module creates files using mode 600 by default.
  803. ; You can change that by using
  804. ;
  805. ;     session.save_path = "N;MODE;/path"
  806. ;
  807. ; where MODE is the octal representation of the mode. Note that this
  808. ; does not overwrite the process's umask.
  809. ;session.save_path = "/tmp"
  810. ; Whether to use cookies.
  811. session.use_cookies = 1
  812. ;session.cookie_secure =
  813. ; This option enables administrators to make their users invulnerable to
  814. ; attacks which involve passing session ids in URLs; defaults to 0.
  815. ; session.use_only_cookies = 1
  816. ; Name of the session (used as cookie name).
  817. session.name = PHPSESSID
  818. ; Initialize session on request startup.
  819. session.auto_start = 0
  820. ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
  821. session.cookie_lifetime = 0
  822. ; The path for which the cookie is valid.
  823. session.cookie_path = /
  824. ; The domain for which the cookie is valid.
  825. session.cookie_domain =
  826. ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
  827. session.cookie_httponly =
  828. ; Handler used to serialize data.  php is the standard serializer of PHP.
  829. session.serialize_handler = php
  830. ; Define the probability that the 'garbage collection' process is started
  831. ; on every session initialization.
  832. ; The probability is calculated by using gc_probability/gc_divisor,
  833. ; e.g. 1/100 means there is a 1% chance that the GC process starts
  834. ; on each request.
  835. session.gc_probability = 1
  836. session.gc_divisor     = 100
  837. ; After this number of seconds, stored data will be seen as 'garbage' and
  838. ; cleaned up by the garbage collection process.
  839. session.gc_maxlifetime = 1440
  840. ; NOTE: If you are using the subdirectory option for storing session files
  841. ;       (see session.save_path above), then garbage collection does *not*
  842. ;       happen automatically.  You will need to do your own garbage
  843. ;       collection through a shell script, cron entry, or some other method.
  844. ;       For example, the following script would is the equivalent of
  845. ;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
  846. ;          cd /path/to/sessions; find -cmin +24 | xargs rm
  847. ; PHP 4.2 and less have an undocumented feature/bug that allows you to
  848. ; to initialize a session variable in the global scope, albeit register_globals
  849. ; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
  850. ; You can disable the feature and the warning separately. At this time,
  851. ; the warning is only displayed, if bug_compat_42 is enabled.
  852. session.bug_compat_42 = 1
  853. session.bug_compat_warn = 1
  854. ; Check HTTP Referer to invalidate externally stored URLs containing ids.
  855. ; HTTP_REFERER has to contain this substring for the session to be
  856. ; considered as valid.
  857. session.referer_check =
  858. ; How many bytes to read from the file.
  859. session.entropy_length = 0
  860. ; Specified here to create the session id.
  861. session.entropy_file =
  862. ;session.entropy_length = 16
  863. ;session.entropy_file = /dev/urandom
  864. ; Set to {nocache,private,public,} to determine HTTP caching aspects
  865. ; or leave this empty to avoid sending anti-caching headers.
  866. session.cache_limiter = nocache
  867. ; Document expires after n minutes.
  868. session.cache_expire = 180
  869. ; trans sid support is disabled by default.
  870. ; Use of trans sid may risk your users security.
  871. ; Use this option with caution.
  872. ; - User may send URL contains active session ID
  873. ;   to other person via. email/irc/etc.
  874. ; - URL that contains active session ID may be stored
  875. ;   in publically accessible computer.
  876. ; - User may access your site with the same session ID
  877. ;   always using URL stored in browser's history or bookmarks.
  878. session.use_trans_sid = 0
  879. ; Select a hash function
  880. ; 0: MD5   (128 bits)
  881. ; 1: SHA-1 (160 bits)
  882. session.hash_function = 0
  883. ; Define how many bits are stored in each character when converting
  884. ; the binary hash data to something readable.
  885. ;
  886. ; 4 bits: 0-9, a-f
  887. ; 5 bits: 0-9, a-v
  888. ; 6 bits: 0-9, a-z, A-Z, "-", ","
  889. session.hash_bits_per_character = 4
  890. ; The URL rewriter will look for URLs in a defined set of HTML tags.
  891. ; form/fieldset are special; if you include them here, the rewriter will
  892. ; add a hidden <input> field with the info which is otherwise appended
  893. ; to URLs.  If you want XHTML conformity, remove the form entry.
  894. ; Note that all valid entries require a "=", even if no value follows.
  895. url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
  896. [MSSQL]
  897. ; Allow or prevent persistent links.
  898. mssql.allow_persistent = On
  899. ; Maximum number of persistent links.  -1 means no limit.
  900. mssql.max_persistent = -1
  901. ; Maximum number of links (persistent+non persistent).  -1 means no limit.
  902. mssql.max_links = -1
  903. ; Minimum error severity to display.
  904. mssql.min_error_severity = 10
  905. ; Minimum message severity to display.
  906. mssql.min_message_severity = 10
  907. ; Compatibility mode with old versions of PHP 3.0.
  908. mssql.compatability_mode = Off
  909. ; Connect timeout
  910. ;mssql.connect_timeout = 5
  911. ; Query timeout
  912. ;mssql.timeout = 60
  913. ; Valid range 0 - 2147483647.  Default = 4096.
  914. ;mssql.textlimit = 4096
  915. ; Valid range 0 - 2147483647.  Default = 4096.
  916. ;mssql.textsize = 4096
  917. ; Limits the number of records in each batch.  0 = all records in one batch.
  918. ;mssql.batchsize = 0
  919. ; Specify how datetime and datetim4 columns are returned
  920. ; On => Returns data converted to SQL server settings
  921. ; Off => Returns values as YYYY-MM-DD hh:mm:ss
  922. ;mssql.datetimeconvert = On
  923. ; Use NT authentication when connecting to the server
  924. mssql.secure_connection = Off
  925. ; Specify max number of processes. -1 = library default
  926. ; msdlib defaults to 25
  927. ; FreeTDS defaults to 4096
  928. ;mssql.max_procs = -1
  929. ; Specify client character set.
  930. ; If empty or not set the client charset from freetds.comf is used
  931. ; This is only used when compiled with FreeTDS
  932. ;mssql.charset = "ISO-8859-1"
  933. [Assertion]
  934. ; Assert(expr); active by default.
  935. ;assert.active = On
  936. ; Issue a PHP warning for each failed assertion.
  937. ;assert.warning = On
  938. ; Don't bail out by default.
  939. ;assert.bail = Off
  940. ; User-function to be called if an assertion fails.
  941. ;assert.callback = 0
  942. ; Eval the expression with current error_reporting().  Set to true if you want
  943. ; error_reporting(0) around the eval().
  944. ;assert.quiet_eval = 0
  945. [COM]
  946. ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
  947. ;com.typelib_file =
  948. ; allow Distributed-COM calls
  949. ;com.allow_dcom = true
  950. ; autoregister constants of a components typlib on com_load()
  951. ;com.autoregister_typelib = true
  952. ; register constants casesensitive
  953. ;com.autoregister_casesensitive = false
  954. ; show warnings on duplicate constant registrations
  955. ;com.autoregister_verbose = true
  956. [mbstring]
  957. ; language for internal character representation.
  958. ;mbstring.language = Japanese
  959. ; internal/script encoding.
  960. ; Some encoding cannot work as internal encoding.
  961. ; (e.g. SJIS, BIG5, ISO-2022-*)
  962. ;mbstring.internal_encoding = EUC-JP
  963. ; http input encoding.
  964. ;mbstring.http_input = auto
  965. ; http output encoding. mb_output_handler must be
  966. ; registered as output buffer to function
  967. ;mbstring.http_output = SJIS
  968. ; enable automatic encoding translation according to
  969. ; mbstring.internal_encoding setting. Input chars are
  970. ; converted to internal encoding by setting this to On.
  971. ; Note: Do _not_ use automatic encoding translation for
  972. ;       portable libs/applications.
  973. ;mbstring.encoding_translation = Off
  974. ; automatic encoding detection order.
  975. ; auto means
  976. ;mbstring.detect_order = auto
  977. ; substitute_character used when character cannot be converted
  978. ; one from another
  979. ;mbstring.substitute_character = none;
  980. ; overload(replace) single byte functions by mbstring functions.
  981. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
  982. ; etc. Possible values are 0,1,2,4 or combination of them.
  983. ; For example, 7 for overload everything.
  984. ; 0: No overload
  985. ; 1: Overload mail() function
  986. ; 2: Overload str*() functions
  987. ; 4: Overload ereg*() functions
  988. ;mbstring.func_overload = 0
  989. [FrontBase]
  990. ;fbsql.allow_persistent = On
  991. ;fbsql.autocommit = On
  992. ;fbsql.show_timestamp_decimals = Off
  993. ;fbsql.default_database =
  994. ;fbsql.default_database_password =
  995. ;fbsql.default_host =
  996. ;fbsql.default_password =
  997. ;fbsql.default_user = "_SYSTEM"
  998. ;fbsql.generate_warnings = Off
  999. ;fbsql.max_connections = 128
  1000. ;fbsql.max_links = 128
  1001. ;fbsql.max_persistent = -1
  1002. ;fbsql.max_results = 128
  1003. [gd]
  1004. ; Tell the jpeg decode to libjpeg warnings and try to create
  1005. ; a gd image. The warning will then be displayed as notices
  1006. ; disabled by default
  1007. ;gd.jpeg_ignore_warning = 0
  1008. [exif]
  1009. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
  1010. ; With mbstring support this will automatically be converted into the encoding
  1011. ; given by corresponding encode setting. When empty mbstring.internal_encoding
  1012. ; is used. For the decode settings you can distinguish between motorola and
  1013. ; intel byte order. A decode setting cannot be empty.
  1014. ;exif.encode_unicode = ISO-8859-15
  1015. ;exif.decode_unicode_motorola = UCS-2BE
  1016. ;exif.decode_unicode_intel    = UCS-2LE
  1017. ;exif.encode_jis =
  1018. ;exif.decode_jis_motorola = JIS
  1019. ;exif.decode_jis_intel    = JIS
  1020. [Tidy]
  1021. ; The path to a default tidy configuration file to use when using tidy
  1022. ;tidy.default_config = /usr/local/lib/php/default.tcfg
  1023. ; Should tidy clean and repair output automatically?
  1024. ; WARNING: Do not use this option if you are generating non-html content
  1025. ; such as dynamic images
  1026. tidy.clean_output = Off
  1027. [soap]
  1028. ; Enables or disables WSDL caching feature.
  1029. soap.wsdl_cache_enabled=1
  1030. ; Sets the directory name where SOAP extension will put cache files.
  1031. soap.wsdl_cache_dir="/tmp"
  1032. ; (time to live) Sets the number of second while cached file will be used
  1033. ; instead of original one.
  1034. soap.wsdl_cache_ttl=86400
  1035. ; Local Variables:
  1036. ; tab-width: 4
  1037. ; End:
  1038. ;eaccelerator
  1039. [eaccelerator]
  1040. zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
  1041. eaccelerator.shm_size="1"
  1042. eaccelerator.cache_dir="/usr/local/eaccelerator_cache"
  1043. eaccelerator.enable="1"
  1044. eaccelerator.optimizer="1"
  1045. eaccelerator.check_mtime="1"
  1046. eaccelerator.debug="0"
  1047. eaccelerator.filter=""
  1048. eaccelerator.shm_max="0"
  1049. eaccelerator.shm_ttl="3600"
  1050. eaccelerator.shm_prune_period="3600"
  1051. eaccelerator.shm_only="0"
  1052. eaccelerator.compress="1"
  1053. eaccelerator.compress_level="9"
  1054. eaccelerator.keys = "disk_only"
  1055. eaccelerator.sessions = "disk_only"
  1056. eaccelerator.content = "disk_only"
  1057. ;ionCube
  1058. [Zend Optimizer]
  1059. zend_optimizer.optimization_level=1
  1060. zend_extension="/usr/local/zend/ZendOptimizer.so"
复制代码

本帖子中包含更多资源

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

x
发表于 2010-10-21 10:52:53 | 显示全部楼层
top 看负载 很低 没事的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-21 11:15:52 | 显示全部楼层
现在用的是php-fpm

有人说很吃内存。。

用php-fastcgi  ?是的吗?怎么改?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-21 11:16:33 | 显示全部楼层
Post by weams;2116670
top 看负载 很低 没事的


可是内存可用的很少啊。。。
ping都丢包
回复 支持 反对

使用道具 举报

发表于 2010-10-25 17:05:59 | 显示全部楼层
安装htop,用htop看实际用了多少内存,top显示的你还得去掉buffer和cache
回复 支持 反对

使用道具 举报

发表于 2010-12-17 10:46:53 | 显示全部楼层
呵呵,刚刚看到这篇帖子,参考一下吧: 64MB 的 VPS 能支持多少访问量?  http://www.vpsee.com/2009/06/can ... ve-1000pvs-per-day/
回复 支持 反对

使用道具 举报

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

本版积分规则

快速回复 返回顶部 返回列表