apache, postgresql, perl
Tom Allison
tom at tacocat.net
Tue Jun 24 23:54:24 PDT 2008
Ryan Schmidt wrote:
> 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.
>
>
I'm not sure exactly what may be required to create the problem
originally as I was not having this problem originally. Last year I
wrote several CGI and FCGI based projects on my notebook.
Since then the only thing I've run is:
upgrade installed.
earlier this morning I ran this again and upgraded all my mac port stuff
with the exception of ruby.
Of course, as the result of this, right now I can't even get users to
run any cgi (eg: /~tom/works.cgi)
<Directory "/Users/*/Sites">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
More information about the macports-users
mailing list