Quercus: Mediawiki

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
  
 
# unpack mediawiki in webapps/wiki
 
# unpack mediawiki in webapps/wiki
# modify languages/Language.php to work around JDBC mysql driver bug
 
 
# add resin-web.xml
 
# add resin-web.xml
 
# start Resin and browse to http://localhost:8080/wiki
 
# start Resin and browse to http://localhost:8080/wiki
 
== modifications to mediawiki ==
 
 
First, you will need to modify languages/Language.php in the mediawiki distribution.  This is to work around a bug in the JDBC driver.
 
 
It's important to do this first, because initializing the database with the buggy code will make it very difficult to fix later.
 
 
In the Languages.php, you need to remove the <em>\\\'</em> strings, i.e. 3 backslashes followed by a single quote.  There are three instances.  Two <em>you\\\'re</em> and one <em>can\\\'t</em>.
 
  
 
== resin-web.xml ==
 
== resin-web.xml ==

Revision as of 19:39, 25 February 2006


Steps:

  1. unpack mediawiki in webapps/wiki
  2. add resin-web.xml
  3. start Resin and browse to http://localhost:8080/wiki

resin-web.xml

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

<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>
Personal tools