I modified my .bashrc like this:
If I type “echo $PATH” from my ssh shell file, the path indeed begins with “xx:”. Great.
I have a webpage which invokes php (set up to php 7 if it matters, with an empty phprc). I added this line inside my php directives:
echo "My PATH is ." . $_ENV["PATH"] . "'";
When I visit the corresponding html page, I do see the message, but the reported path is
My PATH is '/usr/local/bin:/usr/bin:/bin'
Can anyone tell me why php isn’t picking up the PATH I set in my .bashrc? Or clue me in where to look?
Obviously, I don’t really care about xx in the path, but that is just a stand-in for my real issue, which is more complicated. If you want to know the real story, this php-infected html page actually invokes a python script, and that script is not seeing the PATH and PYTHONPATH env variables it needs in order to pick up my virtualenv. But I believe if I can solve the above “xx” path problem, it will lead me to the solution of my actual problem.