Warning: require_once(vendor/autoload.php): Failed to open stream

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elio42
User
Posts: 128

Warning: require_once(vendor/autoload.php): Failed to open stream

Post by elio42 »

Hi

I installed evaluation version 2022.1, using Win10 with VMware 16 and XAMPP and testing with a small database (2 tables) in order to learn the new mvc structure, quite different from the previous ones.

However, on the first attempt, errors occurred:

Warning: require_once(vendor/autoload.php): Failed to open stream: No such file or directory in E:\xampp\htdocs\fotos\index.php on line 24
Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='E:\xampp\php\PEAR') in E:\xampp\htdocs\fotos\index.php:24 Stack trace: #0 {main} thrown in E:\xampp\htdocs\fotos\index.php on line 24

The PEAR module is in the E:\xampp\php\pear\PEAR folder.
Please help me to follow through with the tests.


arbei
User
Posts: 9393

Post by arbei »

You have not completed "composer update" successfully.

Note that since v2019 Composer is used and since v2021 URL Rewrite is used, you may read the follows to set up Composer on your PC and URL Rewrite for your web server:


elio42
User
Posts: 128

Post by elio42 »

Composer was intalled and updated during generation.
The project was created from scratch, not migrated.


arbei
User
Posts: 9393

Post by arbei »

elio42 wrote:

The project was created from scratch, not migrated.

That is irrrelevant. Every project, new or old, needs to run "composer update" at least once to download the required packages from packagist.org.

Read Composer again and open a command prompt and test Composer on your PC by entering:

composer -V

Make sure Composer is working first. Do not ignore any errors or your Composer is not ready yet.

From the help file:

Notes

  • Composer downloads packages from the internet, make sure that you are online when you run "composer update".
  • The packages downloaded by Composer are put in the "vendor" subfolder under the project folder of your project. Make sure you upload this "vendor" subfolder to your site together with other generated files.

When you generate, make sure:

  • You have enabled "composer update" in the Generate tab
  • Generate all scripts
  • See the progress and make sure "composer update" is completed successfully. Again, do not ignore any errors.

elio42
User
Posts: 128

Post by elio42 »

After reviewing the php.ini relating to Composer, the project worked!
Thank you


Post Reply