Questions tagged [env]
221 questions
0
votes
0 answers
PHP shell_exec $PATH variable not matching terminal $PATH variable
I am getting problems when I am trying to use some system packages such as ImageMagick in my application through shell_exec.
If I define the path myself packages work fine. ImageMagick works but as it uses Ghostscript package it goes wrong on this…

directory
- 3,093
- 8
- 45
- 85
0
votes
1 answer
How can I setup an environment variable to hold a DSN for PHP?
I am trying to set up a permanent "environment" variable per this SO Post.
I put the variable in my .bash_profile and am able to access it from the command line using.
echo $VAR
However, this is a DSN ( DB Credentials ) needed by PHP ( same thing…

cade galt
- 3,843
- 8
- 32
- 48
0
votes
1 answer
Laravel Environment Setting
I'm developing laravel proect with git to test my proect to server, my .env is set to local setting for database setting. when i push my laravel proect with git (with .env file), i must resetting my .env at my server.
Can i make a setting that can…

yudijohn
- 1,248
- 3
- 19
- 43
0
votes
0 answers
env variable giving a weird output --!
I have the following code inside a .sh script:
#!/bin/ksh
# Set environment variables
ANT_HOME=/home/tools/ANT1.8.2
ANT_OPTS="-Xmx512m"
cd `dirname $0`/..
BASEDIR=`pwd`
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export PATH JAVA_HOME ANT_HOME…

praveena
- 41
- 1
- 1
- 9
0
votes
1 answer
Wordpress Bedrock framework installation white screen of death ("Dotenv values containing spaces must be surrounded by quotes")
Problem occurred installing the Wordpress Bedrock framework per its documentation here.
PHP error: "Dotenv values containing spaces must be surrounded by quotes" (or just a "Whitescreen of death" if errors are off/going to logs in php.ini).

Will Squire
- 6,127
- 7
- 45
- 57
0
votes
1 answer
set env variable in bash when executing script over ssh
I have a simple bash script with an associative array called servers. The server name is the key and the IP address is the value. I use this when I want to run some one off script on all my servers.
for server in ${!servers[@]}; do
echo ""
…

digitaladdictions
- 143
- 1
- 1
- 8
0
votes
1 answer
About env file extension
now, i want to know about env file extension. what is env file type? How to encrypt my file with env file type. And, How to open env file? Can you open env file type within shell script coding? eg. #!/bin/bash source myfile.env

Zay Ya
- 195
- 1
- 4
- 15
0
votes
3 answers
How to interpolate strings that represent environment variables
I've got this runtime need to replace environment variables in a plain text file. Say the file looks like this:
version: v1
kind: Pod
metadata:
- name: $PODNAME
My bash script pulls out all environment vars, here $PODNAME.
Once I have a handle on…

buley
- 28,032
- 17
- 85
- 106
0
votes
1 answer
Ruby on Rails - Source a file and save ENV variable as global
I have an API key which I've saved to /home/user/api/keys that I would like to save as a global variable in my Rails app. I thought this would work, this is my config/initializers/my_constants.rb:
`source "/home/user/api/keys"`
API_PASS =…

Isaac
- 2,246
- 5
- 21
- 34
0
votes
1 answer
Why sudo env is not showing all the environment variables?
I have a variable set in a script file in /etc/profile.d/somescript.sh
I have modified the /etc/sudoers and added "ansible" user to the sudoers file like this:
Defaults !env_reset
ansible ALL=(ALL) NOPASSWD: ALL
Why isn't the first line…

ady8531
- 689
- 5
- 13
- 24
0
votes
2 answers
How to set path environment variable in linux in C language code
I want to set a path environment variable in bash by C program.
So I coded using 'setenv' function, But it was not the answer to solve.
Could anybody suggest another way to solve this problem in C programming?
I thought the other solution that the…

Choi Taekyoon
- 1
- 1
- 2
0
votes
1 answer
Debug 'env' in Rails initializer
I want to check the value of env[:clearance] to see why something is broken.
How can I do this. I tried puts:
config.user.current = Proc.new { env[:clearance].current_user }
puts "ENV[:CLEARANCE]: #{env[:clearance]}"
but that gets: undefined…

Meltemi
- 37,979
- 50
- 195
- 293
0
votes
3 answers
Laravel 5 Environment Detection on Windows 8.1 not working
Now its working just updated to 5.0.6 version.
$ php artisan env
Current application environment: production
so duplicated .env.example file to .env.production but got no luck
So I checked in Foundation->Bootstrap->DetectEnvironment.php at line…

Webloper
- 178
- 1
- 5
- 15
0
votes
0 answers
environment variable undefined
working on setting up a simple dev environment while i learn Meteor (built on Node.js)
starting with a simple test, in env.sh i have only:
export CUSTOM_VAR="some value"
then in app.js, I have:
if (Meteor.isClient) {
…

gaio
- 41
- 4
0
votes
2 answers
Use remote server env variable in ksh via an SSH command
I can't find any answer to this "easy looking" problem.
I would like to execute an ssh command using a ksh shell or script which use an env variable of the SERVER.
Example:
ssh user@server "ls $DIR"
Where $DIR is an env variable define on the server…

Schiltech
- 3
- 2