Post by denelsen » Tue Jul 29, 2025 12:01 am

Of course. Here is a clear, detailed message you can post on the OpenCart forums. This provides all the necessary information for experienced users to help you effectively.


Hi everyone,

I'm hoping to get some help with an installation of OpenCart that's been giving me a lot of trouble. I've been working through a series of errors and have hit a wall.

My Environment:

OpenCart Version: 4.1.0.3

Hosting Provider: DreamHost

The Problem:

I started with a fatal error: Undefined constant "APPLICATION". I was able to fix this by adding define('APPLICATION', 'Catalog'); to my main index.php file.

This led to a new error: Error: Class "Twig\Loader\FilesystemLoader" not found. I learned that this meant the vendor directory with all the Composer dependencies was missing or incomplete.

Following advice, I tried to re-trigger the installation process to have OpenCart generate the vendor folder for me. My process was:

Backed up my database and files.

Renamed config.php and admin/config.php to .bak to launch the installer.

Ran the installer from my website.

The installer ran, but it failed to download the dependencies correctly. It created the vendor directory, but the files inside are corrupted. This now gives me the following error:

Error: syntax error, unexpected token "<", expecting end of file
File: /system/storage/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php

I understand this means that instead of downloading the PHP library files, my server saved HTML error pages as the .php files. I have tried deleting the vendor folder and re-running the installer, but I get the same result every time. It seems my environment on DreamHost is unable to complete the Composer installation step correctly.

My Question:

Since my server can't seem to build the vendor directory automatically, what is the best way to get a clean, complete vendor directory for OpenCart 4.1.0.3?

Is there a trusted community link to a "full package" download that already includes the vendor files? This seems to be the only way forward for me on this shared hosting plan.

Thanks in advance for any help or advice you can offer!

Newbie

Posts

Joined
Mon Jul 28, 2025 11:57 pm

Post by Cue4cheap » Tue Jul 29, 2025 5:19 am

denelsen wrote:
Tue Jul 29, 2025 12:01 am
My Question:

Since my server can't seem to build the vendor directory automatically, what is the best way to get a clean, complete vendor directory for OpenCart 4.1.0.3?

Is there a trusted community link to a "full package" download that already includes the vendor files? This seems to be the only way forward for me on this shared hosting plan.

Thanks in advance for any help or advice you can offer!
The answer is to not use any OC 4.x.x.x versions at this time.
Use viewtopic.php?t=235631
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by khnaz35 » Tue Jul 29, 2025 11:16 pm

Lower to 3.0.4.1

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 ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 2 guests