Just a quick guess. You are doing something like this in each of your sites fastcgi section? setting the script filename in each site like<br>fastcgi_pass&nbsp;&nbsp; <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br>fastcgi_index&nbsp;&nbsp; index.php;<br>
fastcgi_param&nbsp; SCRIPT_FILENAME&nbsp;&nbsp;&nbsp; /some/path/to/public_html/$fastcgi_script_name;<br><br>If you are doing this you actually reset all the http fastcgi_params that are set in any top level. Again if this is the case you need to either reinclude the fastcgi_params file in each of your site or change your SCRIPT_FILENAME to <br>
fastcgi_param&nbsp; SCRIPT_FILENAME&nbsp;&nbsp;&nbsp; $document_root$fastcgi_script_name; <br>in your fastcgi_params file and then in each of your server sections it will automatically have the script_filename set and you no longer have to do it for each server.<br>
<br><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 6:51 PM, Jim Ohlstein <span dir="ltr">&lt;<a href="mailto:jim.ohlstein@gmail.com">jim.ohlstein@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
That didn't work because the last two lines of nginx.conf are:<br>
<br>
include /usr/local/nginx/conf/fastcgi_params;<br>
include /usr/local/nginx/sites-enabled/*;<br>
<br>
So it was reset in fastcgi_params and still returned an empty string. What I did was hard code it in the site config. That worked. Presumably it won't output for other sites on the server either, not that it&#39;s really an issue.<br>

<br>
Thanks for your help Mike. I appreciate it greatly!<br>
<br>
Best,<br>
<br>
Jim<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a> [mailto:<a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a>] On Behalf Of mike<br>
Sent: Tuesday, October 28, 2008 7:24 PM<br>
To: <a href="mailto:nginx@sysoev.ru">nginx@sysoev.ru</a><br>
Subject: Re: Need help with global variable<br>
<br>
SERVER_ADDR is defined but empty. i am not sure here what to say...<br>
<br>
you -could- hard-code it in the nginx config probably...<br>
<br>
On Tue, Oct 28, 2008 at 4:11 PM, Jim Ohlstein &lt;<a href="mailto:jim.ohlstein@gmail.com">jim.ohlstein@gmail.com</a>&gt; wrote:<br>
&gt; This is the result:<br>
&gt;<br>
&gt; array(40) { [&quot;HOSTNAME&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;PATH&quot;]=&gt; &nbsp;string(28) &quot;/usr/local/bin:/usr/bin:/bin&quot; [&quot;TMP&quot;]=&gt; &nbsp;string(4) &quot;/tmp&quot; [&quot;TMPDIR&quot;]=&gt; &nbsp;string(4) &quot;/tmp&quot; [&quot;TEMP&quot;]=&gt; &nbsp;string(4) &quot;/tmp&quot; [&quot;OSTYPE&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;MACHTYPE&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;MALLOC_CHECK_&quot;]=&gt; &nbsp;string(1) &quot;2&quot; [&quot;USER&quot;]=&gt; &nbsp;string(3) &quot;jim&quot; [&quot;HOME&quot;]=&gt; &nbsp;string(32) &quot;/path/to/my/domain/root&quot; [&quot;FCGI_ROLE&quot;]=&gt; &nbsp;string(9) &quot;RESPONDER&quot; [&quot;QUERY_STRING&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;REQUEST_METHOD&quot;]=&gt; &nbsp;string(3) &quot;GET&quot; [&quot;CONTENT_TYPE&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;CONTENT_LENGTH&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;SCRIPT_FILENAME&quot;]=&gt; &nbsp;string(41) &quot;/path/to/my/domain/root/test.php&quot; [&quot;SCRIPT_NAME&quot;]=&gt; &nbsp;string(9) &quot;/test.php&quot; [&quot;REQUEST_URI&quot;]=&gt; &nbsp;string(9) &quot;/test.php&quot; [&quot;DOCUMENT_URI&quot;]=&gt; &nbsp;string(9) &quot;/test.php&quot; [&quot;DOCUMENT_ROOT&quot;]=&gt; &nbsp;string(32) &quot;/path/to/my/domain/root&quot; [&quot;SERVER_PROTOCOL&quot;]=&gt; &nbsp;string(8) &quot;HTTP/1.1&quot; [&quot;GATEWAY_INTERFACE&quot;]=&gt; &nbsp;string(7) &quot;CGI/1.1&quot; [&quot;SERVER_SOFTWARE&quot;]=&gt; &nbsp;string(12) &quot;nginx/0.7.19&quot; [&quot;REMOTE_ADDR&quot;]=&gt; &nbsp;string(13) &quot;my.ip.add.ress&quot; [&quot;REMOTE_PORT&quot;]=&gt; &nbsp;string(4) &quot;3719&quot; [&quot;SERVER_ADDR&quot;]=&gt; &nbsp;string(0) &quot;&quot; [&quot;SERVER_PORT&quot;]=&gt; &nbsp;string(2) &quot;80&quot; [&quot;SERVER_NAME&quot;]=&gt; &nbsp;string(17) &quot;<a href="http://mydomain.com" target="_blank">mydomain.com</a>&quot; [&quot;REDIRECT_STATUS&quot;]=&gt; &nbsp;string(3) &quot;200&quot; [&quot;HTTP_HOST&quot;]=&gt; &nbsp;string(17) &quot;<a href="http://mydomain.com" target="_blank">mydomain.com</a>&quot; [&quot;HTTP_USER_AGENT&quot;]=&gt; &nbsp;string(90) &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:<a href="http://1.9.0.3" target="_blank">1.9.0.3</a>) Gecko/2008092417 Firefox/3.0.3&quot; [&quot;HTTP_ACCEPT&quot;]=&gt; &nbsp;string(63) &quot;text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&quot; [&quot;HTTP_ACCEPT_LANGUAGE&quot;]=&gt; &nbsp;string(14) &quot;en-us,en;q=0.5&quot; [&quot;HTTP_ACCEPT_ENCODING&quot;]=&gt; &nbsp;string(12) &quot;gzip,deflate&quot; [&quot;HTTP_ACCEPT_CHARSET&quot;]=&gt; &nbsp;string(30) &quot;ISO-8859-1,utf-8;q=0.7,*;q=0.7&quot; [&quot;HTTP_KEEP_ALIVE&quot;]=&gt; &nbsp;string(3) &quot;300&quot; [&quot;HTTP_CONNECTION&quot;]=&gt; &nbsp;string(10) &quot;keep-alive&quot; [&quot;HTTP_COOKIE&quot;]=&gt; &nbsp;string(36) &quot;PHPSESSID=qmuor210i861rct4te1qcmq1o6&quot; [&quot;PHP_SELF&quot;]=&gt; &nbsp;string(9) &quot;/test.php&quot; [&quot;REQUEST_TIME&quot;]=&gt; &nbsp;int(1225235084) }<br>

&gt;<br>
&gt; So that variable returns an empty string.<br>
&gt;<br>
&gt; Hmmm...<br>
&gt;<br>
&gt;<br>
&gt; Jim<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a> [mailto:<a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a>] On Behalf Of mike<br>
&gt; Sent: Tuesday, October 28, 2008 6:40 PM<br>
&gt; To: <a href="mailto:nginx@sysoev.ru">nginx@sysoev.ru</a><br>
&gt; Subject: Re: Need help with global variable<br>
&gt;<br>
&gt; fastcgi_params can be set on the http {} level. i only have them defined once.<br>
&gt;<br>
&gt; var_dump($_SERVER) on the php script. see what it says.<br>
&gt;<br>
&gt; On Tue, Oct 28, 2008 at 3:31 PM, Jim Ohlstein &lt;<a href="mailto:jim.ohlstein@gmail.com">jim.ohlstein@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I have that in there. Maybe I should add it to the site config file?<br>
&gt;&gt;<br>
&gt;&gt; Jim<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; -----Original Message-----<br>
&gt;&gt; From: <a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a> [mailto:<a href="mailto:owner-nginx@sysoev.ru">owner-nginx@sysoev.ru</a>] On Behalf Of mike<br>
&gt;&gt; Sent: Tuesday, October 28, 2008 6:19 PM<br>
&gt;&gt; To: <a href="mailto:nginx@sysoev.ru">nginx@sysoev.ru</a><br>
&gt;&gt; Subject: Re: Need help with global variable<br>
&gt;&gt;<br>
&gt;&gt; you&#39;d need to set that in a fastcgi_param<br>
&gt;&gt;<br>
&gt;&gt; fastcgi_param &nbsp;SERVER_ADDR &nbsp; &nbsp; &nbsp; &nbsp;$server_addr;<br>
&gt;&gt;<br>
&gt;&gt; is what i have. i haven&#39;t confirmed or used it though.<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Oct 28, 2008 at 3:13 PM, Jim Ohlstein &lt;<a href="mailto:jim.ohlstein@gmail.com">jim.ohlstein@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; I am hosting a site that requires the following (according to the developer)<br>
&gt;&gt;&gt; for a script license verification&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &quot;global variable available from the server.&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _SERVER[&#39;SERVER_ADDR&#39;]<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The best that I can understand is that they need the server&#39;s IP address to<br>
&gt;&gt;&gt; be returned.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &quot;SERVER_ADDR&quot; does not seem to be recognized by Nginx. Where do I go with<br>
&gt;&gt;&gt; this?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Jim<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
</blockquote></div><br>