<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">can you confirm that /Library/WebServer/CGI-Executables/mapserv exists? Can you execute it from the command line, e.g. "/Library/WebServer/CGI-Executables/mapserv -v"<div><br></div><div>--john<br><div><div>On Jan 16, 2012, at 6:06 PM, M Badar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Thanks, everyone.</div><div><br></div><div>With /etc/hosts set to:</div><div><br></div><div>127.0.0.1 localhost localhost </div><div><br></div><div>and accessing the URL:</div><div><br></div><div><a href="http://localhost.com/cgi-bin/mapserv" target="_blank">http://localhost.com/cgi-bin/mapserv</a></div>
<div><br></div><div>I get the error:</div><div><br></div><div># safari can't open the page "<a href="http://localhost.com/cgi-bin/mapserv">http://localhost.com/cgi-bin/mapserv</a>" because the server</div><div>
# unexpectedly dropped the connection.</div><div><br></div><div>and when the URL is accessed this way (leaving /etc/hosts as shown above):</div><div><br></div><div><a href="http://localhost/cgi-bin/mapserv">http://localhost/cgi-bin/mapserv</a></div>
<div><br></div><div>I get the error:</div><div><br></div><div><div>Not Found</div><div><br></div><div>The requested URL /cgi-bin/mapserv was not found on this server.</div></div><div><br></div><div>At this point I'm 90% sure the problem lies between safari and apache. Maybe it's time for a reference manual on apache. Does anyone have any titles they would like to recommend?</div>
<div><br></div><div>Mike</div><br><div class="gmail_quote">On Mon, Jan 16, 2012 at 4:14 PM, John Cartwright <span dir="ltr"><<a href="mailto:john.c.cartwright@comcast.net" target="_blank">john.c.cartwright@comcast.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Did you try just "<a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>" ?<div>
<br></div><div>--john</div><div><br><div><div>On Jan 16, 2012, at 1:11 PM, M Badar wrote:</div><br><blockquote type="cite"><font face="'courier new', monospace">Greetings,<br><br>New user to the list. I am installing mapserver on my MacBook Pro. The installation has progressed without error until I attempt to call the 'mapserv' cgi executable from safari; it returns the following error after running the final check as described in the documentation:<br>
<br># Page 40, MapServer Documentation, Release 6.0.1; 4.1.8 Installation - The basic install.<br><br># This is the final test to ensure mapserver is installed and functioning correctly.<br># When attempting to access the test URL, safari returns the following error:<br>
<br># Test URL: <a href="http://localhost.com/cgi-bin/mapserv" target="_blank">http://localhost.com/cgi-bin/mapserv</a><br><br># Safari error:<br><br># safari can't open the page "<a href="http://localhost.com/cgi-bin/mapserv" target="_blank">http://localhost.com/cgi-bin/mapserv</a>" because the server<br>
# unexpectedly dropped the connection.<br><br>Mapserver version: 6.0.1<br>Mac OS X version: 10.6.8<br>Safari version: 5.1.2<br><br>My suspicion is the error is related to how mapserver and apache are communicating; however, not being apache literate, I don't know where to begin diagnosing the connection problem. I ran a syntax check on the httpd.conf file and it returned the following:<br>
<br>Michael-Badars-MacBook-Pro:bin bobby$ apachectl -t<br>httpd: Could not reliably determine the server's fully qualified domain name, using<br>Michael-Badars-MacBook-Pro.local for ServerName<br>Syntax OK<br>Michael-Badars-MacBook-Pro:bin bobby$<br>
<br>The above error is returned regardless if I am connected to the internet via a wireless or hardwired connection.<br><br>Listed below are details regarding my installation.<br><br>Thanks in advance for any help you can provide.<br>
<br>Mike Badar<br><br>#<br># Map Server 6.0.1 "configure" script.<br>#<br><br># Author: Mike Badar<br># Date: 29 December, 2011<br># Version: 3<br><br>./configure \<br>
--with-curl-config=/usr/local/bin/curl-config \<br> --with-gdal=/usr/local/bin/gdal-config \<br> --with-geos=/usr/local/bin/geos-config \<br> --with-ogr=/usr/local/bin/gdal-config \<br>
--with-postgis=/usr/local/pgsql/bin/pg_config \<br> --with-xml2-config=/usr/local/bin/xml2-config \<br> \<br> --with-agg=/usr/local \<br>
--with-freetype=/usr/local \<br> --with-gd=/usr/local \<br> --with-httpd=/usr/local/apache2/bin/httpd \<br> --with-jpeg=/usr/local \<br>
--with-proj=/usr/local \<br> --with-tiff=/usr/local \<br> \<br> --with-wfsclient \<br>
--with-wmsclient \<br> --with-threads \<br> --with-wcs \<br> \<br>
--enable-debug<br><br>#<br># Mapserver version.<br>#<br>Michael-Badars-MacBook-Pro:cgi-bin bobby$ ./mapserv -v<br>MapServer version 6.0.1 \<br><br> OUTPUT=GIF \<br> OUTPUT=PNG \<br> OUTPUT=JPEG \<br>
<br> SUPPORTS=PROJ \<br> SUPPORTS=AGG \<br> SUPPORTS=FREETYPE \<br> SUPPORTS=ICONV \<br> SUPPORTS=WMS_SERVER \<br> SUPPORTS=WMS_CLIENT \<br> SUPPORTS=WFS_CLIENT \<br>
SUPPORTS=WCS_SERVER \<br> SUPPORTS=THREADS \<br> SUPPORTS=GEOS \<br><br> INPUT=OGR \<br> INPUT=GDAL \<br> INPUT=SHAPEFILE<br><br>#<br># Page 39, MapServer Documentation, Release 6.0.1; Step 9 test.<br>
#<br>Michael-Badars-MacBook-Pro:cgi-bin bobby$ ./mapserv<br>This script can only be used to decode form results and<br>should be initiated as a CGI process via a httpd server.<br>Michael-Badars-MacBook-Pro:cgi-bin bobby$<br>
<br>#<br># Apache version.<br>#<br>Michael-Badars-MacBook-Pro:bin bobby$ apachectl -v<br>Server version: Apache/2.2.20 (Unix)<br>Server built: Sep 12 2011 17:42:56<br>Michael-Badars-MacBook-Pro:bin bobby$<br><br>#<br># /usr/local/apache2/conf/httpd.conf; mapserver additions.<br>
#<br><br># ServerRoot<br>ServerRoot "/usr/local/apache2"<br><br># Apache port.<br>Listen 80<br><br># Cgi directory; ScriptAlias; Log file.<br><Directory /usr/local/apache2/cgi-bin><br>Options +ExecCGI +FollowSymLinks<br>
</Directory><br><br>ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/<br><br>#<br># Log file.<br>#<br>ScriptLog logs/cgi_log<br>ErrorLog "logs/error_log"<br><br># Display user 'www'<br><br>Michael-Badars-MacBook-Pro:~ root# dscl . -read /Users/www<br>
AppleMetaNodeLocation: /Local/Default<br>AuthenticationAuthority: ;ShadowHash;<br> ;Kerberosv5;<br> ;_www@LKDC:SHA1.458017A5A4386C409A25B49470E08467DC7022AF<br> ;LKDC:SHA1.458017A5A4386C409A25B49470E08467DC7022AF;<br>
GeneratedUID: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000046<br>NFSHomeDirectory: /Library/WebServer<br>Password: ********<br>PrimaryGroupID: 70<br>RealName:<br>World Wide Web Server<br>RecordName: _www www<br>RecordType: dsRecTypeStandard:Users<br>
UniqueID: 70<br>UserShell: /usr/bin/false<br>Michael-Badars-MacBook-Pro:~ root#<br><br># Check /usr/local/apache2/conf/httpd.conf for syntax errors.<br><br>Michael-Badars-MacBook-Pro:bin bobby$ apachectl -t<br>httpd: Could not reliably determine the server's fully qualified domain name, using<br>
Michael-Badars-MacBook-Pro.local for ServerName<br>Syntax OK<br>Michael-Badars-MacBook-Pro:bin bobby$<br><br># Start apache and check for the existence of the httpd process.<br><br>Michael-Badars-MacBook-Pro:logs root# apachectl start<br>
Michael-Badars-MacBook-Pro:logs root# ps -ajx|grep httpd<br>root 526 1 526 59ff000 0 Ss ?? 0:00.18 /usr/sbin/httpd -D FOREGROUND<br>_www 527 526 526 59ff000 0 S ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND<br>
root 529 391 528 5a00110 2 S+ s001 0:00.00 grep httpd<br>Michael-Badars-MacBook-Pro:logs root#<br><br># Page 40, MapServer Documentation, Release 6.0.1; 4.1.8 Installation - The basic install.<br># This is the final test to ensure mapserver is installed and functioning correctly.<br>
# When attempting to access the test URL, safari returns the following error:<br><br># Test URL: <a href="http://localhost.com/cgi-bin/mapserv" target="_blank">http://localhost.com/cgi-bin/mapserv</a><br><br># Safari error:<br>
<br># safari can't open the page "<a href="http://localhost.com/cgi-bin/mapserv" target="_blank">http://localhost.com/cgi-bin/mapserv</a>" because the server<br>
# unexpectedly dropped the connection.<br><br># Port 80 /etc/services<br><br>http 80/udp www www-http # World Wide Web HTTP<br>http 80/tcp www www-http # World Wide Web HTTP<br><br># /etc/services<br>
<br>Michael-Badars-MacBook-Pro:~ bobby$ cat /etc/hosts<br>##<br># Host Database<br>#<br># localhost is used to configure the loopback interface<br># when the system is booting. Do not change this entry.<br>##<br># 127.0.0.1 localhost<br>
#<br># This line was added in an attempt to diagnose why apache is dropping connections<br># to mapserver.<br>#<br>127.0.0.1 localhost.localdomain localhost # Mapserver diagnostic line.<br><br><br>255.255.255.255 broadcasthost<br>
::1 localhost<br>fe80::1%lo0 localhost<br>Michael-Badars-MacBook-Pro:~ bobby$</font>
_______________________________________________<br>mapserver-users mailing list<br><a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br></div></div><br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>
</blockquote></div><br></div></body></html>