Silverstripe 4.5 installation problem on shared host, urgent

Silverstripe Version 4.5:

Path error: FRAMEWORK_PATH /vendor/silverstripe/framework not within BASE_PATH /public

Hi guys,
I decided to create site using latest Silverstripe 4.5, I have used composer to download files to my local machine, then I copied files via ftp to server, server is shared, I have files is subfolder.
when visiting site to continue installation ( I have error, something with base path and framework path, any ideas?

**Fatal error** : Uncaught Exception: Path error: FRAMEWORK_PATH /vendor/silverstripe/framework not within BASE_PATH /public in /vendor/silverstripe/framework/src/includes/constants.php:171 Stack trace: #0 /vendor/composer/autoload_real.php(70): require() #1 /vendor/composer/autoload_real.php(60): composerRequire255b08803ee1331d7b87efdb9db900ab('795b01cf23ed94c...', '/vendor/compose...') #2 /vendor/autoload.php(7): ComposerAutoloaderInit255b08803ee1331d7b87efdb9db900ab::getLoader() #3 /public/index.php(9): require('/vendor/autoloa...') #4 {main} thrown in **/vendor/silverstripe/framework/src/includes/constants.php** on line **171**

Have you manually set up any paths, etc. in your config / env?
It’s a bit difficult to diagnose too much from just the error message.

No I didn’t change anything, I have just used composer to download files on my local machine and then I have ftp files to server.

From the error it looks like something has got confused in the file paths in the autoloader. Is the file structure on your server similar to that in your dev environment? eg. if you are working on a subdirectory on the server, were you working in a subdirectory on dev, etc.

My file structure is rather similar on local machine and web server.

I have just tried to create folder ‘public’ and I put all files inside it, somehow error message disappeared, I managed to do dev/build but have problem with stylesheets, they are not loaded.

Assuming your web host is using a Linux based OS, then I’d say its going to the wrong path, /vendor would tell the system to go all the to the root of the file system which if your on shared you don’t have access to.
Likely you wanted it to go to vendor/ or ~/vendor/

Hi guys,

I will help BartoszWais. He use Polish hosting service company. They do not use any apache,nginx,litespeed,lighttpd webservers.

Sweet … :wink:

  1. Turn off service separation i - this is required! Its change DOCUMENT_ROOT which is source of Your problem.
  2. Add to public/.htaccess directive DirectoryIndex index.php
  3. Add to ./.htaccess - this is require
    :Location /*.php
    Use php72

best regards / pozdrawiam

Hi guys, thanks for help.

For now I have decided to use older version of Silverstripe 4.3.3, I have used it before and it works.

Next time I will give 4.5 another shot, just to summary what I have done with 4.5 issue:
I have created subfolder ‘public’ and moved my files there it solved errors.

Reason I switched back to 4.3.3 is because my back end doesn’t support symlinks which are used for stylesheets and javascript files so no styles were being load.

One more time thanks for help.

That’s a bit strange. I don’t think there should be any significant reason that 4.3 would work where 4.5 doesn’t :thinking:

You don’t have to use symlinks for those files. If you run composer vendor-expose copy it will copy the files instead of symlinking them.

Hey DorsetDigital thanks for help, I neither know why 4.5 doesn’t work when 4.3.3 does, will try again on next project… and thanks for tip with symlinks.

A post was split to a new topic: Installing on shared hosting