This is a basic installation of OC with no fancy extensions just the basic store front.
As instructed I backed up system files and DB before action. Uploaded all 4.X to server except config.php and admin/config.php
Opened OC expecting the Upgrade prompt but this message comes up:
Fatal error: Uncaught Error: Undefined constant "APPLICATION" in /home/beginanew2015/public_html/somersethomemade.com/shmph/system/framework.php:4 Stack trace: #0 /home/beginanew2015/public_html/somersethomemade.com/shmph/admin/index.php(20): require_once() #1 {main} thrown in /home/beginanew2015/public_html/somersethomemade.com/shmph/system/framework.php on line 4
I have looked for help and found a few that sort of show possible answers but nothing seems to fit this error or, if it does, I cannot see how to fix.
I have tried to open OC using both latest Firefox and latest Chrome on a Windows platform with the same error message received.
I am not an expert but can follow basic logic.
Can anyone assist with a solution?
Worst idea ever!leighwilles wrote: ↑Wed Oct 23, 2024 12:35 pmTrying to upgrade from 3.0.X.X to 4.0.2.3 because when server PHP upgraded from 7.6 to 8.1 and OC3.X no longer works without many errors.
Yes, use this here: https://github.com/opencart/opencart/re ... ag/3.0.4.0
This version works with php 8.x without any problem.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
As has been stated. At this time it is not recommended to use OC4 for live sites. Your error is not relevant to that answer as you will find out very quickly that there will be more errors that will make your site very expensive to get fixed by experts. Your site do as you wish.
APPLICATION is set in the config.php files. I guess you did not update correctly.
How did you update?
3.0.x.x is compatible with php8, presuming you mean 3.0.x.x and not some random OC3 version that you want to keep secret?
like what?I have looked for help and found a few that sort of show possible answers but nothing seems to fit this error or, if it does, I cannot see how to fix.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
If you provide more details, e.g. your old OC version, extensions, theme, etc, then we can help you here with your upgrade. In most cases installing a fresh OC 3.0.4.0 with the same theme and extensions (provided the latter are 3.0.4.0-compatible) is the best approach. You can then use the Export/Import tool to copy over your data, see also our FAQ on this.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
If the error now showing is because a line of code related to the location / specification of 'APPLICATION' is the only problem then I have copies of the original config.php files and can make the edit but I need to know what & where to type and in which of the two config.php files the edit should take place, e.g. is it in the root config.php or in the admin/config.php or is it in both? I am hoping that someone could guide me in this instance to resolve the problem. If not then I will have to reevaluate what software to use for this application.
Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
As already written by many others: don't use 4.x, better 3.0.4.0 - reasons because why you will find here in this forum ..leighwilles wrote: ↑Thu Oct 24, 2024 7:39 pmIf the error now showing is because a line of code related to the location / specification of 'APPLICATION' is the only problem then I have copies of the original config.php files and can make the edit but I need to know what & where to type and in which of the two config.php files the edit should take place, e.g. is it in the root config.php or in the admin/config.php or is it in both?
Basically 4.x is not stable enough for a production environement!
Back to your question:
1. config.php in root:
Code: Select all
define('DIR_APPLICATION', DIR_OPENCART . 'catalog/');
Code: Select all
define('DIR_APPLICATION', DIR_OPENCART . 'admin/');
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Users browsing this forum: No registered users and 3 guests