From c9cd39df37f99fb739b9d9743c6d9a773fb7b0f8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 3 Dec 2004 11:18:16 +0000 Subject: [PATCH] Update INSTALL info a bit, remove old experimental texvc.phtml --- INSTALL | 16 ++++- texvc.phtml | 165 ---------------------------------------------------- 2 files changed, 14 insertions(+), 167 deletions(-) delete mode 100644 texvc.phtml diff --git a/INSTALL b/INSTALL index bbbbae9564..52641cbf34 100644 --- a/INSTALL +++ b/INSTALL @@ -14,6 +14,13 @@ Required software: * A MySQL server. 4.0.x is preferred, but 3.2.x should work as well. +WARNING: MySQL 4.1 and later have introduced several +incompatibilities with old client software (such as most +available PHP installations). You may have problems with +a mixed configuration. For details, please see: + + http://dev.mysql.com/doc/mysql/en/Old_client.html + MediaWiki is developed and tested mainly on Unix/Linux platforms, but should work on Windows as well. @@ -73,7 +80,12 @@ provide enough information to work with, and preferably be aware of what you're doing!) and keep track of major changes to the software, including performance improvements and security patches. -http://mail.wikipedia.org/mailman/listinfo/mediawiki-l (site admin support) +http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce + (low traffic, announcements only) + +http://mail.wikipedia.org/mailman/listinfo/mediawiki-l + (announcements and site admin support) -http://mail.wikipedia.org/mailman/listinfo/wikitech-l (development) +http://mail.wikipedia.org/mailman/listinfo/wikitech-l + (development) diff --git a/texvc.phtml b/texvc.phtml deleted file mode 100644 index 7f427d8916..0000000000 --- a/texvc.phtml +++ /dev/null @@ -1,165 +0,0 @@ -"; -?> - -texvc -" -?> -
-"; -} - -function texvc_cgi_renderMath( $tex ) -{ - global $wgMathDirectory, $wgTmpDirectory, $wgInputEncoding; - $dbr =& wfGetDB( DB_SLAVE ); - $mf = wfMsg( "math_failure" ); - $munk = wfMsg( "math_unknown_error" ); - - $image = ""; - $outhtml = ""; - $outtex = ""; - - $fname = "texvc_cgi_renderMath"; - - $md5 = md5($tex); - $md5_sql = pack("H32", $md5); - - $mathTable = $dbr->tableName( 'math' ); - $rpage = $dbr->selectRow( 'math', array('math_outputhash','math_html_conservativeness','math_html','math_mathml'), - array( 'math_inputhash' => $md5_sql ) ); - - if ( $rpage === false ) - { - $cmd = "./math/texvc ".wfEscapeShellArg($wgTmpDirectory)." ". - wfEscapeShellArg($wgMathDirectory)." ".wfEscapeShellArg($tex)." ".wfEscapeShellArg($wgInputEncoding); - $contents = `$cmd`; - - if (strlen($contents) == 0) - return "

".$mf." (".$munk."): ".wfEscapeHTML($tex)."

"; - $retval = substr ($contents, 0, 1); - - if (($retval == "C") || ($retval == "M") || ($retval == "L")) { - if ($retval == "C") - $conservativeness = 2; - else if ($retval == "M") - $conservativeness = 1; - else - $conservativeness = 0; - $outdata = substr ($contents, 33); - - $i = strpos($outdata, "\000"); - - $outhtml = substr($outdata, 0, $i); - $mathml = substr($outdata, $i+1); - - #$sql_html = "'".mysql_escape_string($outhtml)."'"; - #$sql_mathml = "'".mysql_escape_string($mathml)."'"; - } else if (($retval == "c") || ($retval == "m") || ($retval == "l")) { - $outhtml = substr ($contents, 33); - if ($retval == "c") - $conservativeness = 2; - else if ($retval == "m") - $conservativeness = 1; - else - $conservativeness = 0; - #$sql_html = "'".mysql_escape_string($outhtml)."'"; - $mathml = NULL; - #$sql_mathml = 'NULL'; - } else if ($retval == "X") { - $outhtml = NULL; - $mathml = substr ($contents, 33); - #$sql_html = 'NULL'; - #$sql_mathml = "'".mysql_escape_string($mathml)."'"; - $conservativeness = 0; - } else if ($retval == "+") { - $outhtml = NULL; - $mathml = NULL; - #$sql_html = 'NULL'; - #$sql_mathml = 'NULL'; - $conservativeness = 0; - } else { - if ($retval == "E") - $errmsg = wfMsg( "math_lexing_error" ); - else if ($retval == "S") - $errmsg = wfMsg( "math_syntax_error" ); - else if ($retval == "F") - $errmsg = wfMsg( "math_unknown_function" ); - else - $errmsg = $munk; - return "

".$mf." (".$errmsg.substr($contents, 1)."): ".wfEscapeHTML($tex)."

"; - } - - $outmd5 = substr ($contents, 1, 32); - if (!preg_match("/^[a-f0-9]{32}$/", $outmd5)) - return "

".$mf." (".$munk."): ".wfEscapeHTML($tex)."

"; - - $outmd5_sql = pack("H32", $outmd5); - - # Someone may have inserted the same hash since the SELECT, but that's no big deal, just ignore errors - $dbw =& wfGetDB( DB_MASTER ); - $dbw->insert( 'math', - array( - 'math_inputhash' => $md5_sql, - 'math_outputhash' => $outmd5_sql, - 'math_html_conservativeness' => $conservativeness, - 'math_html' => $outhtml, - 'math_mathml' => $mathml, - ), $fname, array( 'IGNORE' ) - ); - -// we don't really care if it fails - } else { - $outmd5 = unpack ("H32md5", $rpage->math_outputhash); - $outmd5 = $outmd5 ['md5']; - $outhtml = $rpage->math_html; - $conservativeness = $rpage->math_html_conservativeness; - $mathml = $rpage->math_mathml; - } - if ( is_null( $mathml ) || $mathml === '' ) - $mathml = "

Failed to generate MathML

"; - else - $mathml = "

MathML

$mathml"; - $image = "

Image

" . xlinkToMathImage ( $tex, $outmd5 ); - $cmd = "./math/texvc_tex ".escapeshellarg($tex)." ".escapeshellarg($wgInputEncoding); - $outtex = `$cmd`; - - if ( is_null( $outhtml ) || $outhtml === '' ) - $outhtml = "

Failed to generate HTML

"; - else - if ( $conservativeness == 2) - $outhtml = "

HTML (conservative)

" . $outhtml; - else if ( $conservativeness == 1) - $outhtml = "

HTML (moderate)

" . $outhtml; - else - $outhtml = "

HTML (liberal)

" . $outhtml; - - if ( $outtex == '' ) - $outtex = "

Failed to generate TeX

"; - else - $outtex = "

TeX

" . wfEscapeHTML($outtex); - - return $outtex . $outhtml . $mathml . $image; -} - -global $math; -if ($math != '') - print texvc_cgi_renderMath($math); -?> - -- 2.20.1