apache, postgresql, perl

Ryan Schmidt ryandesign at macports.org
Tue Jun 24 22:24:35 PDT 2008


On Jun 24, 2008, at 21:38, Tom Allison wrote:

> I ran into a problem with trying to set up a cgi page on my macbook.
>
> The code uses CGI and DBD::Pg.
>  From the command line, it works great.
>
>  From Apache it works badly...
>
> Can't load
> '/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/Pg/Pg.bundle'
> for module DBD::Pg:
> dlopen(/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/Pg/ 
> Pg.bundle,
> 1): Library not loaded: /usr/local/pgsql/lib/libpq.5.dylib
>
>
> I have no /usr/local/pgsql/...
> But I have a
> /opt/local/lib/postgresql83/libpq.5.dylib
>
> which was put there by the mac port installation.
>
> How do I get these mac port installations playing nice together?

As you said, MacPorts doesn't put things in /usr/local. It doesn't  
put things in /Library/Perl either. The fact that from Apache it's  
trying to load something in /Library/Perl suggests that from Apache  
you're trying to use Apple's Perl instead of the Perl from MacPorts.

You didn't say which Apache. Is this apache2 from MacPorts?

How do you test this from the command line? What command do you run?  
If there is a perl source file involved, can you provide it? How do  
you test this from Apache?



More information about the macports-users mailing list