0

My hosting environment using Server version: Apache/2.2.14 (Unix) and I am modifying ./usr/local/apache/conf/httpd.conf to set environment variable and restarting the server .

SetEnv XML-RPC-IPs 193.45.32.21

I did set it as a first entry in the file and restarted the server . But even restarting if I try to print it is still getting me black , Am I missing any thing ?

echo "My IP address ".$_SERVER['XML-RPC-IPs'];

Thanks for your help Regards Kiran

3
  • Go to serverfault.com, this is a programming site, you should certainly get an answer there Commented Aug 18, 2010 at 1:52
  • 1
    I know this may not help, but fyi I tried your exact code on my own server and it worked fine. I am also using Apache 2.2.14 (on Ubuntu Server). Maybe you have some configuration problem that prevents setting or reading envars? Commented Aug 18, 2010 at 1:55
  • Thanks a lot for your answer , I did check the php info . The variable is there , but surprisingly with different name I mean the name I gave is "XML-RPC-IPs' ( In between hyphens ) But that came as "XML_RPC_IP" ( In between underscores ) . Not sure why ... Commented Aug 18, 2010 at 13:54

1 Answer 1

1

Environmental Variables are located in $_ENV superglobal.

What you are looking for is echo "My IP address ".$_ENV['XML-RPC-IPs'];

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.