Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /opencart-path/system/library/mail.php
Currently i was working in a open cart ecommerce solution and i came across this error:
Warning:
fsockopen
(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided,
or
not known in /opencart-path/system/library/mail.php on line 168
fsockopen
(): unable to connect to :465 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided,
or
not known) in /opencart-path/system/library/mail.php on line 168Notice: Error: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided,
or
not known (0) in /opencart-path/system/library/mail.php on line 171
PHP Warning:
fsockopen
(): php_network_getaddresses: getaddrinfo failed: Name
or
service not known in /opencart-path/system/library/mail.php on line 168
PHP Warning:
fsockopen
(): unable to connect to :25 (php_network_getaddresses: getaddrinfo failed: Name
or
service not known) in /opencart-path/system/library/mail.php on line 168
fsockopen
(): unable to connect to :587 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided,
or
not known) in /opencart-path/system/library/mail.php on line 168Notice: Error: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided,
or
not known (0) in /opencart-path/system/library/mail.php on line 171
After searching a bit i found the solution
This issue was not related to hosting config and if the SMTP configuration was previously working, this only indicated an issue with the latest open cart 2.0.2.0 patch.
After searching i found the issue with the actual upgrade package of OpenCart 2.0.2.0. I found config_mail_smtp_host variable was changed to config_mail_smtp_hostname, but there are files, where the old name was not replaced with the new one. This is the reason why the SMTP configuration for the mail service of Open Cart was not working properly.
So i had to manually replace all the files, where the old config_mail_smtp_host is used and changed it to config_mail_smtp_hostname. This fixed the issue completely for me.
I hope this article would help some one facing the similar issue ..
Thank you about the article! Can you tell us which are these fails?