Ben açılışta apache linux bir ortam değişkeni geçmek istiyorum.
export MYVAR=5 --I define my environment variable on the command line
PassEnv MYVAR --set apache to import the variable in apache config file
apachectl restart --when I restart apache I don't get an error message. However I have noticed that if I do not create the environment variable in my first step, I get a warning message, so must be working here
echo $_SERVER['MYVAR'] --i try to access the environment variable within PHP but it is not defined
Ben zaten çıkar bir ortam değişkeni (kendimi oluşturuldu havn't bir) PassEnv çalışırsanız gayet iyi çalıştığını tespit ettik. SetEnv yönergesi de gayet iyi çalışıyor.
Ben gerçekten bir dosyaya yazmadan anında apache bir ortam değişkeni geçmek istiyorum. Çok takdir Yardım.
Ben CentOS, PHP5 ve Apache2'yi kullanıyorum.
Teşekkürler.
update it seems the environment variable gets passed if i invoke the apache startup directly with httpd and not use apachectl which is a shell script. I would have thought that the "export" would have exported the variable to the shell script no? I am not a linux guru so excuse my lack of knowledge.