InvalidArgumentException php error

Ive built a site in grav, I have it running fine on my production server (digital ocean) and run it locally on my development machine using MAMP.

I pulled the site down from my repo to make some changes at home tonight on a different mac book (10.11). Tried to launch the site locally using MAMP as on my dev machine but just got a white screen - checked the apache logs and had a nice php error. So I tried to run it using the built in apache server in os x and got the same error.

Tried a few things including updating php using homebrew but cant seem to get past this error - needless to say its nearly midnight and my planned updates are shot but would still like to overcome this error so I can work on the site at home in the future.

Here is the error:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'A stream must either be a resource or a string.' in ~/local-directory/vendor/monolog/monolog/src/Monolog/Handler/StreamHan dler.php:50 Stack trace: #0 ~/local-directory/system/src/Grav/Common/Service/LoggerServiceProvider .php(29): Monolog\Handl er\StreamHandler->__construct(false, 100) #1 ~/local-directory/vendor/pimple/pimple/src/Pimple/Container.php(113): Grav\Common\Service\LoggerServiceProvider->Grav\Common\Service\{closur e}(Object(Grav\Common\Grav)) #2 ~/local-directory/system/src/Grav/Common/Errors/Errors.php(51): Pimple\Container->offsetGet('log') #3 ~/local-directory/src/Grav/Common/Processors/ErrorsProcessor.php(17): Grav\Common\Errors\Errors->resetHandlers() #4 /Documents/Dev in ~/local-directory/vendor/monolog/monolog/src/Monolog/Handler/StreamHan dler.php on line 50

Is anyone familiar with this and/or know how to fix it?? Any help appreciated :slight_smile:

I think you are running with an old PHP version?

My dev machine is php 7.0.8, the production server is 7.0 and my machine i tried last night was 5.6. Should I upgrade that to 7 too?

5.6 should be fine, but I would ensure you do a full composer install --no-dev -o.

If you don’t have composer installed, you can use the one we bundle with grav:

bin/composer.phar install --no-dev -o