[sf-perl] LinuxWorld Expo - Demo

Bill Moseley moseley at hank.org
Tue Aug 7 08:16:15 PDT 2007

On Mon, Aug 06, 2007 at 07:19:18PM -0700, Brian Hamlin wrote:
> another twist on the SF Expo: Josh and I were at the booth this 
> afternoon, moving over a nifty demo app I wrote at a contest at MIT 
> last January, that uses Postgres, Perl and the Google Maps API in the 
> browser.
> Funny thing was.. it worked fine on my machine  ;-)
> --
> DBD::Pg can't read from Postgres while executing as a CGI
> yet from the command line, DBD::Pg can read just fine!! vexing!
> This is on a Macintosh OS X. The Apache is pre-installed, and runs
> as user hmmm, someone might know.
> When we installed DBD::Pg, the configure magically 'found' that Postgres
> was actually installed in a local directory of the current (admin) 
> user, not in /usr/local
> So the DBD:Pg test ran fine, and generally can access a running 
> database fine..
> its just when the same code runs as a CGI, access fails.. Josh changed 
> access
> to a library (libpq ?), but that alone did not fix it..

What does access failed mean?  What does Apache's error log say?
If you su to user www and run the script from the command line what
does it say?  Can you run strace to see what system calls are failing?

Bill Moseley
moseley at hank.org

More information about the SanFrancisco-pm mailing list