1

Error:

Warning: require(/apache/htdocs/workbench/../vendor/autoload.php): Failed to open stream: No such file or directory in /apache/htdocs/workbench/shared.php on line 2

Fatal error: Uncaught Error: Failed opening required '/apache/htdocs/workbench/../vendor/autoload.php' (include_path='.:') in /apache/htdocs/workbench/shared.php:2 Stack trace: #0 /apache/htdocs/workbench/login.php(2): require_once() #1 {main} thrown in /apache/htdocs/workbench/shared.php on line 2

As i understand - ../vendor/autoload.php would exist if composer was used to init the project. But in this case- composer is not available and the source for workbench was downloaded and extracted to the apache ServerDocument root per the README.

I removed the following line from workbench/shared.php and it seems to start OK (gets past the error) but im wondering if any functionality will break down the line.

require __DIR__ . '/../vendor/autoload.php';

I cannot install composer in my environment. no mention in the README for encountering this. Is there a workaround? How do others do it?

5
  • Have you tried to install composer? getcomposer.org/doc/00-intro.md Oct 23, 2022 at 11:19
  • To be honest this seems to be a question better target to general stackoverflow given it seems to be a PHP question. Oct 23, 2022 at 11:20
  • @Jeferson See my statement above - I cannot install composer in my environment. no mention in the workbench README for encountering this. Is there a workaround? How do others do it?
    – Eminent
    Oct 23, 2022 at 13:33
  • Looks like this constraint was added to Workbench source code in 2018. But is it necessary? github.com/forceworkbench/forceworkbench/commit/…
    – Eminent
    Oct 23, 2022 at 14:24
  • I think is fair to assume, but again, I suggest posting on general stackoverflow given this is PHP and not Salesforce related. Oct 23, 2022 at 17:49

1 Answer 1

0

I suggest you comment out that line and then install the packages that composer would try to install: ext-redis ext-soap sentry ext-sodium

If you can't install those, then I think you won't be able to run this version of workbench. An earlier version, which doesn't need all those packages, may work for you. I'm successfully using v39.0 from 2017 on PHP7.4. All it needs is ext-redis and ext-soap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.