Re: [naviserver-devel] nsdbpg Module

2017-06-07 Thread Gustaf Neumann

Dear Ian,

In your built process versions for NaviServer and the modules (nsdbpg) 
are probably not matching. The best is to use the released versions from 
sourceforge 
https://sourceforge.net/projects/naviserver/files/naviserver/4.99.15/


Note, that you should install NaviServer first, before building modules, 
such that the default module-Makefile picks up the right includes.

-gn

Am 07.06.17 um 00:56 schrieb Ian Harding:
I downloaded the tip from bitbucket.org  and 
tried to build it against naviserver 4.99.15.


I get an error like this:

[root@web1 nsdbpg-0.2]# make NAVISERVER=/httpd/Naviserver49 
PGLIB=/usr/local/pgsql/lib PGINCLUDE=/usr/local/pgsql/include
gcc -I/usr/local/pgsql/include -g -Wall -fPIC  -pipe 
-I/httpd/Naviserver49/include -I"/usr/local/include" 
-DHAVE_CONFIG_H-c -o nsdbpg.o nsdbpg.c

nsdbpg.c:58:1: error: unknown type name ‘NsDb_DriverInitProc’
 NS_EXPORT NsDb_DriverInitProc Ns_DbDriverInit;
 ^


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] nsdbpg Module

2017-06-06 Thread Ian Harding
I downloaded the tip from bitbucket.org and tried to build it against
naviserver 4.99.15.

I get an error like this:

[root@web1 nsdbpg-0.2]# make NAVISERVER=/httpd/Naviserver49
PGLIB=/usr/local/pgsql/lib PGINCLUDE=/usr/local/pgsql/include
gcc -I/usr/local/pgsql/include -g -Wall -fPIC  -pipe
-I/httpd/Naviserver49/include -I"/usr/local/include"  -DHAVE_CONFIG_H-c
-o nsdbpg.o nsdbpg.c
nsdbpg.c:58:1: error: unknown type name ‘NsDb_DriverInitProc’
 NS_EXPORT NsDb_DriverInitProc Ns_DbDriverInit;
 ^
nsdbpg.c:101:1: error: ‘Ns_DbDriverInit’ redeclared as different kind of
symbol
 Ns_DbDriverInit(const char *driver, const char *configPath)
 ^
nsdbpg.c:58:31: note: previous declaration of ‘Ns_DbDriverInit’ was here
 NS_EXPORT NsDb_DriverInitProc Ns_DbDriverInit;
   ^
make: *** [nsdbpg.o] Error 1

Anyone know how to fix?

Thanks!
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg SSL mode

2013-12-06 Thread David Osborne
Amazon Postgresql RDS? That was exactly why we were asking.

(slightly off-topic - apologies)
We found that Postgresql RDS SSL was optional though.. could happily
connect directly to the RDS instance via psql sslmode=disable... and also
via nsdbpg but think this connection wouldn't be encrypted.

If you want to try stunnel we had to use the following client config to
connect successfully directly to a Postgresql RDS instance (we haven't
heavily tested this yet be warned):

[postgresql]
protocol = pgsql
client = yes
accept = localhost:5432
connect = pg_rds_server:5432
options = NO_TICKET


-- 
David

On 5 December 2013 23:44, Ian Harding harding@gmail.com wrote:

 Anyone?  I am experimenting with Amazon RDS and it appears to require
 SSL.  My naviserver nsdbipg module seems to barf on it.  psql connects fine.


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg SSL mode

2013-12-05 Thread Ian Harding
Anyone?  I am experimenting with Amazon RDS and it appears to require SSL.
My naviserver nsdbipg module seems to barf on it.  psql connects fine.


On Mon, Nov 18, 2013 at 7:23 AM, David Osborne da...@qcode.co.uk wrote:


 Hi,

 Can anyone tell us if it's possible to use the Naviserver nsdbpg drivers
 to connect directly via SSL to a SSL enabled Postgresql database?

 I think we'd be able to encrypt communication between an application
 server and DB server using stunnel if not, but wondered if this is
 something nsdbpg supports directly?

 Regards,
 --
 David


 --
 DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
 OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
 Free app hosting. Or install the open source package on any LAMP server.
 Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
 http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg SSL mode

2013-12-05 Thread Stephen Deasey
On Thu, Dec 5, 2013 at 11:44 PM, Ian Harding harding@gmail.com wrote:

 My naviserver nsdbipg module seems to barf on it.
 psql connects fine.

nsbipg is configured with a datasource param which lets you pass any
key=value pairs directly through to libpq.

According to:

  
http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS

...the default sslmode is prefer, which apparently means don't bother
trying. You actually need sslmode=require.

nsdbpg unfortunately implements it's own datasource parsing so you're
stuck with user:host:db


Are you also using nsssl? Looks like some modifications are required:

  http://www.postgresql.org/docs/9.3/static/libpq-ssl.html#LIBPQ-SSL-INITIALIZE

  If your application initializes libssl and/or libcrypto libraries
and libpq is built
  with SSL support, you should call PQinitOpenSSL to tell libpq that the libssl
  and/or libcrypto libraries have been initialized by your application, so that
  libpq will not also initialize those libraries.

But you could try connecting to the db via ssl with nsssl unloaded, to
confirm that it works.

Not sure what the best way is to coordinate with nsssl who should init
the openssl library.

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] nsdbpg SSL mode

2013-11-18 Thread David Osborne
Hi,

Can anyone tell us if it's possible to use the Naviserver nsdbpg drivers to
connect directly via SSL to a SSL enabled Postgresql database?

I think we'd be able to encrypt communication between an application server
and DB server using stunnel if not, but wondered if this is something
nsdbpg supports directly?

Regards,
-- 
David
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] nsdbpg

2008-11-23 Thread Bernd Eidenschink

Stephen, Vlad,

thanks:

$ make NAVISERVER=/usr/local/ns POSTGRES=/opt/pgsql8.2.11

did the job. I was lead into the wrong direction, because the last time I 
tried, the solution found was to change the Makefile and I left a notice in 
our lifesaver intranet archive. Doing it again now, I did not try the obvious 
simple thing.

Bernd.


Don't cry. It's a waste of good suffering. 
(Pinhead, Hellraiser I)


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg

2008-11-21 Thread Vlad Seryakov
change

MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a

to

MODLIBS = -lnsdb -L/opt/pgsql8.2.11/lib -lpq


Bernd Eidenschink wrote:
 I'm cursed. I never can compile a postgres driver for naviserver
 from scratch.
 
 Here's my tale - maybe you can hint me to an obvious mistake:
 
 I compiled a Postgres 8.2.11 from source into
 /opt/pgsql8.2.11
 
 Then I checked out /modules/nsdbpg.
 
 I changed in the Makefile the line
 MODLIBS= -lnsdb -lpq
 
 to
 MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a
 
 and started make with the line
 make NAVISERVER=/usr/local/ns 
 CFLAGS=-I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
 -I/usr/local/ns/include
 
 It compiles. The only output is:
 gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
   -c -o 
 nsdbpg.o nsdbpg.c
 gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
   -c -o 
 tclcmds.o tclcmds.c
 tclcmds.c: In function ‘stream_actually_write’:
 tclcmds.c:830: warning: ‘Ns_ConnWrite’ is deprecated (declared 
 at /usr/local/ns/include/ns.h:)
 /bin/rm -Rf nsdbpg.so
 gcc -shared -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
 -I/usr/local/ns/include  -L/usr/local/ns/lib -o 
 nsdbpg.so nsdbpg.o 
 tclcmds.o  -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a 
 -lnsthread -lnsd -L/usr/local/ns/lib -ltcl8.4 -ldl -lgcc_s  -lieee -lm  
 -Wl,--export-dynamic  -L/usr/local/ns/lib -Wl,-rpath,:/usr/local/ns/lib
 
 So this warning about Ns_ConnWrite - ignored.
 
 No doing a ldd nsdbpg.so
 returns
 
 linux-gate.so.1 =  (0xb7fce000)
 libnsthread.so = /usr/local/ns/lib/libnsthread.so (0xb7fbe000)
 libnsd.so = /usr/local/ns/lib/libnsd.so (0xb7f46000)
 libtcl8.4.so = /usr/local/ns/lib/libtcl8.4.so (0xb7e9)
 libdl.so.2 = /lib/tls/i686/cmov/libdl.so.2 (0xb7e87000)
 libgcc_s.so.1 = /lib/libgcc_s.so.1 (0xb7e7c000)
 libm.so.6 = /lib/tls/i686/cmov/libm.so.6 (0xb7e57000)
 libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7d08000)
 libz.so.1 = /usr/lib/libz.so.1 (0xb7cf2000)
 libcrypt.so.1 = /lib/tls/i686/cmov/libcrypt.so.1 (0xb7cc)
 libpthread.so.0 = /lib/tls/i686/cmov/libpthread.so.0 (0xb7ca8000)
 /lib/ld-linux.so.2 (0xb7fcf000)
 
 
 Hm. On another server libpq and libnsdb come up,
 missing here.
 
 When trying to run naviserver, called from my startscript
 with an exported LD_LIBRARY_PATH of
 
 export 
 LD_LIBRARY_PATH=/usr/local/ns/lib:/usr/local/ns/lib/xotcl1.6.2:/usr/local/ns/bin:/opt/pgsql8.2.11/lib:/usr/local/lib
 
 including the postgres directory, I get:
 
 [21/Nov/2008:18:23:52][5641.b7c426b0][-main-] Error: 
 modload: /usr/local/ns/bin/nsdbpg.so: couldn't load 
 file /usr/local/ns/bin/nsdbpg.so: /usr/local/ns/bin/nsdbpg.so: undefined 
 symbol: PQsetdbLogin
 
 Can you help me, Veronica Mars?
 
 Bernd.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg

2008-11-21 Thread Stephen Deasey
On 11/21/08, Bernd Eidenschink [EMAIL PROTECTED] wrote:

  I'm cursed. I never can compile a postgres driver for naviserver
  from scratch.

  Here's my tale - maybe you can hint me to an obvious mistake:

  I compiled a Postgres 8.2.11 from source into
  /opt/pgsql8.2.11

  Then I checked out /modules/nsdbpg.

  I changed in the Makefile the line
  MODLIBS= -lnsdb -lpq


You shouldn't need to edit the Makefile.

NAVISERVER points to the base of your naviserver install, and
POSTGRES points the base of your postgres install.

So,

$ make NAVISERVER=/usr/local/ns POSTGRES=/opt/pgsql8.2.11


(The Makefile uses -rpath to embed the location of postgres into
nsdbpg, so you shouldn't need to use LD_LIBRARY_PATH)

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel