Problem module Prestashop using Zend Framework HTTP => HTTPS

For programming and general questions on Zend Framework
Post Reply
math8631
Posts: 2
Joined: Fri Nov 13, 2015 11:24 am

Problem module Prestashop using Zend Framework HTTP => HTTPS

Post by math8631 » Fri Nov 13, 2015 11:32 am

Hello,

A web agency has developped a Prestashop module to import product catalog of one of my suppliers, and has used the Zend Framework (2.2.5 version) to download the product catalog in XML.

Before, the supplier's website was in HTTP and everything was working via CRON tasks, but since they put their website in HTTPS (SSL), the download of the XML file doesn't work...

I replaced all HTTP links by HTTPS in the code of the module, but I didn't made any modification in Zend because I don't know how this works.
I think the problem comes from Zend Framework.

The exact error is :

PHP Fatal error: Uncaught exception 'ErrorException' with message 'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed' in /var/www/mywebsite/modules/cw06importbrands/Zend/Http/Client/Adapter/Socket.php:276
Stack trace:
#0 [internal function]: Zend\Stdlib\ErrorHandler::addError(2, 'stream_socket_e...', '/var/www/mywebsite...', 276, Array)
#1 /var/www/mywebsite/modules/cw06importbrands/Zend/Http/Client/Adapter/Socket.php(276): stream_socket_enable_crypto(Resource id #83, true, 2)
#2 /var/www/mywebsite/modules/cw06importbrands/Zend/Http/Client.php(1358): Zend\Http\Client\Adapter\Socket->connect('www.siteofthesupplier...', 443, true)
#3 /var/www/mywebsite/modules/cw06importbrands/Zend/Http/Client.php(878): Zend\Http\Client->doRequest(Object(Zend\Uri\Http), 'GET', true, Array, '')
#4 /var/www/mywebsite/modules/cw06importbrands/cw06importbrands.php(555): Zend\Http\Client->send()
#5 /var/www/pa in /var/www/mywebsite/modules/cw06importbrands/Zend/Http/Client/Adapter/Socket.php on line 299


Do you know how to solve that problem ?

Thank you in advance !

Best regards from France,

Mathieu

stij2324
Posts: 55
Joined: Fri Nov 06, 2015 11:42 pm

Re: Problem module Prestashop using Zend Framework HTTP => H

Post by stij2324 » Fri Nov 13, 2015 10:42 pm

Yes they need to fix they ssl certificate.
Ort you need to disabale the validation of the certificate in the call.

math8631
Posts: 2
Joined: Fri Nov 13, 2015 11:24 am

Re: Problem module Prestashop using Zend Framework HTTP => H

Post by math8631 » Fri Nov 13, 2015 10:54 pm

Thank you for your reply.

Unfortunately I don't know how to proceed I'm not a developer.

If I give you the FTP access to the module, are you able to sole me this problem ?

Best regards.
Mathieu

Post Reply