[freeside] pslatex error on Solaris 8 -WorkAround
shivkumar at outbackwifi.com
Wed May 4 08:37:18 PDT 2005
since the list is awfully quiet about my ramblings, here's how I found a
workaround for the latex problem.
the default tetex install in solaris is in /usr/local/teTeX
and the binaries are in /usr/local/teTex/bin/sparc-sun-solaris5.8
i wrote a small script that created a sym link for each of the binaries
in /usr/local/bin since that was the only path that was visible to the
web user (no matter what I did to point this guy to a different path!)
now pslatex works like a charm!
Shivkumar said the following:
>Ive installed Freeside v1.5.0pre6 CVS dated 21 April 05 on a Solaris 8
>Ive got all modules working fine (ive even got the Verisign PayflowPro
>module working (test)), except this one thats giving me sleepless nights.
>Id be doubly grateful if you all can point me in the right direction:
>i am getting pslatex failed errors when i either view the invoice or view
>the typeset invoice.
>the httpsd_error log shows:
>sh: pslatex : not found
>I would assume that this meant that the path to the pslatex executable was
>not available to the script.
>However, when I run this small script (extracted from cust_bill.pm) in a
>separate file through the browser, the pdf file gets made in the
>---start script (test_pslatex.pl)-----:
>my $dir= "/usr/local/etc/freeside/cache.DBI:Pg:dbname=freeside";
>my $file = "invoice.2.tbcRUEyP";
>my $sfile = shell_quote $dir."/".$file;
>print "content-type: text/plain\n\n";
>system("pslatex $sfile.tex >/dev/null 2>&1") == 0
>or die "pslatex $sfile failed: $!";
> "dvips -q -t letter -f $sfile.dvi ".
> "| gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$sfile.pdf ".
> " -c save pop -"
> ) == 0
> or die "dvips | gs failed: $!";
>the output of this script on the browser window is:
>which shows that the path to the pslatex binary is available to the script
>which gets executed as the freeside user.
>now if i run the
>https://18.104.22.168/freeside/view/cust_bill-pdf.cgi?3.pdf script by
>clicking on the 'view typeset invoice' link,
>i get this output
>failed: No such file or directory at
>/usr/local/lib/perl5/site_perl/5.8.6/FS/cust_bill.pm line 1448.
>1444: #! LaTeX Error: Unknown graphics extension: .eps.
>1446: my $sfile = shell_quote $file;
>1448: system("pslatex $sfile.tex >/dev/null 2>&1") == 0
>1449: or die "pslatex $file.tex failed: $!";
>1451: system("pslatex $sfile.tex >/dev/null 2>&1") == 0
>1452: or die "pslatex $file.tex failed: $!";
>code stack: /usr/local/lib/perl5/site_perl/5.8.6/FS/cust_bill.pm:1448
>and the funny thing is the test script now shows the follwing output:
>and I get
>sh: pslatex : not found
>in the httpsd_error log
>when I go back to freeside main menu by hitting the back button on the
>so my q is how does the path get changed for the system calls?
>This does not happen on my other server which is a Debian Sarge 3
>I have used the PassEnv directive in httpsd
>so when i restart apache and again run the test script, the original PATH
>is restored and it gets executed
More information about the freeside-users