Hi,
Sorry,
I've been busy of late, but hopefully this is still relevant. You should be able to access the details from
within PHP using the $_ENV variable, try something like $path =
$_ENV['GSDLHOME'];
Graeme.
On 10/26/07, Richard Managh <richard@dlconsulting.com> wrote:
Hi
Bertrand,
Bertrand SODJAHIN wrote:
Dear all !
I did this in PHP (For a linux server) : $path=shell_exec(@echo
$GSDLHOME);
var_dump($path); // result is : string(1) "
"
Do you think there is another way to get it ?
Thanks
://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
If you have greenstone setup on a linux server, the GSDLHOME variable
doesn't exist, generally for apache, outside of when apache is running
greenstone itself. So it is not possible to get the value of gsdlhome
from PHP, unless you already know it, but then you wouldn't need to get
it anyway.
I imagine it would exist for Apache if you opened a bash, and did
export GSDLHOME=some_path
and then started apache, in this case Apache would be started in an
environment that knows about GSDLHOME. In turn PHP would presumably
know about this environment variable, and you might be able to obtain
gsdlhome with something similar to the PHP code you provided.
Regards,
Richard.
-- DL Consulting Greenstone Digital Library and Digitisation Specialists contact@dlconsulting.com
www.dlconsulting.com
_______________________________________________ greenstone-users mailing list greenstone-users@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
|