2

I tried to upload file in extension installer in opencart 2.3.0.2 but I get error message:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

Warning: ftp_login(): Sorry, cleartext sessions are not accepted on this server. in ///////admin/controller/extension/installer.php on line 294{"error":"Could not login as admin"}

Please find the attached below screenshot

enter image description here

Thanks in advance.

DigitCart
  • 2,980
  • 2
  • 18
  • 28
Ezhil
  • 996
  • 8
  • 13

1 Answers1

1

You need to use ftp_ssl_connect() function instead of ftp_connect() because server is using Explicit TLS/SSL

Try this:

admin\controller\extension\installer.php

Find:

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

Change to:

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

Sources:

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

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

DigitCart
  • 2,980
  • 2
  • 18
  • 28