Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Scenario: Migrating from Existing environment to new environment (Both are Linux environments) for PHP CodeIgnitor application. While accessing the application it is found that file_get_contents is not fetching values from the environment file. The application is running on an apache web server and application has to read the variables from the environment file using file_get_contents. But it is returning the blank value and not throwing any errors.
Php Version: 7.3.5
Framework used is CodeIgnitor and also using php-fpm
Code: try{$content = file_get_contents('/samplepath/myapplication/.env');echo " <br/> Content is $content <br/>"; catch (Exception $e) {echo 'Error Caught $e';}
Expected Result : This should return all the values from .env file
Actual Result: It is returning blank while accessing through application hosted in apache web server
Observations:
When executed the above code independently, this is fetching the values properly from the environment file.
i.e. if above code snippet pasted to a test.php and execute php test.php >> This is working as expected
The path provided in the above file is an absolute path. (above path is a sample path given)
Gave full permission to the user to access the file.
Checked with a different file (other than .env)also which is showing the same behavior.
Made the following changes in php.ini also. Not able to see any error in logs (checked in server logs and fpm logs).
display_errors=On
error_reporting= E_ALL & ~E_DEPRECATED & ~E_STRICT
allow_url_fopen = On7.Checked to read the file using readfile ,but still the same behavior as it is returning blank
Stefan
patrickniessenmakezens
donmez.dogan
41809fc37fa549b98a34934d238850
Código de referido Binance
yolanda smith
b1cfd497da4348d08019b0315db7a0
Deeraj EA
1ddffddc31ea402a842dcb134f6134
bec1cd09097d477da725b161a4066f
Anjanesh Lekshminarayanan
Anjanesh Lekshminarayanan