OpenCart 2.3.0.2中的扩展安装程序错误

问题描述 投票:2回答:1

我试图在opencart 2.3.0.2中的扩展安装程序中上传文件,但是我收到错误消息:

SyntaxError:JSON.parse:JSON数据的第1行第1列的意外字符

警告:ftp_login():抱歉,此服务器不接受明文会话。在第294行的///////admin/controller/extension/installer.php {“错误”:“无法以管理员身份登录”}

请在下面的截图中找到

enter image description here

提前致谢。

php opencart opencart2.3
1个回答
1
投票

您需要使用ftp_ssl_connect()函数而不是ftp_connect(),因为服务器正在使用显式TLS / SSL

试试这个:

admin\controller\extension\installer.php

找:

$connection = ftp_connect($this->config->get('config_ftp_hostname'), $this->config->get('config_ftp_port'));

改成:

$connection = ftp_ssl_connect($this->config->get('config_ftp_hostname'), $this->config->get('config_ftp_port'));

资料来源:

https://stackoverflow.com/a/22969260/4330223

https://forum.opencart.com/viewtopic.php?t=142341#p585561

© www.soinside.com 2019 - 2024. All rights reserved.