Go Back   The macosxhints Forums > OS X Help Requests > Networking



Reply
 
Thread Tools Rate Thread Display Modes
Old 04-17-2002, 06:24 PM   #1
mwhybark
Prospect
 
Join Date: Apr 2002
Location: seattle
Posts: 22
Question adding to apache path envionmental variable?

at boot, my apache install reports vanilla system paths based on the information available in /etc/rc.common (which is run by system/library/startupitems/apache).

While I could add to the path statemet found there, I'm wary of doing so for security reasons and out of fear of Apple's default installer behavior, which can't be predicted in regard to areas such as /etc/.

Additionally, if I stop and start Apache from the System Preference/Sharing panel, the reported path environment changes to reflect a Users-style userid, with a home folder, and so forth.

I'm trying to grant path access to the contents of the fink /sw/ directory hierarchy so that I can use ImageMagick with the perl-based Movable Type.

Any hints? How does Apache establis or reject path information from the base PATH, the User path, and so forth?
mwhybark is offline   Reply With Quote
Old 04-18-2002, 09:38 AM   #2
Novajo
Triple-A Player
 
Join Date: Jan 2002
Location: Toronto, Canada
Posts: 185
/sw for storing, /usr/local/ for using

I would not touch /sw. /sw if for storing the source code of your software. "Install" the files you want in a /usr/local/xxx directory. Then, you could use the setenv command in httpd.conf, like:

setenv PERL5LIB "/usr/local/site/lib/"

for instance or any other variable for that matter.
Novajo is offline   Reply With Quote
Old 04-18-2002, 04:46 PM   #3
mwhybark
Prospect
 
Join Date: Apr 2002
Location: seattle
Posts: 22
hm, /sw/ a fink thing; /usr/ an apple thing

actually, usr is one of the directories that Apple can overwrite, so i prefer to install stuff outside of it. /sw/ is the default directory that fink uses, so, again, I prefer to leave it as is.

Happily, all appears to be well.

Here's what was needed.

First of all, setting the appended path variable in rc.common did not improve things, although it did appear in apache's environment.

Second, simply declaring an arbitrary variable in http.conf, although making said variable available in the apache environment, did not resolve the issue.

the appropriate approach was to make the /sw/ perl libs available to the individual scripts by adding the line "use lib /sw/lib/perl5/darwin" to the scripts themselves.

Going a bit deeper, I actually followed the instructions of the honorable Peter N. Lewis seen here:

Peter Lewis' post to mac osx developers perl list

in which he gives instructions on altering a couple of lines in "
/sw/fink/dists/stable/main/finkinfo/graphics/imagemagick-5.4.1-3.patch"

once I did that, I ran "fink rebuild imagemagick" and "fink reinstall imagemagick", and things worked fine!
mwhybark is offline   Reply With Quote
Old 04-18-2002, 06:16 PM   #4
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
Re: hm, /sw/ a fink thing; /usr/ an apple thing

Quote:
Originally posted by mwhybark
actually, usr is one of the directories that Apple can overwrite, so i prefer to install stuff outside of it....

not /usr/local ; it is reserved for site specific installs.

if apple (or any unix dist'or) were to touch /usr/local they would be regarded at terrorists.

your /usr/local is safe (from apple, anyway).

Last edited by mervTormel; 04-18-2002 at 06:19 PM.
mervTormel is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:52 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.