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.
Views: 10,889
Administrator
Nope. Trust me, you'd want to know if someone uploaded bmz_cache/badguy_backdoor.php.
Totally Zenned
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.
Totally Zenned
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 //-->
Administrator
Changed Files Report was just updated to prevent error-log-files being generated when files are unreadable because of permission issues.
Totally Zenned
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?
Totally Zenned
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.
Administrator
FWIW, there's an admin setting for the Max Execution Time: My Store->Admin Set max_execution_time for processes
Administrator
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.
Totally Zenned
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!
Administrator
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.
Administrator
Version 1.3 has just been released. It shows 0 byte files (which are failed uploads) in red for fast identification.
New Zenner
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?
Administrator
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.
Administrator
Updated to ignore images files and pdfs. Tweak this list to your own requirements, of course.
Totally Zenned
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.
Zen Follower
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.
Totally Zenned
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.
Administrator
The language files for this plugin need to be changed to the new format. I just haven't had time to do it yet.
Totally Zenned
Thanks for letting me know.
Tell staff why this post should be reviewed.