PHP
From Stax
PHP 5 applications can be deployed on the Stax Cloud using the Caucho Quercus PHP engine for Java.
You can create PHP-enabled Java applications for Stax using the quercus application template.
# stax create -t quercus APPID
After creating your application, PHP files can be placed directly into the application's webapp folder.
Drupal on Stax
Create a new Stax project using the quercus PHP application template
# stax create -t quercus drupal
Create a MySQL database for your Drupal site
# stax db:create DB_NAME -u USER -p PASS
Unzip the Drupal installation into your application webapp folder
# curl -L http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz | tar xzv # cp drupal-6.2/* drupal/webapp
Run the application locally
# stax run
Connect to the local instance by navigating to http://localhost:8080 and following the instructions for configuring Drupal to connect to your Stax Database (use the advanced option to set the path to the remote database server).
After setup is complete, deploy the Drupal site to Stax:
# stax deploy
Mediawiki on Stax
Create a new Stax project using the quercus PHP application template
# stax create -t quercus mediawiki
Create a MySQL database for your MediaWiki site
# stax db:create DB_NAME -u USER -p PASS
Unzip the MediaWiki installation into your application webapp folder
# curl -L http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz | tar xzv # cp mediawiki-1.15.1/* mediawiki/webapp
Edit WEB-INF/web.xml to add a servlet mapping that enables /index.php/* MediaWiki URLs
<servlet-mapping> <servlet-name>Quercus Servlet</servlet-name> <url-pattern>/index.php/*</url-pattern> </servlet-mapping>
Run the application locally
# stax run
Connect to the local instance by navigating to http://localhost:8080 and following the instructions for configuring MediaWiki to connect to your Stax Database.
As directed in the instructions on the final screen of the setup, move the Settings.php file to the application's webapp folder.
After setup is complete, deploy the MediaWiki site to Stax:
# stax deploy
