Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: kb-ohnemus on May 30, 2008, 09:16:12 PM

Title: Modify $PATH for user www
Post by: kb-ohnemus on May 30, 2008, 09:16:12 PM
Hi,

I've just installed lx-office (a german fork of sql-ledger, web based accounting). In order to create invoices and so on lx-office calls pdflatex. Tetex provided by SME-Server didn't seem to have all features needed by the invoice-templates of lx-office so I installed texlive.

The problem now ist that the pdflatex executable is under /usr/local/texlive/2007/bin/i386-linux. I changed /etc/profile and added that path which made it available to root but not to the webserver. The lx-office-Perl-script still cant find it:

[Fri May 30 21:06:03 2008] [error] [client 192.168.0.115] sh: pdflatex: command not found, referer: https://server.local/lx-erp/is.pl?login=andsoon...

I also tried to add PATH=$PATH,/usr/local/texlive/2007/bin/i386-linux \ export PATH to the following places:
/home/e-smith/.bashrc
/home/e-smith/.bash_profile (/home/e-smith is set as ~ for user www in etc/password)
/etc/bashrc
/etc/csh.login
/etc/init.d/httpd
/etc/init.d/httpd-e-smith

but to no avail so far.

So where is $PATH defined for user www? Or do I miss something else?
Title: Re: Modify $PATH for user www
Post by: Stefano on May 30, 2008, 09:43:30 PM
Hi

IMO you can simply create a link in the folder this file is expected to be and, optionally, change owner and permission..

HTH
Ciao
Stefano
Title: Re: Modify $PATH for user www
Post by: CharlieBrady on May 31, 2008, 12:04:56 AM
The lx-office-Perl-script still cant find it:

Change that script to use the full path.
Title: Re: Modify $PATH for user www
Post by: kb-ohnemus on May 31, 2008, 07:22:01 AM
Thanks. I had already tried to set symlinks to known paths and I had tried to schange the Perlscript to use the full path. The problem ist pdflatex calls further executables and which cannot be found then.

And I've tested this: I added system("echo $PATH > /tmp/test1"); to the Perlscript in order to see which paths it knows. But it gives back exactly nothing, not even /usr/bin which it should know because it can find the executable if i link it to /usr/bin. So maybe I am completly wrong and don't need to change PATH but some other path setting, maybe for perl or apache?
Title: Re: Modify $PATH for user www
Post by: CharlieBrady on May 31, 2008, 05:09:00 PM
Thanks. I had already tried to set symlinks to known paths and I had tried to schange the Perlscript to use the full path. The problem ist pdflatex calls further executables and which cannot be found then.

Set $ENV{PATH} to whatever you want in that perl script.
Title: Re: Modify $PATH for user www
Post by: kb-ohnemus on May 31, 2008, 06:55:31 PM
Hey Charlie, you absolutly made my day, thanks.