|
From: Federico S. I. <ji...@le...> - 2001-08-20 01:56:29
|
Hi everyone, I am not as much into Perl as I am into PHP4, but I was wondering, will it be possible to configure SQL Ledger to possibly connect to PostgreSQL via Unix sockets? Aside from a theoretical speed increase (however unfelt), forcing the postmaster to not listen on TCP might be a good security move for certain sites. On PHP4 this can be done by setting the protocol from tcp to unix. I don't know if this can be done with SQL-Ledger and Perl. Any gives? --> Jijo -- Federico Sevilla III :: ji...@le... Network Administrator :: The Leather Collection, Inc. GnuPG Key: <http://jijo.leathercollection.ph/jijo.gpg> |
|
From: Alan H. <aho...@si...> - 2001-08-20 02:13:32
|
On Mon, Aug 20, 2001 at 09:56:12AM +0800, Federico Sevilla III wrote: > Hi everyone, > > I am not as much into Perl as I am into PHP4, but I was wondering, will it > be possible to configure SQL Ledger to possibly connect to PostgreSQL via > Unix sockets? Aside from a theoretical speed increase (however unfelt), > forcing the postmaster to not listen on TCP might be a good security move > for certain sites. On PHP4 this can be done by setting the protocol from > tcp to unix. I don't know if this can be done with SQL-Ledger and Perl. > Any gives? Edit <user>.config. Remove the host= and port= from the dbconnect string. I'm using an older version, but something similar should still apply. DBD::Pg will connect via UNIX domain socket by default. -- "I don't want to achieve immortality through my work. I want to achieve it through not dying." -- Woody Allen |
|
From: Dieter S. <dsi...@sq...> - 2001-08-20 02:34:25
|
The string you want to change is in User.pm
The user.conf (older versions user.config) is created every time you make
a change, so to make it permanent change the User.pm file.
# connect string to pass to dbi for database access
if ($self->{dbdriver} eq "Pg") {
$self->{dbconnect} = "dbi:Pg:dbname=$self->{dbname};host=$self->{dbhost};por
t=$self->{dbport}";
}
Dieter Simader http://www.sql-ledger.org (780) 472-8161
DWS Systems Inc. Accounting Software Fax: 478-5281
=========== On a clear disk you can seek forever ===========
On Sun, 19 Aug 2001, Alan Hodgson wrote:
> On Mon, Aug 20, 2001 at 09:56:12AM +0800, Federico Sevilla III wrote:
> > Hi everyone,
> >
> > I am not as much into Perl as I am into PHP4, but I was wondering, will it
> > be possible to configure SQL Ledger to possibly connect to PostgreSQL via
> > Unix sockets? Aside from a theoretical speed increase (however unfelt),
> > forcing the postmaster to not listen on TCP might be a good security move
> > for certain sites. On PHP4 this can be done by setting the protocol from
> > tcp to unix. I don't know if this can be done with SQL-Ledger and Perl.
> > Any gives?
>
> Edit <user>.config. Remove the host= and port= from the dbconnect string.
> I'm using an older version, but something similar should still apply.
> DBD::Pg will connect via UNIX domain socket by default.
>
>
>
|
|
From: John C. N. y L. <nj...@nt...> - 2001-08-20 02:24:17
|
Heya, To connect to your PostgreSQL server from PERL you'll, more often than not, be using a Database driver, i.e. DBI:Pg or something..;-) And you're welcome to create or enhance the current PERL driver to support unix sockets.. If you're thinking about security... TCP sockets can still work for your advantage, use your firewall rulesets to moderately block those little script kiddies and system crackers. By the way, how were you able to change PHP4 to use Unix Sockets for PostgreSQL... AFAIK, PHP used pgsql.so to connect to your PostgreSQL server via TCP sockets... From my "limited" experience...;-) It would be better to separate your DB storage facility from your Other services... Then you can cluster your DB's (wait for PostgreSQL 7.2+ or use some other method) and create a HA web server cluster... This would improve your performance. It does, however, depend on the amount of traffic you foresee..;-) Cheers, John Clark Federico Sevilla III wrote: > > Hi everyone, > > I am not as much into Perl as I am into PHP4, but I was wondering, will it > be possible to configure SQL Ledger to possibly connect to PostgreSQL via > Unix sockets? Aside from a theoretical speed increase (however unfelt), > forcing the postmaster to not listen on TCP might be a good security move > for certain sites. On PHP4 this can be done by setting the protocol from > tcp to unix. I don't know if this can be done with SQL-Ledger and Perl. > Any gives? > > --> Jijo > > -- > Federico Sevilla III :: ji...@le... > Network Administrator :: The Leather Collection, Inc. > GnuPG Key: <http://jijo.leathercollection.ph/jijo.gpg> -- /) John Clark Naldoza y Lopez (\ / ) Software Design Engineer III ( \ _( (_ _ Web-Application Development _) )_ (((\ \> /_> Cable Modem Network Management System <_\ </ /))) (\\\\ \_/ / NEC Telecom Software Phils., Inc. \ \_/ ////) \ / \ / \ _/ phone: (+63 32) 233-9142 loc. 3113 \_ / / / cellphone: (+63 919) 399-4742 \ \ / / email: nj...@nt... \ \ "Intelligence is the ability to avoid doing work, yet getting the work done" --Linus Torvalds |
|
From: Noel C. <NO...@mi...> - 2001-08-20 02:27:51
|
speed aside, this may be of interest; you can tighten security by editing pg_hba.conf # PostgreSQL HOST ACCESS CONTROL FILE # # # This file controls what hosts are allowed to connect to what databases # and specifies some options on how users on a particular host are # identified. It is read each time a host tries to make a connection to a # database. ----- Original Message ----- From: "Federico Sevilla III" <ji...@le...> To: "SQL Ledger Mailing List" <sql...@li...> Sent: Monday, August 20, 2001 11:26 AM Subject: Connecting via Unix sockets? > Hi everyone, > > I am not as much into Perl as I am into PHP4, but I was wondering, will it > be possible to configure SQL Ledger to possibly connect to PostgreSQL via > Unix sockets? Aside from a theoretical speed increase (however unfelt), > forcing the postmaster to not listen on TCP might be a good security move > for certain sites. On PHP4 this can be done by setting the protocol from > tcp to unix. I don't know if this can be done with SQL-Ledger and Perl. > Any gives? > > --> Jijo > > -- > Federico Sevilla III :: ji...@le... > Network Administrator :: The Leather Collection, Inc. > GnuPG Key: <http://jijo.leathercollection.ph/jijo.gpg> > > |