Ecodev / newsletter

TYPO3 extension to send newsletter
https://extensions.typo3.org/extension/newsletter/
25 stars 26 forks source link

Newsletter curl error with https #143

Closed totocrenn closed 6 years ago

totocrenn commented 6 years ago

Hi guys, I have some trouble to use the newsletter extension with https. When I go to the newsletter tab and I choose a page, there is some seconds of loading and then get this error in the Newsletter validity --> Errors : Could not fetch "https://www._my-domain_.bzh/index.php?id=45" Error: 28 Message: cURL error 28: Operation timed out after 0 milliseconds with 0 out of 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

When I apply the patch I got an other error : Content too short. The content must be at least 200 chars long to be considered valid. My page is far from being under 200 char long...

Any suggestions would be most welcome.

Newsletter version : 3.2.0 Typo3 version : 8.7.7

PowerKiKi commented 6 years ago

From your server ssh prompt, try curl https://www.my-domain.bzh/index.php?id=45. If it does not return your page content, then something is wrong with your server configuration and it should be solved. Said differently: your sever must be able to browse itself via cURL, independently from TYPO3.

totocrenn commented 6 years ago

The command curl https://www.my-domain.bzh/index.php?id=45 return curl: (7) Failed to connect to www.lorient-agglo.bzh port 443: Connection denied. So it looks like it's a server side configuration issue right ? The server is behind a proxy that's probably why.. Any suggestions ?

PowerKiKi commented 6 years ago

Yes, it is is a server side configuration issue.

I don't have much advice on the topic, except that Newsletter send a special User-Agent header that might help you configuring the proxy. It should look like User-Agent: TYPO3 Newsletter.

totocrenn commented 6 years ago

I just tried to add this line in \Ecodev\Newsletter\Utility\Validator::getURL curl_setopt($ch, CURLOPT_PROXY, "tcp://10.X.X.X:YYYY"); 10.X.X.X is the IP of our proxy and YYYY the port number

No changes, still the Content too short error

PowerKiKi commented 6 years ago

Before touching TYPO3, I suggest you to first solve it on the command line, then you'll have a better understanding on what to change within TYPO3.

PowerKiKi commented 6 years ago

Closing for lack of activity