[NTG-context] Re: ConTeXt "live"
Hi, I have no idea what is wrong. But you can (remark on Hans' reply) set openout_any = p openin_any = p in texmf.cnf, that doesn't hurt. You should be extremly careful when interfacing TeX to the public. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: ConTeXt "live"
Hello, > Changed & tried, but I have the same error. well, this was only some additional remarks. Perhaps you can use strace to find out why ConTeXt can't write mpgraph.mp? What does your cont-sys.tex look like? Do you have write18 enabled (disable it on the public webserver, of course!). >> You should be extremly careful when interfacing TeX to the public. with that I mean * use setrlimt * disable write18 * use openout=p, openin=p * hide other user's ConTeXt run by using sessions * use some kind of jail if possible * do some checking on user's input Unless you want to share your webserver with other people ;-) Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: ConTeXt "live"
Hi, > In my account, ConTeXt works no prob, I got a perfect PDF. > My problem occurs when I run ConTeXt via web, under Apache's user of course. > How to trace ConTeXt run under web server ? I'd guess it is pretty much impossible to trace under a webserver. Can you install the same environment on a local computer? Then you could strace any process. > No cont-sys.tex file on my ConTeXt installation. I have only > texmf-local/tex/context/base/cont-sys.ori & > texmf-local/tex/context/user/cont-sys.rme and they are original of > distribution As far as I know, cont-sys.ori or ...rme are used as a fallback. And the diff between the ones in the distribution and the one on live.contextgarden reveals no significant differences. >> with that I mean >> >> * use setrlimt > > Could you tell me more about this ? a TeX setting ? Apache setting ? Operating Sytem setting. You can use the setrlimit(2) system call to prevent users from using too many resources, such as disk space or cpu time or See manpage of setrlimit(2). This is why I have written a c-wrapper that runs texexec, so I can set those limits. I'd suggest to try to mimic the setup on a local pc and see if you can get it to work there. It saves so much trouble, because you can access every file/setting/... Perhaps this is a problem with php? Did you try running this via cgi? Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: ConTeXt "live"
>> I'd guess it is pretty much impossible to trace under a webserver. Can > > Why's that? Can't you just run > strace -f -e open -o /tmp/mylog texexec ... > instead of plain texexec? You're right, of course. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: ConTeXt "live"
On 2 Dec 2005 15:21:45 +0100, Patrick Gundlach <[EMAIL PROTECTED]> wrote: > Hi, > > I have no idea what is wrong. But you can (remark on Hans' reply) set > > openout_any = p already defined in texmf.cnf > openin_any = p > > in texmf.cnf, that doesn't hurt. Changed & tried, but I have the same error. > > You should be extremly careful when interfacing TeX to the public. Thank you, -- http://vnoss.org Vietnamese Open Source Software Community ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: ConTeXt "live"
VnPenguin wrote: On 2 Dec 2005 15:21:45 +0100, Patrick Gundlach <[EMAIL PROTECTED]> wrote: Hi, I have no idea what is wrong. But you can (remark on Hans' reply) set openout_any = p already defined in texmf.cnf openin_any = p in texmf.cnf, that doesn't hurt. Changed & tried, but I have the same error. no, that should be 'a' and not 'p' (just for testing first) Hans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: ConTeXt "live"
On 2 Dec 2005 16:17:33 +0100, Patrick Gundlach <[EMAIL PROTECTED]> wrote: > Hello, > > > > Changed & tried, but I have the same error. > > well, this was only some additional remarks. Perhaps you can use > strace to find out why ConTeXt can't write mpgraph.mp? In my account, ConTeXt works no prob, I got a perfect PDF. My problem occurs when I run ConTeXt via web, under Apache's user of course. How to trace ConTeXt run under web server ? > What does your cont-sys.tex look like? Do you have write18 enabled > (disable it on the public webserver, of course!). No cont-sys.tex file on my ConTeXt installation. I have only texmf-local/tex/context/base/cont-sys.ori & texmf-local/tex/context/user/cont-sys.rme and they are original of distribution (exactly like http://source.contextgarden.net/tex/context/base/cont-sys.ori and http://source.contextgarden.net/tex/context/user/cont-sys.rme ) The \write18{} feature was disable on my system. > > > >> You should be extremly careful when interfacing TeX to the public. > > with that I mean > > * use setrlimt Could you tell me more about this ? a TeX setting ? Apache setting ? > * disable write18 done > * use openout=p, openin=p done > * hide other user's ConTeXt run by using sessions yes > * use some kind of jail if possible no, it's not possible in my case > * do some checking on user's input Yes, you're right. > Unless you want to share your webserver with other people ;-) No problem, but firstly I need a running ConTeXt via web :-) Thank you so much, Regards, -- http://vnoss.org Vietnamese Open Source Software Community ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: ConTeXt "live"
Patrick Gundlach wrote: Hi, In my account, ConTeXt works no prob, I got a perfect PDF. My problem occurs when I run ConTeXt via web, under Apache's user of course. How to trace ConTeXt run under web server ? Reversing the order will hopefully give a clue on how to proceed: make ConTeXt create mpgraph.mp first, then the other one. If that gets you past the error (and into a similar error: test-mpgraph.mp), then it is probably a number of open files limit problem. Here is the relevant macro, with the order already adjusted : \def\initializeMPgraphics {\bgroup \ifx\bufferprefix\empty\else \let\bufferprefix\empty \initializeMPgraphicfile \fi \egroup \initializeMPgraphicfile } I'd guess it is pretty much impossible to trace under a webserver. Can you install the same environment on a local computer? Then you could strace any process. You can try to add --passon='-kpathsea-debug=4' in the texexec call. All the kpathsea debug output should end up in your apache error_log (the number 4 is for fopen/fclose traces). Perhaps this is a problem with php? Did you try running this via cgi? If you are lucky, there may be some hint in your global or local apache error file. Good luck, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: ConTeXt "live"
Patrick Gundlach wrote: > I'd guess it is pretty much impossible to trace under a webserver. Can Why's that? Can't you just run strace -f -e open -o /tmp/mylog texexec ... instead of plain texexec? Sure, multiple runs will mean you only ever get to see the last log, but on a test system that should be exactly the one you are looking for. Oh, and I'll second Patrick's advice: Before letting unknown users run arbitrary programs on your machine (and TeX code provided by the user, even if it is just their names to be filled into some template, *does* qualify as “arbitrary programs”), make bloody sure those programs have no chance of ruining your server. Double-check the validity of all inputs, check if you can use a chroot “jail” and use the most paranoid TeX settings with which your setup/code still works. regards, Christopher ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: context live @ contextgarden.net doesn't support Chinese
Hello, > When I tried to create PDF on the fly in the wiki, I found that context > live @ contextgarden.net doesn't support Chinese -_- > > Is it possible that context live @ contextgarden.net is reconfigured > with Chinese support ? a) what does it take to support chinese? Which fonts? b) could you provide me a test document (source and final form, so I can compare)? You can contact me off list. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: context live @ contextgarden.net doesn't support Chinese
Patrick Gundlach wrote: Hello, When I tried to create PDF on the fly in the wiki, I found that context live @ contextgarden.net doesn't support Chinese -_- Is it possible that context live @ contextgarden.net is reconfigured with Chinese support ? a) what does it take to support chinese? Which fonts? b) could you provide me a test document (source and final form, so I can compare)? You can contact me off list. Patrick OK. xiaojf ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context