php.ini 基础配置
1305
|
2020-07-20 14:52:00
#在响应头中隐藏php信息
expose_php = Off
#短标签 ?>
short_open_tag = ON
#最大运行时间
max_execution_time = 300
#最大上传时间
max_input_time = 300
#内存限制
memory_limit = 128M
#最大POST数据
post_max_size = 32M
#时区
date.timezone = Asia/Shanghai
extension = "/usr/local/php/lib/php/extensions/no-debug-zts-20170718/ldap.so"
#OPcache 缓存
[opcache]
zend_extension=/usr/local/php/lib/php/extensions/no-debug-zts-20170718/opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
#设置php安全函数
disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru
#配置www.conf
listen = /var/run/www/php-cgi.sock
listen.owner = www
listen.group = www
listen.mode = 0660
listen.allowed_clients = 127.0.0.1
pm = dynamic
listen.backlog = -1
pm.max_children = 180
pm.start_servers = 50
pm.min_spare_servers = 50
pm.max_spare_servers = 180
request_terminate_timeout = 120
request_slowlog_timeout = 50
slowlog = var/log/slow.log
代码段 小部件