Jump to content
Wairds

Fatal error: php_network_getaddresses

Recommended Posts

I am receiving the following error when trying to access a specific category on my website:

Fatal error: php_network_getaddresses: getaddrinfo failed: Name or service not known in /vhost/vhost16/l/i/f/lifecovers.co.uk/www/classes/db/mysqli.class.php on line 38

The category in question is: https://www.lifecovers.co.uk/coin-purses/clasp-purses.html

I can access the items within the category without an issue.

I am baffled as to why I receive this error as it appears generic but is affecting one particular category?

Can anybody advise?

Edited by Wairds

Share this post


Link to post
Share on other sites

From my shallow research on the error message, I wonder if:
1. Your hosting server connects to a database server farm with a load balancer
2. The designated server for that specific query has been cached (not by CubeCart)
3. That designated server no longer exists

The above is just a shot into the absurd.

Here's hoping a support ticket to your hosting provider provides an answer.

Share this post


Link to post
Share on other sites

I have contacted my hosting service and their response is that they believe it to be a coding error. My response to them was that if it was a coding error I would have expected it to be consistent and reproducible. Which it is not and is borne out by the fact it appears to have gone.

Thanks once again for your response.

Share this post


Link to post
Share on other sites

What version of CubeCart are you running and have you made any changes to core code at all.  What plugins are you using ?  Any that affect category functionality especially any non-CubeCart developed ones ?

Is this consistently happening with that one category but no others or is it intermittent.

Extremely unlikely to be a "coding error" but unfortunately that is the typical response you get from 99% of hosting companies !

Ian

Share this post


Link to post
Share on other sites

Ian,

Thank you for taking an interest. The only add-in which possibly may have an impact is Add-this but there again it has been in for a while. I have carried out no recent maintenance on the website.

It was intermittent with other categories and the one category which was acting up is now fine.

Share this post


Link to post
Share on other sites

Those were always a long shot - the cause of that error is almost always a server / hosting based problem generally a DNS issue and for them to claim it is a coding issue should set alarm bells ringing very loudly on many levels

Ian

Share this post


Link to post
Share on other sites

I have been advised this may be caused by an issue with the database configuration file?

Could somebody please advise where I can locate this file and what its name is?

Many thanks.

Regards.

Share this post


Link to post
Share on other sites

The database access info is located in /includes/global.inc.php.

The actual PHP code that requests the connection (using the access user/pass above) is located as a class in /classes/db/mysqli.class.php (or mysql.class.php if using that method).

The actual code that establishes the connection is PHP's MySQLi extension (installed alongside PHP when PHP was installed).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×