I'm running xampp in windows 7, apache is listening port 80.

I downloaded MS4W and installed the bundle under c:\ms4w and configured apache to listen on port 8080.

I'm running htt://localhost:8080/cgi-bin/mapserv.exe and I'm getting the following output

No query information to decode. QUERY_STRING is set, but empty.

which according the instructions shows that mapserver is running. I also executed the following example htt:// which also run with no problems.

Then I copied all the cgi-bin from ms4w/apache to xampp/apache. I also searched the ms4w httpd.conf, in the ms4w/appache/conf, for mapserver and transferred the following to xampp apache configuration.

## Alias for MapServer tmp directory
Alias /ms_tmp/ "C:/xampp/tmp/ms_tmp/"  

# set environment vars necessary for MapServer
SetEnv PROJ_LIB "C:/xampp/ms4w/proj/nad/"
SetEnv PATH "C:/xampp/apache/cgi-bin/" 

# uncomment the following lines to log MapServer errors to a file
#SetEnv MS_ERRORFILE "C:/xampp/tmp/ms_error.txt"

Restarting apache under xampp and executing http://localhost:80/cgi-bin/mapserv.exe and as a result I'm getting

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

What am I doing wrong?

  • It seems to be a problem with permissions, try chmod -R 777 xamp/ – Gery Aug 23 '15 at 13:33
  • @Grey I'm using windows 7 and I have logged in with admin account. – Pavlos Papanikolaou Aug 23 '15 at 13:56
  • what happens if you just try localhost/cgi-bin/mapserver.exe? ie. without the port? – Gery Aug 23 '15 at 15:19
  • you also should add as tags windows and xampp in order to bring the attention of windows users, I work on unix-like environments. – Gery Aug 23 '15 at 15:24
  • Without port 80 I'm getting the same error. – Pavlos Papanikolaou Aug 23 '15 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.