0

I use apache2 server and i need to execute bash scripts on server. So i use exec() function. For my scripts i should define environment variables but apache sends me an error when i'm trying to start server with my bash-like definition:

/etc/apache2/envvars: Syntax error: "(" unexpected

Syntax export MY_ARRAY = (1 2 3) works in terminal but doesn't works by placing in apache's envvars file.

So how can i define array environment variable to work with in other scripts by using php function exec()?

Thanks.

  • Possible duplication question https://stackoverflow.com/questions/19696230/how-to-set-global-environment-variables-for-php – Raman Sailopal Aug 21 '17 at 08:35
  • Not at all, because when i set regular values like: "export VALUE = 1.5" in /etc/apache2/envvars it does work. I have problems only with arrays and it's another problem, i guess. – Vsevolod Yeroshenko Aug 21 '17 at 08:51

0 Answers0