Quercus: WordPress on Resin 3.1

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
[[Category: Quercus]]
 
[[Category: Quercus]]
 +
 +
Running Wordpress 2.5 on GlassFish
 +
----------------------------------
 +
(sorry for posting it here, but the forum doesn't work - can't add new posts)
 +
I am running Java EE SDK 5.03 over CentOS Linux.
 +
Copied the 3 Quercus jar files to /opt/SDK/lib and restarted the server.
 +
Everything else is setup as it should be (MySQL Connector/J, defined new DB).
 +
Wrapped WordPress 2.5 in a war file with the right web.xml (changed wp-config.php).
 +
Deployed, and it fails on
 +
 +
com.caucho.quercus.QuercusModuleException: java.lang.OutOfMemoryError: Java heap space
 +
 +
Ideas?
 +
  
 
Running Wordpress 2.2.1 on Resin 3.1.2
 
Running Wordpress 2.2.1 on Resin 3.1.2

Revision as of 12:28, 10 April 2008


Running Wordpress 2.5 on GlassFish


(sorry for posting it here, but the forum doesn't work - can't add new posts) I am running Java EE SDK 5.03 over CentOS Linux. Copied the 3 Quercus jar files to /opt/SDK/lib and restarted the server. Everything else is setup as it should be (MySQL Connector/J, defined new DB). Wrapped WordPress 2.5 in a war file with the right web.xml (changed wp-config.php). Deployed, and it fails on

com.caucho.quercus.QuercusModuleException: java.lang.OutOfMemoryError: Java heap space

Ideas?


Running Wordpress 2.2.1 on Resin 3.1.2


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:

http://trac.wordpress.org/changeset/5736


Running Wordpress 2.0.3 on Resin
--------------------------------
Created: July 9, 2006
Tested on: Mac OS X 10.4.7 on an Intel Mac, July 9, 2006)
Author: Tony Field

You can't install WordPress 2.0.3 on Resin 3.0.19 and configure it "just like that" - 
there were apparently some problems with Quercus that have since been fixed:  the 
install script fails part-way through.  However, you can indeed run WordPress on
Resin 3.0.19 after you get it running using a more recent snapshot.  Here are the instructions.

1. Download WordPress 2.0.3 <http://www.wordpress.org/download/>

2. Download & install/configure a snapshot of Resin 3, July 5 or later (I haven't tried earlier snapshots)

3. Extract the WordPress zip file and put it into your webapps folder.

4. Create your database, datasource, and add the driver to <resin_home>/lib/local

5. Tell Quercus about this php app:  Create a WEB-INF folder and put this content inside a web.xml file:

<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};)/','&$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/>
Personal tools