Error in require 'vendor/autoload.php';


Hi everyone.
I have several slim configurations working. I moved to a new server, used the same code, and do not move forward the autoload line in index.php

I have no idea what can be. Where can I find the log file to see if there is more info?

<?php require 'vendor/autoload.php'; echo "0"; Thanks


I’m not sure I understand your question, but it sounds like you need to find the log file of your webserver. You might be able to find the path like this:

<?php echo ini_get('error_log');

If you’ve just moved your app, make sure you either copy your vendor folder or run composer install to get the included libraries.


Hi. thanks. I moved everything but an error occurs in this line:

echo “0”;
require ‘vendor/autoload.php’;
echo “1”

only 0 appears. Do you suggested to see the log file? Where do these error go to? The line you provided does not echo anything.



I don’t know which webserver you are using or how it might be installed, but that would dictate where the log file is for your webserver. Yes, your webserver’s log file should log the error and give you more details.

In a typical setup, your vendor folder wouldn’t be in the same location as your front controller (index.php), so you might more often see

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

But that depends on your environment.