apache, postgresql, perl

Ryan Schmidt ryandesign at macports.org
Tue Jun 24 23:41:21 PDT 2008


On Jun 25, 2008, at 01:32, Tom Allison wrote:

> Ryan Schmidt wrote:
>
>> 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?
>
> It's the macport Apache (apache2).  All the mentinoed packages are  
> from mac port.
>
> pg-dbd-pg is installed.
> apache2 is installed and running.
>
> which perl tells me I'm runnign /opt/local/bin/perl from the  
> command line,  My assumption is that if I'm running this perl  
> installation, and apache2 was installed by mac port -- isn't it  
> running the same perl?
>
> How can I tell?
>
> And if they are running the same version then it should see the path.

I don't know. The last time I used Perl CGIs was about ten years ago  
so I'm a bit rusty. That's why I'm asking you. What all did you do to  
get to where you are now? In other words, what do I need to do to see  
the same error on my computer, so that I can begin debugging the  
problem?

Please Reply All so that your reply goes to the mailing list too, not  
just to me.




More information about the macports-users mailing list