I noticed that today someone turned off the site twice. There are about 500 pages of logs on the live site, and it is difficult to search them. I have access only to myself and I changed passwords twice, but it did not help. It will take a long time to figure out this problem, so I think it will be faster to disable the site shutdown function?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Web Development for service businesses serious about online growth
I think I wrote it correctly. I'm using CMS version 3.0.3.8. How can I remove the site shutdown function from the CMS?OSWorX wrote: ↑Wed Mar 27, 2024 11:15 amIf you really expect answer(s) and help, read this here before: viewtopic.php?t=200480
-----
Regarding the modules, I understand that myself, but I haven't found in the logs which module was responsible for disabling the site. As I wrote above, there are too many logs to search through manually.
update^
I found some suspicious attempts in the logs. However, it is relatively easy to maintain a pool of 1000 proxies and avoid getting banned.
[Wed Mar 27 01:13:40.738620 2024] [autoindex:error] [pid 877443] [client 66.249.66.206:33922] AH01276: Cannot serve directory /var/www/wisma/data/www/*/image/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
[Wed Mar 27 01:24:11.328452 2024] [authz_core:error] [pid 878616] [client 34.125.240.71:42404] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:11.336256 2024] [authz_core:error] [pid 878617] [client 34.125.240.71:42418] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/app-ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:17.098637 2024] [authz_core:error] [pid 878659] [client 34.94.137.71:60254] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/app-ads.txt, referer: https://*/uk-generator-honda-eu-70-is
[Wed Mar 27 01:24:17.098944 2024] [authz_core:error] [pid 878658] [client 34.94.137.71:60240] AH01630: client denied by server configuration: /var/www/wisma/data/www/*/ads.txt, referer: https://*/uk-generator-honda-eu-70-is
Or can you tell me the approximate code that needs to be found? I'm talking about the one that is responsible for disabling the site? I understand that it is related to the configuration.
Code: Select all
public function cacheDelete() {
if ($this->validateModification()) {
$this->load->language('octemplates/theme/'. $this->oct_theme);
$maintenance = $this->config->get('config_maintenance');
$this->load->model('setting/setting');
$this->cache->delete('octemplates');
$this->model_setting_setting->editSettingValue('config', 'config_maintenance', true);
if (isset($this->request->get['store_id'])) {
$store_id = $this->request->get['store_id'];
} else {
$store_id = 0;
}
$setting_info = $this->model_setting_setting->getSetting('theme_'. $this->oct_theme, $store_id);
There is no such thing as a "Site shutdown function".wisma wrote: ↑Wed Mar 27, 2024 2:56 amGood afternoon,
I noticed that today someone turned off the site twice. There are about 500 pages of logs on the live site, and it is difficult to search them. I have access only to myself and I changed passwords twice, but it did not help. It will take a long time to figure out this problem, so I think it will be faster to disable the site shutdown function?
As others have said you need to give us relevant information.
Mike
cue4cheap not cheap quality
The system seems to have the functionality for maintenance mode:
There's a controller and code ($maintenance = $this->config->get('config_maintenance');) to manage it.
There's a corresponding entry in the MySQL database.
Yet, I can't find a way to disable it permanently.
My question:
In which files can I remove code to permanently disable the ability to put the site in maintenance mode?
Additional context (optional):
The website recently received updates to the ReMarket template and ocfilter module. These updates might be coincidental to the issue, but I'm unsure.
There haven't been any problems for over a month until yesterday's outages.
You haven't read my comment here: posting.php?mode=quote&p=868510&sid=109 ... a#pr868488
Why do you thinkl I highlighted that here: viewtopic.php?t=200480 (doing it again!!).
And especially this here: viewtopic.php?t=200480#p707152 (read carefully and slow!).
And this here: viewtopic.php?t=53294
But you do not want to hear nor reading!
With this post you declare, that you have installed (several) other extensions/theme/mods/hacks/whatever ..
So better follow the advices and post what's important (for us) - or do you think we are all clairvoyants ?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
My question is:
In which files can I find the code for disabling the maintenance mode in OpenCart 3.0.3.8?
What code do I need to delete to permanently remove this functionality?
Context:
I am aware of the controller and code $maintenance = $this->config->get('config_maintenance');.
I have checked the developer's code, but it is encrypted against hacking.
I am not interested in the reason for the issue; I just want to remove the maintenance mode function entirely.
The website is currently indexed and displayed as "Technically closed" in Google, which is unacceptable.
I understand this is a drastic measure, but it is necessary to prevent future problems.
I apologize for any confusion.
Please help me by providing the specific file names and code I need to delete.
Thank you for your understanding.
Additional details:
The user is not interested in fixing the errors that are causing the maintenance mode to be enabled.
The user wants to remove the maintenance mode function completely from the OpenCart software.
The user wants to do this so that the maintenance mode cannot be enabled by anyone, including administrators.
I'm new to the website's webmaster and don't know where some of the files were purchased or downloaded.
Some of the files are pirated.
I don't think anyone wants to go through 100,500 files when you can simply remove the function out of the box.
What do you think? Do you want me to burden you with searching for a small line of code in all these files?
It would be much easier to just tell me what to delete, and it would only cause a small error on the website that users wouldn't even see.
I understand that this is not an ideal solution, but it's the quickest and simplest one.
Please let me know if this is possible.
Thank you for your time!
P.S.
I can provide you with FTP/SSH access if needed.
I can also provide you with more information about the website if it helps.
Attachments
3.jpg (176.94 KiB) Viewed 7817 times
2.jpg (190.19 KiB) Viewed 7817 times
1.jpg (269.02 KiB) Viewed 7817 times
However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.
Thank you! This is exactly what I needed.ADD Creative wrote: ↑Thu Mar 28, 2024 2:57 amLook at the action_pre_action in system/config/catalog.php. You could remove the 'startup/maintenance' entry. Else look in catalog/controller/startup/maintenance.php.
However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.
I understand that this is a workaround, but the website's behavior shows that only this function is accessible. If there are any problems in the future, I think I will be able to solve them. For now, I just need to remove this feature.
Thank you again for your help.
I really appreciate it!
Sorry, I can't understand this code a little:ADD Creative wrote: ↑Thu Mar 28, 2024 2:57 amLook at the action_pre_action in system/config/catalog.php. You could remove the 'startup/maintenance' entry. Else look in catalog/controller/startup/maintenance.php.
However, I wouldn't recommend it as a final solution. If it is being changed by someone and not just a bug, they probably have access to a lot more.
catalog/controller/startup/maintenance.php
Code: Select all
<?php
class ControllerStartupMaintenance extends Controller {
public function index() {
if ($this->config->get('config_maintenance')) {
// Route
if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
$route = $this->request->get['route'];
} else {
$route = $this->config->get('action_default');
}
$ignore = array(
'common/language/language',
'common/currency/currency'
);
// Show site if logged in as admin
$this->user = new Cart\User($this->registry);
if ((substr($route, 0, 17) != 'extension/payment' && substr($route, 0, 3) != 'api') && !in_array($route, $ignore) && !$this->user->isLogged()) {
return new Action('common/maintenance');
}
}
}
Code: Select all
// Show site if logged in as admin
$this->user = new Cart\User($this->registry);
if ((substr($route, 0, 17) != 'extension/payment' && substr($route, 0, 3) != 'api') && !in_array($route, $ignore) && !$this->user->isLogged()) {
return new Action('common/maintenance');
find:
Code: Select all
'startup/maintenance'
Code: Select all
//'startup/maintenance'
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 1 guest