I've also add a script that prints the variables and <span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">TNS_ADMIN is there...</span><div><br></div><div><pre>USERNAME=root
LANG=en_US.UTF-8
SUDO_GID=1001
SHELL=/bin/bash
SUDO_COMMAND=/etc/init.d/lighttpd restart
ORACLE_HOME=/home/gis/libs/instantclient_11_2/
SUDO_UID=1001
TERM=xterm
PHP_FCGI_CHILDREN=1
PATH=/sbin:/bin:/usr/sbin:/usr/bin
PWD=/home/gis/conf
LOGNAME=root
USER=root
HOME=/home/gis
MAIL=/var/mail/gis
SUDO_USER=gis
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LD_LIBRARY_PATH=/home/gis/libs/instantclient_11_2/
TNS_ADMIN=/home/gis/conf/
</pre><div><br></div><div>any other ideas ?</div><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 3:09 PM, Sebastian E. Ovide <span dir="ltr"><<a href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">done. (restarted server etc...)<div><br></div><div>exactly the same problem...</div><div><br></div><div><br></div><div>
<br></div><div><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 2:51 PM, Dan Little <span dir="ltr"><<a href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>></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>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><div><br></div><div>TNS_ADMIN=/home/gis/conf</div><div><br></div></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"><div><b><span style="font-weight:bold">From:</span></b> Sebastian E. Ovide <<a href="mailto:sebastian.ovide@gmail.com" target="_blank">sebastian.ovide@gmail.com</a>><br>
</div><b><span style="font-weight:bold">To:</span></b> Dan Little <<a href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>><br><b><span style="font-weight:bold">Cc:</span></b> Rahkonen Jukka <<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>>; <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b><span style="font-weight:bold">Sent:</span></b> Thu, September 30, 2010 8:01:22 AM<div><div></div><div><br><b><span style="font-weight:bold">Subject:</span></b> Re: [mapserver-users] lighttpd, TNS:could not resolve...<br>
</div></div></font><div><div></div><div><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 <span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">"TNS_ADMIN" => "/home/gis/conf/" is ignored (in apache I've used SetEnv and PassEnv</span><div>
<font face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div><div><font face="arial, sans-serif"><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"><<a rel="nofollow" href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>></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><b><span style="font-weight:bold">From:</span></b> Sebastian E. Ovide <<a rel="nofollow" href="mailto:sebastian.ovide@gmail.com" target="_blank">sebastian.ovide@gmail.com</a>><br>
</div><b><span style="font-weight:bold">To:</span></b> Rahkonen Jukka <<a rel="nofollow" href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>><br><b><span style="font-weight:bold">Cc:</span></b> <a rel="nofollow" href="mailto:mapserver-users@lists.osgeo.org" target="_blank">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><br>
the message says: <div><br></div><div>ORA-12154: TNS:could not resolve the connect identifier specified in <unnamed><div><br></div><div>so... does <unnamed> 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"><<a rel="nofollow" href="mailto:sebastian.ovide@gmail.com" target="_blank">sebastian.ovide@gmail.com</a>></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"><<a rel="nofollow" href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>></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> </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. 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 for you. </font></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </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. 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> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </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> </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" href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>
[mailto:<a rel="nofollow" href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">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" href="mailto:mapserver-users@lists.osgeo.org" target="_blank">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> (DESCRIPTION =</div>
<div> (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT
= 1521))</div>
<div> (CONNECT_DATA =</div>
<div> (SERVER = DEDICATED)</div>
<div> (SERVICE_NAME = mfuatdb)</div>
<div> )</div>
<div> )</div>
<div><br></div><br>
<div class="gmail_quote">On Wed, Sep 29, 2010 at 7:58 PM, Dan Little <span dir="ltr"><<a rel="nofollow" href="mailto:danlittle@yahoo.com" target="_blank">danlittle@yahoo.com</a>></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 <<a rel="nofollow" href="mailto:sebastian.ovide@gmail.com" target="_blank">sebastian.ovide@gmail.com</a>><br><b><span style="font-weight:bold">To:</span></b> <a rel="nofollow" href="mailto:mapserver-users@lists.osgeo.org" target="_blank">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> "/mapserver" =></div>
<div> ( "localhost" =></div>
<div> (</div>
<div>
"socket" => "/tmp/mapserver-fastcgi.socket",</div>
<div>
"bin-path" => "/home/gis/bin/mapserv",</div>
<div>
"bin-environment" =></div>
<div>
(</div>
<div>
"TNS_ADMIN" =>
"/home/gis/conf/"</div>
<div>
),</div>
<div>
"max-procs" => 2,</div>
<div>
"check-local" => "disable"</div>
<div> )</div>
<div> )</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> (DESCRIPTION =</div>
<div> (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.60.70)(PORT = 1521))</div>
<div> (CONNECT_DATA =</div>
<div> (SERVER = DEDICATED)</div>
<div> (SERVICE_NAME = mfuatdb)</div>
<div> )</div>
<div> )</div></div>
<div><br></div>
<div>and I'm getting: </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 <unnamed></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> in <unnamed></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> LAYER</div>
<div> NAME TESTII</div>
<div> TYPE POLYGON</div>
<div> STATUS ON</div>
<div> CONNECTION
"OCI:GEO_US_DATA/GEO_US_DATA@mfuatdb"</div>
<div> CONNECTIONTYPE OGR</div>
<div> DATA "CA_WILDFIRE"</div>
<div> PROJECTION</div>
<div> "init=epsg:3857"</div>
<div> END</div>
<div> CLASS</div>
<div># NAME "local_shape"</div>
<div> COLOR 0 0 255</div>
<div> OUTLINECOLOR 0 0 255</div>
<div> END</div>
<div> 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> 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></div></div></blockquote><div></div>
</div><br>
</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><br>
</div>