Zen Cart Logo
Forums / Installing on a Linux/Unix Server / zcInstallDEBUG log: Access denied for user ''@'localhost'

zcInstallDEBUG log: Access denied for user ''@'localhost'

Views: 2,934

Results 1 to 9 of 9
25 Jun 2016, 1:20 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

zcInstallDEBUG log: Access denied for user ''@'localhost'

Hi,

I installed a fresh copy of zc155a, went through all the steps just as I have a zillion times. Immediately after, added the Backup mySQL mod.

When I went to add a template, I ran into problems. Because of that, I checked the log folder and found two install bug reports. Since they were virtually the same, I'm going to only paste contents of one:

[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102
[22-Jun-2016 21:38:19 UTC] PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /public_html/q-stage/includes/classes/db/mysql/query_factory.php on line 102

Is this a problem? And did I cause it? If I caused it, what did I do wrong?

I'm going to run thru another install to see if I get the same error log.

Thanks!

25 Jun 2016, 2:21 PM
#2
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

Ok, I think this is a bug and has nothing to do with anything I did.

I just started along the process of installing a new zc155a. The moment I clicked on the installer in my browswer (https://www.mysite.com/zc_install/index.php), that same error showed up in my log folder.

Upon arriving at that screen, the installer does a server check in the background. No errors show up on the browser, but that bug report gets kicked to the log folder.

Since I'm using cPanel, my hostname is in fact 'localhost'. Why zc kicked that out as an error is beyond me. My guess is that check is coming early because the error arrives in the folder before I get to the db setup/check page: https://www.mysite.com/zc_install/index.php?main_page=database

After I input all my db/user info, the install runs just fine.

Can I simply ignore this install error log?

25 Jun 2016, 3:16 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

It would help to elaborate further on the "same steps as I always do" portion...

What looks like to me is that either some portion of the code being used is "old" in that mysqli_ or mysql_ related function(s) are being run but the credentials have not been provided or that perhaps an old includes/configure.php or one or more files in includes/local are providing inaccurate credentials to try to move forward on the install...

But, it requires knowing what was done to get to the point of the error or a clear explanation of the current status other than error generating.

25 Jun 2016, 3:35 PM
#4
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

My bad! By "same steps" I simply meant following the steps provided in the docs folder of the install (created a new db, give user privileges, rename config files, adjust permissions on files/folders, etc).

Just the standard protocols, as per usual.

If you look at my last post, you'll see that I kept an eye on the log folder and discovered that it has nothing to do with me. It's just that for some reason the installer checks db access early, before it gets to the screen where the user inputs db user/password info.

After I run that screen (with actual info), no error gets kicked.

So it has to be a bug. It's not anything I'm doing. My db is using 'localhost' (standard for cPanel) and clearly that's true because the install goes smoothly... other than leaving behind that pesky zcInstallDEBUG-1466862507-789994.log file.

Before I said there were two such files. I must have hit that "check server again" button, as is my habit. This time I did not and only one DEBUG file kicked.

Seems unimportant to me because the site installed fine.

I don't know who's moderating, but maybe you can move this thread to:
https://www.zen-cart.com/forumdisplay.php?140-Bug-Reports

But... MC, do you agree that this is not a problem?

25 Jun 2016, 4:23 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

Feznizzle:

My bad! By "same steps" I simply meant following the steps provided in the docs folder of the install (created a new db, give user privileges, rename config files, adjust permissions on files/folders, etc).

Just the standard protocols, as per usual.

If you look at my last post, you'll see that I kept an eye on the log folder and discovered that it has nothing to do with me. It's just that for some reason the installer checks db access early, before it gets to the screen where the user inputs db user/password info.

After I run that screen (with actual info), no error gets kicked.

So it has to be a bug. It's not anything I'm doing. My db is using 'localhost' (standard for cPanel) and clearly that's true because the install goes smoothly... other than leaving behind that pesky zcInstallDEBUG-1466862507-789994.log file.

Before I said there were two such files. I must have hit that "check server again" button, as is my habit. This time I did not and only one DEBUG file kicked.

Seems unimportant to me because the site installed fine.

I don't know who's moderating, but maybe you can move this thread to:
https://www.zen-cart.com/forumdisplay.php?140-Bug-Reports

But... MC, do you agree that this is not a problem?

So by rename of configure.php files you mean that you rename the dist-configure.php file to configure.php and then use that as part of the install/upgrade? If so, then that would explain the error log as the credentials would be blank (no password, no user name) and when attempting to check to see if the system was available for an upgrade, the connection to the database would fail and an error generated... Things like this are why I allow ZC to auto-generate the file(s) rather than to copy/paste/rename some other file.

Not so sure that it is really a bug other than the instructions provided suggest to rename the dist-configure.php file instead of recommending autogenerating it and that in a situation with blank credentials that a test is performed against the credentials (though don't see why one couldn't have such a condition for a development server if they wanted it). I mean if you filled in bogus DB_ related information into the includes/configure.php file then, I would expect a similar set of errors to be generated but to include that incorrect information to some extent.

25 Jun 2016, 4:39 PM
#6
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

mc12345678:

Not so sure that it is really a bug other than the instructions provided suggest to rename the dist-configure.php file instead of recommending autogenerating it... when attempting to check to see if the system was available for an upgrade... Things like this are why I allow ZC to auto-generate the file(s)** rather than to copy/paste/rename some other file.**

I was not trying to upgrade, only do a fresh install. All I did was rename the file as per instruction.

This is from the install instructions included with zc155a (/docs/1.readme_installation.html):

On the server locate the file: /catalog/includes/dist-configure.php
Rename this file to configure.php and change the permissions to 777 (read-write-execute for all)

Next, on the server locate the file: /catalog/admin/includes/dist-configure.php
Rename this file to configure.php and change the permissions to 777 (read-write-execute for all)

If zc155+ automatically does that now, then you are correct... this is not a bug. The instructions just need a revision.

25 Jun 2016, 5:03 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

Feznizzle:

I was not trying to upgrade, only do a fresh install. All I did was rename the file as per instruction.

This is from the install instructions included with zc155a (/docs/1.readme_installation.html):

If zc155+ automatically does that now, then you are correct... this is not a bug. The instructions just need a revision.

By the presence of a includes/configure.php file, the ZC install process is going to also check the information provided and check the condition of the associated/referenced areas. While there may not have been intent to upgrade, the install process is simply doing its thing to try to offer the upgrade if it is warranted.

Otherwise, ZC has been auto creating includes/configure.php files at least since 1.5.0 if not longer. That also said, there are several "versions" of the installation of a site instruction, no one truly wrong, just different. And as for the zcInstall log? I think the typical situation with that is, did it install? If so, carry on.

25 Jun 2016, 5:34 PM
#8
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

Right on, ty sir!

25 Jun 2016, 11:36 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: zcInstallDEBUG log: Access denied for user ''@'localhost'

zc_install does attempt to create a configure.php file. But not all (in fact, few) servers allow that. So, the instructions remain geared around the majority, as they will have to create the file themselves, even if it's just by copying/renaming dist-configure.php