Quercus: WordPress on Resin 3.1

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category: Quercus]]
+
=Running Wordpress 2.5.1 on Resin 3.1.6=
  
Running Wordpress 2.2.1 on Resin 3.1.2
+
==Requirements==
--------------------------------------
+
# MySQL server
Wordpress 2.2 will run on Resin without modification.  However, Wordpress 2.2.1 will require a fix to wp-includes/formatting.php.  The Wordpress function js_escape() was changed in 2.2.1 to use conditional constructs in regular expressions.  Java does not support conditional constructs. The workaround is to revert the change to that function detailed here:
+
# Java 1.5 or higher
  
http://trac.wordpress.org/changeset/5736
+
==Quick start==
 +
Follow these instructions if you would simply like to evaluate running WordPress without doing a system-wide installation. Follow the instructions below to perform a system-wide installation.
  
 +
# Download WordPress 2.5.1 from http://www.wordpress.org/download
 +
# Download Resin 3.1.6 from http://www.caucho.com/download
 +
# Unzip Resin 3.1.6
 +
# Delete resin-3.1.6/webapps/ROOT/index.jsp
 +
# Unzip WordPress and copy all files and directories to resin-3.1.6/webapps/ROOT
 +
# Create the WordPress database: <pre>mysql -u root</pre><pre>mysql> CREATE DATABASE wordpress;</pre>
 +
# Create the directory resin-3.1.6/webapps/ROOT/WEB-INF/lib
 +
# Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
 +
version 3.1.4 is Recommanded, the 5.1.6 may have some issues.
 +
# Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in resin-3.1.6/webapps/ROOT/WEB-INF/lib
 +
# Run <pre>java -jar resin-3.1.6/lib/resin.jar</pre>
 +
# Browse to http://localhost:8080 and set up WordPress according to the online directions
  
Running Wordpress 2.0.3 on Resin
+
I have tried again and again and again, but it never works under Resin, I don't know why. So what I can do is to tell you never do follow above. And I hope some one can post something really work,please!
--------------------------------
+
 
Created: July 9, 2006
+
==Full installation==
Tested on: Mac OS X 10.4.7 on an Intel Mac, July 9, 2006)
+
Follow these instructions if you would like to perform a permanent installation with virtual hostsFollow the above directions for a quick start evaluation.
Author: Tony Field
+
 
+
# Download WordPress 2.5.1 from http://www.wordpress.org/download
You can't install WordPress 2.0.3 on Resin 3.0.19 and configure it "just like that" -
+
# Download Resin 3.1.6 from http://www.caucho.com/download
there were apparently some problems with Quercus that have since been fixed:  the
+
# Unzip Resin 3.1.6 in /usr/local/share
install script fails part-way through.  However, you can indeed run WordPress on
+
# Copy /usr/local/share/resin-3.1.6/conf/resin.conf to /etc/resin/resin.conf
Resin 3.0.19 after you get it running using a more recent snapshotHere are the instructions.
+
# Edit /etc/resin/resin.conf to change the host-deploy directory:<pre><host-deploy path="/var/www/hosts"></pre>
+
# Create a virtual host directory for your domain:<pre>/var/www/hosts/blog.example.com/webapps/ROOT</pre> (in this example, the domain is blog.example.com)
1. Download WordPress 2.0.3 <http://www.wordpress.org/download/>
+
# Unzip WordPress and copy all files and directories to /var/www/hosts/blog.example.com/webapps/ROOT
+
# Create the WordPress database: <pre>mysql -u root</pre><pre>mysql> CREATE DATABASE wordpress;</pre>
2. Download & install/configure a snapshot of Resin 3, July 5 or later (I haven't tried earlier snapshots)
+
# Create the directory /var/www/hosts/blog.example.com/webapps/ROOT/WEB-INF/lib
+
# Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
3. Extract the WordPress zip file and put it into your webapps folder.
+
# Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in /var/www/hosts/blog.example.com/webapps/ROOT/WEB-INF/lib
+
# Run <pre>java -jar /usr/local/share/resin-3.1.6/lib/resin.jar -conf /etc/resin/resin.conf start</pre>
4. Create your database, datasource, and add the driver to <resin_home>/lib/local
+
# Browse to http://blog.example.com:8080 and set up WordPress according to the online directions
+
 
5. Tell Quercus about this php app:  Create a WEB-INF folder and put this content inside a web.xml file:
+
[[Category: Quercus]]
+
[[Category: Resin 3.1]]
<web-app xmlns="http://caucho.com/ns/resin">
+
<servlet-mapping url-pattern="*.php" servlet-class="com.caucho.quercus.servlet.QuercusServlet">
+
<init>
+
<compile>
+
false
+
</compile>
+
<database>
+
jdbc/<your-dsn>
+
</database>
+
<php-ini SMTP="smtp.your-isp.ca" sendmail_from="your@email.address.ca"/>
+
</init>
+
</servlet-mapping>
+
</web-app>
+
+
6. Fix WordPress problems - 2 current issues:
+
+
Fix, the first:
+
+
Remove the trailing '-' on line 101 of /webapps/wordpress/wp-includes/functions-formatting.php :
+
/webapps/wordpress/wp-includes/functions-formatting.php:102:
+
-$text is an invalid left-hand side of an assignment. in
+
functions-formatting.php:101: $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/','&#038;$1', $text);-
+
+
Fix, the second:
+
+
Open the file /webapps/wordpress/wp-includes/class-snoopy.php
+
and re-save it as UTF-8 if it is not already in UTF-8. (Required for Mac OS X, as the file opens
+
as "Western (Mac OS Roman)" by default).
+
+
7. Start the Resin snapshot and run the installation wizard
+
<http://localhost:8080/wordpress/wp-admin/install.php>
+
You'll see numerous exceptions where WordPress is looking for a table that doesn't exist.  These will
+
continue throughout the wizard then stop forever once you're all set up.
+
+
8. Shut down the Resin snapshot and move your webapp to resin-3.0.19
+
+
9. Start resin-3.0.19 and visit your blog:  <http://localhost:8080/wordpress/>
+

Latest revision as of 17:49, 21 October 2011

Contents

Running Wordpress 2.5.1 on Resin 3.1.6

Requirements

  1. MySQL server
  2. Java 1.5 or higher

Quick start

Follow these instructions if you would simply like to evaluate running WordPress without doing a system-wide installation. Follow the instructions below to perform a system-wide installation.

  1. Download WordPress 2.5.1 from http://www.wordpress.org/download
  2. Download Resin 3.1.6 from http://www.caucho.com/download
  3. Unzip Resin 3.1.6
  4. Delete resin-3.1.6/webapps/ROOT/index.jsp
  5. Unzip WordPress and copy all files and directories to resin-3.1.6/webapps/ROOT
  6. Create the WordPress database:
    mysql -u root
    mysql> CREATE DATABASE wordpress;
  7. Create the directory resin-3.1.6/webapps/ROOT/WEB-INF/lib
  8. Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)

version 3.1.4 is Recommanded, the 5.1.6 may have some issues.

  1. Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in resin-3.1.6/webapps/ROOT/WEB-INF/lib
  2. Run
    java -jar resin-3.1.6/lib/resin.jar
  3. Browse to http://localhost:8080 and set up WordPress according to the online directions

I have tried again and again and again, but it never works under Resin, I don't know why. So what I can do is to tell you never do follow above. And I hope some one can post something really work,please!

Full installation

Follow these instructions if you would like to perform a permanent installation with virtual hosts. Follow the above directions for a quick start evaluation.

  1. Download WordPress 2.5.1 from http://www.wordpress.org/download
  2. Download Resin 3.1.6 from http://www.caucho.com/download
  3. Unzip Resin 3.1.6 in /usr/local/share
  4. Copy /usr/local/share/resin-3.1.6/conf/resin.conf to /etc/resin/resin.conf
  5. Edit /etc/resin/resin.conf to change the host-deploy directory:
    <host-deploy path="/var/www/hosts">
  6. Create a virtual host directory for your domain:
    /var/www/hosts/blog.example.com/webapps/ROOT
    (in this example, the domain is blog.example.com)
  7. Unzip WordPress and copy all files and directories to /var/www/hosts/blog.example.com/webapps/ROOT
  8. Create the WordPress database:
    mysql -u root
    mysql> CREATE DATABASE wordpress;
  9. Create the directory /var/www/hosts/blog.example.com/webapps/ROOT/WEB-INF/lib
  10. Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
  11. Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in /var/www/hosts/blog.example.com/webapps/ROOT/WEB-INF/lib
  12. Run
    java -jar /usr/local/share/resin-3.1.6/lib/resin.jar -conf /etc/resin/resin.conf start
  13. Browse to http://blog.example.com:8080 and set up WordPress according to the online directions
Personal tools