Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit bc08d5a8042ecb39a21324bf2010009a8f0c848d Nam Nguyen committed Dec 6, 2012
0 README.md
No changes.
79 build.xml
@@ -0,0 +1,79 @@
+<project>
+ <property name="sdk.dir" location="../appengine-java-sdk" />
+
+ <import file="${sdk.dir}/config/user/ant-macros.xml" />
+
+ <path id="project.classpath">
+ <pathelement path="war/WEB-INF/classes" />
+ <fileset dir="war/WEB-INF/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="${sdk.dir}/lib">
+ <include name="shared/**/*.jar" />
+ </fileset>
+ </path>
+
+ <target name="copyjars"
+ description="Copies the App Engine JARs to the WAR.">
+ <copy
+ todir="war/WEB-INF/lib"
+ flatten="true">
+ <fileset dir="${sdk.dir}/lib/user">
+ <include name="**/*.jar" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="compile" depends="copyjars"
+ description="Compiles Java source and copies other source files to the WAR.">
+ <mkdir dir="war/WEB-INF/classes" />
+ <copy todir="war/WEB-INF/classes">
+ <fileset dir="src">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ <javac
+ srcdir="src"
+ destdir="war/WEB-INF/classes"
+ classpathref="project.classpath"
+ debug="on" />
+ </target>
+
+ <target name="datanucleusenhance" depends="compile"
+ description="Performs JDO enhancement on compiled data classes.">
+ <enhance_war war="war" />
+ </target>
+
+ <target name="runserver" depends="datanucleusenhance"
+ description="Starts the development server.">
+ <dev_appserver war="war" />
+ </target>
+
+ <target name="update" depends="datanucleusenhance"
+ description="Uploads the application to App Engine.">
+ <appcfg action="update" war="war" />
+ </target>
+
+ <target name="update_indexes" depends="datanucleusenhance"
+ description="Uploads just the datastore index configuration to App Engine.">
+ <appcfg action="update_indexes" war="war" />
+ </target>
+
+ <target name="rollback" depends="datanucleusenhance"
+ description="Rolls back an interrupted application update.">
+ <appcfg action="rollback" war="war" />
+ </target>
+
+ <target name="request_logs"
+ description="Downloads log data from App Engine for the application.">
+ <appcfg action="request_logs" war="war">
+ <options>
+ <arg value="--num_days=5"/>
+ </options>
+ <args>
+ <arg value="logs.txt"/>
+ </args>
+ </appcfg>
+ </target>
+
+</project>
BIN quercus_on_gae_2.tar.gz
Binary file not shown.
11 war/WEB-INF/appengine-web.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>my_app_id_here</application>
+ <version>1</version>
+
+ <threadsafe>true</threadsafe>
+
+ <static-files>
+ <exclude path="/**.php" />
+ </static-files>
+</appengine-web-app>
0 war/WEB-INF/php.ini
No changes.
23 war/WEB-INF/web.xml
@@ -0,0 +1,23 @@
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
+ <servlet>
+ <servlet-name>Quercus Servlet</servlet-name>
+ <servlet-class>com.caucho.quercus.servlet.GoogleQuercusServlet</servlet-class>
+ <init-param>
+ <param-name>ini-file</param-name>
+ <param-value>WEB-INF/php.ini</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cloud-storage-bucket</param-name>
+ <param-value>quercusbucket0</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Quercus Servlet</servlet-name>
+ <url-pattern>*.php</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.php</welcome-file>
+ </welcome-file-list>
+</web-app>
13 war/mysql.php
@@ -0,0 +1,13 @@
+<pre>
+<?php
+
+ $jdbc_url = 'jdbc:google:rdbms//project_name:instance_name';
+ $db = mysql_connect($jdbc_url);
+
+ $result = mysql_query('SHOW DATABASES', $db);
+
+ while (($row = mysql_fetch_assoc($result))) {
+ var_dump($row);
+ }
+
+?>
5 war/test.php
@@ -0,0 +1,5 @@
+<?php
+
+phpinfo();
+
+?>
10 war/vfs.php
@@ -0,0 +1,10 @@
+<pre>
+<?php
+
+ $filename = 'test.txt';
+ var_dump(file_get_contents($filename));
+
+ file_put_contents($filename, 'modified at time ' . date('Y-m-d H:i:s O'));
+ var_dump(file_get_contents($filename));
+
+?>

0 comments on commit bc08d5a

Please sign in to comment.