Forums / General Questions / PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

Locked

Views: 4,467

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
11 Feb 2016, 4:03 PM
#1
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

There are 2 myDEBUG files generated within 3 seconds of each other. The IP address in the files both point to MSFT. If I attempt to navigate to the URL in the myDEBUG, I do not have a problem, nor generate a myDEBUG file.

There are no differences in the 2 files other than the URI request and IP address.

Is there cause for worry or something to fix?

[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62
[09-Feb-2016 22:57:30 America/Los_Angeles] Request URI: /index.php?cPath=1_114, IP address: 40.77.167.9
#1  mysqli_connect() called at [/home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php:62]
#2  queryFactory->connect() called at [/home/XXXXXXXX/public_html/includes/init_includes/init_database.php:23]
#3  require(/home/XXXXXXXX/public_html/includes/init_includes/init_database.php) called at [/home/XXXXXXXX/public_html/includes/autoload_func.php:48]
#4  require(/home/XXXXXXXX/public_html/includes/autoload_func.php) called at [/home/XXXXXXXX/public_html/includes/application_top.php:158]
#5  require(/home/XXXXXXXX/public_html/includes/application_top.php) called at [/home/XXXXXXXX/public_html/index.php:26]

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): No such file or directory in /home/XXXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 62

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Feb 2016, 4:41 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

The request URI in all cases would imply a request to https://www.example.com/index.php?cPath=1_114, which is a malformed Zen Cart access (no main_page specified).

That's not getting to the heart of the issue (i.e. why the error is thrown), but I'm guessing that it's part of the root-cause.

11 Feb 2016, 4:59 PM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

TNX Cindy,

Over my head, but the 'hits' immediately before and after seem to use the same format but did not generate a myDEBUG file

"GET /index.php?cPath=1_85 HTTP/1.1"
"GET /index.php?cPath=5_107 HTTP/1.1"
"GET /index.php?main_page=create_account HTTP/1.1"
"GET /index.php?cPath=1_114 HTTP/1.1"
"GET /nddbc.html HTTP/1.1"
"GET /index.php?cPath=1_13 HTTP/1.1"

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Feb 2016, 5:28 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

Do you have a URL rewriter installed?

Zen-Venom Get Bitten

11 Feb 2016, 5:32 PM
#5
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

kobra:

Do you have a URL rewriter installed?

No, I do not

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Feb 2016, 5:45 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

Setting for phpbb link?

Any plugins / modifications doing direct mysql_* or mysqli_* calls?

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

11 Feb 2016, 6:10 PM
#7
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

lhungil:

Setting for phpbb link?

false

lhungil:

Any plugins / modifications doing direct mysql_* or mysqli_* calls?

Not that I know of, though I would not have a clue where to look.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Feb 2016, 6:34 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

GET /nddbc.html HTTP/1.1"

Is your shop in maintenance mode??

As the admin your IP will not see it as in maintenance

Zen-Venom Get Bitten

11 Feb 2016, 6:46 PM
#9
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

kobra:

GET /nddbc.html HTTP/1.1"

> Is your shop in maintenance mode??
> 
> As the admin your IP will not see it as in maintenance

Website is live.  Not in Maintenance mode.  I don't think that file would be shown if in maintenance mode.
I haven't a clue where/how BingBot gets its data.  I don't think those links are in the sitemap xml files.

I would have to dig through the archived myDEBUG, but IIRC, the only times that I have seen these particular myDEBUG files generated are from BINGBOT IP addresses.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Feb 2016, 7:30 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

RixStix:

[09-Feb-2016 22:57:30 America/Los_Angeles] PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory ...
That's MySQL saying "no such file or directory" ... which all the google results I've seen suggest is caused by a socket failure on the server, or by an invalid mysql servername/ip.

Is it possible that your hosting company was doing maintenance at that moment and did a restart of MySQL during that time?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Feb 2016, 9:30 PM
#11
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory

DrByte:

That's MySQL saying "no such file or directory" ... which all the google results I've seen suggest is caused by a socket failure on the server, or by an invalid mysql servername/ip.

Is it possible that your hosting company was doing maintenance at that moment and did a restart of MySQL during that time?

Thank you DrByte.
YES, it does coincide with a mySQL server restart after I walked backwards from mySQL server uptime.

Thank you. At least I know what those myDEBUG means and the event to which it is associated.

It is probably just coincidental but prior to upgrade from 1.5.3 to 1.5.4, the mySQL server would run for months between restarts. Since the upgrade to 1.5.4, it is 2-3 weeks between restarts.

Thanks everyone else for the pointers.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com