Failed opening required file in vendor folder (v2022)

Hi,
I use Phpmaker 2022.12.4
I appreciate your help for the error
I can not understand.

Your “vendor” folder is not working,

  1. Make sure you use the latest version of Composer,
  2. Delete vendor folder and composer.json from your project folder,
  3. Generate all files again, make sure “composer update” is completed successfully.

I did as you suggested
and now I have:Fatal error: Uncaught Error: Class ‘PHPMaker2022\personaltrainer\HttpErrorHandler’ not found in /web/htdocs/www.appfc.it/home/personaltrainer/index.php:83 Stack trace: #0 {main} thrown in /web/htdocs/www.appfc.it/home/personaltrainer/index.php on line 83line 83 is
—> $errorHandler = new HttpErrorHandler($callableResolver, $ResponseFactory);

HttpErrorHandler.php is generated under the “src” folder, make sure you have generated all scripts and uploaded the folder to your site correctly.As said, make sure you use latest version of Composer (some older versions might have bugs). If your “vendor” folder is generated correctly by Composer, you should find the file vendor\composer\autoload_psr4.php in which you should find, e.g.‘PHPMaker2023\MyProjectName\’ => array($baseDir . ‘/src’, $baseDir . ‘/models’, $baseDir . ‘/controllers’),which means it will find the class in those folders.

autoload_psr4.php and ‘PHPMaker2023\MyProjectName\’ => array($baseDir . ‘/src’, $baseDir . ‘/models’, $baseDir . ‘/controllers’), there are.I try to redo everything from the beginning.
It works locally.

fchiurazzi wrote:

It works locally.

That means the scripts in the “vendor” folder cannot run on your server.

  1. Make sure you use the latest version of Composer. (Latest: v2.5.1 as of today)
  2. Delete the “vendor” folder and composer.json in your local project folder,
  3. Generate all scripts and run “composer update” again (to remake the “src” folder and the “vendor” folder)
  4. Upload all scripts to your server again.

I did as you said and now it works fine.
Best Regards :slight_smile: