On Jan 30, 2013, at 3:45 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote:

> On Wed, 30 Jan 2013, Ryan Dagey wrote:
> 
>> Thanks for the reply. We are simply running gretlcli from 
>> within php which should execute as apache user. Now this 
>> user has no home directory, so if that causes gretlcli to 
>> default to root directory [...]
> 
> It doesn't: libgretl uses $HOME. If "/root" is coming into the 
> picture, that must be because $HOME=/root in the environment 
> in which gretlcli is running.
> 
>> Why is gretlcli requiring any user directories at all? I 
>> don't understand what is derived from these directories.
> 
> In the normal use-case for gretlcli we need to know the user 
> directories for writing various files, mostly pertaining to 
> auxiliary programs such as gnuplot, X-12-ARIMA, the programs 
> supported by the "foreign" comand and so on.
> 
>> It would be good if this is the case to review some 
>> documentation on the required directories, I did a lot of 
>> googling looking for them.
> 
> In the normal use-case these are supposed to "just work", you 
> don't need to know about them. Obviously your case is 
> different, and I'll have to think aout it.
> 
>> Am I understanding that all of those environment variables 
>> have to be set every time in PHP to some temporary directory 
>> just to get gretlcli to run in PHP under the apache user? 
>> There is no way to tell gretlcli to use some set of 
>> defaults?
> 
> Environment variables are just one way to get gretlcli to use 
> a set of defaults that work for your usage of the program via 
> PHP (since the built-in defaults are problematic in this 
> case).
> 
> However, it may be that we can come up with an option that 
> says to gretlcli something like, "There's nobody here, don't 
> read any user config." But you'd still need a user directory 
> (however defined and wherever located) if you want gretlcli to 
> be able to interact with third-party programs (gnuplot, etc.).
> 
> Allin Cottrell
> 
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
> 

Thanks for getting back with me. I don't know how apache works but it might be 
possible HOME is not set at all, what would gretl do in this case?

Is there a way to pass config data to gretl on the command line? I could create 
an alias in that case. Or is there a global config that I could setup for gretl 
to use in these cases?  In etc maybe?

I can say now we are only interested in gretl's individual power, but it could 
change later. I do know we will never care about x11, it's a server 
environment, so it would still be a limited use configuration. 

Regardless, gretl is awesome, we do inventory and production forecasting with 
it and now I'm implementing a job times regression analysis, trend line, etc. 
Much better to use gretl than PHP that function out. 

Reply via email to