<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div>I was starting to suspect MapServer is just no seeing the environment variables...</div><div><br></div><div>Try this... write a wrapper script "mapserv.sh"</div><div><br></div><div>#!/bin/bash</div><div><br></div><div>TNS_ADMIN=/home/gis/conf</div><div><br></div><div>/home/gis/bin/mapserv</div><div><br></div><div>Then update your script to point to "mapserv.sh".</div><div><br></div><div><br></div><div><br></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><b><span style="font-weight: bold;">From:</span></b> Sebastian E. Ovide &lt;sebastian.ovide@gmail.com&gt;<br><b><span
 style="font-weight: bold;">To:</span></b> Dan Little &lt;danlittle@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> Rahkonen Jukka &lt;Jukka.Rahkonen@mmmtike.fi&gt;; mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, September 30, 2010 8:01:22 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] lighttpd, TNS:could not resolve...<br></font><br>
on the same machine, with the same data and same tns file it works fine with APACHE.... the problems is only with LIGHTTPD... it looks like&nbsp;<span class="Apple-style-span" style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse;">"TNS_ADMIN" =&gt; "/home/gis/conf/" is ignored (in apache I've used&nbsp;SetEnv and&nbsp;PassEnv</span><div>

<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse;">???</span></font></div>

<div><div><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 12:22 PM, Dan Little <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:danlittle@yahoo.com" target="_blank" href="mailto:danlittle@yahoo.com">danlittle@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;"><div>Does shp2img work with your Mapfile?</div><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;"><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;">

<br><div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><font size="2" face="Tahoma"><div class="im"><b><span style="font-weight:bold;">From:</span></b> Sebastian E. Ovide &lt;<a rel="nofollow" ymailto="mailto:sebastian.ovide@gmail.com" target="_blank" href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>&gt;<br>

</div><b><span style="font-weight:bold;">To:</span></b> Rahkonen Jukka &lt;<a rel="nofollow" ymailto="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank" href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>&gt;<br><b><span style="font-weight:bold;">Cc:</span></b> <a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>

<b><span style="font-weight:bold;">Sent:</span></b> Thu, September 30, 2010 4:47:30 AM<br><b><span style="font-weight:bold;">Subject:</span></b> Re: [mapserver-users] lighttpd, TNS:could not
 resolve...<br></font><div><div></div><div class="h5"><br>
the message says:&nbsp;<div><br></div><div>ORA-12154: TNS:could not resolve the connect identifier specified&nbsp;in &lt;unnamed&gt;<div><br></div><div>so... does &lt;unnamed&gt; mean that gdal didn't get any name for the connection ?</div>



<div><br><div><br></div><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:sebastian.ovide@gmail.com" target="_blank" href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

no luck...<div><br></div><div>renamed servicename to capital.. so now connection name==service name...</div><div><br></div><div>same problem... ogrinfo works, mapserver doesn't....<div><div></div><div><br>
<br>
<div class="gmail_quote">On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank" href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
<div dir="ltr" align="left">
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>For me, sometimes with some Oracle user name from some 
computers SQL*Plus does not understand if I am using the SERVICE_NAME.&nbsp; It 
you happen to have the same situation you should be able to connect with the 
connection name, which seems to be <font color="#000000" size="3" face="Times New Roman">MFUATDB&nbsp;for you.&nbsp;</font></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Actually, the error message <font face="Times New Roman"><font color="#000000" size="3">"TNS:could not resolve the 
connect identifier specified" may mean that you should not use service name but 
the connect identifier.&nbsp; Have a try and tell how it 
went.</font></font></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span><font color="#0000ff" size="2" face="Arial"></font></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span><font color="#000000" size="3" face="Times New Roman">-Jukka 
Rahkonen-</font>&nbsp;</span></font></div><br></div><br>
<blockquote style="border-left:#0000ff 2px solid;padding-left:5px;margin-left:5px;margin-right:0px;" dir="ltr">
  <div dir="ltr" lang="fi" align="left">
  <hr>
  <font size="2" face="Tahoma"><b>Lähettäjä:</b> 
  <a rel="nofollow" ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> 
  [mailto:<a rel="nofollow" ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] <b>Puolesta </b>Sebastian E. 
  Ovide<br><b>Lähetetty:</b> 30. syyskuuta 2010 11:15<br><b>Vastaanottaja:</b> 
  Dan Little<br><b>Kopio:</b> <a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><b>Aihe:</b> 
  Re: [mapserver-users] lighttpd, TNS:could not resolve...<br></font><br></div><div><div></div><div>
  <div></div>yes.
  <div><br></div>
  <div><br></div>
  <div>
  <div>gis@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora</div>
  <div>-rw-r--r-- 1 gis gis 184 2010-09-29 16:19 
  /home/gis/conf/tnsnames.ora</div>
  <div>gis@mapserver:~$ sudo su www-data -c 'cat 
  /home/gis/conf/tnsnames.ora'</div>
  <div>MFUATDB =</div>
  <div>&nbsp;&nbsp;(DESCRIPTION =</div>
  <div>&nbsp;&nbsp; &nbsp;(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT 
  = 1521))</div>
  <div>&nbsp;&nbsp; &nbsp;(CONNECT_DATA =</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp;(SERVER = DEDICATED)</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp;(SERVICE_NAME = mfuatdb)</div>
  <div>&nbsp;&nbsp; &nbsp;)</div>
  <div>&nbsp;&nbsp;)</div>
  <div><br></div><br>
  <div class="gmail_quote">On Wed, Sep 29, 2010 at 7:58 PM, Dan Little <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:danlittle@yahoo.com" target="_blank" href="mailto:danlittle@yahoo.com">danlittle@yahoo.com</a>&gt;</span> 
wrote:<br>
  <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex;" class="gmail_quote">
    <div>
    <div style="font-family:arial, helvetica, sans-serif;font-size:10pt;">
    <div>Is tnsnames.ora accessible by the web-server user? (Check the 
    permissions.)</div>
    <div><br></div>
    <blockquote style="border-left:rgb(16,16,255) 2px solid;padding-left:5px;margin-left:5px;">
      <div style="font-family:arial, helvetica, sans-serif;font-size:10pt;">Is 
      t<br>
      <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><font size="2" face="Tahoma"><b><span style="font-weight:bold;">From:</span></b> 
      Sebastian E. Ovide &lt;<a rel="nofollow" ymailto="mailto:sebastian.ovide@gmail.com" target="_blank" href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>&gt;<br><b><span style="font-weight:bold;">To:</span></b> <a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>




<b><span style="font-weight:bold;">Sent:</span></b> Wed, September 29, 2010 
      11:10:09 AM<br><b><span style="font-weight:bold;">Subject:</span></b> 
      [mapserver-users] lighttpd, TNS:could not resolve...<br></font>
      <div>
      <div></div>
      <div><br>Hi All,
      <div><br></div>
      <div>I have installed MapServer on lighttpd + fastcgi.</div>
      <div><br></div>
      <div>
      <div>fastcgi.server = (</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;"/mapserver" =&gt;</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;( "localhost" =&gt;</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;"socket" =&gt; "/tmp/mapserver-fastcgi.socket",</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;"bin-path" =&gt; "/home/gis/bin/mapserv",</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;"bin-environment" =&gt;</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;(</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"TNS_ADMIN" =&gt; 
      "/home/gis/conf/"</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;),</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;"max-procs" =&gt; 2,</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;"check-local" =&gt; "disable"</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;)</div>
      <div>)</div></div>
      <div><br></div>
      <div><br></div>
      <div>
      <div>gis@mapserver:~$ cat /home/gis/conf/tnsnames.ora</div>
      <div>MFUATDB =</div>
      <div>&nbsp;&nbsp;(DESCRIPTION =</div>
      <div>&nbsp;&nbsp; &nbsp;(ADDRESS = (PROTOCOL = TCP)(HOST = 
      192.168.60.70)(PORT = 1521))</div>
      <div>&nbsp;&nbsp; &nbsp;(CONNECT_DATA =</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;(SERVER = DEDICATED)</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;(SERVICE_NAME = mfuatdb)</div>
      <div>&nbsp;&nbsp; &nbsp;)</div>
      <div>&nbsp;&nbsp;)</div></div>
      <div><br></div>
      <div>and I'm getting:&nbsp;</div>
      <div><br></div>
      <div>msDrawMap(): Image handling error. Failed to draw layer named 
      'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in 
      layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier 
      specified in &lt;unnamed&gt;</div>
      <div><br></div>
      <div>from the logs:</div>
      <div><br></div>
      <div>
      <div>[Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513</div>
      <div>[Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open 
      failed for OGR connection in layer `TESTII'.</div>
      <div>ORA-12154: TNS:could not resolve the connect identifier 
      specified</div>
      <div>&nbsp;in &lt;unnamed&gt;</div>
      <div><br></div>
      <div>[Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. 
      Failed to draw layer named 'TESTII'.</div>
      <div>[Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 
      0xa00f298.</div>
      <div>[Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 
      0xa0237a0.</div>
      <div>[Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 
      0xa024718.</div></div>
      <div><br></div>
      <div><br></div>
      <div>in mapserver:</div>
      <div><br></div>
      <div>
      <div>&nbsp;&nbsp;LAYER</div>
      <div>&nbsp;&nbsp; &nbsp;NAME TESTII</div>
      <div>&nbsp;&nbsp; &nbsp;TYPE POLYGON</div>
      <div>&nbsp;&nbsp; &nbsp;STATUS ON</div>
      <div>&nbsp;&nbsp; &nbsp;CONNECTION 
      "OCI:GEO_US_DATA/GEO_US_DATA@mfuatdb"</div>
      <div>&nbsp;&nbsp; &nbsp;CONNECTIONTYPE OGR</div>
      <div>&nbsp;&nbsp; &nbsp;DATA "CA_WILDFIRE"</div>
      <div>&nbsp;&nbsp; &nbsp;PROJECTION</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;"init=epsg:3857"</div>
      <div>&nbsp;&nbsp; &nbsp;END</div>
      <div>&nbsp;&nbsp; &nbsp;CLASS</div>
      <div># &nbsp; &nbsp; &nbsp;NAME "local_shape"</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;COLOR 0 0 255</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;OUTLINECOLOR 0 0 255</div>
      <div>&nbsp;&nbsp; &nbsp;END</div>
      <div>&nbsp;&nbsp;END</div></div>
      <div><br></div>
      <div><br></div>
      <div><br></div>
      <div>The connection string is right as I'm using it from gdal:</div>
      <div><br></div>
      <div>
      <div>
      <div>gis@mapserver:~$ ogrinfo 
      OCI:GEO_US_DATA/GEO_US_DATA@mfuatdb:CA_WILDFIRE</div>
      <div>INFO: Open of `OCI:GEO_US_DATA/GEO_US_DATA@mfuatdb:CA_WILDFIRE'</div>
      <div>&nbsp;&nbsp; &nbsp; &nbsp;using driver `OCI' successful.</div>
      <div>1: CA_WILDFIRE</div></div></div>
      <div><br></div>
      <div><br></div>
      <div>any ideas ?</div>
      <div><br></div>
      <div><br></div>
      <div>-- <br>Sebastian E. 
      Ovide<br><br><br><br><br></div></div></div></div></div></blockquote>
    <div></div></div><br></div></blockquote></div><br><br clear="all"><br>-- 
  <br>Sebastian E. Ovide<br><br><br><br><br></div></div></div></blockquote></div>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Sebastian E. Ovide<br><br><br><br><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Sebastian E. Ovide<br><br><br><br>
</div></div>
</div></div></div></div></blockquote><div></div>


</div><br>

      </div></blockquote></div><br><br clear="all"><br>-- <br>Sebastian E. Ovide<br><br><br><br><br>
</div></div>
</div></div></blockquote><div style="position:fixed"></div>


</div><br>

      </body></html>