Skip to main content
0 votes
1 answer
17 views

AWS ECS Docker automatic environment variables injections

I will share my experience about a crazy problem on one application that I manage, that is a Laravel application publish on AWS ECS, that need to use a shared redis to store sessions and developers ...
Luca Camillo's user avatar
0 votes
0 answers
38 views

.env is being hashed? [duplicate]

I am resolving .env like this. $dotenv = new Dotenv(); $dotenv->load(__DIR__ . '/../.env'); $_ENV seems to be loaded as expcted, when I dumping it. However getenv('') just returns false for any of ...
lenchester's user avatar
0 votes
1 answer
142 views

Polyfill warning from Google; PHPMailer and PHP dotenv affected [closed]

I got a warning from Google saying that my website is using Polyfill framework on Google Maps: "Notification Title: [Security Alert]: Polyfill.io Issue for Google Maps Platform users". It ...
Linus Karlsson's user avatar
1 vote
1 answer
616 views

PHP is not reading .env file

I am using PHP with PDO to connect to my database. I want to start using environment variables, so I used the following terminal command: composer require vlucas/phpdotenv My .env file now contains ...
John Beasley's user avatar
  • 3,099
-1 votes
2 answers
700 views

Laravel 10 - Getting the env returns the entire .env file [closed]

I have tried a few different ways to do this, but if I do env("APP_ENV") I get the entires contents of the env file instead of the APP_ENV value I know this is bad practice but I also get ...
Neo's user avatar
  • 2,405
1 vote
2 answers
183 views

Symfony framework.lock with .env set-up

Problem I need to set up Symfony framework.yaml parameter framework.lock with 2+ memcached servers using .env. But when I try to do so, it does not recognize 2 servers, but only one, and with a glitch....
Yury A.'s user avatar
  • 13
1 vote
1 answer
145 views

Bash: what delimiter to use for this string to array conversion to work? (Laravel/dotenv/Sail/Docker Compose)

Laravel Sail should support multiple docker-compose files by configuring them in a dotenv file (.env). The line in my .env file... SAIL_FILES='docker-compose.yml:docker-compose-arm.yml' The part of ...
Mike's user avatar
  • 71
-1 votes
1 answer
147 views

how to properly load libraries in php? [duplicate]

I'm working with two libraries: phpdotenv spatie/async This is what I'm executing: <?php require_once "/var/local/entrop/vendor/autoload.php"; include_once '/var/local/entrop/inc/...
Dexter Naru's user avatar
-1 votes
1 answer
205 views

Heroku Symfony app Unable to read the "/tmp/build_2f06b5cf/.env" environment file

After updating composer to v1 to v2, my build on heroku is failing, error message : Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! PHP ...
Dezz H's user avatar
  • 452
0 votes
0 answers
826 views

load environment variables to the global scope

I am currently using vlucas/phpdotenv to load environment variables in my pure php application. I installed the package with composer then loaded it in the index page like: //Load Composer's auto ...
Morena's user avatar
  • 58
-1 votes
1 answer
2k views

How to limit a package's dependency to a certain PHP version in Composer? [duplicate]

Our production server is PHP 5.5.24. A package I need (vlucas/dotenv) requires in its composer.json: "symfony/polyfill-ctype": "^1.17" Unfortunately version 1.20 of that symfony ...
Vael Victus's user avatar
  • 4,132
-1 votes
2 answers
4k views

Symfony 5.3 Mailer setup env vars not reading correctly

In a Symfony 5.3 project I am using the Mailer (..\Symfony\Component\Mailer\MailerInterface) to send mails. For devolopment I required "symfony/google-mailer" with composer and set it up in ....
user3440145's user avatar
2 votes
2 answers
3k views

PHP cannot get the environment variables

I have some environment variables as bash variable and other environment variables into a .env file. In my php script I load env variable using this require __DIR__.'/vendor/autoload.php'; use Dotenv\...
Vito Lipari's user avatar
1 vote
0 answers
902 views

Undefined type 'Dotenv\Dotenv\Dotenv'

Is this the way to use a package installed from composer? <?php use Dotenv\Dotenv; require_once __DIR__ . '/../../../vendor/autoload.php'; $dotenv = Dotenv\Dotenv::createImmutable(dirname(...
Denusklo's user avatar
5 votes
1 answer
7k views

How to use phpdotenv library on my whole project?

I started a project using composer and donlowaded the package vlucas/phpdotenv. I would like to call the $_ENV['name'] for example in my whole project without needing to instantiate the dot env in ...
Raul Perez Tosa's user avatar

15 30 50 per page
1
2 3 4 5 6