
作者
本站作者 我好笨 共计发布文章979篇

数据库本身的日志占多数,早期的日志未处理,后面的都设置了30天自动清理的。
操作涉及的一些SQL如下:
SELECT
sum(rows) AS total_rows,
formatReadableSize(sum(data_uncompressed_bytes)) AS before_compress,
formatReadableSize(sum(data_compress...

php开发thinkphp8 $request->controller()在中间件中获取不到值
在官方的文档中,中间件的定义部分,特别是应用中间件的定义,是在应用目录下定义middleware.php文件
并在文件中声明中间件即可。
实际操作时,会走中间件,但是,通过$request->controller()无法获取到控制器名称。
搜了一下,发现是需要在应用目录下创建config目录,并在里面定义route.php文件,在其中初始化中间件,这个有点奇怪,...

其他技术使用docker安装JumpServer的最简单方法
官网安装方法: https://docs.jumpserver.org/zh/v3/installation/setup_linux_standalone/requirements/
官方的一键安装命令:
curl -sSL https://resource.fit2cloud.com/jumpserver/jumpserver/releases/latest/download/q...

其他技术搭建开源堡垒机Jumpserver提示:配置文件有问题,无法登录,请联系管理员或查看最新文档
服务器通过nginx代理提示这个,后面也没解决。
最后还是没有走代理解决的。
不过,出现这个,需要修改配置文件,配置文件默认在:
/opt/jumpserver/config/config.txt
主要是这个位置不是太好找。改里面的domains即可,页面上有提示的。

其他技术css设置页面或者容器的滚动条在顶部,上面或者左边
设置左右,通过:
direction: ltr;
direction: rtl;
来实现。
设置顶部,通过反转页面展示来实现:
transform: scaleY(-1);
参考:https://blog.csdn.net/weixin_44670249/article/details/116790296
其中设置滚动条在顶部的代码如下:
// 实现原理
// ...

其他技术vscode执行npm或者pnpm报错:pnpm : 无法加载文件 C:Program Filesnodejspnpm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies
报错信息:
pnpm : 无法加载文件 C:Program Filesnodejspnpm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的
about_Execution_Policies
解决办法:
1. 以管理员身份运行vscode;
2. 执行:get-Executi...

其他技术Oracle 18C导出awr性能分析报告的过程
在sqlplus下面:
cd /opt/oracle/product/18c/dbhome_1/rdbms/admin
@?/rdbms/admin/awrrpt.sql
第一句是切换目录,第二句是生成报告,然后有几个参数需要输入,按照提示输入即可。
生成完成后,文件在第一句那个目录下,下载下来就可以了。
更多信息可以参考:
https://www.cnbl...

其他技术Gemini Pro的重搭建,pm2没有save导致的
继上一篇自己搭建了一个Gemini Pro Chat (144d.com)文章过去已经很久了
偶然把VPS重启了一下,发现pm2没有保存原来的内容,重试了半天,都找不到启动之法了。
于是,又重新各种查找资料,最后通过两种方式找回:
第一种,就是上文说到的,通过pnmp build以后,会有一个dist目录,里面有server和client两个目录,然后server目录...

其他技术记一次Clickhouse的问题处理,报错:query execution time (39.17692568900305 seconds) is too long. Maximum: 20 rows to process: 549270975: While executing MergeTreeThread. (TOO SLOW)
实际问题很简单,就是执行SQL查询超时,默认的查询超时时间是20秒。
为什么20秒还会超时呢,肯定是技术不到家。本来是属于验证型的一个日志库,日志存储了5亿多了,是大文本的那种数据,在其他库下面早死了几百次了那种。所以clickhouse能够查询出来,都还算不错。
由于对Clickhouse掌握的不够深,建表的时候,并未在查询某条记录详细的时候,给where条件后的字段建立索...

其他技术frp报错:frpc login to server failed: i/o deadline reached
正常的服务,跑着跑着,就提示这个了。
配置文件是公共的,也不知道谁改了什么。
解决这个,在配置文件的common段,放入:
tls_enable = true
这样,再重新运行就可以了。

php开发WeCenter V4.1.0后台,话题管理,编辑已有话题报错:htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
后台,话题管理,编辑已有话题报错:htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
调试信息提示文件:
at FormBuilder->fetch() in Topic.php line 247
完整路径:
app/backend/content/Topi...

其他技术今天偶然看到一篇帖子说eu.org域名被禁止了
之前申请过两个,很少使用,前端时间测试一个模型用到了,并配置在了微信公众号里,用来平时自己记录一点东西使用
昨晚用了一下,无法正常使用了,还以为是模型无法调用导致的,并没在意
今天突然看到别人发帖子说这个域名被封禁了,于是,换了一个域名解析上去,功能果然正常了。
哎,免费域名滥用就会导致这样的问题,现在太多人不珍惜资源了。

php开发本地PHP8.1配置wecenter4.1,点击个人中心的账号设置报错
报错信息:
htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
经检查发现,是模板中对值进行了转换,但默认初始值是null,因此需要转换一下
打开文件:app/common/controller/Frontend.php
第45行下面,添加:
if (is...

php开发本地PHP8.1配置wecenter4.1,点击首页的热门标签报错
报错信息:
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'peth5.aws_answer.id' which is not function...
![本地PHP8.1配置wecenter4.1报错:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'peth5.aws_answer.id' which is 本地PHP8.1配置wecenter4.1报错:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'peth5.aws_answer.id' which is](https://www.144d.com/content/templates/J2/images/random/14.jpg)
php开发本地PHP8.1配置wecenter4.1报错:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'peth5.aws_answer.id' which is
登录以后,点击个人主页报错:
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'peth5.aws_answer.id' which is not...
![本地PHP8.1配置wecenter4.1报错:[error] [0]Class "thinkfacadeFilesystem" not found 本地PHP8.1配置wecenter4.1报错:[error] [0]Class "thinkfacadeFilesystem" not found](https://www.144d.com/content/templates/J2/images/random/2.jpg)
php开发本地PHP8.1配置wecenter4.1报错:[error] [0]Class "thinkfacadeFilesystem" not found
报错位置:
appcommonlibraryhelperUploadHelper.php:226
这是因为引入了thinkphp的Filesystem类,但是下载的压缩包里面没有包含。
修改composer.json,加入
"topthink/think-filesystem":"^1.0",
如图:
改成如图后,再composer update即可。
...
![本地PHP8.1配置wecenter4.1报错:[error] [0]thinkRequest::server(): Argument #2 ($default) must be of type string, null given, 本地PHP8.1配置wecenter4.1报错:[error] [0]thinkRequest::server(): Argument #2 ($default) must be of type string, null given,](https://www.144d.com/content/templates/J2/images/random/19.jpg)
php开发本地PHP8.1配置wecenter4.1报错:[error] [0]thinkRequest::server(): Argument #2 ($default) must be of type string, null given,
报错位置:
appcommoncontrollerPlugins.php on line 89
找到文件位置,发现是从cookie中获取token时,没有初始化,导致的报错。
于是改一改:
$cookie_token=cookie('token');
$cookie_token=$cookie_token?$cookie_token:'';
...
![本地PHP8.1配置wecenter4.1报错:[error] [8192]explode(): Passing null to parameter #2 ($string) of type string is deprecated 本地PHP8.1配置wecenter4.1报错:[error] [8192]explode(): Passing null to parameter #2 ($string) of type string is deprecated](https://www.144d.com/content/templates/J2/images/random/16.jpg)
php开发本地PHP8.1配置wecenter4.1报错:[error] [8192]explode(): Passing null to parameter #2 ($string) of type string is deprecated
只要打开了调试模式,定位到了文件,就可以解决了。
报错文件位于:
appcommonlibraryhelperUserAuthHelper.php:58
找到文件,在报错代码前面加一句:
$authArr = is_null($authArr)?'':$authArr;
就不再报错了。