semaphore-demo-php-unsplash icon indicating copy to clipboard operation
semaphore-demo-php-unsplash copied to clipboard

There is missed file vendor/autoload.php error

Open shaopengwu opened this issue 3 years ago • 2 comments

After following the instructions to build Docker image by docker-compose, When access url: http://localhost:8000/

Errors appear as:

Warning: require(/var/www/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/public/index.php on line 24

Fatal error: require(): Failed opening required '/var/www/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/public/index.php on line 24

shaopengwu avatar May 04 '22 10:05 shaopengwu

Hi @shaopengwu I just refreshed the demo code. I think that fixed the problem. Could you try again? Thank you

TomFern avatar May 06 '22 11:05 TomFern

Hi @TomFern,

Thanks for the reply.

I realised I started from Docker directly. So that I did not install composer (nor installation PHP in order to keep everything inside of Docker) on my host machine.

So that, the 'vendor' folder is not found.

I will try to see if I can modify Dockerfile to install composer and installation in docker directly.

thanks

shaopengwu avatar May 06 '22 22:05 shaopengwu