Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-05-31 Thread karsten
 
Hi All,
 
thanks to all the responses. It was neither one of ( cgi-bin permissions for 
Apache nor the Script alias) Both where in line with what everyone said/ 
listed. The issue was that I did not have the cgi module for Apache enabled :(
I enabled it with 
a2enmod cgi
service apache2 restart
and then everything worked for mapserver, perl script etc. 
 
I did only find out because I places a simple Perl script in cgi-bin that also 
was downloaded instead of executed .
Thanks for the answers they brought me on the right track !
 
Cheers
Karsten

  _  

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Sent: Tuesday, April 05, 2016 0:17
To: kars...@terragis.net; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 
on ubuntu 14.04 - but NO - gives binary output ?



Hi,

 

I believe that there is something wrong with the configuration of your http 
server. It does not seem to know that you do not want to download the mapserv 
binary but make the binary to work for you. If you run Apache I would have a 
look at “ScriptAlias” in the httpd.conf file and check that the directory where 
you have placed the mapserv binary is configured to contain applications. This 
example is from Windows.

 

# ScriptAlias: This controls which directories contain server scripts. 

# ScriptAliases are essentially the same as Aliases, except that

# documents in the target directory are treated as applications and

# run by the server when requested rather than as documents sent to the

# client.  The same rules about trailing "/" apply to ScriptAlias

# directives as to Alias.

#

ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/"

ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/"

 

-Jukka Rahkonen-

 

karsten wrote:



 

Hi All,

 

I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can 
getv the follwoing output  from the executable:

/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Howvere when I try to get a get aresponse to a request e.g. 
136.243.250.62/cgi-bin/mapserv

or aslo when I try a getcapabiliteis request like

http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map
 
<http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map=1.1.1=getCapabilities=wms>
 =1.1.1=getCapabilities=wms

I always get a 'binary file back' output like below the line . Would anybody 
know what could have gone wrong or where to start figuring this out ?

 

Cheers

Karsten

 

Karsten Vennemann
Terra GIS LTD

.binary output below? -

ELF  >ð
@ @   P"  @ 8   @ ‑@   @ @ @ @ ø  ø 
  8  8@ 8@      @ 
  @   ð  ð` ð`   (
‑  ‑` ‑` ð  ð   T  T@ T@ D  
 D  Påtd   È  È@ È@ <   <  Qåtd 
 Råtd   ð  ð` ð`
/lib64/ld-linux-x86-64.so.2  GNU   GNU 
O ~a¢; ¼k*BUÍš~6›   ‑ €!
ˆ @‑   "   *   j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ

:—
­KãÀêÓï
âž Ñ”óµ         
Ï      š      e        
   m     /   Â    
   –     Y     l    
  ¥      å      > 
  `     9     û      
£     Ý      ª      
R   t     /   
       y     ’      bè 
` Ï!` ˆ     !`¼ø ` ·  
 
 $@   h   
 ð
@ Ãø `     !`o   
 @@ e   y   
@ d è ` ‘    À@\   
 ´@ R   
 °@   
 Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ 
_Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers 
msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion 
msCGIWriteLog msSet

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-05-31 Thread karsten
Hi,
 
Thanks for our response. I don't think that is the issue because the apparent 
'download' of the mapserv executable is only because browsers in this case do 
not 'understand' the mine type of the response . Regularly the response is just 
a text file but apparently a 'download' of mapserv... I fact you can usually 
rename the downloaded mapserv and rename as a text file then read the error 
message.
I have in any  Apache configuration
 
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted


Cheers
Karsten

  _  

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Sent: Tuesday, April 05, 2016 0:17
To: kars...@terragis.net; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 
on ubuntu 14.04 - but NO - gives binary output ?



Hi,

 

I believe that there is something wrong with the configuration of your http 
server. It does not seem to know that you do not want to download the mapserv 
binary but make the binary to work for you. If you run Apache I would have a 
look at “ScriptAlias” in the httpd.conf file and check that the directory where 
you have placed the mapserv binary is configured to contain applications. This 
example is from Windows.

 

# ScriptAlias: This controls which directories contain server scripts. 

# ScriptAliases are essentially the same as Aliases, except that

# documents in the target directory are treated as applications and

# run by the server when requested rather than as documents sent to the

# client.  The same rules about trailing "/" apply to ScriptAlias

# directives as to Alias.

#

ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/"

ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/"

 

-Jukka Rahkonen-

 

karsten wrote:



 

Hi All,

 

I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can 
getv the follwoing output  from the executable:

/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Howvere when I try to get a get aresponse to a request e.g. 
136.243.250.62/cgi-bin/mapserv

or aslo when I try a getcapabiliteis request like

http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map
 
<http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map=1.1.1=getCapabilities=wms>
 =1.1.1=getCapabilities=wms

I always get a 'binary file back' output like below the line . Would anybody 
know what could have gone wrong or where to start figuring this out ?

 

Cheers

Karsten

 

Karsten Vennemann
Terra GIS LTD

.binary output below? -

ELF  >ð
@ @   P"  @ 8   @ ‑@   @ @ @ @ ø  ø 
  8  8@ 8@      @ 
  @   ð  ð` ð`   (
‑  ‑` ‑` ð  ð   T  T@ T@ D  
 D  Påtd   È  È@ È@ <   <  Qåtd 
 Råtd   ð  ð` ð`
/lib64/ld-linux-x86-64.so.2  GNU   GNU 
O ~a¢; ¼k*BUÍš~6›   ‑ €!
ˆ @‑   "   *   j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ

:—
­KãÀêÓï
âž Ñ”óµ         
Ï      š      e        
   m     /   Â    
   –     Y     l    
  ¥      å      > 
  `     9     û      
£     Ý      ª      
R   t     /   
       y     ’      bè 
` Ï!` ˆ     !`¼ø ` ·  
 
 $@   h   
 ð
@ Ãø `     !`o   
 @@ e   y   
@ d è ` ‘    À@\   
 ´@ R   
 °@   
 Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ 
_Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers 
msFreeMapServObj ms

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-04-05 Thread Jeff McKenna


On 2016-04-05 1:45 PM, karsten wrote:

Hi All,
thanksto all the responses. It was neither one of ( cgi-bin permissions
for Apache nor the Script alias) - both where in line with what everyone
said/ listed. The issue was that I did not have the cgi module for
Apache enabled :(
I enabled it with
a2enmod cgi
service apache2 restart
and then everything worked for mapserver, perl script etc.
I did only find out because I places a simple Perl script in cgi-bin
that also was downloaded instead of executed...
Thanksfor the answers they brought me on the right track !
Cheers
Karsten



Ah yes, that is here in my notes as well, an important step! :)  Sorry
for not mentioning that.  It always bites me too when I setup a new
virtualhost in Apache.

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-04-05 Thread Jeff McKenna

Hi Karsten,

With Ubuntu, your problem is a combination of what Jukka and Jörg said. 
 Here is what I would do in your situation, with Ubuntu:


- make sure the mapserv executable has the correct permissions, with a 
command (inside cgi-bin directory) such as:


  sudo chmod 755 mapserv

- make sure that you have configured the appropriate permissions through 
Apache for the cgi-bin directory, such as:


  ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/

  Options ExecCGI
  SetHandler cgi-script


- restart Apache

  sudo /etc/init.d/apache2 restart


-jeff

--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/





On 2016-04-05 3:50 AM, karsten wrote:

Hi All,
I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04
and can getv the follwoing output  from the executable:
/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Howvere when I try to get a get aresponse to a request e.g.
136.243.250.62/cgi-bin/mapserv
or aslo when I try a getcapabiliteis request like
http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map=1.1.1=getCapabilities=wms
I always get a 'binary file back' output like below the line . Would
anybody know what could have gone wrong or where to start figuring this
out ?
Cheers
Karsten

Karsten Vennemann
Terra GIS LTD





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-04-05 Thread Jeff McKenna

oops, here is the correct Apache syntax:

ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/

  Options ExecCGI
  SetHandler cgi-script


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-04-05 10:52 AM, Jeff McKenna wrote:

Hi Karsten,

With Ubuntu, your problem is a combination of what Jukka and Jörg said.
  Here is what I would do in your situation, with Ubuntu:

- make sure the mapserv executable has the correct permissions, with a
command (inside cgi-bin directory) such as:

   sudo chmod 755 mapserv

- make sure that you have configured the appropriate permissions through
Apache for the cgi-bin directory, such as:

   ScriptAlias /cgi-bin/ /var/www/public_html/cgi-bin/
 
   Options ExecCGI
   SetHandler cgi-script
 

- restart Apache

   sudo /etc/init.d/apache2 restart


-jeff




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-04-05 Thread WhereGroup
Hello Karsten,

looks like your Webserver-CGI-Config isn't correct. Is the directory
configured as executable?

Jörg

Am 05.04.2016 um 08:50 schrieb karsten:
> Hi All,
>  
> I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04
> and can getv the follwoing output  from the executable:
> /usr/lib/cgi-bin# ./mapserv -v
> MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
> SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> Howvere when I try to get a get aresponse to a request e.g.
> 136.243.250.62/cgi-bin/mapserv
> or aslo when I try a getcapabiliteis request like
> http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map=1.1.1=getCapabilities=wms
> I always get a 'binary file back' output like below the line . Would
> anybody know what could have gone wrong or where to start figuring this
> out ?
>  
> Cheers
> Karsten
>  
> 
> Karsten Vennemann
> Terra GIS LTD
> 
> .binary output below? -
> 
> ELF  >    ð@ @   P"  @ 8   @        
> @   @ @ @ @ ø  ø           8 
> 8@ 8@              @  
> @           ð  ð` ð`  
> (          ` ` ð  ð 
>          T  T@ T@ D   D     
> Påtd   È  È@ È@ <   <     
> Qåtd      Råtd  
> ð  ð` ð`       
> /lib64/ld-linux-x86-64.so.2          GNU            
>       GNU O ~a¢; ¼k*BUÍš~6›            €!
> ˆ @   "   *  
> j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ:—­KãÀêÓïâž Ñ”ó  
>  
> µ         Ï  
>    š      e    
>       m    
> /   Â       
>    –     Y    
> l      ¥      å     
>>   `     9 
>    û      £    
> Ý      ª         
> R   t     / 
>         y    
> ’      b    è ` Ï   
> !` ˆ     !`    ¼    ø ` ·  
>  $@   h  
>  ð@ à    ø `     !`    o  
>  @@ e   y    
> @ d è ` ‘    À@    \   
> ´@ R  
>  °@      
>  Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable
> __gmon_start__ _Jv_RegisterClasses _ITM_registerTMCloneTable
> msIO_installHandlers msFreeMapServObj msDebug loadParams msCGIWriteError
> msIO_fprintf msGetVersion msCGIWriteLog msSetup msGetGlobalDebugLevel
> msCGIDispatchRequest msCGILoadMap msAllocMapServObj msCleanup
> msIO_setHeaderEnabled libc.so.6 fflush exit strncmp signal puts putchar
> putenv stdout stderr gettimeofday strcmp __libc_start_main _edata
> __bss_start _end
> /src/ms/mapserver-7.0.1/build:/usr/local/lib:
> __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal
> _IO_stdin_used GLIBC_2.2.5              
>                            O    
> ui       ø`    !`   
> !`    %    `     `      
> ( `       0 `       8 `      
> @ `       H `       P `   
> X `   
>` `       h `       p `   
>x `       € `       ˆ `   
>     `       ˜ `     `
>       ¨ `       ° `       ¸
> `       À `       È `       Ð
> `       Ø `       à `   
>    HƒìH‹Õ  H…Àtèƒ   HƒÄà  ÿ5  ÿ%Ä  @
> ÿ%  héà%º  h   éÐ%²  h   éÀ%ª  h  
> é°%¢  h   é %š  h   é%’  h   é€%Š  h  
> ép%‚  h   é`%z  héP%r  h
>é@%j   h   é0%b  h   é %Z  h
>é%R  h   é %J  

[mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-04-05 Thread karsten
Hi All,
 
I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can 
getv the follwoing output  from the executable:
/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Howvere when I try to get a get aresponse to a request e.g. 
136.243.250.62/cgi-bin/mapserv
or aslo when I try a getcapabiliteis request like
http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map
 

 =1.1.1=getCapabilities=wms
I always get a 'binary file back' output like below the line . Would anybody 
know what could have gone wrong or where to start figuring this out ?
 
Cheers
Karsten
 

Karsten Vennemann
Terra GIS LTD

.binary output below? -

ELF  >    ð@ @   P"  @ 8   @         @   
@ @ @ @ ø  ø           8  8@ 8@    
          @   @           
ð  ð` ð`   (          ` ` 
ð  ð           T  T@ T@ D   D      
Påtd   È  È@ È@ <   <      Qåtd   
   Råtd   ð  ð` ð`     
   /lib64/ld-linux-x86-64.so.2          GNU                   
GNU O ~a¢; ¼k*BUÍš~6›            €!
ˆ @   "   *   j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ:—­KãÀêÓïâž Ñ”ó
µ         Ï      
š      e           
m     /   Â        
   –     Y     l      
¥      å      >   
`     9     û      £  
   Ý      ª          
R   t     /     
     y     ’      b  
  è ` Ï    !` ˆ     !`    ¼    ø ` 
·   
 $@   h   
 ð@ à    ø `     !`    o   
 @@ e   y    
@ d è ` ‘    À@    \    ´@   
  R   
 °@       
 Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ 
_Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers 
msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion 
msCGIWriteLog msSetup msGetGlobalDebugLevel msCGIDispatchRequest msCGILoadMap 
msAllocMapServObj msCleanup msIO_setHeaderEnabled libc.so.6 fflush exit strncmp 
signal puts putchar putenv stdout stderr gettimeofday strcmp __libc_start_main 
_edata __bss_start _end 
/src/ms/mapserver-7.0.1/build:/usr/local/lib:
 __libc_csu_fini __data_start __libc_csu_init msCleanupOnSignal _IO_stdin_used 
GLIBC_2.2.5                           
               O     ui       ø`       
 !`    !`    %    `     ` 
      ( `       0 `       8 `       
@ `       H `       P `    
X `    
   ` `       h `       p `    
   x `       € `       ˆ `    
    `       ˜ `     `       ¨ `  
         ° `       ¸ `       À `    
   È `       Ð `       Ø `       
à `       HƒìH‹Õ  H…Àtèƒ   HƒÄà  ÿ5  ÿ%Ä  
@ ÿ%  héà%º  h   éÐ%²  h   éÀ%ª  h   é°%¢  h   
é %š  h   é%’  h   é€%Š  h   ép%‚  h   é`%z  h
éP%r  h
   é@%j  h   é0%b  h   é %Z  h
   é%R  h   é %J  h   éðþÿÿÿ%B  h   éàþÿÿÿ%:  h   éÐþÿÿÿ%2  
h   éÀþÿÿÿ%*  h   é°þÿÿÿ%"  h   é þÿÿÿ%  h   éþÿÿÿ%  h   é€þÿÿÿ%
  h   épþÿÿÿ%  h   é`þÿÿÿ%ú  h