Upgraded to 1.5.7c.Working through the Debug Log Files.
Hi all
Been using Zen Cart since 2007 (www.lrbits.co.uk) and had site working great on 1.5.6c until our hosts changed serves?? and it stopped working. Now managed to upgrade to 1.5.7c and site is back up, but some bits are not 100%!! Currently cannot see the customer list and keep getting duplicate orders?? The debug list is full of loads of error and deprecated messages. Peejay used to help me, but is not active at the moment?? Keep getting these messages again and again. Would like to get rid of them, so I can get to the important bits. The take payments files are now not needed, but not sure how to get rid of them without crashing the whole site. PHP is set at native (7.3)(current) which is 7.3.32. I have googled "deprecated constructor" but didn't understand the answer. Can anyone guide me through this?
[29-Nov-2021 09:32:54 Europe/London] Request URI: /index.php?main_page=product_info&cPath=59_52&products_id=118, IP address: 66.249.66.221
#1 include_once() called at [/includes/autoload_func.php:28]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; takepaymentsConfigCheck has a deprecated constructor in /includes/classes/class.takepaymentsConfigCheck.php on line 13.
[29-Nov-2021 09:32:54 Europe/London] Request URI: /index.php?main_page=product_info&cPath=59_52&products_id=118, IP address: 66.249.66.221
#1 include_once() called at [/includes/autoload_func.php:28]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardDebugWarning has a deprecated constructor in /includes/classes/class.ceon_manual_cardDebugWarning.php on line 9.
[29-Nov-2021 09:32:54 Europe/London] Request URI: /index.php?main_page=product_info&cPath=59_52&products_id=118, IP address: 66.249.66.221
#1 include_once() called at [/includes/autoload_func.php:28]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardConfigCheck has a deprecated constructor in /includes/classes/class.ceon_manual_cardConfigCheck.php on line 28.
[29-Nov-2021 09:32:54 Europe/London] Request URI: /index.php?main_page=product_info&cPath=59_52&products_id=118, IP address: 66.249.66.221
#1 include_once() called at [/includes/autoload_func.php:28]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; takepaymentsSessionCleaner has a deprecated constructor in /includes/classes/observers/class.takepaymentsSessionCleaner.php on line 12.
[29-Nov-2021 09:32:54 Europe/London] Request URI: /index.php?main_page=product_info&cPath=59_52&products_id=118, IP address: 66.249.66.221
#1 include_once() called at [/includes/autoload_func.php:28]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardSessionCleaner has a deprecated constructor in /includes/classes/observers/class.ceon_manual_cardSessionCleaner.php on line 13.
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
https://stackoverflow.com/questions/...-the-same-name
On each of those debug lines change the method name which is the same as the class name, to "__construct"
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
Thanks SWGuy
That seams to have sorted those issues. Thank you very much for your help.
I think this error is to do with GDPR add on JS Web installed to 1.5.6c and has vanish since upgrading to 1.5.7c. From reading on here it could be a date format issue, but I just did not understand how to sort the issues? All advice very gratefully received.
[29-Nov-2021 12:18:38 Europe/London] Request URI: /admin1/index.php?cmd=customers, IP address: 86.168.218.100
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:170]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:142]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:269]
#4 queryFactory->Execute() called at [/admin1/customers.php:1236]
#5 require(/admin1/customers.php) called at [/admin1/index.php:11]
--> PHP Fatal error: 1054:Unknown column 'c.customers_secret' in 'field list' :: SELECT c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, c.customers_telephone, c.customers_authorization, c.customers_referral, c.customers_secret, a.entry_country_id, a.entry_company, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created , cgc.amount FROM zen_customers c LEFT JOIN zen_customers_info ci ON c.customers_id= ci.customers_info_id LEFT JOIN zen_address_book a ON c.customers_id = a.customers_id AND c.customers_default_address_id = a.address_book_id LEFT JOIN zen_coupon_gv_customer cgc ON c.customers_id = cgc.customer_id ORDER BY ci.customers_info_date_account_created DESC limit 0, 20 ==> (as called by) /admin1/customers.php on line 1236 <== in /includes/classes/db/mysql/query_factory.php on line 170.
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
If you get this, error
> --> PHP Fatal error: 1054:Unknown column 'c.customers_secret' in 'field list' ...
It means part of the zc_install failed during the upgrade process.
If you go to phpMyAdmin and run the command
ALTER TABLE customers ADD customers_secret varchar(64) NOT NULL default '';
(adding a prefix if your store uses one)
You'll see the message that tells you why this failed. Fix that issue, then rerun the ALTER TABLE command above.
The *most likely* cause of the failure is that you added a date field to the customers table but didn't correctly upgrade it.
This page tells you how to fix this, if this is indeed the root cause:
https://docs.zen-cart.com/user/upgra...andardization/
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
I run the command in PHPmyadmin.
Static Analysis: 1 error were found during analysis. 1. Ending quote "was expected (near "" at position 71)
My SQL said. #1046 - No database selected
Not sure what to do with this?
Run the date upgrade and got this
[29-Nov-2021 15:41:47 Europe/London] Request URI: /admin1/index.php?cmd=sqlpatch&action=execute, IP address: 86.168.218.100
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:170]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:142]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:269]
#4 queryFactory->Execute() called at [/admin1/sqlpatch.php:291]
#5 executeSql() called at [/admin1/sqlpatch.php:736]
#6 require(/admin1/sqlpatch.php) called at [/admin1/index.php:11]
--> PHP Fatal error: 1054:Unknown column 'order_delivery_date' in 'where clause' :: UPDATE zen_orders SET order_delivery_date = '0001-01-01 00:00:00' WHERE CAST(order_delivery_date AS CHAR(19)) = '0000-00-00 00:00:00'; ==> (as called by) /admin1/sqlpatch.php on line 291 <== in /includes/classes/db/mysql/query_factory.php on line 170.
Checked this file zc_install/sql/install/zero_dates_cleanup.sql. All the dates info looks updated, there is no 'Customer-secret' in there?
Sorry, trying my best.
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
If you get "No database selected" it means you didn't click on a database on the left hand side of phpMyAdmin.
The database to click on is the one shown next to "Database:" on the Version page in your admin.
https://docs.zen-cart.com/user/admin...s/server_info/
But given that this is a commercial mod costing hundreds of dollars, how about asking JSWeb to fix their stuff and post back the fix here?
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
JS WEB have said that it would cost too much to upgrade our existing site and quoted more than I can afford to transfer everything on to new software. Peejay from Zenofobe used to do the trouble shooting for me. He is no longer on here, so struggling on alone.
Selected the correct database and it now says.
#1064 - you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' " ' at line 1
Re: Upgraded to 1.5.7c.Working through the Debug Log Files.
Quote:
Originally Posted by
swguy
If you get this, error
> --> PHP Fatal error: 1054:Unknown column 'c.customers_secret' in 'field list' ...
It means part of the zc_install failed during the upgrade process.
If you go to phpMyAdmin and run the command
ALTER TABLE customers ADD customers_secret varchar(64) NOT NULL default '';
(adding a prefix if your store uses one)
You'll see the message that tells you why this failed. Fix that issue, then rerun the ALTER TABLE command above.
The *most likely* cause of the failure is that you added a date field to the customers table but didn't correctly upgrade it.
This page tells you how to fix this, if this is indeed the root cause:
https://docs.zen-cart.com/user/upgra...andardization/
Quote:
Originally Posted by
Jabbawocky
JS WEB have said that it would cost too much to upgrade our existing site and quoted more than I can afford to transfer everything on to new software. Peejay from Zenofobe used to do the trouble shooting for me. He is no longer on here, so struggling on alone.
Selected the correct database and it now says.
#1064 - you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' " ' at line 1
It would appear (guessing here) that the above SQL statement was not entered correctly. It is most helpful to post the sql statement that was entered in addition to the error response.
I am **ASSUMING** that the following was entered:
Code:
ALTER TABLE customers ADD customers_secret varchar(64) NOT NULL default ";
When instead this should have been entered:
Code:
ALTER TABLE customers ADD customers_secret varchar(64) NOT NULL default '';
Note the difference in the *TWO* characters before the semicolon(;): " versus ''
The second is two single quotes (') the first is a single double quote("). Based on the content of the above error message, the character captured between the quotes associated to "near ' " '" indicates a single double quote as I am not able to highlight/select one side or the other....
As to the "order delivery date" issue, there is this post associated to this issue in the associated forum thread and the change made to the install/upgrade of that module which suggests something like the following SQL command which can be executed through the admin screen->Tools->Install SQL Patches:
Code:
ALTER TABLE orders ALTER order_delivery_date SET DEFAULT '0001-01-01 00:00:00';
(The above was to ensure future date entries were of an "appropriate" value, while there was a second query in the linked post to correct/modify existing incorrect entries.)
A little background to that issue was that the initial implementation didn't include a default. On servers where mysql settings permitted, the value captured when none was entered was effectively a 0 filled date/datetime. Later implementations of mysql prohibit such value. The "upgrade" process of the plugin did not account for that old (incorrect) history. The issue has been documented in the forum and aspects of the issue have been captured, though I would certainly agree more could be done to help the user(s). I haven't closed the issue in github yet basically because of situations described above still occurring...