Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

Environment variables are available in $_ENV in PHP.

share|improve this answer

You can get a dump of the PHP environment by setting up a page with the following code and pointing your browser to it:

<?php
phpinfo();
?>

In this case, you can find your XML-RPC-IPs content in $_SERVER["XML-RPC-IPs"].

share|improve this answer
    
Thanks a lot for your answer , I did check 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 ... –  Kiran Aug 18 '10 at 13:53
    
That's interesting indeed. I plugged your SetEnv line into my Apache config and pulled up the phpinfo page, and the content was in $_SERVER["XML-RPC-IPs"]. –  Brian Showalter Aug 18 '10 at 14:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.