小破站

未分类 | 小破站

Warning: Undefined variable $wrap in /www/wwwroot/www.999678.xyz/wp-content/themes/presence/archive.php on line 9
>

All posts in “未分类”

解决DMIT无法使用SSH客户端登录的问题

问题分析:VPS只允许密钥证书登录,不支持密码登录。

想要只支持密码登录。

解决方案:登录修改ssh,取消密钥证书登录,支持root密码登录,同时修改端口为高位端口。

1、登录DMIT后台,在页面上修改root密码

2、在VPS的后台找到面板终端按钮,登录root

3、配置sshd文件

(系统为Debian,以下命令在Debian上适用)

输入 vi /etc/ssh/sshd_config

把Port 22 的参数修改为其它端口,如果有#,需要去掉

把PermitRootLogin和PasswordAuthentication俩参数修改为yes

把PubkeyAuthentication的参数修改为no,或注释掉

把ChallengeResponseAuthentication 参数修改为no,或注释掉

4、重启sshd服务

service sshd restart 或者 systemctl restart sshd

2024-11-04 0 / /
标签:  暂无标签

宝塔面板wordpress“知更鸟”主题升级到php7.3,出现“警告错误提示”的解决办法

最近,将网站运行的硬件进行了升级,从虚拟主机换成了vps,同时,用上最新的宝塔面板(基于centos7的6.9版本),php主要是用7.3版本,网上资料说,wordpress完美支持php7.0及以上版本,那么现阶段选择php7.3是可以承前启后的。

附为什么要选择php7,因为快;为什么选择php7.3,因为其稳定。

一通wordpress搬家操作。域名解析更换且成功后,浏览网站,出现这么一大串:

constant gallerytag – assumed ‘gallerytag’ (this will throw an Error in a future version of PHP) in……
constant videotag – assumed ‘videotag’ (this will throw an Error in a future version of PHP) in……
constant taotag – assumed ‘taotag’ (this will throw an Error in a future version of PHP) in……
constant filtersa – assumed ‘filtersa’ (this will throw an Error in a future version of PHP) in constant filtersb – assumed ‘filtersb’ (this will throw an Error in a future version of PHP) in……

……好多好多,不忍描述。然后下面是网站正常的样子。

以上这些错误大概意思是“使用了未定义的常量gallerytag、videotag、taotag、filtersa、filtersb,这将在未来的PHP版本中引发错误“;

我去,不是说wordpress完美支持php7么?怎么会这样,细一思考,这其实不怪wordpress,而是用的是“知更鸟”主题,这个主题有很多字段模型,如上面的gallerytag、videotag等,这都是主题附带的。

那解决方法有两种:

一、升级主题,这个不太现实。

二、只是报了”Warning警告“,我能不能不让这些错误信息显示?

看来只需要关闭”PHP错误提示“就行了。宝塔面板中操作如下:

进入php管理,点“配置修改”,设置display_errors为关闭,然后保存,重启一下服务。

就这么简单。

如果不是在宝塔面板,那就要深入腹地,修改php.ini文件。

1、打开 php.ini

2、设置 error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

3、设置 display_errors = Off

其实两个方法,只是方式不同,改的都是同一个东西。

2024-07-11 0 / /
标签:  暂无标签

世界,您好!

欢迎使用 WordPress。这是您的第一篇文章。编辑或删除它,然后开始写作吧!

2024-07-11 1 / /
标签:  暂无标签

Warning: Undefined variable $max_page in /www/wwwroot/www.999678.xyz/wp-content/themes/presence/functions.php on line 201
回到顶部