[Mediawiki-l] blank page after install +patch

Joshua Swink yathster at yahoo.com
Wed Jun 9 03:25:43 UTC 2004


If you install php and mysql for the sole reason of running Mediawiki,
and are inexperienced :-) and forget to uncomment ;extension=mysql.so,
you get a blank page in your browser after running the script in
config/index.php.  Here is a patch to make it painfully clear what
is going wrong in this situation.  It checks for mysql prior to
asking you to fill out that form.

--
Joshua Swink
yathster at yahoo.com

-------------- next part --------------
--- config/index.php.old	2004-05-23 18:03:30.000000000 -0700
+++ config/index.php	2004-06-08 20:20:25.000000000 -0700
@@ -150,6 +150,22 @@
 	</pre>" );
 }
 
+if ( !function_exists( "mysql_connect") ) {
+	dieout( "<h2 style=\"color: red\">MySQL functionality not present!</h2>
+
+	<p>I'm unable to use the function <strong>mysql_connect</strong>.  This
+	indicates that MySQL database software isn't usable by the wiki at
+	this point.  You might need to add the following line to your
+	<tt><strong>php.ini</strong></tt> file (or just uncomment it):</p>
+
+	<blockquote><strong><tt>extension=mysql.so</tt></strong></blockquote>
+
+	<p>If this line is already present in php.ini, remove the semicolon;
+	otherwise, add the line.  Then restart the webserver, and reload this
+	page.  If that doesn't work, it may be that PHP hasn't been set up to
+	interface with MySQL (unlikely), or that your MySQL setup has
+	problems.</p>");
+}
 
 require( "../install-utils.inc" );
 require( "../maintenance/updaters.inc" );


More information about the MediaWiki-l mailing list