cancel
Showing results for 
Search instead for 
Did you mean: 

Net_SFTP | php7 | Deprecated Functionality (class name used for constructor)

Net_SFTP | php7 | Deprecated Functionality (class name used for constructor)

Hi All,

 

    I have found following error when using sftp with default vendor package in magento 2.0.7 (CE).

 

Error:

 

    Deprecated Functionality: Methods with the same name as their class will not be constructors in a future version of PHP; Net_SFTP has a deprecated constructor in vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 122

 

Reason: Net_SFTP uses class name for function for constructor but this is deprecated  in php7.

 

It is basically problem with the Net_SFTP package in php7.

 

Please check.

 

Regards,

Ranga

2 REPLIES 2

Re: Net_SFTP | php7 | Deprecated Functionality (class name used for constructor)

Hello Ranga,

You are right problem caused by PHP version. Update your PHP version. If you instal new extension from the marketplace they will ask for PHP 7. So it is better to update PHP rather than using a patch. 

This may help you to Install PHP and required PHP extension http://www.ipragmatech.com/install-magento2-php7-amazon-ec2/

Re: Net_SFTP | php7 | Deprecated Functionality (class name used for constructor)

Hi Manish Kumar,

 

 

It is basically problem with the Net_SFTP package in php7.