I'm trying to get the math formatting working on my wiki. I've installed OCaml and teTeX but I'm having problems with ImageMagick. I'm running on Solaris 10. The texconfig for the teTex installation works fine.
As part of the set-up I need to set the environmental variables MAGICK_HOME and LD_LIBRARY_PATH. I've got the following lines in /etc/profile export MAGICK_HOME="/usr/local/ImageMagick-6.2.1" export LD_LIBRARY_PATH="/usr/local/ImageMagick-6.2.1/lib:$LD_LIBRARY_PATH" and I've got them again in /.login and /.profile.
However, I'm getting the error *Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): \int_{s=a-1}^{b} f(s), ds \le \sum_{i=a}^{b} f(i) \le \int_{s=a}^{b+1} f(s), ds* on a sample math equation I've got.
How do I set an evironmental variable for the wiki? What user is it? I think it may be webservd: (extract from /etc/passwd) **webservd:x:80:80:WebServer Reserved UID:/: and that has no home directory or shell so I can't set it in ~/home.
Just in case it makes a difference the wiki is installed in /var/apache2/htdocs/wiki. Also I've enabled $wgUseTeX in LocalSettings.php and the make in /var/apache2/htdocs/wiki/math generated no errors.
Help? -- Emma
PS I used symbolic links from /usr/local/bin instead of setting the PATH for dvips, convert etc: root[k)(sh]@sunray21#which latex /usr/local/bin/latex root[k)(sh]@sunray21#which dvips /usr/local/bin/dvips root[k)(sh]@sunray21#which convert /usr/local/bin/convert root[k)(sh]@sunray21#which gs /usr/sfw/bin/gs
Emma Gottesman wrote in gmane.org.wikimedia.mediawiki:
As part of the set-up I need to set the environmental variables MAGICK_HOME and LD_LIBRARY_PATH. I've got the following lines in /etc/profile export MAGICK_HOME="/usr/local/ImageMagick-6.2.1" export LD_LIBRARY_PATH="/usr/local/ImageMagick-6.2.1/lib:$LD_LIBRARY_PATH" and I've got them again in /.login and /.profile.
instead of doing this, i'd recommend either: * recompile imagemagick with -R/usr/local/ImageMagick-6.2.1/lib so it can find its libraries automatically; or * run "crle -l /lib:/usr/lib:/usr/local/ImageMagick-6.2.1/lib" so the runtime linker can find them normally.
either of these is probably preferable to hardcoding $LD_LIBRARY_PATH everywhere.
however, if you don't want to do either of these, you can put this in LocalSettings.php:
putenv("LD_LIBRARY_PATH=/usr/local/ImageMagick-6.2.1/lib:" . getenv("LD_LIBRARY_PATH"));
and something similar for MAGICK_HOME.
your shell init files are not (normally) read by PHP, so they won't have an effect on PHP's environment.
alternatively, you could set these before starting Apache and they would take effect for all CGI programs. (for example, copy /lib/svc/method/http-apache2 to somewhere else, modify it as needed and change the 'start/exec' SMF property for network/http:apache2 to the new file:
mkdir -p /etc/local/svc/method/ cp /lib/svc/method/httpd-apache2 /etc/local/svc/method/httpd-apache2 vi /etc/local/svc/method/httpd-apache [ ... add exports ... ] svccfg -s network/httpd:apache2 setprop \ start/exec = /etc/local/svc/method/httpd-apache2
i've not tested this, but i believe it should work. )
How do I set an evironmental variable for the wiki? What user is it? I think it may be webservd: (extract from /etc/passwd) **webservd:x:80:80:WebServer Reserved UID:/: and that has no home directory or shell so I can't set it in ~/home.
i believe that Sun's supplied apache2 (in /usr/apache2/) does run as "webservd" by default, but you can do:
grep ^User /etc/apache2/httpd.conf
to find out. since Apache isn't normally started by this user, though, changing its shell profile isn't likely to affect it.
Just in case it makes a difference the wiki is installed in /var/apache2/htdocs/wiki. Also I've enabled $wgUseTeX in LocalSettings.php and the make in /var/apache2/htdocs/wiki/math generated no errors.
Help? -- Emma
kate.
mediawiki-l@lists.wikimedia.org