Environment variables not being set by php module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to set an environment variable and run a program via php when the page is loaded. This command runs fine when I use the php interactive shell: putenv('TS_SOCKET=/tmp/test.socket'); echo exec('tsp');

However, if I wrap that with php tags, throw it in a .php file and access it via browser, the environment variable seems to not be set at all (evidenced by the incorrect output of `tsp`). Setting the environment variable in the exec() call doesn't work either. I know its not a user issue, since I've run the command as the apache2 service user.

This is all running on Ubuntu 17.10 with PHP 7.1.11 on Apache 2.4.27

Why isn't this working?

Thanks,

Aram


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux