New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checked.cache spam #94

Closed
daveyoi opened this Issue Nov 9, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@daveyoi

daveyoi commented Nov 9, 2016

Hey Guys,

Got an odd issue using 2.6.1 with opencart 2.2.

the checked.cache file is full of duplicate references to /vendor/autoload.php - it is a pretty busy site with a lot of ajax so the number of requests is pretty high.. so after 6 days we have over half a million records in the checked.cache file - which is causing massive slow down (due to the amount of array looping)

If we delete the checked.cache site performance comes back - but the file is again receiving a new /vendor/autoload line on every request.

Any ideas how to stop this?

@JAY6390

This comment has been minimized.

Show comment
Hide comment
@JAY6390

JAY6390 Nov 9, 2016

Contributor

Hi Dave. Interesting bug - haven't seen that but haven't really checked for it. Will take a look at that shortly and see what I can find if anything

Contributor

JAY6390 commented Nov 9, 2016

Hi Dave. Interesting bug - haven't seen that but haven't really checked for it. Will take a look at that shortly and see what I can find if anything

@JAY6390

This comment has been minimized.

Show comment
Hide comment
@JAY6390

JAY6390 Nov 9, 2016

Contributor

@daveyoi Hi Dave. Tried this on a 2.2 and 2.3 install and I don't actually see any autoload at all in the checked.cache file. It's not a standard file. Can you show the content of your vendor directory

Contributor

JAY6390 commented Nov 9, 2016

@daveyoi Hi Dave. Tried this on a 2.2 and 2.3 install and I don't actually see any autoload at all in the checked.cache file. It's not a standard file. Can you show the content of your vendor directory

@daveyoi

This comment has been minimized.

Show comment
Hide comment
@daveyoi

daveyoi Nov 9, 2016

@JAY6390 - Thanks for the quick response!

The vendor directory is the one that is provided with the 2.2 compiled download from opencart.com with the addition of the bugsnag library.

The directory is outside of the public_html doc root

In the file the duplicates are all full path

/home/site/vendor/autoload.php

where as other entries are like this

system/engine/event.php
system/engine/model.php
system/engine/registry.php
system/engine/proxy.php
system/helper/general.php
system/helper/utf8.php
system/helper/json.php
system/helper/hash_equals.php

and only appear once.

There is one odd thing with this install, in the config.php at the root declares its paths like this.

define('DIR_APPLICATION', './catalog/');
define('DIR_SYSTEM', './system/');
define('DIR_IMAGE', './image/');
define('DIR_LANGUAGE', './catalog/language/');
define('DIR_TEMPLATE', './catalog/view/theme/');
define('DIR_CONFIG', './system/config/');
define('DIR_CACHE', './system/storage/cache/');
define('DIR_DOWNLOAD', './system/storage/download/');
define('DIR_LOGS', './system/storage/logs/');
define('DIR_MODIFICATION', './system/storage/modification/');
define('DIR_UPLOAD', './system/storage/upload/');

Should I change these to full paths maybe?

daveyoi commented Nov 9, 2016

@JAY6390 - Thanks for the quick response!

The vendor directory is the one that is provided with the 2.2 compiled download from opencart.com with the addition of the bugsnag library.

The directory is outside of the public_html doc root

In the file the duplicates are all full path

/home/site/vendor/autoload.php

where as other entries are like this

system/engine/event.php
system/engine/model.php
system/engine/registry.php
system/engine/proxy.php
system/helper/general.php
system/helper/utf8.php
system/helper/json.php
system/helper/hash_equals.php

and only appear once.

There is one odd thing with this install, in the config.php at the root declares its paths like this.

define('DIR_APPLICATION', './catalog/');
define('DIR_SYSTEM', './system/');
define('DIR_IMAGE', './image/');
define('DIR_LANGUAGE', './catalog/language/');
define('DIR_TEMPLATE', './catalog/view/theme/');
define('DIR_CONFIG', './system/config/');
define('DIR_CACHE', './system/storage/cache/');
define('DIR_DOWNLOAD', './system/storage/download/');
define('DIR_LOGS', './system/storage/logs/');
define('DIR_MODIFICATION', './system/storage/modification/');
define('DIR_UPLOAD', './system/storage/upload/');

Should I change these to full paths maybe?

@JAY6390

This comment has been minimized.

Show comment
Hide comment
@JAY6390

JAY6390 Nov 9, 2016

Contributor

@daveyoi Yes I'd definitely change those to full paths. Those should always be full paths - I've seen partial paths like that cause issues in the past with third party applications. The issue with the autoload can probably be solved in a simpler manner, as VQMod won't actually modify any files outside the root of the site (or shouldn't!). Open your /system/startup.php file and find this line

require_once(DIR_SYSTEM . '../../vendor/autoload.php');

Change it to

require_once((DIR_SYSTEM . '../../vendor/autoload.php'));

That should stop vqmod applying to it, as it won't match. You may need to refresh your modifications in the opencart admin under EXTENSIONS > MODIFICATIONS

Kind regards
Jay

Contributor

JAY6390 commented Nov 9, 2016

@daveyoi Yes I'd definitely change those to full paths. Those should always be full paths - I've seen partial paths like that cause issues in the past with third party applications. The issue with the autoload can probably be solved in a simpler manner, as VQMod won't actually modify any files outside the root of the site (or shouldn't!). Open your /system/startup.php file and find this line

require_once(DIR_SYSTEM . '../../vendor/autoload.php');

Change it to

require_once((DIR_SYSTEM . '../../vendor/autoload.php'));

That should stop vqmod applying to it, as it won't match. You may need to refresh your modifications in the opencart admin under EXTENSIONS > MODIFICATIONS

Kind regards
Jay

@daveyoi

This comment has been minimized.

Show comment
Hide comment
@daveyoi

daveyoi Nov 9, 2016

@JAY6390 Cheers mate.. but no go on that quick fix - vqmod still adds modCheck to that line.

Also correcting the paths in config.php didn't fix it - but i felt better for changing it to full paths :)

For now we have disabled our bugsnag module - and removed the vendor directory as it is not crucial to the running of the live site.

daveyoi commented Nov 9, 2016

@JAY6390 Cheers mate.. but no go on that quick fix - vqmod still adds modCheck to that line.

Also correcting the paths in config.php didn't fix it - but i felt better for changing it to full paths :)

For now we have disabled our bugsnag module - and removed the vendor directory as it is not crucial to the running of the live site.

@JAY6390

This comment has been minimized.

Show comment
Hide comment
@JAY6390

JAY6390 Nov 9, 2016

Contributor

simply renaming the autoload.php file would probably been enough. Looks like just adding a space after the require_once would be enough to disable the vqmod modcheck applying to it. I forgot we made the modcheck a bit smarter in more recent versions to allow multiple braces

Contributor

JAY6390 commented Nov 9, 2016

simply renaming the autoload.php file would probably been enough. Looks like just adding a space after the require_once would be enough to disable the vqmod modcheck applying to it. I forgot we made the modcheck a bit smarter in more recent versions to allow multiple braces

@pearlpandz

This comment has been minimized.

Show comment
Hide comment
@pearlpandz

pearlpandz Nov 30, 2016

guys any one help me...

i recently work with opencart 2.3.0.2. it show one error after hosting PHP 5.4+ required... but my boss need it to run 5.3 version.... what i do? please remember one thing php version 5.3 only

thank you

pearlpandz commented Nov 30, 2016

guys any one help me...

i recently work with opencart 2.3.0.2. it show one error after hosting PHP 5.4+ required... but my boss need it to run 5.3 version.... what i do? please remember one thing php version 5.3 only

thank you

@JAY6390

This comment has been minimized.

Show comment
Hide comment
@JAY6390

JAY6390 Nov 30, 2016

Contributor

@pearlpandz Not a vqmod issue - use the opencart forums or hire a developer

Contributor

JAY6390 commented Nov 30, 2016

@pearlpandz Not a vqmod issue - use the opencart forums or hire a developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment