<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><pre style="white-space: pre-wrap; widows: 1;"><blockquote type="cite">On Wed, 6/25/14, Krishna Priya Patury <<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">krishna.patury at gmail.com</a>> wrote:

><i> Subject: Re: [mapserver-users] PostGIS Connection Failure
</i>><i> To: <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">humberto at pastoraldacrianca.org.br</a>
</i>><i> Cc: "<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">mapserver-users at lists.osgeo.org</a>" <<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">mapserver-users at lists.osgeo.org</a>>
</i>><i> Date: Wednesday, June 25, 2014, 10:13 AM
</i>><i>
</i>><i> Thanks for responding. Would you please tell
</i>><i> me how to check that? When I go to Network Proxy on the VM,
</i>><i> "Direct Connection to internet" is selected. 
</i>><i>
</i>><i>
</i>><i> Both Mapserver and Postgres on the
</i>><i> same VM. Do you think something might still be blocking the
</i>><i> port? I am able to open a psql connection just fine using
</i>><i> the same port. What is even more confusing is a Mapserver
</i>><i> application outside the VM is able to connect to the
</i>><i> Database on the VM just fine.
</i>
This is really weird. Are you sure the application outside of your VM that works has the same connection string as the one that doesn't works ? Both applications (the one that works and the one that doesn´t) are using the same version of Mapserver ? Both applications (the one that works and the one that doesn´t) are hosted in the same machine/VM ?


Mtro. Carlos Ruiz
</blockquote></pre><div>I encountered the same exact problem on 64-bit CentOS 6.5: mapserv is able to connect to the database except when executed by apache httpd.</div><div><br></div><div>I saw a note that SELinux may be the cause, so I tried:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>echo 0 > /selinux/enforce</div><div><br></div><div>and it fixed the problem. </div><div><br></div><div>What are the implications of applying this fix? Does it impact system security in unfavorable ways? </div><div><br></div><div>-Mike</div><div><br></div></body></html>