Zen Follower
- Join Date:
- Apr 2008
- Location:
- Qld, Australia
- Posts:
- 429
- Plugin Contributions:
- 0
IP address in error log not always matching IP addess in Apache
I have NOT been hacked. This is not critical.
site URL =bmhstore.bmh.com.au; ZC version=158; list of plugins = several, bootstrap cloned, Ultimate URLS; PHP version=7.4.3, etc
Error logging = Yes
The IP address listed in the ZC error log when the URI provided is trying to break SQL does not always match the IP in the Apache access log. The IP address in the ZC error log does not appear in that days Apache access log at all.
The access log entry with the correct IP address was identified by time stamp and the URI string.
If I use the same bad URI in ZC catalogue in a web browser the zc screen search result screen displays the message "WARNING: An Error occurred, please let us know!" This message comes from includes\classes\db\mysql\query_factory.php
The previous zc error, from 2 seconds prior, gave IP address 221.232.106.46 and Apache access log gave IP address 5.182.16.60
The zc error log is
[12-Feb-2023 10:57:13 Australia/Brisbane] Request URI: /index.php?main_page=product_info&cPath=38_37'maEFDZ%3c'%22%3eEuDBHv&products_id=4348, IP address: 157.158.153.104
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:667]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:634]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:241]
#4 queryFactory->Execute() called at [/includes/classes/usu.php:761]
#5 usu->get_category_name() called at [/includes/classes/usu.php:446]
#6 usu->parse_parameters() called at [/includes/classes/usu.php:226]
#7 usu->href_link() called at [/includes/classes/observers/UsuObserver.php:55]
#8 UsuObserver->update() called at [/includes/classes/traits/NotifierManager.php:87]
#9 base->notify() called at [/includes/functions/html_output.php:18]
#10 zen_href_link() called at [/includes/templates/bmh_bootstrap/templates/tpl_modules_category_icon_display.php:17]
#11 require(/includes/templates/bmh_bootstrap/templates/tpl_modules_category_icon_display.php) called at [/includes/templates/bmh_bootstrap/templates/tpl_product_info_display.php:40]
#12 require(/includes/templates/bmh_bootstrap/templates/tpl_product_info_display.php) called at [/includes/modules/pages/product_info/main_template_vars.php:156]
#13 require(/includes/modules/pages/product_info/main_template_vars.php) called at [/includes/templates/bmh_bootstrap/common/tpl_main_page.php:202]
#14 require(/includes/templates/bmh_bootstrap/common/tpl_main_page.php) called at [/index.php:94]
--> 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 '"EuDBHv
AND language_id = 1
' at line 3 :: SELECT categories_name AS cName
FROM zen_categories_description
WHERE categories_id = 37maEFDZ"EuDBHv
AND language_id = 1
LIMIT 1 ==> (as called by) /includes/classes/usu.php on line 761 <== in /includes/classes/db/mysql/query_factory.php on line 667.
The apache access log is ```
Line 2762: 5.182.16.60 - - [12/Feb/2023:10:57:12 +1000] "GET /index.php?main_page=product_info&cPath=38_37'maEFDZ%3c'%22%3eEuDBHv&products_id=4348 HTTP/1.1" 200 9308 "-" "##########Spider"
OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB