Skip to main content

All Questions

Tagged with
-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
-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 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
0 votes
1 answer
488 views

\[InvalidArgumentException\] Could not find package vlucas/phpdotenv. Couldn't download package

I'm having a problem with vlucas/phpdotenv installation  ~/ nslookup repo.packagist.org Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: repo.packagist.org Address: 54.37....
Abubakr Abduvakhidov's user avatar
0 votes
2 answers
4k views

How do I solve the error "Fatal error: require(): Failed opening required '../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') ?"

So I am using vlucas/phpdotenv in my php application to store and use environment variables. I have created a db.php file which contains the configuration of my database connection. The folder ...
MajesticOverlord's user avatar
2 votes
1 answer
1k views

phpdotenv download many packages

I wanna to use phpdotenv in my project. I read it installation guide and run composer require vlucas/phpdotenv inside my project. Now it downloads many other packages except vlucas/phpdotenv in a ...
self demand's user avatar
1 vote
3 answers
5k views

Undefined type 'Dotenv\Dotenv". intelephense(1009)

I need help with this error in the screenshot below I am using PHP 7.2 and a 3rd party composer - "composer require vlucas/phpdotenv" v4.1.4. I define the base path but there is an error in the ...
Emmanuel Oga's user avatar
1 vote
1 answer
697 views

PHP Dotenv causing wordpress configuration to run twice

I have a relatively complex laravel project, within it I have a wordpress installation for a blog on the side which is installed with composer. In my wp-config.php I use an include to a file in my ...
GApple's user avatar
  • 11
1 vote
2 answers
9k views

PHP Fatal error: Class 'Dotenv' not found in

I've a project I try to run it but I am getting a following error: PHP Fatal error: Class 'Dotenv' not found in `/home/maras/Documents/eCodile/debtorcare/server/bootstrap/app.php on line 5` I'm ...
Marek Czyż's user avatar