Ezhil
Ezhil

Reputation: 1006

Extension installer error in OpenCart 2.3.0.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.

Upvotes: 2

Views: 952

Answers (1)

DigitCart
DigitCart

Reputation: 3000

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

Upvotes: 1

Related Questions