News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

SQL Errors on customer login, V. 1.4.1

Started by MHaz, February 28, 2025, 01:43:25 AM

Previous topic - Next topic

MHaz

I randomly started getting the following error on any attempt by myself or a customer to log in to my store. I have updated to 1.4.1, and removed all the incompatible extensions.

SQL Error: Table 'mhazcom_aban959.ab73_customer_sessions' doesn't exist\nError No: 1146\nSQL: SELECT c.*, cg.*
FROM ab73_customers c
LEFT JOIN ab73_customer_groups cg
ON c.customer_group_id = cg.customer_group_id
INNER JOIN ab73_customer_sessions cs
ON c.customer_id = cs.customer_id
WHERE c.customer_id = '19'
AND cs.session_id = '950555a929f6bcd25f307d3ac0eb8f5a' AND status = '1'PHP call stack:
#0 /home2/mhazcom/public_html/ftdecals/core/lib/db.php:119
#1 /home2/mhazcom/public_html/ftdecals/core/engine/extensions.php:1159
#2 /home2/mhazcom/public_html/ftdecals/core/engine/extensions.php:390
#3 /home2/mhazcom/public_html/ftdecals/core/lib/db.php:85
#4 /home2/mhazcom/public_html/ftdecals/core/lib/customer.php:93
#5 /home2/mhazcom/public_html/ftdecals/index.php:72
in /home2/mhazcom/public_html/ftdecals/core/database/amysqli.php on line 162

Thanks in advance!

Basara

Hello.
It looks like your AbanteCart store is missing the customer_sessions table in the database. This likely happened because the update did not fully complete the database upgrade or failed during the process.

Please check if the table exists in your database. If it's missing, you will need to recreate it manually (with database prefix ab73_).
https://github.com/abantecart/abantecart-src/blob/master/public_html/install/abantecart_database.sql#L738

MHaz

Thanks. If I can ask a really dumb question here: how do I do that? My host uses CPanel and phpMyAdmin for database editing.

I did confirm that the table is missing from my database, but as to creating it...

abolabo

Quote from: MHaz on February 28, 2025, 02:20:10 AM
Thanks. If I can ask a really dumb question here: how do I do that? My host uses CPanel and phpMyAdmin for database editing.

I did confirm that the table is missing from my database, but as to creating it...

1. open your file public_html/system/config.php and find DB_PREFIX constant value.
2. Then go into phpMyAdmin, open your database (see name in the config.php )
3. click SQL button to run sql-query.
4. open this file https://github.com/abantecart/abantecart-src/blob/master/public_html/install/abantecart_database_upgrade.sql#L73
Copy code since line  73 and below and paste into sql query textearea.
5. replace all default table prefixes `ac_  with yours from config.php file.
6. Run query.


"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

MHaz


Forum Rules Code of conduct
AbanteCart.com 2010 -