On Jan 16, 2011, at 4:53 PM, John Delacour wrote:

> At 11:13 -0500 16/01/2011, Levan, Jerry wrote:
> 
>> I have an iPad and I have a Postgresql database on my home server.
>> 
>> I have turned on the MacOS(client) VPN on the mac mini that I use
>> as my home server and can access my home network in a secure fashion...
>> 
>> It turns out that once upon a time I wrote a perl cgi that allowed
>> me  to access postgresql and display the results of selections in
>> a html table.
>> 
>> It appears that I need to install DBI and DBD for Postgresql.
>> 
>> Unfortunately I have pretty much forgotten most of my Perl
>> ( Sh*t happens when you get into your seventies...)
>> 
>> Could some kind soul give me a quick guide on how to install
>> the necessary modules to enable the cgi?
> 
> Presuming you have the developer tools installed then use CPAN.  I've 
> recently installed DBI and DBD::SQLite on my Mac Mini without any 
> complaints.  I see that  I am excluded from getting DBD:Pg because I 
> can't answer a simple question:
> 
>     Configuring DBD::Pg 2.17.2
>     Path to pg_config?   You tell me!
>     Use of uninitialized value $ENV{"POSTGRES_HOME"} ...
> 
> But no doubt as a user of Pg and 4 years my senior you will be able 
> to answer it.
> 
> 
> 
> 21:41:50 User:jd   Cwd: /usr/lib
> ➔ sudo cpan
> Password:
> Terminal does not support AddHistory.
> 
> cpan shell -- CPAN exploration and modules installation (v1.9402)
> Enter 'h' for help.
> 
> cpan[1]> install DBI DBD::Pg
> CPAN: Storable loaded ok (v2.18)
> 
> 
> JD

I compiled postgresql ( 8.4.4) myself and pg_config is living in /usr/local/bin
but I have set /usr/local/bin as the target for all of the 'binarys' for the 
install.

I am not sure how to use cpan properly ( espcially the install part )

I got a cpan shell by perl -MCPAN -e shell
and did a 'install Bundle::DBD::Pg
After much stuff flew by the install failed because I did not have root 
access...

I did a sudo -s and restarted cpan.

I did the install again and did not notice that DBD::Pg was installed ( DBI 
evidently
was ok...

I then did a 'install DBD:Pg' and it appeared that some errors were made and 
the install
did not take place.

I went ahead and did a force install and much to my surprise, my rempgsql.cgi 
worked!

I have been able to connect to my db via http using the VPN and have done 
selects and inserts 
successfully. ( The auxiliary documentation is missing and the describe 
function does
not work for schema qualified names).

Safari forces all of the columns to fit on the screen which can make for very 
small entires ;(
but I can zoom the window and read the table ok.

The highest version of DBD::Pg I found was was 2.17.2 

Is doing a:

    sudo perl -MCPAN -e shell

The standard way of preparing to install modules?

Seems like root might only be needed for actual installation...

Thanks

Jerry

Reply via email to