Re: [mapserver-users] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP
I'm on 10.5 and never played with 10.4, but I'll see if I can help as it's all just UNIX, right? :-) I'm also assuming that your directory definition was not copied, pasted and emailed correctly so the superfluous \ are not really in that file. Have you checked the permissions on the directory itself? It may not be possible for the apache user to cd into the directory where the cgi-bin directory resides. From: rmaurer jevoudrais0...@gmail.com To: mapserver-users@lists.osgeo.org Sent: Friday, July 10, 2009 11:28:03 AM Subject: [mapserver-users] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP So I'm a first time MapServer user and have been trying to navigate the installation process. I think I almost have it, but I am having some last problems. When I access my executable mapserv file from the command line, I get this: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. All sounds good, right? Well, I am using MAMP to host an Apache2.0 server. The httpd.conf file has the following in it: Alias /cgi-bin/ [rootfile]/cgi-bin/ Directory [rootfile]/cgi-bin/\ AllowOverride None Options ExecCGI FollowSymLinks Indexes Order allow,deny Allow from all /Directory\ AddHandler cgi-script .cgi .py I know that first line should probably be ScriptAlias, but I kept getting a Permission Denied message and read in a forum that this was a solution somebody had come up with, and indeed it worked for me as well. Anyways, the problem is that in this cgi-bin I have my mapserv executable (though one of the things I'm thinking is that maybe I need to add something else to AddHandler to make it think that this file is executable?). But when I got to //localhost/cgi-bin/mapserv it tries to download the file as Untyped Binary Data and it doesn't execute anthing. In case its of any help the ls -l for my cgi-bin gives the following information: -rwxr-xr-x 1 Rebecca Rebecca 51244 Jul 9 07:52 mapserv Do I not have this installed correctly? Or is my server just not realizing that this is executable. I would be thrilled if I could just get to the point where //localhost/cgi-bin/mapserv just brought up a No query information to decode message, since I think I can handle it from there. Thank you very much, Rebecca View this message in context: access problems from cgi-bin on Mac OS X 10.4.11 / MAMP Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP
So I'm a first time MapServer user and have been trying to navigate the installation process. I think I almost have it, but I am having some last problems. When I access my executable mapserv file from the command line, I get this: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. All sounds good, right? Well, I am using MAMP to host an Apache2.0 server. The httpd.conf file has the following in it: Alias /cgi-bin/ [rootfile]/cgi-bin/ Directory [rootfile]/cgi-bin/\ AllowOverride None Options ExecCGI FollowSymLinks Indexes Order allow,deny Allow from all /Directory\ AddHandler cgi-script .cgi .py I know that first line should probably be ScriptAlias, but I kept getting a Permission Denied message and read in a forum that this was a solution somebody had come up with, and indeed it worked for me as well. Anyways, the problem is that in this cgi-bin I have my mapserv executable (though one of the things I'm thinking is that maybe I need to add something else to AddHandler to make it think that this file is executable?). But when I got to //localhost/cgi-bin/mapserv it tries to download the file as Untyped Binary Data and it doesn't execute anthing. In case its of any help the ls -l for my cgi-bin gives the following information: -rwxr-xr-x 1 Rebecca Rebecca 51244 Jul 9 07:52 mapserv Do I not have this installed correctly? Or is my server just not realizing that this is executable. I would be thrilled if I could just get to the point where //localhost/cgi-bin/mapserv just brought up a No query information to decode message, since I think I can handle it from there. Thank you very much, Rebecca -- View this message in context: http://n2.nabble.com/access-problems-from-cgi-bin-on-Mac-OS-X-10.4.11---MAMP-tp3236919p3236919.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP
On Jul 10, 2009, at 11:28 AM, rmaurer wrote: So I'm a first time MapServer user and have been trying to navigate the installation process. I think I almost have it, but I am having some last problems. Just a check: are you using my installer, or compiling from source? What OSX version? If you are using my installer, and are on OSX 10.4, Mapserver is built for Apache 1.3, as found in the system, and it probably won't work correctly, if at all with an added-on Apache 2. If you are on OSX 10.5, why not just use the system Apache 2? When I access my executable mapserv file from the command line, I get this: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. All sounds good, right? Well, I am using MAMP to host an Apache2.0 server. The httpd.conf file has the following in it: Alias /cgi-bin/ [rootfile]/cgi-bin/ Directory [rootfile]/cgi-bin/\ AllowOverride None Options ExecCGI FollowSymLinks Indexes Order allow,deny Allow from all /Directory\ Are the starting '' really missing, or did Mail strip them out? I also see closing quotes missing and extra \ chars. Should be: Directory [rootfile]/cgi-bin/ AllowOverride None Options ExecCGI FollowSymLinks Indexes Order allow,deny Allow from all /Directory AddHandler cgi-script .cgi .py I know that first line should probably be ScriptAlias, but I kept getting a Permission Denied message and read in a forum that this was a solution somebody had come up with, and indeed it worked for me as well. Anyways, the problem is that in this cgi-bin I have my mapserv executable (though one of the things I'm thinking is that maybe I need to add something else to AddHandler to make it think that this file is executable?). That addhandler is to run scripts as CGI. Mapserv is a binary, so all it should need is ExecCGI. But when I got to //localhost/cgi-bin/mapserv it tries to download the file as Untyped Binary Data and it doesn't execute anthing. I'm not sure, but you may need to load the mod_cgi module in your httpd.conf. Though it may only apply to script CGIs also. In case its of any help the ls -l for my cgi-bin gives the following information: -rwxr-xr-x 1 Rebecca Rebecca 51244 Jul 9 07:52 mapserv Do I not have this installed correctly? Or is my server just not realizing that this is executable. I would be thrilled if I could just get to the point where //localhost/cgi-bin/mapserv just brought up a No query information to decode message, since I think I can handle it from there. And, make sure to restart Apache after changing httpd.conf ;) Oh, and make sure that the system Apache is not running (System Preferences-Sharing-Web Sharing), as it will be using the same port and your MAMP Apache won't even start. - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ Earth: Mostly harmless - revised entry in the HitchHiker's Guide to the Galaxy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users