Vaibhav Dwivedi
Vaibhav Dwivedi

Reputation: 55

Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE'

I was trying to upgrade my opencart version 1.5.6.4 to the latest one, 3.0.2.0 and followed all the instructions and was able to do it. I did the install procedure from mysite.com/install but got the error 1051 which i fixed by a solution here.

Anyway, Now I have done everything, I am getting following code on

[homepage][1]:-

Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 9
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 25
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 63
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 47
Notice: Use of undefined constant DIR_CACHE - assumed 'DIR_CACHE' in /home/msgcl/public_html/ocart/system/library/cache/file.php on line 25
Error: A theme has not beeareassigned to this store!

There are also two pop-ups I get after I log in from admin page with something like:

Syntax error - unexpected token > in JSON at position 0

any ideas what this could be referring to? Any help would be appreciated.

Upvotes: 0

Views: 2770

Answers (1)

Uwe
Uwe

Reputation: 16

Not sure if this is the officially approved fix, but the following worked for me:

In your opencart folder, open the config.php and admin/config.php files and add the following lines to both (adjust the file paths for your installation):

define('DIR_MODIFICATION', '/your/Path/To/opencart/system/modification/');
define('DIR_CACHE', '/your/Path/To/opencart/system/cache/');
define('DIR_LOGS', '/your/Path/To/opencart/system/logs/');

I had similar errors for DIR_MODIFICATION and DIR_LOGS, hence three lines.

Also created the directories on the server in the system subfolder.

Credits for the jump start about he DIR_MODIFICATION error to: http://www.betterhostreview.com/undefined-constant-dir_modification-opencart-error.html

Upvotes: 0

Related Questions