0

I have some variables written in /etc/environment

NLS_DATE_FORMAT=DD/MM/YYYY
NLS_DATE_LANGUAGE=SPANISH
NLS_LANG=SPANISH_SPAIN.WE8ISO8859P1

However, when I open the shell in Ubuntu and I start lampp (sudo /opt/lampp/lampp start), the environment variables don't appear in phpinfo. I'm using Ubuntu 10.4

How can I make Apache2 aware of the variables?

Please help

Thank you

4
  • how about adding them to /opt/lampp/lampp ?
    – netbrain
    Commented May 12, 2011 at 11:44
  • exactly where in /opt/lampp/lampp?
    – sergio
    Commented May 12, 2011 at 12:00
  • im guessing its a bash script? in that case after #!/bin/bash
    – netbrain
    Commented May 12, 2011 at 12:05
  • You can use the SetEnv directive in your Apache config file if that's the only place you really need those variables. Commented May 12, 2011 at 12:12

1 Answer 1

0

I tried putting those variables in /etc/bash.bashrc, also in my apache config file with SetEnv. However, no luck at all. Finally I found the solution elsewhere which, in my case, it's working.

I added the variables here: /opt/lampp/bin/envvars

export NLS_DATE_FORMAT=DD/MM/YYYY
export NLS_DATE_LANGUAGE=SPANISH
export NLS_LANG=SPANISH_SPAIN.WE8ISO8859P1

Hope this will help someone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.