4

I am using laravel 5.8.

I am getting an exception in file /var/www/html/admin/vendor/nesbot/carbon/src/Carbon/Traits/Units.php at line

       // @call addRealUnit
            case 'minute':
            $value *= static::SECONDS_PER_MINUTE;
            break;

I am using AWS server.

I am trying to run composer update but I am getting this error :

[Composer\Downloader\TransportException]
The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to op
en stream: Connection timed out

Al Foиce ѫ
  • 4,195
  • 12
  • 39
  • 49
Rishikesh Singh
  • 85
  • 2
  • 10

1 Answers1

13

Looks like the new warning in PHP 7.1

Probably you have an empty SESSION_LIFETIME in the .env which cause this warning by calling the addRealUnit($unit, $value = 1) with the $value = ""

Solution: Update the .env and set a value to SESSION_LIFETIME or remove the SESSION_LIFETIME and the problem should be solved.

Benjamin
  • 206
  • 3
  • 3
  • in my opinion, the composer error has nothing to do with the exception, maybe this will help you: https://stackoverflow.com/questions/43996782/how-to-correct-the-composer-downloader-transportexception-error-for-composer – Benjamin Sep 17 '19 at 12:31
  • Thanks, Benjamin it's working when I remove the SESSION_LIFETIME from .ENV but when I am using SESSION_LIFETIME = 525600 then it throws the same error – Rishikesh Singh Sep 17 '19 at 12:47
  • try to remove all spaces, probably the number gets converted in a string – Benjamin Sep 17 '19 at 15:12