Back

putenv() has been disabled for security reasons


Hello,

I just clean installed Laravel and am getting the following message not just upon install but also when running composer update:

putenv() has been disabled for security reasons

The thing is, I've enabled putenv(), I've removed it from the disable_functions directive in PHP and even ran the following code snippet in a test file:

<?php

    if (putenv("TESTENV=yes")) {
        echo 'putenv is indeed enabled.';
    }

And it outputs "putenv is indeed enabled". So putenv() is enabled but artisan and Laravel are still having trouble using it for some reason.

Is Laravel disabling it on the application level? I'm running WTServer.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us