1

I use PHP 7.0 on Apache 2.4.20 and Ubuntu 16.04 LTS. I have followed this guide to have upload functionality and would like to know what I can do to fix the following error that I receive:

PHP Fatal error: Uncaught Error: Class 'Monolog\Logger' not found in /var/www/vendor/dilab/resumable.php/src/Resumable.php:49\nStack trace:\n#0 /var/www/upload.php(11): Dilab\Resumable->__construct(Object(Dilab\Network\SimpleRequest), Object(Dilab\Network\SimpleResponse))\n#1 {main}\n thrown in /var/www/vendor/dilab/resumable.php/src/Resumable.php on line 49

Can someone help me overcome this error on my server?

Edit 1: Composer doesn't download any dependency named "Monolog" or "Logger", so why is that happening? (note that this might be a Composer question and not a PHP question after all...)

6
  • Looks to me like 'Monolog\Logger' not found in /var/www/vendor/dilab/resumable.php/src/Resumable.php:49, whats your question?
    – Matt Clark
    Apr 25, 2016 at 20:52
  • @MattClark Why downvote? The question is clear: How can I fix that error?
    – user243975
    Apr 25, 2016 at 20:55
  • Did you fix the problem? Jun 10, 2016 at 12:00
  • @mortezamalvandi Not yet..... No-one has helped me.
    – user243975
    Jun 10, 2016 at 12:07
  • Did you by any chance miss the following line at the top? include 'vendor/autoload.php';
    – user509612
    Feb 11, 2019 at 20:57

1 Answer 1

2

You have to install Monolog as well. Go to your project directory and execute:

composer require monolog/monolog
composer require php-console/php-console

Then edit your update.php and insert below use Dilab\Resumable;

use Monolog\Logger;
use Monolog\Handler\PHPConsoleHandler;

That should do the trick.

0

You must log in to answer this question.