• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Apache Perl CGI environment question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache Perl CGI environment question


  • Subject: Apache Perl CGI environment question
  • From: John Michael Zorko <email@hidden>
  • Date: Mon, 7 Feb 2005 14:57:07 -0800


Hello, all ...

I am sending this to both darwin-dev and darwinos-users because this question kiind of straddles the fence, me thinks. It's a simple one, though.

I have some Perl code that uses the DBD::Pg (PostgreSQL DBI interface) module. This code runs fine under OSX 10.3.7 using mod_perl as long as I add this to httpd.conf:

PerlSetEnv PERL5LIB /sw/lib/perl5/5.8.1/darwin-thread-multi-2level

... which I need to do because, while the CPAN module for DBD::Pg fails to install under Panther, the Fink package for it indeed works. It's just that Fink puts it in a different directory (/sw) so I need to tell Apache and mod_perl to add that directory to @INC so that the Perl code will find it. This all works wonderfully.

However, now I need to forsake mod_perl and make this also work for plain CGI. As far as I can tell, there doesn't seem to be a way to specify additional directories to be added to @INC (via PERL5LIB or otherwise). This has to work under multiple platforms (Mac OSX, Debian Linux and Cygwin) so changing the Perl code is out of the question. So, i'm wondering how to do this.

1. I could somehow alter the way OSX starts up Apache so the /sw/... directory is added ...
2. ???

I want to keep things as similar and parsimonious as I can across platforms i.e. I don't want to use some elaborate hack to do it only for one platform, when the others don't need to ...

Can anyone help?

Regards,

John

Falling You - exploring the beauty of voice and sound
New album, "Touch", available now
http://www.magnatune.com/artists/falling_you










 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Apache Perl CGI environment question
      • From: "Jeff W. Boote" <email@hidden>
  • Prev by Date: Re: detecting logout
  • Next by Date: Re: Apache Perl CGI environment question
  • Previous by thread: ApplePanels and backlight values
  • Next by thread: Re: Apache Perl CGI environment question
  • Index(es):
    • Date
    • Thread