<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mysql &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Sat, 03 May 2025 09:03:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Setting the time machine for June 20th 2011</title>
		<link>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/</link>
					<comments>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 10 Mar 2022 07:53:32 +0000</pubDate>
				<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wikipedia]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11780</guid>

					<description><![CDATA[No, not that time machine, this one is a rehash of the old local Wikipeida mirror. So sadly I didn&#8217;t keep the source files as I thought they were evergreen, and yeah turns out they are NOT. But thankfully there &#8230; <a href="https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="474" height="293" src="https://virtuallyfun.com/wp-content/uploads/2022/03/OIP.jpg" alt="" class="wp-image-11781"/><figcaption>John Titor hunting Orange wine, and IBM 5100&#8217;s</figcaption></figure>



<p class="wp-block-paragraph">No, not that time machine, this one is a rehash of the old <a href="/wordpress/2014/04/15/mirroring-wikipedia/" target="_blank" rel="noreferrer noopener">local Wikipeida mirror</a>.</p>



<p class="wp-block-paragraph">So sadly I didn&#8217;t keep the source files as I thought they were evergreen, and yeah turns out they are NOT.  But thankfully there is a 2011 set on archive.org listed as <a rel="noreferrer noopener" href="https://archive.org/details/enwiki-20110620-item-1-of-2" target="_blank">enwiki-20110620-item-1-of-2</a> and <a rel="noreferrer noopener" href="https://archive.org/download/enwiki-20110620-item-2-of-2" target="_blank">enwiki-20110620-item-2-of-2</a>.  Sadly there isn&#8217;t any torrents of these files, and it seems as of today the internet archive torrent servers are dead so a direct download is needed.</p>



<h2 class="wp-block-heading">Getting started</h2>



<p class="wp-block-paragraph">You are going to need a LOT of disk space.  It&#8217;s about 10GB for the downloaded compressed data, and with the pages blown out to a database it&#8217;s ~60GB.  Yes it&#8217;s massive.  Also enough space for a <a href="https://cdimage.debian.org/cdimage/archive/7.11.0/amd64/iso-dvd/" target="_blank" rel="noreferrer noopener">Debian 7 VM</a>, or a lot of your time trying to decode ancient perl. Yes it really is a write only language. I didn&#8217;t bother trying to figure out why it doesn&#8217;t work instead I used netcat and a Debian 7 VM.</p>



<p class="wp-block-paragraph">Thanks to trn he suggested <a href="https://github.com/aria2/aria2" target="_blank" rel="noreferrer noopener">aria2c</a> which did a great job of downloading stuff, although one URL at a time, but that&#8217;s fine.</p>



<pre class="wp-block-code"><code>aria2c -x 16 -s 16 -j 16 &lt;&lt;URL&gt;&gt;</code></pre>



<p class="wp-block-paragraph">I downloaded the following files:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<ul class="wp-block-list"><li>enwiki-20110620-all-titles-in-ns0.gz</li><li>enwiki-20110620-category.sql.gz</li><li>enwiki-20110620-categorylinks.sql.gz</li><li>enwiki-20110620-externallinks.sql.gz</li><li>enwiki-20110620-flaggedpages.sql.gz</li><li>enwiki-20110620-flaggedrevs.sql.gz</li><li>enwiki-20110620-image.sql.gz</li><li>enwiki-20110620-imagelinks.sql.gz</li><li>enwiki-20110620-interwiki.sql.gz</li><li>enwiki-20110620-iwlinks.sql.gz</li><li>enwiki-20110620-langlinks.sql.gz</li><li>enwiki-20110620-oldimage.sql.gz</li><li>enwiki-20110620-page.sql.gz</li><li>enwiki-20110620-pagelinks.sql.gz</li><li>enwiki-20110620-pages-articles.xml.bz2</li><li>enwiki-20110620-pages-logging.xml.gz</li><li>enwiki-20110620-page_props.sql.gz</li><li>enwiki-20110620-page_restrictions.sql.gz</li><li>enwiki-20110620-protected_titles.sql.gz</li><li>enwiki-20110620-redirect.sql.gz</li><li>enwiki-20110620-site_stats.sql.gz</li><li>enwiki-20110620-templatelinks.sql.gz</li><li>enwiki-20110620-user_groups.sql.gz</li></ul>
</div></div>



<p class="wp-block-paragraph">although the bulk of what you want as a single file is enwiki-20110620-pages-articles.xml.bz2, which is 7.5 GB, downloading the rest of the files is another 10GB rouding this out to 17.5GB of files to download. Yikes!</p>



<h2 class="wp-block-heading">MySQL on WSLv2</h2>



<p class="wp-block-paragraph">I&#8217;m using Ubuntu 20.04 LTS on Windows 11, so adding MySQL is done via the MariaDB version with a simple apt-get install:</p>



<pre class="wp-block-code"><code>apt-get install mariadb-server mariadb-common mariadb-client mariadb-common</code></pre>



<p class="wp-block-paragraph">Installing MySQL is kind of easy although it will need to be setup to assign the pid file to the right place and set so it can write to it:</p>



<pre class="wp-block-code"><code>mkdir -p /var/run/mysqld<br>chown mysql:mysql /var/run/mysqld</code></pre>



<p class="wp-block-paragraph">Otherwise you&#8217;ll get this:</p>



<pre class="wp-block-preformatted">[ERROR] mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 "No such file or directory")</pre>



<p class="wp-block-paragraph">Additionally you&#8217;ll need to tell it to bind to 0.0.0.0 instead of 127.0.0.1 as we&#8217;ll want this on the network.  I&#8217;m on an isolated LAN so it&#8217;s fine by me, but of course your millage may vary. For me a simple diff of the config directory is this:</p>



<pre class="wp-block-code"><code>diff -ruN etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
--- etc/mysql/mariadb.conf.d/50-server.cnf      2021-11-21 08:22:31.000000000 +0800
+++ /etc/mysql/mariadb.conf.d/50-server.cnf     2022-03-11 10:01:45.369272200 +0800
@@ -27,7 +27,7 @@

 # Instead of skip-networking the default is now to listen only on
 # localhost which is more compatible and is not less secure.
-bind-address            = 127.0.0.1
+bind-address            = 0.0.0.0

 #
 # * Fine Tuning
@@ -43,6 +43,11 @@
 #max_connections        = 100
 #table_cache            = 64

+key_buffer_size = 1G
+max_allowed_packet = 1G
+query_cache_limit = 18M
+query_cache_size = 128M
+
 #
 # * Logging and Replication
 #</code></pre>



<p class="wp-block-paragraph">As far as I know MySQL doesn&#8217;t run on WSLv1.  So people with that restriction are kind of SOL.  At the same time for me, Debian 7 doesn&#8217;t run on Hyper-V so I had to run VMware Player.  And well if you can&#8217;t run Hyper-V/WSLv2 then you can run it all on Debian 7 which is probably eaiser.  Although you&#8217;ll probably hit some performance issues in the import that either my machine is fast enough I don&#8217;t care or the newer stuff is pre-configured for machines larger than an ISA/PCI gen1 Pentium 60.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/mysqld-running-on-wslv2.png"><img decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2022/03/mysqld-running-on-wslv2.png" alt="" class="wp-image-11782"/></a></figure></div>



<p class="wp-block-paragraph">I run mysqld manually in a window as I am only doing this adhoc not as a service. Although on a Windows 10 machine to reproduce and test this, mysqld wont run interactively, instead I had to do the &#8216;service mysql start&#8217; to get it running.  So I guess you&#8217;ll have to find out the hard way.</p>



<p class="wp-block-paragraph">Next, be sure to create the database and a user to so this will work:</p>



<pre class="wp-block-code"><code>create database wikidb;<br>create user 'wikiuser'@'%' IDENTIFIED BY 'password';<br>GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'%' WITH GRANT OPTION;<br>show grants for 'wikiuser'@'%';</code></pre>



<p class="wp-block-paragraph">Something like this works well. Yes the password is password but it&#8217;s all internal so who cares.  If you don&#8217;t like it, change it as needed.</p>



<p class="wp-block-paragraph">With the database &amp; user created you&#8217;ll want to make sure  that you can connect from the Debian 7 machine with something like this:</p>



<pre class="wp-block-code"><code>mysql -h 192.168.6.10 -uwikiuser -ppassword wikidb</code></pre>



<p class="wp-block-paragraph">As I don&#8217;t think PHP 7 or whatever is modern will run the ancient MediaWiki version 1.15.5 (which I&#8217;m using).</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="375" height="149" src="https://virtuallyfun.com/wp-content/uploads/2022/03/wiki-versions.png" alt="" class="wp-image-11784"/></figure></div>



<p class="wp-block-paragraph">This is my setup as I&#8217;m writing this so bear with me.</p>



<h2 class="wp-block-heading">Prepping Apache</h2>



<p class="wp-block-paragraph">Since I have that Debian 7 VM, I used that for setting up MediaWiki. Looking at my apt-cache I believe I loaded the following modules:</p>



<ul class="wp-block-list"><li>mysql-client</li><li>mysql-common</li><li>apache2</li><li>apache2.2-bin</li><li>apache2.2-common</li><li>apache2-mpm-prefork</li><li>apache2-mpm-worker</li><li>apache2-utils</li><li>libapache2-mod-php5</li><li>php5-cli</li><li>php5-common</li><li>php5-mysql</li><li>lua5.1</li><li>liblua5.1</li></ul>



<p class="wp-block-paragraph">On the Apache side I have the following extension enabled:</p>



<pre class="wp-block-preformatted">alias authz_default authz_user deflate mime reqtimeout<br>auth_basic authz_groupfile autoindex dir negotiation setenvif<br>authn_file authz_host cgi env php5 status</pre>



<p class="wp-block-paragraph">Which I think is pretty generic.</p>



<p class="wp-block-paragraph">I used <a rel="noreferrer noopener" href="https://releases.wikimedia.org/mediawiki/1.15/" target="_blank">mediawiki-1.15.5</a> as the basis mostly because I had started with an incomplete 2010 dump, but after finding this 2011 dump I probably should have gone with 1.16.5 or 1.17.5.. Oh well.  When connecting from Debian 7 to my &#8216;modern&#8217; MariaDB there is one table that needs to be updated, otherwise it&#8217;ll fail.  A simple diff that needs to be applied (that was with the least amount of effort spent by me!) is this:</p>



<pre class="wp-block-code"><code>--- maintenance/tables.sql      2009-03-20 19:20:39.000000000 +0800
+++ /var/www/maintenance/tables.sql     2022-03-07 14:21:25.580318700 +0800
@@ -1099,7 +1099,7 @@

 CREATE TABLE /*_*/trackbacks (
   tb_id int PRIMARY KEY AUTO_INCREMENT,
-  tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE,
+  tb_page int,
   tb_title varchar(255) NOT NULL,
   tb_url blob NOT NULL,
   tb_ex text,</code></pre>



<p class="wp-block-paragraph">All being well and patched you can do the install!  I just do a super basic install, nothing exciting.  In my setup the MySQL server is on 192.168.6.10.  I don&#8217;t think I changed much of anything?</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-preinstall.png"><img loading="lazy" decoding="async" width="1568" height="2602" src="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-preinstall.png" alt="" class="wp-image-11787"/></a></figure></div>



<p class="wp-block-paragraph">And with that done if all goes well you&#8217;ll get the install completed!</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-postinstall.png"><img loading="lazy" decoding="async" width="1086" height="698" src="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-postinstall.png" alt="" class="wp-image-11788"/></a></figure></div>



<p class="wp-block-paragraph">If you get anything else, drop the database (the permission grants stay, because MySQL doesn&#8217;t actually drop thing associated with databases.. :shrug:.</p>



<p class="wp-block-paragraph">Next in the extensions folder I grabbed Scribunto-REL1_35-04b897f.tar.gz, <a rel="noreferrer noopener" href="https://extdist.wmflabs.org/dist/extensions/" target="_blank">which is still on the extensions site</a>. This required Lua 5.1 and the following to be appended to the LocalSetings.php</p>



<pre class="wp-block-code"><code>#
$wgScribuntoEngineConf&#91;'luastandalone']&#91;'luaPath'] = '/usr/bin/lua5.1';

$wgScribuntoUseGeSHi = true;
$wgScribuntoUseCodeEditor = true;
#</code></pre>



<p class="wp-block-paragraph">Keep in mind the original extensions I used are not, and appear to not have been archived, so yeah.</p>



<h2 class="wp-block-heading">Doing the pages.xml import</h2>



<p class="wp-block-paragraph">You can find the <a rel="noreferrer noopener" href="https://web.archive.org/web/20111126152510/http://meta.wikimedia.org/wiki/Data_dumps/mwimport" target="_blank">version 0.5 media wiki import script</a> on archive.org.  Obviously check the first 5-10 lines of the decompressed bz2 file to see what version you have if you are deviating and look around IA to time travel to see if there is a matching one.  I have no idea about modern ones as this is hard enough trying to reproduce an old experiment.</p>



<p class="wp-block-paragraph">First you need to make some files to setup the pre-post conditions of the insert.  It&#8217;s about 11,124,050 pages, give or take.</p>



<p class="wp-block-paragraph">pre.sql</p>



<pre class="wp-block-code"><code>SET autocommit=0;<br>SET unique_checks=0;<br>SET foreign_key_checks=0;<br>BEGIN;</code></pre>



<p class="wp-block-paragraph">post.sql</p>



<pre class="wp-block-code"><code>COMMIT;<br>SET autocommit=1;<br>SET unique_checks=1;<br>SET foreign_key_checks=1;</code></pre>



<p class="wp-block-paragraph">Running the actual import</p>



<p class="wp-block-paragraph">I&#8217;m assuming that 192.168.6.33 is the Debian 7 machine, 192.168.6.10 is the Windows 11 machine.</p>



<p class="wp-block-paragraph">On the machine with the data:</p>



<pre class="wp-block-code"><code>netcat 192.168.6.33 9909 &lt; enwiki-latest-pages-articles.xml.bz2</code></pre>



<p class="wp-block-paragraph">On the machine that can run the mwimport script:</p>



<pre class="wp-block-code"><code>netcat -l -p 9909 | bzip2 -dc | ./mwimport-0.5.pl | netcat 192.168.6.10 9906</code></pre>



<p class="wp-block-paragraph">And finally on the MySQL machine:</p>



<pre class="wp-block-code"><code>(cat pre.sql; netcat -l -p 9906 ; cat post.sql) | mysql -f --default-character-set=utf8 wikidb</code></pre>



<p class="wp-block-paragraph">Since I&#8217;m using WSLv2 the Windows firewall may screw stuff up so add a rule with netsh (as Administrator CMD prompt)</p>



<pre class="wp-block-code"><code>netsh interface portproxy add v4tov4 listenaddress=192.168.6.10 listenport=3306 connectaddress=172.24.167.66 connectport=3306<br>netsh interface portproxy add v4tov4 listenaddress=192.168.6.10 listenport=9906 connectaddress=172.24.167.66 connectport=9906</code></pre>



<p class="wp-block-paragraph">On my setup it takes about 2.5 hours to load the database, which will be about 51GB.</p>



<pre class="wp-block-preformatted">11340000 pages (1231.805/s),  11340000 revisions (1231.805/s) in 9206 seconds</pre>



<p class="wp-block-paragraph">The savvy among you may notice the -f flag to the mysql parser.  And yes that is because there *<em>will</em>* be errors during the process.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2022/03/wikidb-import-errors.png" alt="" class="wp-image-11785"/></figure></div>



<p class="wp-block-paragraph">I&#8217;m not sure what how or what to do about it, but without the -f (force) flag the process will stop around the 2 million row mark.  Doing it forced allows the process to continue.</p>



<p class="wp-block-paragraph">With that done I get the following tallies&#8230;</p>



<pre class="wp-block-code"><code>MariaDB &#91;(none)]&gt; SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES    WHERE TABLE_SCHEMA = 'wikidb' and
table_rows &gt; 0;
+---------------+------------+
| table_name    | table_rows |
+---------------+------------+
| interwiki     |         85 |
| objectcache   |         10 |
| page          |   10839464 |
| revision      |   11357659 |
| text          |   14491759 |
| user_groups   |          2 |
+---------------+------------+
9 rows in set (0.002 sec)</code></pre>



<p class="wp-block-paragraph">If all of this worked (amazing!) then search for something like 1001 and be greeted with:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/1001-a-non-odyssey.png"><img loading="lazy" decoding="async" width="989" height="672" src="https://virtuallyfun.com/wp-content/uploads/2022/03/1001-a-non-odyssey.png" alt="" class="wp-image-11792"/></a><figcaption>1001: a non odyssey</figcaption></figure>



<h2 class="wp-block-heading">MySQL disappointments</h2>



<p class="wp-block-paragraph">So with this in place, having some 51GB laying around just seemed lame.  Using WSLv2 I setup a compressed folder on NTFS and moved the data directory into there and it gets it down to a somewhat more manageable 20GB.  Since the data doesn&#8217;t change I had a better idea, SquashFS.  Well it compresses down to 12GB, HOWEVER for the life of me I can&#8217;t find anything concrete on using a read only backing store to MySQL.  Even general mediawiki stuff seems to want to write to all the tables, I guess it&#8217;s index searching?!  Insane!  And it appears MySQL can only use single file storage units per table?  Yeah this isn&#8217;t MSSQL with stuff like a database from CD-ROM with the log on a floppy.  I tried doing a union overlay filesytem but it makes a 100% copy of a file that changes.  That&#8217;s not good.  I guess using qemu-img for a compressed qcow2 with a writable diff file could hide the read only compressed backing store, but  I&#8217;ve already lost interest.</p>



<p class="wp-block-paragraph">Maybe it&#8217;s just me, but it seems like there should be a way to write logs/updates/scratch to a RW place, and keep the majority of the data read-only (and highly compressed).</p>



<h2 class="wp-block-heading">Why doesn&#8217;t stuff format correctly</h2>



<p class="wp-block-paragraph">There seems to be a lot of formatting nonsense going on, I probably should step up to mediawiki 1.17.  And I&#8217;ll add in loading the other SQL tables since they are straight up inserts.  Also the extensions I know I loaded don&#8217;t seem to exist in any form anymore, and the images I snapshotted of the install are all long gone.  It&#8217;ll require more diving around.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Reviving 20 year old web forum software</title>
		<link>https://virtuallyfun.com/2019/07/21/reviving-20-year-old-web-forum-software/</link>
					<comments>https://virtuallyfun.com/2019/07/21/reviving-20-year-old-web-forum-software/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Sun, 21 Jul 2019 17:41:18 +0000</pubDate>
				<category><![CDATA[forums]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=9630</guid>

					<description><![CDATA[(This is a guest post by&#160;xorhash.) What makes you nostalgic? I don&#8217;t know about you, but for me, it&#8217;s definitely early 2000s web forums. Names like vBulletin, UltimateBB, phpBB, YaBB, IkonBoard, â€¦ bring a smile to my face. Thus, I &#8230; <a href="https://virtuallyfun.com/2019/07/21/reviving-20-year-old-web-forum-software/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>(This is a guest post by&nbsp;<a href="https://twitter.com/xorhash">xorhash</a>.)</em></p>



<p class="wp-block-paragraph">What makes you nostalgic? I don&#8217;t know about you, but for me, it&#8217;s definitely early 2000s web forums. Names like vBulletin, UltimateBB, phpBB, YaBB, IkonBoard, â€¦ bring a smile to my face. Thus, I figured it would be time to revisit the oldest vBulletin I could get my hands on. As it turns out,&nbsp;<a href="https://web.archive.org/web/20000926005905/http://vbulletin.com/download/">vBulletin used to offer â€œvBulletin Liteâ€</a>&nbsp;back in the year&nbsp;2000, which is a version of vBulletin&nbsp;1.x stripped down so much, it almost stops being vBulletin.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="761" height="420" src="https://virtuallyfun.com/wp-content/uploads/2019/07/index.png" alt="" class="wp-image-9631" srcset="https://virtuallyfun.com/wp-content/uploads/2019/07/index.png 761w, https://virtuallyfun.com/wp-content/uploads/2019/07/index-300x166.png 300w" sizes="auto, (max-width: 761px) 100vw, 761px" /></figure></div>



<p class="wp-block-paragraph">Because they hid it behind a form, the web archive didn&#8217;t quite catch it, but I managed to find a different copy online, which&nbsp;<em>seems</em>&nbsp;pristine enough at least:&nbsp;<a href="https://virtuallyfun.com/wp-content/uploads/2019/07/vbulletinlite101.zip">vbulletinlite101.zip</a></p>



<p class="wp-block-paragraph">So that&#8217;s just a bunch of code. I could just get a period-appropriate Red&nbsp;Hat&nbsp;9 installation going, but that&#8217;d be&nbsp;<em>boring</em>. How much work could it possibly be to get this to run? In hindsight: just about six&nbsp;hours. Please allow me to say that the code is of rather questionable quality.&nbsp;<strong>Do not expose this to the Internet</strong>. Without even trying, I found at least two SQL injections. Every SQL injection immediately leads to code execution under PHP as well since the templates are interpreted using&nbsp;<code>eval()</code>. And so I set out on my quest to port this to a modern OS.</p>



<table>
  <tr><th>Software</th><th>Original Requirement</th><th>My Version</th></tr>
  <tr><td>Operating System</td><td>&ldquo;different flavours of UNIX, as well as Windows&nbsp;NT/98&rdquo;</td><td>Ubuntu&nbsp;19.04</td></tr>
  <tr><td>Interpreter</td><td>PHP&nbsp;3.0.9</td><td>PHP&nbsp;7.2.19</td></tr>
  <tr><td>Database</td><td>MySQL&nbsp;3.22</td><td>MariaDB&nbsp;10.3.13</td></tr>
</table>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="759" height="436" src="https://virtuallyfun.com/wp-content/uploads/2019/07/forumdisplay.png" alt="" class="wp-image-9633" srcset="https://virtuallyfun.com/wp-content/uploads/2019/07/forumdisplay.png 759w, https://virtuallyfun.com/wp-content/uploads/2019/07/forumdisplay-300x172.png 300w" sizes="auto, (max-width: 759px) 100vw, 759px" /></figure>



<p class="wp-block-paragraph">The details of this are rather boring, so allow me to point out some highlights and discoveries made while digging through the code:</p>



<ul class="wp-block-list"><li><strong>50&nbsp;reply limit</strong>: Threads were limited to 50&nbsp;replies. There was no pagination. Any replies beyond that would just replace the most recent post. I&#8217;m not sure if this was an attempt at preventing server and client load from excessively large pages or an attempt to â€œencourageâ€ people to actually buy vBulletin.</li><li><strong>No accounts</strong>: Unlike vBulletin&nbsp;1.x, there were no accounts. All posts would just have a username field and an optional field for an e-mail address; even if provided, the e-mail address does not get verified.</li><li><strong>No thread/post management</strong>: There&#8217;s no way to conveniently delete threads or posts, leaving the forums completely defenseless against spam. I suspect this was by design, so that nobody would stick with vBulletin Lite.</li><li><strong>Icon plagiarism</strong>: The icons for the â€œsearchâ€ and â€œhomeâ€ buttons are actually taken from Internet Explorer&nbsp;4. For comparison, here are the buttons in Internet Explorer:</li></ul>



<center><img decoding="async" src="https://virtuallyfun.com/wp-content/uploads/2019/07/ie4-search.jpg" alt="Internet Explorer 4 search button">
<img decoding="async" src="https://virtuallyfun.com/wp-content/uploads/2019/07/IE4-home.jpg" alt="Internet Explorer 4 home button"></center>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="760" height="588" src="https://virtuallyfun.com/wp-content/uploads/2019/07/showthread.png" alt="" class="wp-image-9637" srcset="https://virtuallyfun.com/wp-content/uploads/2019/07/showthread.png 760w, https://virtuallyfun.com/wp-content/uploads/2019/07/showthread-300x232.png 300w" sizes="auto, (max-width: 760px) 100vw, 760px" /></figure></div>



<ul class="wp-block-list"><li><strong>Questionable security</strong>: vBulletin Lite was not a pinnacle of secure and defensive coding. Though some efforts were made (e.â€‰g. using&nbsp;<a href="https://www.php.net/manual/en/function.addslashes.php"><code>addslashes()</code></a>, which is nowadays considered inappropriate, but was all that what was available at the time in PHP&nbsp;3), they were not thorough and overlooked spots. When encountering a database error, the&nbsp;<em>actual</em>&nbsp;SQL query and error details would be shown in an HTML comment on the error page, greatly helping attackers build their SQL injection even without source code available. The admin control panel password is stored in plaintext: on the server as well as in the cookie that persists an admin session. I&#8217;m also not sold on using&nbsp;<code>eval()</code>&nbsp;for interpreting templates from the database.</li><li><strong>Filenames ending in .php3</strong>: Back then, it was common for PHP scripts to have a filename ending in .php3, though I couldn&#8217;t find the exact reason why this used to be common practice (possibly to allow PHP/FI&nbsp;2.0 and PHP&nbsp;3.0 to co-exist, maybe?). Nowadays, everything&#8217;s normally just a .php file.</li><li><strong>register_globals was very much a thing</strong>: The PHP (anti-)feature&nbsp;<a href="https://www.php.net/manual/en/security.globals.php">register_globals</a>&nbsp;caused request parameters and cookies to be turned into global variables in the script, e.â€‰g. https://www.php.example/test.php?x=1 would set&nbsp;<code>$x</code>&nbsp;to&nbsp;<code>1</code>. vBulletin Lite relied on register_globals existing and working. PHP removed it in version&nbsp;5.4, so a lot of request handling needed to be changed for vBulletin Lite to work at all.</li><li><strong>MySQL has implicit defaults</strong>: Apparently, if strict mode is not enabled,&nbsp;<a href="https://www.php.net/manual/en/function.mysql-real-escape-string.php#data-types-defaults-implicit">MySQL has implicit defaults for various data types</a>. vBulletin Lite relied on this behavior, much to my surprise. I&#8217;m not sure who thought this was a good feature, but it sure surprised me.</li></ul>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="803" height="464" src="https://virtuallyfun.com/wp-content/uploads/2019/07/acp.png" alt="" class="wp-image-9638" srcset="https://virtuallyfun.com/wp-content/uploads/2019/07/acp.png 803w, https://virtuallyfun.com/wp-content/uploads/2019/07/acp-300x173.png 300w, https://virtuallyfun.com/wp-content/uploads/2019/07/acp-768x444.png 768w" sizes="auto, (max-width: 803px) 100vw, 803px" /></figure></div>



<ul class="wp-block-list"><li><strong>Password caching until exactly 2020</strong>: When successfully logging into the admin control panel, a cookie â€œcontrolpasswordâ€ is set. It is hardcoded to expire at the beginning of 2020â€”next year. I&#8217;m glad I didn&#8217;t have to try and debug that subtle issue. My patch makes it so that the cookie expires at the start of the next year.</li><li><strong>A typo in the admin control panel</strong>: In&nbsp;<code>admin/forum.php</code>, deletion of a forum should bring the list of forums again. However, due to a typo (â€œmodfiyâ€ instead of â€œmodifyâ€), the page instead stays blank. I also took the liberty to fix this obvious bug.</li><li><strong>Feature remnants</strong>: vBulletin Lite kind of looks like a rushjob; I&#8217;d love to find out if that&#8217;s true. There are leftovers of various features, which manifest themselves in stray variables being referenced but never set. For example, the e-mail field in the template for the&nbsp;<code>newthread.php</code>&nbsp;page actually references&nbsp;<code>$password</code>, which nothing else ever reads or sets. Similarly,&nbsp;<code>forumdisplay.php</code>&nbsp;references a&nbsp;<code>$datecut</code>&nbsp;variable, which I assume regular vBulletin&nbsp;1.x would use to prune old threads by date (to save space on the database?).</li><li><strong>Ampersands in HTML</strong>: vBulletin had literal ampersands (&amp;) in the templates, namely in links. Firefox complains about this nowadays and expects&nbsp;<code>&amp;amp;</code>&nbsp;even in&nbsp;<code>&lt;a href&gt;</code>, but I didn&#8217;t want to touch that because I&#8217;m afraid I might break an old browser by changing this behavior.</li></ul>



<p class="wp-block-paragraph"> As mentioned above, I&nbsp;<strong>made a patch for vBulletin Lite&nbsp;1.0.1</strong>&nbsp;to make it work with modern versions of PHP and MySQL:&nbsp;<a href="https://virtuallyfun.com/wp-content/uploads/2019/07/vbulletinlite101-2019.zip">vbulletinlite101-2019.diff</a><br>Applying it requires some preparation (renaming the files from .php3 to .php and adjusting the names of included files ahead of time); after that, it should apply cleanly: </p>



<pre>$ for i in *.php3; do mv $i $(basename $i .php3).php; done
$ cd admin && for i in *.php3; do mv $i $(basename $i .php3).php; done
$ cd .. && find . -name "*.php" -exec sed -i 's/php3/php/g' {} \;
$ patch -p1 < PATH_TO_PATCH.diff</pre>



<p class="wp-block-paragraph">vBulletin Lite had a mechanism that would send e-mail a configurable address about SQL errors. I ended up disabling that in&nbsp;<code>db_mysql.php</code>, spilling the error onto the page and kept that behavior in the patch to make debugging easier (since this has no business running in production anymore anyway). See the areas marked with TODO if you want to undo that after all.</p>



<p class="wp-block-paragraph">I used the newÂ <code>??</code>Â syntax introduced in PHPÂ 7, so this patch may not immediately work with PHPÂ 5, though the worst grunt work has already been taken care of.</p>



<p class="wp-block-paragraph">And for those who want to give it a kick, I put one up on  <a href="https://vbulletin.virtuallyfun.com/">vbulletin.virtuallyfun.com</a>. </p>



<hr class="wp-block-separator"/>



<p class="wp-block-paragraph">The&nbsp;<a href="https://web.archive.org/web/20000926005905/http://vbulletin.com/download/">website that used to host vBulletin Lite</a>&nbsp;notes that â€œvBulletin Lite may be modified for your own use only. Under no circumstances may any modified vBulletin Lite code be distributedâ€.</p>



<p class="wp-block-paragraph"><em>I hope that separating this into a pristine archive and a patchâ€”with no functional changesâ€”is good enough. Should this still not be enough for the rightsholders (currently MH&nbsp;Sub&nbsp;I,&nbsp;LLC dba vBulletin), takedown requests will of course be honored.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2019/07/21/reviving-20-year-old-web-forum-software/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>More pointless site updates&#8230;</title>
		<link>https://virtuallyfun.com/2017/09/13/pointless-site-updates/</link>
					<comments>https://virtuallyfun.com/2017/09/13/pointless-site-updates/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Wed, 13 Sep 2017 14:53:38 +0000</pubDate>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=7338</guid>

					<description><![CDATA[Debian 9&#8230; time flies. Â Also moved from MySQL to MariaDB version: 10.1 Oh and from PHP v5 to PHP v7. I guess if you can read this, then it&#8217;s still working&#8230;. Looks like the MariaDB migration had some weird and &#8230; <a href="https://virtuallyfun.com/2017/09/13/pointless-site-updates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Debian 9&#8230; time flies. Â Also moved from MySQL to MariaDB version: 10.1</p>
<p>Oh and from PHP v5 to PHP v7.</p>
<p>I guess if you can read this, then it&#8217;s still working&#8230;.</p>
<p>Looks like the MariaDB migration had some weird and under-performing defaults. Â So I <a href="https://github.com/atcurtis/mariadb/blob/master/support-files/my-large.cnf.sh">found this my.cnf</a> to at least pick up some new defaults. Â I don&#8217;t see any my-huge.cnf on this Debian install so yeah&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2017/09/13/pointless-site-updates/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Mirroring Wikipedia</title>
		<link>https://virtuallyfun.com/2014/04/15/mirroring-wikipedia/</link>
					<comments>https://virtuallyfun.com/2014/04/15/mirroring-wikipedia/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 14 Apr 2014 23:00:36 +0000</pubDate>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random updates]]></category>
		<category><![CDATA[wikipedia]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=3953</guid>

					<description><![CDATA[So I had an internet outage, and was thinking if I was trapped on my proverbial desert island what would I want with me? Well wikipedia would be nice! So I started with this extreme tech article by Sebastian Anthony, &#8230; <a href="https://virtuallyfun.com/2014/04/15/mirroring-wikipedia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>So I had an internet outage, and was thinking if I was trapped on my proverbial desert island what would I want with me?</p>
<p>Well <a href="http://en.wikipedia.org/wiki/Main_Page">wikipedia</a> would be nice!</p>
<p>So I started with <a href="http://www.extremetech.com/computing/114387-how-to-set-up-your-own-copy-of-wikipedia">this extreme tech article by Sebastian Anthony</a>, although it has since drifted out of date on a few things.</p>
<p>But it is enough to get you started.</p>
<p>I downloaded my XML dump from <a href="http://wikipedia.c3sl.ufpr.br/enwiki/20140304/">Brazil</a> like he mentions.  The files I got were:</p>
<ul>
<li>enwiki-20140304-pages-articles.xml.bz2 10G</li>
<li>enwiki-20140304-all-titles-in-ns0.gz 58MB</li>
<li>enwiki-20140304-interwiki.sql.gz 728Kb</li>
<li>enwiki-20140304-redirect.sql.gz 91MB</li>
<li>enwiki-20140304-protected_titles.sql.gz 887Kb</li>
</ul>
<p>The pages-articles.xml is required.  I added in the others in the hopes of fixing some formatting issues.  I re-compressed it from 10GB using Bzip2 to 8.4GB with 7zip.  It’s still massive, but when you are on a ‘slow’ connection every saved GB matters.</p>
<p>Since I already have apache/php/mysql running on my Debian box, I can’t help you with a virgin install.  I would say it’s pretty much like every other LAMP install.</p>
<p>Although I did *NOT* install phpmyadmin.  I’ve seen too many holes in it, and I prefer the command line anyways.</p>
<p>First, I connect to my database instance:</p>
<blockquote><p>mysql -uroot -pMYBADPASSWORD</p></blockquote>
<p>And then execute the following:</p>
<blockquote><p>create database wikimirror;<br />
create user ‘wikimirror’@’localhost’ IDENTIFIED BY ‘MYOTHERPASSWORD’;<br />
GRANT ALL PRIVILEGES ON wikimirror.* TO ‘wikimirror’@’localhost’ WITH GRANT OPTION;<br />
show grants for ‘wikimirror’@’localhost’;</p></blockquote>
<p>This creates the database, adds the user and grants them permission.</p>
<p>Downloading and setting up <a href="https://web.archive.org/web/20171008221451/http://releases.wikimedia.org/mediawiki/1.22/mediawiki-1.22.5.tar.gz">mediawiki 1.22.5</a> is pretty straight forward.  There is one big caveat I found though.  InnoDB is incredibly slow for loading the database. I spent a good 30 minutes trying to find a good solution before going back to MyISAM with utf8 support.</p>
<p>With the empty site created, I do a quick backup in case I want to purge what I have.</p>
<blockquote><p>/usr/bin/mysqldump -uwikimirror -pw1k1p3d1a wikimirror &gt; /usr/local/wikipedia/wikimedia-1.22.5-empty.sql</p></blockquote>
<p>This way I can quickly revert as constantly re-installing mediawiki is… a pain.  And it gets repetitive which is good for introducing errors, so it’s far easier to dump the database/user and re-create them, and reload the empty database.</p>
<p>When I was using InnoDB, I was getting a mere 163 inserts a second. That means it would take about <strong>24 hours to import the entire database!!  </strong>Which simply is not good enough for someone as impatient as me.  As of this latest dump there are 14,313,024 records that need to be inserted, which would take the better part of <em>forever</em> to do.</p>
<p>So, let’s make some changes to the MySQL server config.  Naturally backup your existing /etc/mysql/my.cnf to something else, then I added the following bits:</p>
<blockquote><p>key_buffer = 1024M<br />
max_allowed_packet = 384M<br />
query_cache_limit = 18M<br />
query_cache_size = 128M</p></blockquote>
<p>I should add that I have a lot of system RAM available.  And that my box is running Debian 7.1 x64_86.</p>
<p>Next you’ll want a slightly modified import program,  I used the one from <a href="https://web.archive.org/web/20171008221451/http://tsikerdekis.wuwcorp.com/WikipediaDumpstoMysql">Michael Tsikerdekis’s site</a>, but I did modify it to run the ‘precommit’ portion on it’s own.  I did this because I didn’t want to decompress the massive XML file on the filesystem.  I may have the space but it just seems silly.</p>
<p>With the script ready we can import!  Remember to restart the mysql server, and make sure it’s running correctly.  Then you can run:</p>
<blockquote><p>bzcat enwiki-20140304-pages-articles.xml.bz2 | perl ./mwimport2 | mysql -f -u wikimirror -pMYOTHERBADPASSWORD Â â€“default-character-set=utf8 wikimirror</p></blockquote>
<p>And then you’ll see the progress flying by.  While it is loading you should be able to hit a random page, and get back some wikipedia looking data.  If you get an error well obviously something is wrong…</p>
<p>With my slight moddifications I was getting about 1000 inserts a second, which gave me…</p>
<blockquote>
<blockquote><p> 14313024 pages (1041.174/s),  14313024 revisions (1041.174/s) in 13747 seconds</p></blockquote>
</blockquote>
<p>Which ran in just under four hours.  Not too bad!</p>
<p>With the load all done, I shut down mysql, and then copy back the first config.  For the fun of it I did add in the following for day to day usage:</p>
<blockquote><p>key_buffer = 512M<br />
max_allowed_packet = 128M<br />
query_cache_limit = 18M<br />
query_cache_size = 128M</p></blockquote>
<p>I should add that the ‘default’ small config was enough for me to withstand over 16,000 hits a day when I got listed on reddit.  So it’s not bad for small-ish databases (my wordpress is about 250MB) that see a lot of action, but wikipedia is about 41GB.</p>
<p>Now for the weird stuff.  There is numerous weird errors that’ll appear on the pages.  I’ve tracked the majority down to lua scripting now being enabled on the template pages of wikipedia.  So you need to enable lua on your server, and setup the lua extensions.</p>
<p>The two that just had to be enabled to get things looking half right are:</p>
<ul>
<li><a href="http://www.mediawiki.org/wiki/Extension_talk:Lua">Lua</a></li>
<li><a href="http://www.mediawiki.org/wiki/Extension:Scribunto">Scribunto</a></li>
</ul>
<p>With this done right, you’ll see Lua as part of installed software on the <a href="https://web.archive.org/web/20171008221451/http://your.server.local/index.php/Special:Version">version page</a>:</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2014/04/mediawiki-installed-software.png"><img alt="mediawiki installed software" width="374" height="176" /></a>And under installed extensions:</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2014/04/wikimedia-installed-extensions.png"><img alt="wikimedia installed extensions" width="824" height="481" /></a></p>
<p>I did need to put the following in the LocalSettings.php file, but it’s in the installation bits for the extensions:</p>
<blockquote><p>$wgLuaExternalInterpreter = “/usr/bin/lua5.1″;<br />
require_once(“$IP/extensions/Lua/Lua.php”);<br />
$wgScribuntoEngineConf[‘luastandalone’][‘luaPath’] = ‘/usr/bin/lua5.1′;<br />
require_once( “$IP/extensions/Scribunto/Scribunto.php” );</p></blockquote>
<p>Now when I load a page it still has some missing bits, but it’s looking much better.</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2014/04/wikipedia-local-mirror.png"><img alt="The Amiga page..." width="1014" height="611" /></a></p>
<p>The Amiga page…</p>
<p>Now I know the <a href="https://web.archive.org/web/20171008221451/http://xowa.sourceforge.net/">XOWA</a> people have a torrent setup for about 75GB worth of images.  I just have to figure out how to get those and parse them into my wikipedia mirror.</p>
<p>I hope this will prove useful for someone in the future.  But if it looks too daunting, just use the XOWA.  Another solution is <a href="https://web.archive.org/web/20171008221451/http://www.nongnu.org/wp-mirror/">WP-MIRROR</a>, although it can apparently take several days to load.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2014/04/15/mirroring-wikipedia/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ownCloud</title>
		<link>https://virtuallyfun.com/2011/09/20/owncloud/</link>
					<comments>https://virtuallyfun.com/2011/09/20/owncloud/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 20 Sep 2011 06:16:52 +0000</pubDate>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random updates]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=1419</guid>

					<description><![CDATA[So I was reading through a friends blog (wintellect!) and I came across this page about ownCloud&#8230; Â Well I thought this was very interesting as I&#8217;ve pulled a lot of my external email mess inside (on my own Exchange 5.5 &#8230; <a href="https://virtuallyfun.com/2011/09/20/owncloud/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://owncloud.org/"><img loading="lazy" decoding="async" class="alignleft size-medium wp-image-1421" title="owncloud" src="https://virtuallyfun.com/wp-content/uploads/2011/09/owncloud-300x63.jpg" alt="" width="300" height="63" /></a>So I was reading through a friends blog (wintellect!) and I came across this page about <a href="http://www.bsdnexus.com/blog/articles/owncloud-private-web-storage">ownCloud</a>&#8230; Â Well I thought this was very interesting as I&#8217;ve pulled a lot of my external email mess inside (on my own Exchange 5.5 server on MS Virtual Server 2005!) .. So I like this whole idea.</p>
<p>I&#8217;ve got this VPS that has a few extra gigs of space, and it&#8217;d be SUPER convenient to map some drives for backups, or even back it up by copying some files.. Â It&#8217;s a simple AMP program setup, so I had it up and running in a few seconds. Â The &#8216;hard&#8217; part was mapping the drive from Vista. Â Naturally it came down to reading the <a href="http://owncloud.org/use/webdav/">instructions</a>, namely:</p>
<ol>
<li>inÂ <em>Services</em>, enable theÂ <em>Webclient</em>Â service (might be enabled already)</li>
<li>in theÂ <em>Registry</em>, changeÂ <code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel</code>Â from 1 to 2</li>
<li>go toÂ <em>My Computer</em>Â â†’Â <em>Mount Network Drive</em></li>
<ul>
<li>in theÂ <em>Folder</em>Â field typeÂ <code><a href="http://address/files/webdav.php">http://ADDRESS/files/webdav.php</a></code></li>
<li>checkÂ <em>Connect using different credentials</em></li>
</ul>
</ol>
<div><span style="font-size: small;"><span class="Apple-style-span" style="line-height: 24px;">And that is about the size of it.</span></span></div>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2011/09/20/owncloud/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Who is the drizzle?</title>
		<link>https://virtuallyfun.com/2011/03/17/who-is-the-drizzle/</link>
					<comments>https://virtuallyfun.com/2011/03/17/who-is-the-drizzle/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Fri, 18 Mar 2011 00:47:00 +0000</pubDate>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[random updates]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=384</guid>

					<description><![CDATA[In case you&#8217;ve been hiding in a cave, you&#8217;ll know that Oracle has bought out just about all the real competition to their flagship product and basically driven the developers out.. Just as they have strangled SUN&#8217;s products in some &#8230; <a href="https://virtuallyfun.com/2011/03/17/who-is-the-drizzle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"></div>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2011/03/the-drizzle2.jpg"><img loading="lazy" decoding="async" class="alignright size-full wp-image-1403" title="the-drizzle2" src="https://virtuallyfun.com/wp-content/uploads/2011/03/the-drizzle2.jpg" alt="" width="400" height="300" /></a>In case you&#8217;ve been hiding in a cave, you&#8217;ll know that Oracle has bought out just about all the real competition to their flagship product and basically driven the developers out.. Just as they have strangled SUN&#8217;s products in some vain attempt at a lawsuit against Google, they basically have killed mysql.</p>
<p>Well enter, <a href="http://drizzle.org/">drizzle</a>.</p>
<p>I haven&#8217;t loaded it yet, but it&#8217;ll certainly be something worth investigating going forward since MySQL is effectively dead.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2011/03/17/who-is-the-drizzle/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WAMP server 2.1c</title>
		<link>https://virtuallyfun.com/2010/12/28/wamp-server-2-1c/</link>
					<comments>https://virtuallyfun.com/2010/12/28/wamp-server-2-1c/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 21:04:00 +0000</pubDate>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WAMP]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=331</guid>

					<description><![CDATA[As I was writing my WAMP installation guides, it turns out that a new version, 2.1c was just released! I&#8217;ve updated the links, but it&#8217;s great to see WAMP is very much alive! All of the WAMP releases for 2.1 &#8230; <a href="https://virtuallyfun.com/2010/12/28/wamp-server-2-1c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>As I was writing my WAMP installation guides, it turns out that a new version, 2.1c was just released!</p>
<p>I&#8217;ve updated the links, but it&#8217;s great to see WAMP is very much alive!</p>
<p>All of the WAMP releases for 2.1 can be found on <a href="https://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.1/">sourceforge</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2010/12/28/wamp-server-2-1c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Installing mediawiki on WAMP</title>
		<link>https://virtuallyfun.com/2010/12/28/installing-mediawiki-on-wamp/</link>
					<comments>https://virtuallyfun.com/2010/12/28/installing-mediawiki-on-wamp/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 20:55:00 +0000</pubDate>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WAMP]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=330</guid>

					<description><![CDATA[Building on our WAMP installation, we are now going to install mediawiki. The first thing I&#8217;d recommend to do is to move the contents of c:\wamp\www into another directory&#8230; I just shoved the terminal thing into c:\wamp\terminal . Now mediawiki &#8230; <a href="https://virtuallyfun.com/2010/12/28/installing-mediawiki-on-wamp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Building on our <a href="http://virtuallyfun.blogspot.com/2010/12/wamp-server-21.html">WAMP installation</a>, we are now going to install mediawiki.</p>
<p>The first thing I&#8217;d recommend to do is to move the contents of c:\wamp\www into another directory&#8230; I just shoved the terminal thing into c:\wamp\terminal .</p>
<p>Now mediawiki is the software that powers wikipedia. It&#8217;s a great collaboration platform, it has built in revision control, and best of all it&#8217;s free.</p>
<p>It&#8217;s also VERY simple to setup, well compared to other web content platforms.</p>
<p>The current version is 1.16, which can be downloaded <a href="http://download.wikimedia.org/mediawiki/1.16/mediawiki-1.16.0.tar.gz">here</a>. As things change, you may be best served by just visiting the <a href="http://www.mediawiki.org/wiki/Download">main download site</a>.</p>
<p>Since most &#8216;AMP&#8217; servers are Linux based, we&#8217;ll have to get <a href="http://vpsland.superglobalmegacorp.com/install/gzip.exe">gzip</a> &amp; <a href="http://vpsland.superglobalmegacorp.com/install/tar.exe">tar</a> to extract mediawiki. It&#8217;s very easy though.</p>
<p>Simply type this in to extract mediawiki</p>
<blockquote><p>C:\temp&gt;dir<br />
Volume in drive C has no label.<br />
Volume Serial Number is FC55-C2F4</p>
<p>Directory of C:\temp</p>
<p>12/28/2010 08:15 PM DIR .<br />
12/28/2010 08:15 PM DIR ..<br />
12/28/2010 08:13 PM 49,152 gzip.exe<br />
112/28/2010 08:15 PM 12,647,934 mediawiki-1.16.0.tar.gz<br />
12/28/2010 08:13 PM 114,688 tar.exe<br />
3 File(s) 12,811,774 bytes<br />
2 Dir(s) 7,073,234,944 bytes free</p>
<p>C:\temp&gt;gzip -dc mediawiki-1.16.0.tar.gz| tar -xf &#8211;</p>
<p>C:\temp&gt;</p></blockquote>
<p>Ok, now with mediawiki extracted we just move the contents of c:\temp\mediawiki-1.16.0 into c:\wamp\www</p>
<p>Now before we go on, we are going to set a password for the MySQL process. In the off chance someone is following this on a server to deploy on the internet, it&#8217;d be crazy to leave it with no password.</p>
<p>So left click on the WAMP system tray icon, go to MySQL, and bring up the MySQL Console.</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/media1.png" rel="attachment wp-att-5937"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5937" src="https://virtuallyfun.com/wp-content/uploads/2010/12/media1.png" alt="media1" width="448" height="309" /></a></p>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>Just hit enter for the password as there isn&#8217;t one.</p>
<p>Next follow this SQL statement to set the password for the root user to password. Or select your own better password.</p>
<blockquote><p>mysql&gt; use mysql;<br />
Database changed<br />
mysql&gt; update user set password=PASSWORD(&#8220;password&#8221;) where User=&#8217;root&#8217;;<br />
Query OK, 3 rows affected (0.05 sec)<br />
Rows matched: 3 Changed: 3 Warnings: 0</p></blockquote>
<p>Now restart the mysql service, by clicking on the system tray icon, then mysql, service then &#8216;restart service&#8217;. If you don&#8217;t do this the password change will not take effect!</p>
<p>With that out of the way, it&#8217;s time to configure mediawiki. Simply open up a web browser to the following location:</p>
<p>http://localhost</p>
<p>And you should see something like this:</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/media2.png" rel="attachment wp-att-5939"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5939" src="https://virtuallyfun.com/wp-content/uploads/2010/12/media2.png" alt="media2" width="712" height="371" /></a></p>
<p>Click the setup link, and let&#8217;s walk through the options&#8230;</p>
<p>First is the wikiname. I&#8217;m just going to call mine &#8216;test wiki&#8217;. Put in your own contact email, so that mediawiki will email YOU if anything is going on&#8230; I left the language in English, and left the license alone. The next important thing to do is to select a Admin username, and password. This is all up to you. Just remember that the Username is CaSe SeNsItIvE!!!</p>
<p>Leave the caching off.</p>
<p>The next section is for the email notifications, I just left those as default.</p>
<p>The final thing to configure is the database.</p>
<p>Since we are going to keep this simple, just set the DB username to root, and put in the password you configured earlier in the MySQL Console. Next check the &#8216;superuser account&#8217; box, and specify root and the password again.</p>
<p>You can now click the Install MediaWiki button!</p>
<p>You&#8217;ll see some information printed on the page, and if everything goes according to plan, you&#8217;ll get the message:</p>
<blockquote><p>Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki.</p>
<p>You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data</p></blockquote>
<p>So simply copy the file c:\wamp\www\config\LocalSettings.php to c:\wamp\www\</p>
<p>then simply click the following link to be taken to your personal wiki:</p>
<p><a href="http://localhost/index.php">http://localhost/index.php</a></p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/media4.png" rel="attachment wp-att-5940"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5940" src="https://virtuallyfun.com/wp-content/uploads/2010/12/media4.png" alt="media4" width="998" height="649" /></a></p>
<p>And that should take care of it!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2010/12/28/installing-mediawiki-on-wamp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WAMP server 2.1</title>
		<link>https://virtuallyfun.com/2010/12/28/wamp-server-2-1/</link>
					<comments>https://virtuallyfun.com/2010/12/28/wamp-server-2-1/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 16:48:00 +0000</pubDate>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WAMP]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=328</guid>

					<description><![CDATA[Due to a request, I figured I&#8217;d document out the joys of installing WAMP, flashterm &#38; the flash policy server, mediawiki in a multipart article. So to start, we&#8217;ll build the foundation which is the WAMP package which the other &#8230; <a href="https://virtuallyfun.com/2010/12/28/wamp-server-2-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Due to a request, I figured I&#8217;d document out the joys of installing WAMP, flashterm &amp; the flash policy server, mediawiki in a multipart article. So to start, we&#8217;ll build the foundation which is the WAMP package which the other two will rely on.</p>
<p>So what is WAMP, well it&#8217;s Windows Apache Mysql &amp; PHP. If you&#8217;ve ever heard of LAMP, this is the Windows version. And I&#8217;m happy to say that PHP applications seem to be pretty portable, allowing you to freely move data &amp; applications to &amp; from Linux/BSD/Solaris/Windows. Or that&#8217;s been my experience.</p>
<p>The first thing you&#8217;ll need to do is install the WAMP package. Luckily for us, the<a href="http://www.wampserver.com/"> WampServer project</a> has packaged the whole thing up into a nice windows installer. And the new version (2.1c) even includes x64 bulids!</p>
<p>So for the 32bit crowd you can d<a href="http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.1/WampServer2.1c-x32.exe/download">ownload WAMP here</a>.</p>
<p>And for the x64 64bit crowd, <a href="http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.1/WampServer2.1c-x64.exe/download">download WAMP here</a>.</p>
<p>I&#8217;m currently using an aging HP machine as my server so I&#8217;m using Windows Server 2003 along with the 32bit version. WAMP works best when it&#8217;s just installed with the defaults.</p>
<p>The first thing I do is I install the SMTP service that comes with Windows. I leave IIS off as it&#8217;s kind of silly to have two web servers, unless you are doing it for some planned reason (say Virtual Server which needs IIS and uses port 1024). If you do have IIS make sure the &#8216;default&#8217; website is turned off.</p>
<p>All that has to be done with the SMTP server is configure it to allow 127.0.0.1 to relay emails.. As it&#8217;s nice to get notifications that could be built in with whatever PHP application you go with.</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/SMTP1.png" rel="attachment wp-att-5946"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-5946" src="https://virtuallyfun.com/wp-content/uploads/2010/12/SMTP1-1024x469.png" alt="SMTP1" width="584" height="267" /></a></p>
<p>Now run the installer, and I&#8217;ll try to walk through the steps.</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp1.png" rel="attachment wp-att-5942"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5942" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp1.png" alt="wamp1" width="554" height="402" /></a></p>
<blockquote><p>Hit next</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp2.png" rel="attachment wp-att-5943"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5943" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp2.png" alt="wamp2" width="523" height="402" /></a></p>
<blockquote><p>Accept the GPL License.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp3.png" rel="attachment wp-att-5947"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5947" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp3.png" alt="wamp3" width="556" height="405" /></a></p>
<blockquote><p>Let it install in the default directory, it makes things easier.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp4.png" rel="attachment wp-att-5948"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5948" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp4.png" alt="wamp4" width="536" height="411" /></a></p>
<blockquote><p>I like both set, you may not, but it&#8217;s easier to launch.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp5.png" rel="attachment wp-att-5949"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5949" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp5.png" alt="wamp5" width="544" height="416" /></a></p>
<blockquote><p>Verify the install settings.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp6.png" rel="attachment wp-att-5950"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5950" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp6.png" alt="wamp6" width="543" height="400" /></a></p>
<blockquote><p>Now WAMP will copy files and install.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp7.png" rel="attachment wp-att-5951"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5951" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp7.png" alt="wamp7" width="592" height="450" /></a></p>
<blockquote><p>Then WAMP will want to know the default browser, honestly IE is just fine.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp8.png" rel="attachment wp-att-5952"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5952" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp8.png" alt="wamp8" width="542" height="411" /></a></p>
<blockquote><p>Next WAMP will want to know what SMTP server to use&#8230; This is kind of important, and why I installed the default MS SMTP server as a lot of things that do registration, or email alerts, well work better with an email server&#8230;</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp9.png" rel="attachment wp-att-5953"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5953" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp9.png" alt="wamp9" width="513" height="391" /></a></p>
<blockquote><p>With the install completed let it launch WAMP.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp10.png" rel="attachment wp-att-5954"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5954" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp10.png" alt="wamp10" width="203" height="66" /></a></p>
<blockquote><p>Once the WAMP server is installed it&#8217;ll be stopped and offline.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp11.png" rel="attachment wp-att-5955"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5955" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp11.png" alt="wamp11" width="340" height="311" /></a></p>
<blockquote><p>Left click on the WAMP tray tool, and have it start all the services.</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp12.png" rel="attachment wp-att-5956"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5956" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp12.png" alt="wamp12" width="380" height="313" /></a></p>
<blockquote><p>Then left click again on the WAMP tray tool, and now you can start it up and take it online&#8230;</p></blockquote>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp13.png" rel="attachment wp-att-5957"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5957" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp13.png" alt="wamp13" width="185" height="66" /></a></p>
<blockquote><p>If everything has gone right your WAMP tray tool will look like this!</p></blockquote>
<p>Now open up a web browser, and go to http://localhost/</p>
<p>If everything has gone right, you should see this:</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp14.png" rel="attachment wp-att-5958"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-5958" src="https://virtuallyfun.com/wp-content/uploads/2010/12/wamp14.png" alt="wamp14" width="1017" height="738" /></a></p>
<p>Congratulations! You&#8217;ve successfully installed the WAMP server!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2010/12/28/wamp-server-2-1/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
