Many people have complained about the race issue with the cache deleting issue in opencart, which causes all those nasty errors to show on your store or in your error logs. Hopefully this will remove that problem for people
Requirements:
- Must be on a Linux machine
- Must have exec enabled
- Must have vqmod 1.0.8 or above (latest version recommended)
Enjoy!
Requirements:
- Must be on a Linux machine
- Must have exec enabled
- Must have vqmod 1.0.8 or above (latest version recommended)
Enjoy!
Does it matter how big the database is ?
For example sometimes Im reluctant to add information pages or products as I think it will increase the database size and affect load time ?
Are all database tables queries called even if they are not on that specific category or product page ?
For example sometimes Im reluctant to add information pages or products as I think it will increase the database size and affect load time ?
Are all database tables queries called even if they are not on that specific category or product page ?
It clears the cache folder (for sql queries, countries etc). Certain cache files get cleared every time you update information in the admin. This does it via the command line rather than using php's inbuilt functions, making it MUCH faster and preventing the ugly error messages sometimes seen due to the race condition of the original cache clearing
Please excuse me if I'm wrong, my PHP knowledge is limited, but are you sure this file is correct?
You say that for this to work it must be a linux system, but your script is returning false if PHP_OS = linux
if(!defined('PHP_OS') || strtolower(PHP_OS) == 'linux') return false;
should this not be
if(!defined('PHP_OS') || strtolower(PHP_OS) != 'linux') return false;
Also this section here doesn't make sense.
$disabled = explode(',', ini_get('disable_functions'));
return in_array('exec');
This would surely return true of exec is found in the disabled array. Surely you want to be returning false if exec is found.
Also should it not be
return in_array('exec', $disabled);
Again, sorry if I am totally wrong here, but I am having major issues with category cache and this has not really solved the problem. I have not tried to re-write it yet as I wanted to make sure it was indeed correct before I messed with it.
Cheers
elliott
You say that for this to work it must be a linux system, but your script is returning false if PHP_OS = linux
if(!defined('PHP_OS') || strtolower(PHP_OS) == 'linux') return false;
should this not be
if(!defined('PHP_OS') || strtolower(PHP_OS) != 'linux') return false;
Also this section here doesn't make sense.
$disabled = explode(',', ini_get('disable_functions'));
return in_array('exec');
This would surely return true of exec is found in the disabled array. Surely you want to be returning false if exec is found.
Also should it not be
return in_array('exec', $disabled);
Again, sorry if I am totally wrong here, but I am having major issues with category cache and this has not really solved the problem. I have not tried to re-write it yet as I wanted to make sure it was indeed correct before I messed with it.
Cheers
elliott

Thanks for confirming that. I'll update it now.
Now, I'm on a roll
I still think this is wrong though.
if(!defined('PHP_OS') || strtolower(PHP_OS) != 'linux') return false;
$disabled = explode(',', ini_get('disable_functions'));
return in_array('exec', $disabled);
}
If 'exec' is found in the $disabled array then we should be returning false not true which it is currently doing.
The calling argument is
if($this->allow_exec()) {
but if it is in the disabled list then we can not allow_exec
I still think this is wrong though.
if(!defined('PHP_OS') || strtolower(PHP_OS) != 'linux') return false;
$disabled = explode(',', ini_get('disable_functions'));
return in_array('exec', $disabled);
}
If 'exec' is found in the $disabled array then we should be returning false not true which it is currently doing.
The calling argument is
if($this->allow_exec()) {
but if it is in the disabled list then we can not allow_exec
Who is online
Users browsing this forum: No registered users and 4 guests