I think the search paths are determined by the shell that the user runs. I'm guessing WebDNA runs as the user apache (or _www for OSX). I doubt that user has more than the most basic shell available and likely no paths set up. You might be able to create the home directory for that user and the environmental variables but I've never tried.For example, for imagemagick, I need to specify the full path to /usr/bin/convert in WebDNA scripts rather than just convert as I would for myself when I'm logged in as the user.Likely it is easier to determine the server you're on and use full paths based on that information or to configure the servers identically (at least from a directory perspective. Even symlinks could work.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listBillOn Wed, Jan 25, 2012 at 11:28 AM, Thierry Almy <lists@almy.ch> wrote:If I have to hack it like this, I'd prefer to list my different servers in a global db and store the paths there.
Then I can build the path to IM depending on the server I am and my CMS templates will work on all servers ...
Do we really have to work with full paths in the shell?
...
Thierry
Am 25.01.2012 um 16:19 schrieb Donovan Brooke:
> Thierry Almy wrote:
>> We'd like to set environment variables to be accessible by shell commands from WebDNA.
>>
>> The problem is, we are working with ImageMagick on different servers where IM is installed on different locations.
>> If I use the hole path to the "convert" command it works fine, but I'd like to just use the command itself without a path.
>>
>> We added the path in /etc/profiles and /etc/paths
>>
>> The IM commands are found in the terminal but not inside the WebDNA shell tags ... where do we define the paths for apache/lighttpd/webdna?
>> Or do we really have to work with full paths to the commands?
>>
>> Thierry
>
>
> Hi Thierry,
> Instead of environment variables, maybe functions.
>
> ..ie., have a vunction called [convert ..], where it first looks for the command within known paths from the different inviro's?
>
> Just a thought.
> Donovan
>
> --
> Donovan Brooke
> Euca Design Center
> www.euca.us
> www.keepitturning.co
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us
> Bug Reporting: support@webdna.us
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: support@webdna.us.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
|
I think the search paths are determined by the shell that the user runs. I'm guessing WebDNA runs as the user apache (or _www for OSX). I doubt that user has more than the most basic shell available and likely no paths set up. You might be able to create the home directory for that user and the environmental variables but I've never tried.For example, for imagemagick, I need to specify the full path to /usr/bin/convert in WebDNA scripts rather than just convert as I would for myself when I'm logged in as the user.Likely it is easier to determine the server you're on and use full paths based on that information or to configure the servers identically (at least from a directory perspective. Even symlinks could work.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listBillOn Wed, Jan 25, 2012 at 11:28 AM, Thierry Almy <lists@almy.ch> wrote:If I have to hack it like this, I'd prefer to list my different servers in a global db and store the paths there.
Then I can build the path to IM depending on the server I am and my CMS templates will work on all servers ...
Do we really have to work with full paths in the shell?
...
Thierry
Am 25.01.2012 um 16:19 schrieb Donovan Brooke:
> Thierry Almy wrote:
>> We'd like to set environment variables to be accessible by shell commands from WebDNA.
>>
>> The problem is, we are working with ImageMagick on different servers where IM is installed on different locations.
>> If I use the hole path to the "convert" command it works fine, but I'd like to just use the command itself without a path.
>>
>> We added the path in /etc/profiles and /etc/paths
>>
>> The IM commands are found in the terminal but not inside the WebDNA shell tags ... where do we define the paths for apache/lighttpd/webdna?
>> Or do we really have to work with full paths to the commands?
>>
>> Thierry
>
>
> Hi Thierry,
> Instead of environment variables, maybe functions.
>
> ..ie., have a vunction called [convert ..], where it first looks for the command within known paths from the different inviro's?
>
> Just a thought.
> Donovan
>
> --
> Donovan Brooke
> Euca Design Center
> www.euca.us
> www.keepitturning.co
> ---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us
> Bug Reporting: support@webdna.us
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: support@webdna.us.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...