Closed smindel closed 5 years ago
CWP requires all outgoing traffic to travel through an egres proxy. The choice of native PHP function to send the update requests to Google and Bing (fsockopen) does not support the configuring of proxies, e.g. default stream contexts easily and connection details like URLs and ports are hard coded in the module.
The result is that you get the following errors: [error-log] E_WARNING: fsockopen(): unable to connect to www.google.com:80 (Network is unreachable) [error-log] E_WARNING: fsockopen(): unable to connect to www.bing.com:80 (Network is unreachable)
PR welcome.
Here you go: #157
GoogleSitemap::ping() cannot be piped through CWP egres proxy, because fsockopen doesn't use stream_context_set_default():
https://www.cwp.govt.nz/developer-docs/en/2/how_tos/external_http_requests_with_proxy