Discuz! Database Error
(1062) Duplicate entry 'available' for key 'PRIMARY'
INSERT INTO `minfish_conf` (`skey`, `svalue`) VALUES ('available', '1');

再整理,再出发,人生是一段不休的自我救赎……
Discuz! Database Error
(1062) Duplicate entry 'available' for key 'PRIMARY'
INSERT INTO `minfish_conf` (`skey`, `svalue`) VALUES ('available', '1');

[1314]SEO之sitemap开启需要额外添加伪静态文件
Nginx Web Server
rewrite ^([^\.]*)/sitemap-([0-9]+)\.html$ $1/sitemap.php?module=forum&type=new&page=$2 last;
if (!-e $request_filename) {
return 404;
}
MediaWiki 伪静态静态化
官方的Nginx伪静态设置
https://www.mediawiki.org/wiki/Manual:Short_URL/Nginx
估计你们也难搞,建议采用宝塔面板,网站配置里面的静态化规则:
laravel5的规则
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
MVC规则
location /{
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}
MediaWiki:Common.js 文件打开404 not found
去掉网站配置里面如下选定内容

MediaWiki上传数据库出现502 bad gateway

MediaWiki是比较大,MediaWiki的数据库里会存储每次的编辑记录,所以大。所以,在导出MediaWiki的数据库时候选择gz压缩就行了,能压缩掉2/3,因为sql是纯文本的内容。
需要,设置nginx的fcgi超时时间调大一点,如下所示默认是60s,如果是数据库很大,就可以适当将连接时间设置长一点。

如下是某国内阿里云深圳服务器原始nginx配置
user www www;
worker_processes auto;
error_log /www/wwwlogs/nginx_error.log crit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
include mime.types;
#include luawaf.conf;
include proxy.conf;
default_type application/octet-stream;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 300m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server_tokens off;
access_log off;
server
{
listen 888;
server_name phpmyadmin;
index index.html index.htm index.php;
root /www/server/phpmyadmin;
location ~ /tmp/ {
return 403;
}
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /www/wwwlogs/access.log;
}
include /www/server/panel/vhost/nginx/*.conf;
}
一、啥时候用到
用来设置请求资源和服务器返回的时间,保证一个请求占用固定时间,超出后报504超时!这样可以保证一个请求占用过长时间。
二、主要参数
使用nginx服务器如果遇到timeou情况时可以如下设置参数,使用fastcgi:
fastcgi_connect_timeout 75; 链接
fastcgi_read_timeout 600; 读取
fastcgi_send_timeout 600; 发请求
这两个选项.
fastcgi_read_timeout是指fastcgi进程向nginx进程发送response的整个过程的超时时间
fastcgi_send_timeout是指nginx进程向fastcgi进程发送request的整个过程的超时时间
这两个选项默认都是秒(s),可以手动指定为分钟(m),小时(h)等
三、其他常用参数以及参数说明
keepalive_timeout 600; 连接超时时间,1分钟,具体时间可以根据请求(例如后台导入)需要的时间来设置
proxy_connect_timeout 600; 1分钟
proxy_read_timeout 600; 1分钟
nginx超时配置参数说明:
keepalive_timeout
语法 keepalive_timeout timeout [ header_timeout ]
默认值 75s
上下文 http server location
说明 第一个参数指定了与client的keep-alive连接超时时间。服务器将会在这个时间后关闭连接。可选的第二个参数指定了在响应头Keep-Alive: timeout=time中的time值。这个头能够让一些浏览器主动关闭连接,这样服务器就不必要去关闭连接了。没有这个参数,nginx不会发送Keep-Alive响应头(尽管并不是由这个头来决定连接是否“keep-alive”)
两个参数的值可并不相同
注意不同浏览器怎么处理“keep-alive”头
MSIE和Opera忽略掉”Keep-Alive: timeout=” header.
MSIE保持连接大约60-65秒,然后发送TCP RST
Opera永久保持长连接
Mozilla keeps the connection alive for N plus about 1-10 seconds.
Konqueror保持长连接N秒
proxy_connect_timeout
语法 proxy_connect_timeout time
默认值 60s
上下文 http server location
说明 该指令设置与upstream server的连接超时时间,有必要记住,这个超时不能超过75秒。
这个不是等待后端返回页面的时间,那是由proxy_read_timeout声明的。如果你的upstream服务器起来了,但是hanging住了(例如,没有足够的线程处理请求,所以把你的请求放到请求池里稍后处理),那么这个声明是没有用的,由于与upstream服务器的连接已经建立了。
proxy_read_timeout
语法 proxy_read_timeout time
默认值 60s
上下文 http server location
说明 该指令设置与代理服务器的读超时时间。它决定了nginx会等待多长时间来获得请求的响应。这个时间不是获得整个response的时间,而是两次reading操作的时间。
client_header_timeout
语法 client_header_timeout time
默认值 60s
上下文 http server
说明 指定等待client发送一个请求头的超时时间(例如:GET / HTTP/1.1).仅当在一次read中,没有收到请求头,才会算成超时。如果在超时时间内,client没发送任何东西,nginx返回HTTP状态码408(“Request timed out”)
client_body_timeout
语法 client_body_timeout time
默认值 60s
上下文 http server location
说明 该指令设置请求体(request body)的读超时时间。仅当在一次readstep中,没有得到请求体,就会设为超时。超时后,nginx返回HTTP状态码408(“Request timed out”)
lingering_timeout
语法 lingering_timeout time
默认值 5s
上下文 http server location
说明 lingering_close生效后,在关闭连接前,会检测是否有用户发送的数据到达服务器,如果超过lingering_timeout时间后还没有数据可读,就直接关闭连接;否则,必须在读取完连接缓冲区上的数据并丢弃掉后才会关闭连接。
resolver_timeout
语法 resolver_timeout time
默认值 30s
上下文 http server location
说明 该指令设置DNS解析超时时间
proxy_send_timeout
语法 proxy_send_timeout time
默认值 60s
上下文 http server location
说明 这个指定设置了发送请求给upstream服务器的超时时间。超时设置不是为了整个发送期间,而是在两次write操作期间。如果超时后,upstream没有收到新的数据,nginx会关闭连接
proxy_upstream_fail_timeout(fail_timeout)
语法 server address [fail_timeout=30s]
默认值 10s
上下文 upstream
说明 Upstream模块下 server指令的参数,设置了某一个upstream后端失败了指定次数(max_fails)后,该后端不可操作的时间,默认为10秒
四、实例
这里来看一个把Nginx的超时时间上调的例子。
看看时间是否符合要求,在nginx.config里面的三个参数:
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
以上的单位是秒。
MediaWiki搬家、换域名
官方说明 https://www.mediawiki.org/wiki/Manual:Moving_a_wiki
本页说明了如何将Wiki移至另一台服务器。当移至其他Web服务器或域(或两者)时,通常需要这样做。
最安全的方法是在两个Wiki上使用相同的MediaWiki版本。但是,可以在新服务器上安装较新的MediaWiki版本,并直接在新服务器上执行升级。实际上,如果要将Wiki升级到要求比旧服务器上的要求更高的新版本(例如php版本),则这可能是您唯一的选择。
其他页面中基本解释了这些步骤:
备份您的Wiki。
将备份从旧服务器转移到新服务器。
在新服务器上还原备份。
全局 » 上传设置
抱歉,当前的本地文件读取模式会导致部分浏览器下视频播放异常,如需开启附件URL地址、媒体附件播放,请在 config_global.php 内修改本地文件读取模式为 1 或 4 后再试
默认为2
// ------------------------- CONFIG DOWNLOAD -------------------------- //
$_config['download']['readmod'] = 2;
论坛中的用户无法修改个人资料(前面提过,但没解决得了。),在论坛搜了一下——要修改profilegroup表。不知这表应该怎么修改?
您开启了 运行 SQL 语句 功能。建议您只有在十分必要的时候才开启它。请修改 config/config_global.php 关闭此功能
后台 站长 数据库升级
运行以下sql:
a:5:{s:4:"base";a:4:{s:9:"available";i:1;s:12:"displayorder";s:1:"0";s:5:"title";s:12:"基本资料";s:5:"field";a:17:{s:8:"realname";s:8:"realname";s:6:"gender";s:6:"gender";s:8:"birthday";s:8:"birthday";s:9:"birthcity";s:9:"birthcity";s:10:"residecity";s:10:"residecity";s:10:"residedist";s:10:"residedist";s:15:"affectivestatus";s:15:"affectivestatus";s:10:"lookingfor";s:10:"lookingfor";s:9:"bloodtype";s:9:"bloodtype";s:6:"field1";s:6:"field1";s:6:"field2";s:6:"field2";s:6:"field3";s:6:"field3";s:6:"field4";s:6:"field4";s:6:"field5";s:6:"field5";s:6:"field6";s:6:"field6";s:6:"field7";s:6:"field7";s:6:"field8";s:6:"field8";}}s:7:"contact";a:4:{s:5:"title";s:12:"联系方式";s:9:"available";i:1;s:12:"displayorder";s:1:"1";s:5:"field";a:7:{s:9:"telephone";s:9:"telephone";s:6:"mobile";s:6:"mobile";s:2:"qq";s:2:"qq";s:3:"msn";s:3:"msn";s:6:"taobao";s:6:"taobao";s:3:"icq";s:3:"icq";s:5:"yahoo";s:5:"yahoo";}}s:3:"edu";a:4:{s:9:"available";i:1;s:12:"displayorder";s:1:"2";s:5:"title";s:12:"教育情况";s:5:"field";a:2:{s:14:"graduateschool";s:14:"graduateschool";s:9:"education";s:9:"education";}}s:4:"work";a:4:{s:9:"available";i:1;s:12:"displayorder";s:1:"3";s:5:"title";s:12:"工作情况";s:5:"field";a:4:{s:7:"company";s:7:"company";s:10:"occupation";s:10:"occupation";s:8:"position";s:8:"position";s:7:"revenue";s:7:"revenue";}}s:4:"info";a:4:{s:5:"title";s:12:"个人信息";s:9:"available";i:1;s:12:"displayorder";s:1:"4";s:5:"field";a:10:{s:10:"idcardtype";s:10:"idcardtype";s:6:"idcard";s:6:"idcard";s:7:"address";s:7:"address";s:7:"zipcode";s:7:"zipcode";s:4:"site";s:4:"site";s:3:"bio";s:3:"bio";s:8:"interest";s:8:"interest";s:7:"sightml";s:7:"sightml";s:12:"customstatus";s:12:"customstatus";s:10:"timeoffset";s:10:"timeoffset";}}}
记住在数据库管理后台phpmyadmin,每页默认显示25行,如果你要找profilegroup表,我一开始就设置每页显示最多500行,然后怎么保存,都保存不了。
后来,我改为每页显示50行,然后找到大概是第7页,就可以找到profilegroup表,然后再保存上面的数据,就可以搞定了。
Web 在线加密(无下载,新上线)
https://miniu.alipay.com/keytool/create
WINDOWS(windows 版本工具请不要安装在含有空格的目录路径下,否则会导致公私钥乱码的问题)
https://ideservice.alipay.com/ide/getPluginUrl.htm?clientType=assistant&platform=win&channelType=WEB
MAC_OS
https://ideservice.alipay.com/ide/getPluginUrl.htm?clientType=assistant&platform=mac&channelType=WEB
将注册表HKEY_CURRENT_USER\Software\Classes\下面的,图片格式,例如jpg、jpeg、Tiff、gif、png、bmp、ico等图片格式,设置默认键值如下:
PhotoViewer.FileAssoc.Tiff