views:

440

answers:

2

My Texvc seems to works, since texvc /home/wiki/tmp /home/wiki/math "y=x+2" gives

Cdaa63ef966cc412541190bc8794731de<i>y</i> = <i>x</i> + 2<mi>y</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>2</mn>

My LocalSettings.php at /var/www/wiki (source)

$IP = "81.111.1.1";
$wgMathPath         = "{$wgUploadPath}/math";
$wgMathDirectory = "{$IP}/images/math";
$wgUploadDirectory  = "{$IP}/images";
$wgUploadPath       = "{$wgScriptPath}/images";
$wgTexvc            = "{$IP}/math/texvc";  # Path to compiled 
texvc
$wgMathDirectory    = "{$wgUploadDirectory}/math";
$wgTmpDirectory     = "{$wgUploadDirectory}/tmp";

I go to my wiki in Firefox and I see the output

Warning: require_once(81.111.1.1/includes/OutputHandler.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/wiki/includes/WebStart.php on line 123

Fatal error: require_once() [function.require]: Failed opening required '81.111.1.1/includes/OutputHandler.php' (include_path='/var/www/wiki:/var/www/wiki/includes:/var/www/wiki/languages:.:/usr/share/php:/usr/share/pear') in /var/www/wiki/includes/WebStart.php on line 123

I am using my correct IP in the variable $IP at /var/www/wiki/LocalSettings.php. I copied /wiki/includes/DefaultSettigs.php to /wiki/, but Math equations are not still working.

I run unsuccessfully RCS' suggestion about including the PATH to the variable $IP. I get the similar warning and error as above.

What would you change in my settings to make Math formulee work?

+3  A: 

Check if the math temp directory exists and the permissions on that directory. I think mode 777 is necessary (i.e., chmod a+w /path/to/dir).

There is some further help in the MediaWiki Manual.

edit: the variable $IP is the (local) include path and not an IP-address:

Include path: The $IP (include path) variable holds the local file path to the base installation of your wiki. Make sure you refer to the fully qualified file path. Do not include a slash at the end of the path. The DefaultSettings.php file gets loaded from the directory designated by the IP variable.

rcs
you can also dochmod 777 /path/to/directory
Mica
My LocalSettings.php is this http://dpaste.com/113534/. I have not managed to get the Math formulee to work with the path included in the variable $IP.
Masi
Have you tried $IP="/var/lib/mediawiki/" or $IP="/usr/share/mediawiki"?
rcs
The last two values of the variable $IP are not working: I can now see my site again, but LaTeX equations are not visible.
Masi
I gave the bounty to this question because it has the right answer in its body `$IP is the local include path and not an IP-address`. I did not notice it first time reading. -- BTW, I think that the name of the variable $IP is rather confusing, since you do not put any IP-address to that variable.
Masi
A: 

My mediawiki locates at /var/www/wiki. However, my $IP prefers only to an IP address. It should also prefer to the location of the installation directory.

I changed the $IP variable from /usr/share/mediawiki to /var/www/wiki wihout my IP at all. I seem to be able to access my wiki outside of my home though I do not have my IP in the variable.

This change made the Math formulee to work.

Masi