Zen Cart Logo
Forums / All Other Contributions/Addons / Generate an e-mail on page-not-found (404) errors [support thread]

Generate an e-mail on page-not-found (404) errors [support thread]

Views: 9,926

Results 21 to 37 of 37
18 May 2012, 12:35 PM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Generate an e-mail on page-not-found (404) errors [support thread]

My _ENV (both XAMMP localhost and 1and1 hosting) show _ENV as pretty much a copy of _SERVER. I'll get that update into the queue.

21 May 2012, 5:10 PM
#22
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

v1.2.2 is now available in the Plugins area; this corrects the issues that torvista identified.

22 Sep 2012, 10:56 AM
#23
relish avatar

relish

New Zenner

Join Date:
Jun 2012
Posts:
33
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

A user at host address [xxx.xxx.76.40] with IP address [xxx.xxx.76.40]
generated a 404 using the query string
[/index.php?main_page=page_not_found].

Getting this message. Cant we get the actual url that led to this page_not_found page.

like if this user type https://www.mydomain.com/secure and there is no such address on my website , we should get message:

A user at host address [xxx.xxx.76.40] with IP address [xxx.xxx.76.40]
generated a 404 using the query string
[/secure].

Thanks

22 Sep 2012, 11:53 AM
#24
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

relish, there are two possibilities:

  1. Did you update your store's root .htaccess file to contain ```
    ErrorDocument 404 /index.php?main_page=page_not_found
2. If you did, then it's possible that the /secure access is generating a 403 (permission error) rather than a 404 (not found) error.  You can force the plugin to send emails in this case, too, by updating your .htaccess file to contain the following as well ```
ErrorDocument 403 /index.php?main_page=page_not_found
28 Oct 2012, 12:14 PM
#25
relish avatar

relish

New Zenner

Join Date:
Jun 2012
Posts:
33
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

lat9:

relish, there are two possibilities:

  1. Did you update your store's root .htaccess file to contain ```
    ErrorDocument 404 /index.php?main_page=page_not_found
> 2. If you did, then it's possible that the /secure access is generating a 403 (permission error) rather than a 404 (not found) error.  You can force the plugin to send emails in this case, too, by updating your .htaccess file to contain the following as well ```
ErrorDocument 403 /index.php?main_page=page_not_found

Thanks boss !

Though we have not updated the .htaccess file , we are getting the queries which generate 404 error:

A user at host address [pluto.hostonwin.com] with IP address
[206.72.195.228] generated a 404 using the query string
[/index.php?main_page=shippinginfo/extras/ipn_test_return.php].

A user at host address [117.198.89.34] with IP address [117.198.89.34]
generated a 404 using the query string [/index.php?main_page=login3].

A user at host address [mail.it-security-center.ru] with IP address
[93.158.114.134] generated a 404 using the query string
[/index.php?main_page=products_new/extras/curltest.php].

A user at host address [mail.nap.websolute.com.br] with IP address
[200.150.205.30] generated a 404 using the query string
[/index.php?main_page=shippinginfo/extras/curltest.php].

A user at host address [mail.nap.websolute.com.br] with IP address
[200.150.205.30] generated a 404 using the query string
[/index.php?main_page=specials/admin/file_manager.php/login.php].

I think they are hacking attempts , could that be true ?
Our ZC installation is 1.5 and the security guidelines has been followed as per the guide posted on ZC tutorials (http://www.zen-cart.com/wiki/index.php/Important_Site_Security_Recommendations).
Is there anything to worry about? Will be helpful if anybody could elaborate

Thanks

28 Oct 2012, 12:54 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

relish, what you're seeing are probes from people trying to exploit weaknesses in previous versions of Zen Cart (I've seen the same on various stores) -- you should be fine with v1.5+ and following (as you said) those security guidelines. I usually just let them be, unless they start hogging my bandwidth. If that's the case, I update the top of the .htaccess file in the root of my store to include the additional IP address ... I've filled in two from your query:

# Block specific IP address ranges
order allow,deny
deny from 117.198.89.34
deny from 93.158.114.134
allow from all
11 Dec 2012, 2:38 PM
#27
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

Problem fixed

30 Dec 2012, 8:31 PM
#28
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

Hello,

Thanks for the great plugin,

here is how i get an email on error:

A user at host address [112.111.174.12] with IP address [112.111.174.12]
generated a 404 using the query string
[/index.php?main_page=page_not_found].

Without the page which led to the error.

This is the content of my .htaccess file:

ErrorDocument 404 /page_not_found.php

ErrorDocument 403 /page_not_found.php
31 Dec 2012, 2:47 AM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

ShopVille:

Hello,

Thanks for the great plugin,

here is how i get an email on error:

A user at host address [112.111.174.12] with IP address [112.111.174.12]
generated a 404 using the query string
[/index.php?main_page=page_not_found].

> 
> Without the page which led to the error.
> 
> This is the content of my .htaccess file: 
> 
> ```html
ErrorDocument 404 /page_not_found.php

ErrorDocument 403 /page_not_found.php

Try modifying your .htaccess file to read:

ErrorDocument 404 /index.php?main_page=page_not_found
ErrorDocument 403 /index.php?main_page=page_not_found
31 Dec 2012, 3:22 AM
#30
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

lat9:

Try modifying your .htaccess file to read:

ErrorDocument 404 /index.php?main_page=page_not_found
ErrorDocument 403 /index.php?main_page=page_not_found


Works perfect now.

Thanks loads
24 Dec 2015, 9:44 PM
#31
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

While the current version in the plugins will "play nice" with Zen Cart v1.5.5, it needed a change for PHP 7.0 compliance (class constructor named __construct). v1.2.3 has been submitted to the plugins to correct this incompatibility.

19 Feb 2021, 8:18 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

I've just submitted v1.2.4 for the Zen Cart moderators' review and will post back here when it's available for download.

 This version contains changes captured for GitHub issue [#2](https://github.com/lat9/emailFor404/issues/2).   Language constants (and pseudo-configuration definitions) have been  moved from the auto_loader to a language-based extra_definitions file.

The email report now includes the contents of the entire $_SERVER and $_SESSION values.

27 Feb 2021, 2:24 PM
#33
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

lat9:

I've just submitted v1.2.4 for the Zen Cart moderators' review and will post back here when it's available for download.

 This version contains changes captured for GitHub issue [#2](https://github.com/lat9/emailFor404/issues/2).   Language constants (and pseudo-configuration definitions) have been  moved from the auto_loader to a language-based extra_definitions file.

The email report now includes the contents of the entire $_SERVER and $_SESSION values.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1090

31 Mar 2021, 4:06 PM
#34
rosestar avatar

rosestar

New Zenner

Join Date:
Oct 2019
Posts:
24
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

lat9:

Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1090

I don't know how I got this far without knowing this mod exists. Perfect. YOU ROCK!

23 Feb 2025, 5:33 PM
#35
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

Any ideas if this would work with zen cart 2.1.0?

23 Feb 2025, 9:43 PM
#36
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Generate an e-mail on page-not-found (404) errors [support thread]

TamyA:

Any ideas if this would work with zen cart 2.1.0?
I see no reason why it wouldn't.

25 Feb 2025, 8:09 AM
#37
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Generate an e-mail on page-not-found (404) errors [support thread]

lat9:

I see no reason why it wouldn't.

Well, i copied the file and did the set up and it works, Now,
I am not sure to get happy or cry that it works.

I start getting emails like if you open a flood gate, 95+% of the emails about
loading images from the bmz_cache directory and it has a wired format like

'/Main-Category/Sub-Category/bmz_cache/m/mso421_2jpg.image.480x480.gif',

this is the structure of the bmz_cache folder /public_html/bmz_cache/
why the bot accessing it with '/Main-Category/Sub-Category/'

This is part of the email
'USER' => 'user74',
'HOME' => '/home/user74',
'SCRIPT_NAME' => '/index.php',
'REQUEST_URI' => '/Main-Catagory/Sub-Catagory/bmz_cache/m/mso421_2jpg.image.480x480.gif',
'QUERY_STRING' => 'main_page=page_not_found',
'REQUEST_METHOD' => 'GET',
'SERVER_PROTOCOL' => 'HTTP/2.0',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'REDIRECT_URL' => '/Main-Category/Sub-Category/bmz_cache/m/mso421_2jpg.image.480x480.gif',
'REMOTE_PORT' => '419xx',
'SCRIPT_FILENAME' => '/home/user74/public_html/index.php',
'SERVER_ADMIN' => '[email protected]',
'CONTEXT_DOCUMENT_ROOT' => '/home/user74/public_html',