/ railoapacheportable/webapps/resin-doc/examples/quercus-hello/index.xtp
Unknown | 101 lines | 79 code | 22 blank | 0 comment | 0 complexity | 1f6deb2541e5943ac41af6038c853c22 MD5 | raw file
Possible License(s): BSD-2-Clause, Apache-2.0, EPL-1.0, LGPL-3.0, GPL-3.0, AGPL-1.0, LGPL-2.0, MPL-2.0-no-copyleft-exception, GPL-2.0, LGPL-2.1, BSD-3-Clause, AGPL-3.0, CC-BY-SA-3.0
- <document>
- <header>
- <title>Quercus: Hello, World installation</title>
- <description>
- <p>The Hello, World tutorial covers the basic steps to
- start Resin and run a trivial php script in Quercus.</p>
- </description>
- <type>tutorial</type>
- <tutorial-startpage>hello.php</tutorial-startpage>
- </header>
- <body>
- <summary/>
- <s1 title="Files in this tutorial">
- <deftable>
- <tr><td><viewfile-link file="WEB-INF/resin-web.xml"/>
- </td><td>web.xml configuration
- </td></tr><tr><td><viewfile-link file="hello.php"/>
- </td><td>The PHP Hello, World
- </td></tr></deftable>
- </s1>
- <s1 title="Introduction">
- <p>This short article is intended for PHP programers who are
- interested in trying Caucho's PHP implementation. The download and
- unzipping instructions are intended for windows users. However, the
- implementation will work just as well in UNIX.</p>
- </s1>
- <s1 title="Part I: Installing Resin">
- <s2 title="Downloading and unzipping Resin">
- <ol>
- <li>Navigate to http://www.caucho.com/download</li>
- <li>Download the latest Resin binary for your operating system.</li>
- <li>For purposes of this demo, I have downloaded the Windows .zip binary.
- The non-pro version is open-source.</li>
- <li>Save the file to your desktop.</li>
- <li>Double click the binary and unzip the file.</li>
- <li>For purposes of this demo, I have unzipped the contents to C:\resin-3.0.14</li>
- </ol>
- </s2>
- <s2 title="Running Resin for the first time">
- <ol>
- <li>Browse to the directory into which you unzipped the resin download (ie: C:\resin-3.0.14)</li>
- <li>Double-click httpd.exe. At this point the resin web server should start.</li>
- <li>Open your favorite browser and type in the following URL: http://localhost:8080</li>
- <li>You will now see Resin's Default Home Page</li>
- </ol>
- </s2>
- </s1>
- <s1 title="Part II: Configuring Resin to Serve PHP Pages">
- <ol>
- <li>Cut and paste the "resin-web.xml" into your favorite text editor.</li>
- <li>Save the file into C:\resin-3.0.14\webapps\ROOT\WEB-INF (NB: if you use
- Notepad, then be careful to either save as "all files" or just put the
- file name in double quotes. IE: "resin-web.xml").</li>
- <li>Cut and paste the "hello-world.php" into your text editor.</li>
- <li>Save the file into C:\resin-3.0.14\webapps\ROOT</li>
- <li>Open your favorite browser and type in the
- following URL: http://localhost:8080/hello-world.php.</li>
- </ol>
- <example title="WEB-INF/resin-web.xml">
- <web-app xmlns="http://caucho.com/ns/resin">
- <servlet-mapping url-pattern="*.php"
- servlet-class="com.caucho.quercus.servlet.QuercusServlet">
- </servlet-mapping>
- </web-app>
- </example>
- <example title="hello-world.php">
- <?php
- echo "Hello World";
- ?>
- </example>
- </s1>
- <s1 title="Conclusion">
- <p>If all went well with the above steps, you have installed
- Resin correctly. Congratulations!</p>
- <p>You can now create your own PHP pages and store them in the same
- directory as the hello-world.php file.</p>
- </s1>
- </body>
- </document>