MB 2.7.x: Can't save wms application settings

classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|

MB 2.7.x: Can't save wms application settings

lukas.bollack
Hello Mapbender mailing list!

I have the following problem with my mapbender 2.7.4 installation:

I am trying to configure a wms service. I loaded the getcapabilities request into an empty gui. Since it is a password protected service, i used a request in the following form: http://user:password@url/wms?GetCapabilities&SERVICE=WMS&VERSION=1.1.0. When I use a request without username and password the wms can't be loaded and I am never asked for a username and password in the process.

Then I linked the wms in the empty gui to an application with gui in order to test it. When I access the application the wms is displayed fine. But because the wms contains a lot of layers, most of which I don't want to use in the application, I would like to disable them in the wms application settings.

That's where my problem occurs: When I make changes to the wms application settings and try to save them using the "save settings" button, all my changes disappear and are not saved. When I make changes to other wms services, saving the settings works just fine.

I checked my installtion using the mapbender_setup.php but everything seems fine. The only error message I see is: "extension_dir no extension_dir set!" but I don't think this has anything to do with my problem.

Can anybody help me out here?

Thanks, Lukas
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
hi lukas,

1. the username/password is set in some fields below the registration
field of the url. you must set curl as connection method to use this
feature (http_digest and http_basic auth)
otherwise you will have the username and password in the javascript
client - which is not really senseful if you want to protect the service ;-)

2. this is a problem of the newer php versions 5.4+ - see:
http://www.mapbender2.org/Installation_de
increase max_input_vars in php.ini :-)

best regards from germany

armin


On 11.01.2016 11:08, lukas.bollack wrote:

> Hello Mapbender mailing list!
>
> I have the following problem with my mapbender 2.7.4 installation:
>
> I am trying to configure a wms service. I loaded the getcapabilities request
> into an empty gui. Since it is a password protected service, i used a
> request in the following form:
> http://user:password@url/wms?GetCapabilities&SERVICE=WMS&VERSION=1.1.0. When
> I use a request without username and password the wms can't be loaded and I
> am never asked for a username and password in the process.
>
> Then I linked the wms in the empty gui to an application with gui in order
> to test it. When I access the application the wms is displayed fine. But
> because the wms contains a lot of layers, most of which I don't want to use
> in the application, I would like to disable them in the wms application
> settings.
>
> That's where my problem occurs: When I make changes to the wms application
> settings and try to save them using the "save settings" button, all my
> changes disappear and are not saved. When I make changes to other wms
> services, saving the settings works just fine.
>
> I checked my installtion using the mapbender_setup.php but everything seems
> fine. The only error message I see is: "extension_dir no extension_dir
> set!" but I don't think this has anything to do with my problem.
>
> Can anybody help me out here?
>
> Thanks, Lukas
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Hi Armin

Thanks a lot, this was very helpful. I edited my php-ini to max_input_vars=6000 and now I can save the wms-settings :)

As to setting curl as the connection method, I read the corresponding part of the mapbender installation guide but I'm not 100% sure what I'm supposed to do. I understand I have to edit my mapbender.conf-file.

I think I have to change this:
---------------------------------------
 #define("CONNECTION", "curl");
 define("CONNECTION", "http");
 #define("CONNECTION", "socket");
---------------------------------------
to this:
---------------------------------------
 define("CONNECTION", "curl");
 #define("CONNECTION", "http");
 #define("CONNECTION", "socket");
---------------------------------------

but then there's this part:
---------------------------------------
 define("CONNECTION_PROXY", "<ip>");
 define("CONNECTION_PORT", "<port>");
 define("CONNECTION_USER", "<user>");
 define("CONNECTION_PASSWORD", "<password>");
---------------------------------------

Do I have to make changes here as well?

Thanks
Lukas
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
hi lukas,

no - only when you make your connections via a special proxy. if you
have a standard internet connection (maybe outside a dmz) you don't have
to set a proxy.

proxy settings without proxy:

  define("CONNECTION_PROXY", "");
  define("CONNECTION_PORT", "");

this it not really nice but you have to set the proxy to empty strings,
and there has to be installed the php5-curl library.

which operating system do you use?

armin

On 11.01.2016 13:05, lukas.bollack wrote:

> Hi Armin
>
> Thanks a lot, this was very helpful. I edited my php-ini to
> max_input_vars=6000 and now I can save the wms-settings :)
>
> As to setting curl as the connection method, I read the corresponding part
> of the mapbender installation guide but I'm not 100% sure what I'm supposed
> to do. I understand I have to edit my mapbender.conf-file.
>
> I think I have to change this:
> ---------------------------------------
>   #define("CONNECTION", "curl");
>   define("CONNECTION", "http");
>   #define("CONNECTION", "socket");
> ---------------------------------------
> to this:
> ---------------------------------------
>   define("CONNECTION", "curl");
>   #define("CONNECTION", "http");
>   #define("CONNECTION", "socket");
> ---------------------------------------
>
> but then there's this part:
> ---------------------------------------
>   define("CONNECTION_PROXY", "<ip>");
>   define("CONNECTION_PORT", "<port>");
>   define("CONNECTION_USER", "<user>");
>   define("CONNECTION_PASSWORD", "<password>");
> ---------------------------------------
>
> Do I have to make changes here as well?
>
> Thanks
> Lukas
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5244532.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Hi Armin

Ok so I installed the curl library using the command line ("sudo apt-get install php5-curl", then restart the server with "sudo service apache2 restart"). I'm using Ubuntu Linux 12.04.5, but didn't set it up myself, it's a mapserverpro.com-server.

Am I right when I change my settings in mapbender.conf to the following:

---------------------------------------
define("CONNECTION", "curl");
#define("CONNECTION", "http");
#define("CONNECTION", "socket");

define("CONNECTION_PROXY", "");
define("CONNECTION_PORT", "");
define("CONNECTION_USER", "<user>");
define("CONNECTION_PASSWORD", "<password>");
---------------------------------------

Thanks
Lukas
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
yes - that's right ;-)

On 11.01.2016 13:42, lukas.bollack wrote:

> Hi Armin
>
> Ok so I installed the curl library using the command line ("sudo apt-get
> install php5-curl", then restart the server with "sudo service apache2
> restart"). I'm using Ubuntu Linux 12.04.5, but didn't set it up myself, it's
> a mapserverpro.com-server.
>
> Am I right when I change my settings in mapbender.conf to the following:
>
> ---------------------------------------
> define("CONNECTION", "curl");
> #define("CONNECTION", "http");
> #define("CONNECTION", "socket");
>
> define("CONNECTION_PROXY", "");
> define("CONNECTION_PORT", "");
> define("CONNECTION_USER", "<user>");
> define("CONNECTION_PASSWORD", "<password>");
> ---------------------------------------
>
> Thanks
> Lukas
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5244539.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

jmckenna
Administrator
In reply to this post by armin11
On 2016-01-11 6:27 AM, Armin Retterath wrote:
> 2. this is a problem of the newer php versions 5.4+ - see:
> http://www.mapbender2.org/Installation_de
> increase max_input_vars in php.ini :-)
>

Thanks for mentioning this Armin, I will update this PHP setting for
MS4W/Mapbender users in the next release
(http://www.ms4w.com/trac/ticket/32).

-jeff



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




_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
hi jeff,

i don't think, that you need to do this, because mapbender 2.7.x is not
part of the ms4w package ;-) .
it is the predecessor of the current mapbender 3 project, which is
available on the osgeo live cd.

best regards from germany

armin

On 11.01.2016 14:03, Jeff McKenna wrote:

> On 2016-01-11 6:27 AM, Armin Retterath wrote:
>> 2. this is a problem of the newer php versions 5.4+ - see:
>> http://www.mapbender2.org/Installation_de
>> increase max_input_vars in php.ini :-)
>>
>
> Thanks for mentioning this Armin, I will update this PHP setting for
> MS4W/Mapbender users in the next release
> (http://www.ms4w.com/trac/ticket/32).
>
> -jeff
>
>
>


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
In reply to this post by lukas.bollack
hi lukas,

i forgot something:

if you use authenticated services in mapbender, the client also use this
services via the mapbender internal owsproxy. you have to configure this
proxy to see the services in the client ;-) :

http://www.mapbender2.org/Owsproxy

for debian 6/7/8 use the usage of mod_rewrite is preferred:
http://www.mapbender2.org/Owsproxy#2._rewrite_.28bevorzugte_Methode.2C_vor_allem_f.C3.BCr_Mapbender-Versionen_.3E.3D_2.7.x.29

regards
armin

On 11.01.2016 13:42, lukas.bollack wrote:

> Hi Armin
>
> Ok so I installed the curl library using the command line ("sudo apt-get
> install php5-curl", then restart the server with "sudo service apache2
> restart"). I'm using Ubuntu Linux 12.04.5, but didn't set it up myself, it's
> a mapserverpro.com-server.
>
> Am I right when I change my settings in mapbender.conf to the following:
>
> ---------------------------------------
> define("CONNECTION", "curl");
> #define("CONNECTION", "http");
> #define("CONNECTION", "socket");
>
> define("CONNECTION_PROXY", "");
> define("CONNECTION_PORT", "");
> define("CONNECTION_USER", "<user>");
> define("CONNECTION_PASSWORD", "<password>");
> ---------------------------------------
>
> Thanks
> Lukas
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5244539.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

jmckenna
Administrator
In reply to this post by armin11
Hi Armin, thanks for the clarification.

-jeff



On 2016-01-11 9:35 AM, Armin Retterath wrote:

> hi jeff,
>
> i don't think, that you need to do this, because mapbender 2.7.x is not
> part of the ms4w package ;-) .
> it is the predecessor of the current mapbender 3 project, which is
> available on the osgeo live cd.
>
> best regards from germany
>
> armin
>

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

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
In reply to this post by armin11
Hi Armin

I'm trying to edit mods-enabled/proxy.conf but I'm clueless about how to do this. My file manager won't let me open it. Can you help me out?
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3
hi lukas,
you have to get root access for editing the conf files of apache2!
;-)

2016-02-26 19:25 GMT+01:00 lukas.bollack <[hidden email]>:
Hi Armin

I'm trying to edit mods-enabled/proxy.conf but I'm clueless about how to do
this. My file manager won't let me open it. Can you help me out?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253073.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users


_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3
does it help? - which operation system do you have?

2016-02-26 19:40 GMT+01:00 Armin Retterath <[hidden email]>:
hi lukas,
you have to get root access for editing the conf files of apache2!
;-)

2016-02-26 19:25 GMT+01:00 lukas.bollack <[hidden email]>:
Hi Armin

I'm trying to edit mods-enabled/proxy.conf but I'm clueless about how to do
this. My file manager won't let me open it. Can you help me out?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253073.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users



_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
In reply to this post by Armin Retterath-3
I can edit all the conf files just fine, only the files in mod-enabled can't be opened. Webmin says: "only normal files can be edited". I edited proxy.conf via webmins file manager in mods-available but this seems to be the wrong one. My server runs Ubuntu Linux 12.04.5. Is there a way to open proxy.conf in the shell?
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3

Yes - you need a editor - but you may edit proxy.conf in mods.available and before this disable mod proxy like a2dismod proxy - this may delete mods-enabled/proxy.conf first. After editing mods-available/proxy.conf enable it again with a2enmod proxy. Maybe in your environment the files in the enabled folder just link to those in the available folder ;-)

Am 26.02.2016 21:09 schrieb "lukas.bollack" <[hidden email]>:
I can edit all the conf files just fine, only the files in mod-enabled can't
be opened. Webmin says: "only normal files can be edited". I edited
proxy.conf via webmins file manager in mods-available but this seems to be
the wrong one. My server runs Ubuntu Linux 12.04.5. Is there a way to open
proxy.conf in the shell?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253094.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

Armin Retterath-3

The editor is vi - or install nano first - it is easier to use. apt-get install nano - in root shell or do it with sudo

Am 26.02.2016 22:23 schrieb "Armin Retterath" <[hidden email]>:

Yes - you need a editor - but you may edit proxy.conf in mods.available and before this disable mod proxy like a2dismod proxy - this may delete mods-enabled/proxy.conf first. After editing mods-available/proxy.conf enable it again with a2enmod proxy. Maybe in your environment the files in the enabled folder just link to those in the available folder ;-)

Am 26.02.2016 21:09 schrieb "lukas.bollack" <[hidden email]>:
I can edit all the conf files just fine, only the files in mod-enabled can't
be opened. Webmin says: "only normal files can be edited". I edited
proxy.conf via webmins file manager in mods-available but this seems to be
the wrong one. My server runs Ubuntu Linux 12.04.5. Is there a way to open
proxy.conf in the shell?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253094.html
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Hi armin

I've fiddled around with the settings but still can't get it to work. I suspect I missed something I need to do - the wiki is a bit unclear, especially if you've never done anything like the things described you get lost easily.

Tomorrow I'll have time to work on the problem again, I think I'll write down exactly what I have done so far and then maybe we can figure out what's missing or where I went wrong.

I really appreciate your help! It would take me so much longer to solve all the issues that come up! :)

Regards
Lukas
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Two things that I have found while searching the mailing list:

One time you refer to making an entry in /etc/apache2/sites-available/default (found here: https://lists.osgeo.org/pipermail/mapbender_users/2012-September/004236.html). Is this a necessary step and if yes, what do I need to do there?

Another time you refer to defining an Alias for http_auth (found here: https://lists.osgeo.org/pipermail/mapbender_users/2013-May/004392.html). Is this a necessary step if I want to use a password protected wms service in my application?
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

armin11
hi lukas,

here is my devel apache2 conf part in
/etc/apache2/sites_available/default (ubuntu 12.04 lts - desktop)
this should be easily adopted to your path ;-) :

         Alias /owsproxy
/home/armin/GDI-RP/Geoportal/devel/mb_trunk/owsproxy
         <Directory /home/armin/GDI-RP/Geoportal/devel/mb_trunk/owsproxy/>
                 Options +FollowSymLinks
                 ReWriteEngine On
                 RewriteBase /owsproxy
                 RewriteRule  ^([\w\d]+)\/([\w\d]+)\/?$
http://127.0.0.1/owsproxy/http/index.php?sid=$1\&wms=$2\& [P,L,QSA,NE]
                 Options +Indexes
                 Allow from all
         </Directory>
         Alias /cors_proxy
/home/armin/GDI-RP/Geoportal/devel/mb_trunk/cors_proxy
         <Directory
/home/armin/GDI-RP/Geoportal/devel/mapbender_trunk/cors_proxy/>
                 Options +FollowSymLinks
                 ReWriteEngine On
                 RewriteBase /cors_proxy
                 RewriteRule  ^([\d]+)?$
http://127.0.0.1/cors_proxy/http/index.php?wmsid=$1\& [P,L,QSA,NE]
                 Options +Indexes
                 Allow from all
         </Directory>
        Alias /http_auth
/home/armin/GDI-RP/Geoportal/devel/mb_trunk/http_auth
         <Directory /home/armin/GDI-RP/Geoportal/devel/mb_trunk/http_auth/>
                 Options +FollowSymLinks +Indexes
                 ReWriteEngine On
                 RewriteBase /http_auth
                 RewriteRule  ^([\d]+)\/?$
http://127.0.0.1/http_auth/http/index.php?layer_id=$1 [P,L,QSA,NE]
                 Order allow,deny
                 Allow from all
         </Directory>


hope this help

armin


On 29.02.2016 14:50, lukas.bollack wrote:

> Two things that I have found while searching the mailing list:
>
> One time you refer to making an entry in
> /etc/apache2/sites-available/default (found here:
> https://lists.osgeo.org/pipermail/mapbender_users/2012-September/004236.html).
> Is this a necessary step and if yes, what do I need to do there?
>
> Another time you refer to defining an Alias for http_auth (found here:
> https://lists.osgeo.org/pipermail/mapbender_users/2013-May/004392.html). Is
> this a necessary step if I want to use a password protected wms service in
> my application?
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/MB-2-7-x-Can-t-save-wms-application-settings-tp5244512p5253385.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapbender_users


--
Zentrale Stelle Geodateninfrastruktur
Rheinland-Pfalz
LVermGeo-RP

Von-Kuhl-Straße 49
56070 Koblenz

0261/492-466
[hidden email]
http://www.geoportal.rlp.de

_______________________________________________
Mapbender_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: MB 2.7.x: Can't save wms application settings

lukas.bollack
Hi Armin

Thanks, I'll try this tomorrow!

I thought these entrys have to be made in httpd.conf?

Lukas
123