Hi,
got this error while using "search" with a customer email:
[06-Nov-2018 12:07:34 Europe/Berlin] PHP Fatal error: 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 '"f234f8abe083c9aa2db842463ada0af8") ON DUPLICATE KEY UPDATE encrypted_data = "f2' at line 1 :: INSERT INTO log_in_as_customers (customers_id,encrypted_data) VALUES (,"f234f8abe083c9aa2db842463ada0af8") ON DUPLICATE KEY UPDATE encrypted_data = "f234f8abe083c9aa2db842463ada0af8" ==> (as called by) /var/xxx/customers.php on line 1469 <== in /var/xxx/includes/classes/db/mysql/query_factory.php on line 171
The line it refers to in customer.php are:
$db->Execute('INSERT INTO '.TABLE_LOG_IN_AS_CUSTOMERS.' (customers_id,encrypted_data) VALUES ('.$cInfo->customers_id.',"'.$encrypted_data.'") ON DUPLICATE KEY UPDATE encrypted_data = "' . $encrypted_data . '"');
Which is the line modified by Alac.
Don't know if it is related to the version of php or my sql i'm using on the server. I looked into it to see if there is any mistype but it seems all correct to me...
Following the details of the server and the complete error report:
HTTP Server: Apache
Versione PHP: 5.5.38 (Zend: 2.5.0)
PHP File Uploads: OnUpload
Max Size: 8MPHP
Memory Limit: 128MPOST
Max Size: 8M
Database: MySQL 5.5.62
Zencart 1.5.5f
Full error report:
[06-Nov-2018 12:37:31 Europe/Berlin] Request URI: /../customers.php?search=espositoba%40libero.it, IP address: 2.239.187.39
#1 array_merge() called at [/var/.../customers.php:1341]
[06-Nov-2018 12:37:31 Europe/Berlin] PHP Warning: array_merge(): Argument #1 is not an array in /var/.../customers.php on line 1341
[06-Nov-2018 12:37:31 Europe/Berlin] Request URI: /.../customers.php?search=espositoba%40libero.it, IP address: 2.239.187.39
#1 array_merge() called at [/.../customers.php:1343]
[06-Nov-2018 12:37:31 Europe/Berlin] PHP Warning: array_merge(): Argument #2 is not an array in /var/.../customers.php on line 1343
[06-Nov-2018 12:37:31 Europe/Berlin] Request URI: /.../customers.php?search=espositoba%40libero.it, IP address: 2.239.187.39
#1 trigger_error() called at [/var/.../includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/var/.../includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/var/..../includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/var/.../customers.php:1469]
[06-Nov-2018 12:37:31 Europe/Berlin] PHP Fatal error: 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 '"cbe380b4bdcee45fa5298752135b0384") ON DUPLICATE KEY UPDATE encrypted_data = "cb' at line 1 :: INSERT INTO log_in_as_customers (customers_id,encrypted_data) VALUES (,"cbe380b4bdcee45fa5298752135b0384") ON DUPLICATE KEY UPDATE encrypted_data = "cbe380b4bdcee45fa5298752135b0384" ==> (as called by) /var/.../customers.php on line 1469 <== in /var/.../includes/classes/db/mysql/query_factory.php on line 171