Zen Cart Logo
Forums / Addon Admin Tools / Changed Files

Changed Files

Views: 10,889

Results 21 to 39 of 39
25 Apr 2018, 2:46 PM
#21
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Changed Files

Nope. Trust me, you'd want to know if someone uploaded bmz_cache/badguy_backdoor.php.

25 Apr 2018, 4:01 PM
#22
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Changed Files

That's true, but right now the list of files is so long, it is impracticable to use.

swguy:

Nope. Trust me, you'd want to know if someone uploaded bmz_cache/badguy_backdoor.php.

26 Apr 2018, 5:19 AM
#23
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Changed Files

Design75:

That's true, but right now the list of files is so long, it is impracticable to use.

Some ideas...
I like your change to table, my brain seams to like line numbers... I know I have around 4082 files in there somewhere...

I know date when I uploaded the files which sets the date of change I would want to flag from or I can set a date which would drop the 4082 list down to maybe 561 lines... Could add an input filed for the date and a refresh button maybe!

<!-- body //-->
<div class="container">
  <h1><?php echo HEADING_TITLE ?></h1>
<?php
  $maxdate = strtotime('2018-01-01');  //date changes after would be flagged  Y-m-d
  echo '<div>Files changed after: ' . date('Y-m-d H:i:s', $maxdate) . ' (or) ' . (string)$maxdate . '</div>'; 
?> 
<br />
  <table class="table">
<?php 
$i = 0;
foreach ($files as $file) {
   $i = $i + 1;
   if ($file['mtime'] > $maxdate) {
   $name = str_replace(DIR_FS_CATALOG, "", $file['name']); 
   echo '<tr>';
   echo '<td>' . (string)$i . '</td><td>'.$name . '</td><td>' . date('Y-m-d H:i:s', $file['mtime']) . "</td>";
   echo '</tr>';
   }
}
?>
</table>
</div>
<!-- body_eof //-->
8 Mar 2019, 2:01 PM
#24
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

Changed Files Report was just updated to prevent error-log-files being generated when files are unreadable because of permission issues.

18 Mar 2019, 8:38 PM
#25
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Changed Files

SWGUY - I just installed this on 1.5.5f, but it's getting the following error log:

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4304 bytes) in /home/servername/public_html/store/admin/changed_files.php on line 14

Any suggestions?

18 Mar 2019, 10:14 PM
#26
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Changed Files

Jeff_Mash:

SWGUY - I just installed this on 1.5.5f, but it's getting the following error log:

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4304 bytes) in /home/servername/public_html/store/admin/changed_files.php on line 14

Any suggestions?

Nevermind. I fixed it by adding the following line on the top of the changed_files.php:

ini_set('memory_limit', '2048M');

As a request, it would be great if we could IGNORE files which don't exist in the default installation. For example, your script is returning everything in the CACHE folders......which we really don't care about. We are mainly looking to see which ZenCart files were changed/modified in order to help with upgrades.

18 Mar 2019, 10:25 PM
#27
lat9 avatar

lat9

Administrator

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

Re: Changed Files

FWIW, there's an admin setting for the Max Execution Time: My Store->Admin Set max_execution_time for processes

19 Mar 2019, 12:23 AM
#28
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

Feel free to update it to your own tastes. By default I want people warned about files in cache because one of them might be cache/attack_file.php.

19 Mar 2019, 10:29 PM
#29
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Changed Files

lat9:

FWIW, there's an admin setting for the Max Execution Time: My Store->Admin Set max_execution_time for processes

I totally forgot about that! Thanks for the helpful reminder of this setting!

22 Mar 2019, 11:37 AM
#30
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

In version 1.2 of the mod, there is a variable in admin/changed_files.php called $filetype_exclusions, which is a list of filetypes which should be skipped. By default it skips over .txt, .log and .sql files. Customize to taste.

24 Mar 2020, 11:53 PM
#31
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

Version 1.3 has just been released. It shows 0 byte files (which are failed uploads) in red for fast identification.

18 Apr 2020, 6:39 PM
#32
lrfowler24 avatar

lrfowler24

New Zenner

Join Date:
Feb 2010
Posts:
74
Plugin Contributions:
0

Re: Changed Files

so...I unzipped the folder to my store....does 'admin' folder need to be renamed to 'whatever my admin' folder is named ?
also....how do u run the plug-in?

18 Apr 2020, 6:48 PM
#33
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

does 'admin' folder need to be renamed to 'whatever my admin' folder is named ?

Correct.

how do u run the plug-in?

After you run the .sql, you'll see a menu item under Reports. Click that.

2 Jul 2022, 4:23 PM
#34
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

Updated to ignore images files and pdfs. Tweak this list to your own requirements, of course.

24 Nov 2023, 10:59 PM
#35
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Changed Files

Hi All,

Server info:

Server Host: xxxxx.prod.phx3.secureserver.net (68.178.132.xxx)
Database: xxxxx_live158Store
Home: /home/xxxxx/public_html/Server
OS: Linux 4.18.0-477.27.2.lve.el8.x86_64
Server Date: 24/11/2023 22:50:21
Server Up Time: Disabled/UnavailableHTTP
Server: ApachePHP Version: 8.0.30 (Zend: 4.0.30)PHP
File Uploads: OnUpload Max Size: 1024M
PHP Memory Limit: -1POST Max Size: 1024M
Database Engine: MySQL 10.6.14-MariaDB-cll-lve
Database Host: localhost (127.0.0.1)
Database Date: 24/11/2023 22:50:21
Database Data Size: 280,607 kB
Database Index Size: 40,767 kB
MySQL Slow Query Log Status: Off
MySQL Slow Query Log File: xxxxx-slow.log
MySQL Mode: NO_ENGINE_SUBSTITUTIONView the database configuration variables

Getting the error message after installing the software.

Warning: Constant HEADING_TITLE already defined in /home/xxxxx/public_html/xxxx/includes/languages/english/changed_files.php on line 2 Warning: Constant FILE_BYTES already defined in /home/xxxx/public_html/xxxx/includes/languages/english/changed_files.php on line 3

Please advise me on what I should do to remove the message.

25 Nov 2023, 2:17 AM
#36
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
419
Plugin Contributions:
0

Re: Changed Files

The changed files plugin only has files for the admin side so that definition should be in admin/includes/languages/english/changed_files.php.
It looks like copied the files to incorrect locations.

I would look at the source structure for admin and navigate to similar folders under the catalog and carefully check then delete.
Then reinstall the plug-in in the correct area.

25 Nov 2023, 5:33 AM
#37
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Changed Files

OldNGrey:

The changed files plugin only has files for the admin side so that definition should be in admin/includes/languages/english/changed_files.php.
It looks like copied the files to incorrect locations.

I would look at the source structure for admin and navigate to similar folders under the catalog and carefully check then delete.
Then reinstall the plug-in in the correct area.

Did what you suggested checked and deleted the files and replaced them and still got the same error message coming up.

Could not find any files incorrectly placed on the system and tried to instal the sql patch and got this error: WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.

25 Nov 2023, 5:49 AM
#38
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Changed Files

The language files for this plugin need to be changed to the new format. I just haven't had time to do it yet.

25 Nov 2023, 6:09 AM
#39
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Location:
Sydney Australia
Posts:
828
Plugin Contributions:
0

Re: Changed Files

Thanks for letting me know.