Failed opening required 'vendor/autoload.php'

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

Failed opening required 'vendor/autoload.php'

Post by AntonioBack »

I'm testing phpmaker 2022 and updated a project and when generating it gave the error:

Error: Command failed: composer update -n --ignore-platform-req php
    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at global.Exec (C:\Users\almei\AppData\Roaming\PHPMaker2022\node_modules\@phpmaker\core\phpmaker.js:8:260981)
    at global.RunComposerUpdate (C:\Users\almei\AppData\Roaming\PHPMaker2022\node_modules\@phpmaker\core\phpmaker.js:8:266473)
    at C:\Users\almei\AppData\Roaming\PHPMaker2022\node_modules\@phpmaker\core\phpmaker.js:8:272021
    at <anonymous> {
  status: 2,
  signal: null,
  output: [ null, null, null ],
  pid: 6520,
  stdout: null,
  stderr: null
}
Error(s) occurred. Compilation of .scss files skipped.
Generation completed with error(s), please scroll up (if necessary) to check error(s) highlighted in red.

When I try to access I give the error on the page:

Warning: require_once(vendor/autoload.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\eMasterCaixa2022\index.php on line 24

Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\eMasterCaixa2022\index.php:24 Stack trace: #0 {main} thrown in C:\xampp\htdocs\eMasterCaixa2022\index.php on line 24


AntonioBack
User
Posts: 16

Post by AntonioBack »

From the phpmaker page I updated composer:

Composer version 2.1.12 2021-11-09 16:02:04

It stopped giving the Genereting Scripts error...

The error remains:
Warning: require_once(vendor/autoload.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\eMasterCaixa2022\index.php on line 24

Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\eMasterCaixa2022\index.php:24 Stack trace: #0 {main} thrown in C:\xampp\htdocs\eMasterCaixa2022\index.php on line 24
When accessing the project through the browser.


arbei
User
Posts: 9787

Post by arbei »

  • Make sure you generate all new scripts with v2022 (Delete all old files) in the project folder.
  • Delete "vendor" folder in the project folder, if it exists.
  • Open a command prompt at the project folder and run: composer update.
  • Make sure you have completed "composer update" successfully, do not ignore errors. If it is completed successfully, you should not see any errors and you'll see a folder named "vendor" created by composer. If you need to upload generated scripts to testing site, make sure you upload the "vendor" folder, see Composer for details.

AntonioBack
User
Posts: 16

Post by AntonioBack »

I followed the list gave the error:

{"statusCode":404,"error":{"class":"text-warning","type":"Not Found","description":"The requested resource could not be found. Please verify the URI and try again."}}


AntonioBack
User
Posts: 16

Post by AntonioBack »

  • I looked for: 'mod_rewrite' is already enabled, appears in phpinfo.

  • I put all the project letters lowercase, updated Composer in the folder and it worked, found the path

Grateful


Post Reply