<div dir="ltr">Thanks for your reply. Nginx doesn't have control on that. I've set the environment variable in spawn-fcgi (mapserver) startup script right from the beginning, and it's always there. As I said, I've checked spawn-fcgi's process environment, and can see the ORACLE_HOME is there.
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 22, 2013 at 8:14 PM, <a href="mailto:richard.suematsu@syncadd.com">richard.suematsu@syncadd.com</a> <span dir="ltr"><<a href="mailto:richard.suematsu@syncadd.com" target="_blank">richard.suematsu@syncadd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="auto">
<div>I could be wrong but I believe /etc/profile is only loaded when you spawn a shell. You can try force the issue and set the oracle home in your startup script for nginx and work backwards from there. <br>
<br>
Sent from my iPhone</div><div><div class="h5">
<div><br>
On May 22, 2013, at 1:38 AM, "Jackey Cheung" <<a href="mailto:cheung.jackey@gmail.com" target="_blank">cheung.jackey@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>I'm setting up a nginx + spawn-fcgi + mapserver centos box.I've installed everything. The web site (nginx) is working, Oracle is working fine and returning spatial data, shp2img generates pictures from Oracle data well, and everything just seem
 working well. Unless I put them all together.</div>
<div><br>
</div>
<div>Requesting map image from the box in browser and I get this:</div>
<div>msDrawMap(): Image handling error. Failed to draw layer named 'BLD_BLDG'. msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI Handlers. Connection failure. Check the connection string. Error: . <br>

</div>
<div><br>
</div>
<div>I've tried strace and checked the oracle trace log, and found this in the oracle log:</div>
<div>
<div><msg time='2013-05-22T14:15:00.181+08:00' org_id='oracle' comp_id='clients'</div>
<div> type='UNKNOWN' level='16' host_id='<a href="http://55.gz.rd.mapking.com" target="_blank">55.gz.rd.mapking.com</a>'</div>
<div> host_addr='127.0.0.1'></div>
<div> <txt>Unable to find environment variable: ORACLE_HOME</div>
<div> </txt></div>
<div></msg></div>
<div><br>
</div>
<div>I've change the mapserver process to use oracle user, and I've then checked the spawn-fcgi process environment at /proc/ directory and see that there are variables in it. I've even tried adding ORACLE_HOME variable to /etc/profile, but still can't
 get it working.</div>
<div><br>
</div>
<div>What is wrong? Or what have I missed?</div>
<div><br>
</div>
<div>P.S. I could have post the whole strace log here, but it's too long so if anyone really need it to get a clue, just give a mail to me.</div>
</div>
</div>
</div>
</blockquote>
</div></div><blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>mapserver-users mailing list</span><br>
<span><a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a></span><br>
<span><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br>
</div>
</blockquote>
</div>

</blockquote></div><br></div>