Quercus: Mediawiki

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
[[Category:Quercus]]
 
[[Category:Quercus]]
  
Steps:
+
==Download Resin 3.1.5+==
 +
We suggest using the most recent release of Resin as several
 +
MediaWiki related bugs have been fixed recently.
  
# unpack mediawiki in webapps/wiki
+
==Download MediaWiki 1.11.1 or newer==
# modify languages/Language.php to work around JDBC mysql driver bug
+
Download [http://www.mediawiki.org/wiki/Download MediaWiki] into $resin_home/webapps/ROOT/mediawiki.
# add resin-web.xml
+
# start Resin and browse to http://localhost:8080/wiki
+
  
== modifications to mediawiki ==
+
==Download MySQL JDBC Driver==
 +
Download [http://www.mysql.com/products/connector/j/ MySQL Connector/J JDBC Driver]
 +
version 3.1.14 or newer. Save the mysql-connector-java-3.1.14-bin.jar Jar file
 +
in $resin_home/lib.
  
First, you will need to modify languages/Language.php in the mediawiki distributionThis is to work around a but in the JDBC driver.  
+
==Add resin-web.xml==
 +
Add the following resin-web.xml file to $resin_home/webapps/ROOT/mediawiki/WEB-INFCustomize email settings to allow the sending of emails from PHP.  Anything not in bold is optional.
  
It's important to do this first, because initializing the database with the buggy code will make it very difficult to fix later.
+
The resin-web.xml has the QuercusServlet mapped to *.php.  Optionally, it has a <[[database]]> as PHP's database.  Quercus can automatically create database pools if you omit the <[[database]]> configuration, but it's better to configure it explicitly.
  
In the Languages.php, you need to remove the <em>\\\'</em> strings, i.e. 3 backslashes followed by a single quoteThere are three instances. Two <em>you\\\'re</em> and one <em>can\\\'t</em>.
+
<b><web-app xmlns="http://caucho.com/ns/resin"></b>
 +
  <database jndi-name='jdbc/mediawiki'>
 +
    <driver type="com.mysql.jdbc.Driver">
 +
      <url>jdbc:mysql://localhost:3306/mediawiki</url>
 +
      <user></user>
 +
      <password></password>
 +
    </driver>
 +
  </database>
 +
   
 +
  <b><servlet-mapping url-pattern="*.php"
 +
                    servlet-class="com.caucho.quercus.servlet.QuercusServlet">
 +
    <init></b>
 +
      <database>jdbc/mediawiki</database>
 +
      <compile>true</compile>
 +
      <b><script-encoding>ISO-8859-1</script-encoding>
 +
      <php-ini>
 +
        <sendmail_from>foo@bar.com</sendmail_from>
 +
      </php-ini>
 +
    </init>
 +
  </servlet-mapping></b>
 +
 +
  <b><welcome-file-list>index.php</welcome-file-list>
 +
</web-app></b>
  
== resin-web.xml ==
+
==Finish==
 +
Run MediaWiki's installation.  That's it!
  
The resin-web.xml needs to add the QuercusServlet and map it to *.php.  Optionally, it configures a <[database]> as PHP's database.  Quercus can automatically create database pools if you omit the <[database]> configuration, but it's better to configure it explicitly.
 
  
==== resin-web.xml ====
+
==Quercus on Sun Java System Application Server==
 
+
Please see the detail on discussion tab. Thanks
<web-app xmlns="http://caucho.com/ns/resin">
+
    <database jndi-name='jdbc/wiki'>
+
      <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
+
        <url>jdbc:mysql://localhost:3306/test_wiki2</url>
+
        <user></user>
+
        <password></password>
+
      </driver>
+
    </database>
+
+
  <servlet-mapping url-pattern="*.php"
+
                    servlet-class="com.caucho.quercus.servlet.QuercusServlet">
+
      <init compile="true" database="jdbc/wiki"/>
+
  </servlet-mapping>
+
+
  <welcome-file-list>index.php</welcome-file-list>
+
</web-app>
+

Latest revision as of 13:48, 26 July 2008


Contents

Download Resin 3.1.5+

We suggest using the most recent release of Resin as several MediaWiki related bugs have been fixed recently.

Download MediaWiki 1.11.1 or newer

Download MediaWiki into $resin_home/webapps/ROOT/mediawiki.

Download MySQL JDBC Driver

Download MySQL Connector/J JDBC Driver version 3.1.14 or newer. Save the mysql-connector-java-3.1.14-bin.jar Jar file in $resin_home/lib.

Add resin-web.xml

Add the following resin-web.xml file to $resin_home/webapps/ROOT/mediawiki/WEB-INF. Customize email settings to allow the sending of emails from PHP. Anything not in bold is optional.

The resin-web.xml has the QuercusServlet mapped to *.php. Optionally, it has a <database> as PHP's database. Quercus can automatically create database pools if you omit the <database> configuration, but it's better to configure it explicitly.

<web-app xmlns="http://caucho.com/ns/resin">
  <database jndi-name='jdbc/mediawiki'>
    <driver type="com.mysql.jdbc.Driver">
      <url>jdbc:mysql://localhost:3306/mediawiki</url>
      <user></user>
      <password></password>
    </driver>
  </database>

  <servlet-mapping url-pattern="*.php"
                   servlet-class="com.caucho.quercus.servlet.QuercusServlet">
    <init>
      <database>jdbc/mediawiki</database>
      <compile>true</compile>
      <script-encoding>ISO-8859-1</script-encoding>
      <php-ini>
        <sendmail_from>foo@bar.com</sendmail_from>
      </php-ini>
    </init>
  </servlet-mapping>

  <welcome-file-list>index.php</welcome-file-list>
</web-app>

Finish

Run MediaWiki's installation. That's it!


Quercus on Sun Java System Application Server

Please see the detail on discussion tab. Thanks

Personal tools