Forums / General Questions / There seems to be a problem connecting to our database

There seems to be a problem connecting to our database

Views: 2,740

Results 21 to 34 of 34
3 Mar 2016, 4:02 PM
#21
mc12345678 avatar

mc12345678

Totally Zenned

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

There seems to be a problem connecting to our database

> 29-Jun-2015
Those are from 2015.
So, no, not unless the system time is set way back in the past. The one(s) relevant would be the most recent logs...

Zen Cart v1.5.4 stores logs in the /logs/ folder

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2016, 4:29 PM
#22
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I see, It looks like it is from today on the date of the file however as it is copie accrss from my other site thewy are old ones which are unrelated.

I will delete them all but is there a way to make it regenerate an error as it doesnot seem to have made one that is for this site?

Thanks
A

3 Mar 2016, 4:41 PM
#23
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: There seems to be a problem connecting to our database

rainbow_pixie_star:

I see, It looks like it is from today on the date of the file however as it is copie accrss from my other site thewy are old ones which are unrelated.

I will delete them all but is there a way to make it regenerate an error as it doesnot seem to have made one that is for this site?

Thanks
A

Short answer is to reproduce the problem. But, if it didn't log one before, then it likely will not log one now. So need to address that issue: contents of includes/configure.php obscuring DB credentials, verify permissions on the cache directory are either 777 or I suggest 755 (as most servers I've worked with don't like 777).

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2016, 4:44 PM
#24
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Ok, just oing that now.

When i have, will it just start to produce one automatically or do I need to do something?

3 Mar 2016, 4:49 PM
#25
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: There seems to be a problem connecting to our database

rainbow_pixie_star:

Ok, just oing that now.

When i have, will it just start to produce one automatically or do I need to do something?

Autocreates the file each time the error is caused. May have to refresh the ftp screen for it to "appear"

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2016, 5:53 PM
#26
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Hi,
Created 775 permission on my cache folder, went to add product then refreshed ftp and I got...

[03-Mar-2016 10:51:34 America/Denver] PHP Fatal error: 1054:Unknown column 'p.products_price_w' in 'field list' :: select p.products_type, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_price_w, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_model, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max, p.products_sort_order from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by p.products_sort_order, pd.products_name limit 0, 1 in /home3/craftja1/public_html/g**********/includes/classes/db/mysql/query_factory.php on line 101

3 Mar 2016, 6:38 PM
#27
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: There seems to be a problem connecting to our database

So, this is curious, because if the previous site were functional, the databases the same and the files the same, then there shouldn't be this type of error....

Suggestion to locate the applicable file is to install mydebug backtrace and as necessary post the generated error log.

Also, funny that between the two offeered security settings of 777 and 755 went halfway with 775...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2016, 6:48 PM
#28
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I just manually typed the 775 as you mentioned it might be the best option.

Just looking up my debug backtrace now...

Is it fine to always have my debug folder as 775?

Thank you
A

3 Mar 2016, 6:53 PM
#29
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Just looking up my debug backtrace. Not sure what it is as in is it something i need to install or something that is already present in my site?
Sorry, not too wure what i'm doing.

Also, yes it is a complete copy over so I am completely confused my self as to why.

It did mention on the debug phpmyadmin (I think) Is there somethign I need to look at on there?

If you need any screen shots, let me knoe.

Thanks
A

4 Mar 2016, 3:01 PM
#30
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I have installed the debug backtrace files.

When I check the cache this is what it generates...

[04-Mar-2016 07:51:57 America/Denver] Request URI: /ADMIN/categories.php, IP address: 90.207.207.135
#1 trigger_error() called at [/home3//public_html/ADMIN/includes/classes/db/mysql/query_factory.php:101]
#2 queryFactory->show_error() called at [/home3/
/public_html/ADMIN/includes/classes/db/mysql/query_factory.php:86]
#3 queryFactory->set_error() called at [/home3/*******/public_html/ADMIN/includes/classes/db/mysql/query_factory.php:208]
#4 queryFactory->Execute() called at [/home3/
/public_html/WEB FOLDER/ADMIN/includes/modules/category_product_listing.php:300]
#5 require(/home3/
/public_html/WEB FOLDER/ADMIN/includes/modules/category_product_listing.php) called at [/home3/******/public_html/WEB FOLDER/ADMIN/categories.php:647]

[04-Mar-2016 07:51:57 America/Denver] PHP Fatal error: 1054:Unknown column 'p.products_price_w' in 'field list' :: select p.products_type, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_price_w, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_model, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max, p.products_sort_order from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by p.products_sort_order, pd.products_name limit 0, 1 in /home3/********/public_html/WEB FOLDER/includes/classes/db/mysql/query_factory.php on line 101

4 Mar 2016, 3:10 PM
#31
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: There seems to be a problem connecting to our database

More than likely the issue is located in: ADMIN/includes/modules/category_product_listing.php at or before one of the lines identified in the error log.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

4 Mar 2016, 3:23 PM
#32
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Hi,
Thank you for the dbug backtrack thing, think it may have solved it.
I looked at that file but an error wasnt obvious to me so I took the original file from the zencart set up to replace it and it now lets me add products and there is no new debug log.

Thank you
A

4 Mar 2016, 3:59 PM
#33
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: There seems to be a problem connecting to our database

mc12345678:

Short answer is to reproduce the problem. But, if it didn't log one before, then it likely will not log one now. So need to address that issue: contents of includes/configure.php obscuring DB credentials, verify permissions on the cache directory are either 777 or I suggest 755 (as most servers I've worked with don't like 777).

rainbow_pixie_star:

I just manually typed the 775 as you mentioned it might be the best option.

Just looking up my debug backtrace now...

Is it fine to always have my debug folder as 775?

Thank you
A
Yes it is fine for the folder to always have 755 permissions. Having 775 may allow others to write to it that shouldn't be able to...

rainbow_pixie_star:

Hi,
Thank you for the dbug backtrack thing, think it may have solved it.
I looked at that file but an error wasnt obvious to me so I took the original file from the zencart set up to replace it and it now lets me add products and there is no new debug log.

Thank you
A

Well... The error was the presence of a field in a query statement that wasn't in the database. Going and replacing files that might have an "integration" problem will result in 1) any changes made to add functionality to be lost 2) may result in additional errors, etc... Normally in this situation, one could compare the problem file with an unmodified version, identify the differences, then investigate why the differences exist (what's the benefit/harm) and resolve the central issue... Somewhere in your code there is likely something that is expecting that field (and will cause another error log to be generated when so referenced). It has been addressed in that one file, but not anywhere else...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

4 Mar 2016, 6:38 PM
#34
drbyte avatar

drbyte

Sensei

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

Re: There seems to be a problem connecting to our database

rainbow_pixie_star:

Fatal error: 1054:Unknown column 'p.products_price_w' in 'field list'
products_price_w isn't a field in original Zen Cart code/database.
It probably came from a plugin such as wholesale-prices or something.

.
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.