Google is now supporting 2 languages for Google App Engine: Phyton and Java. This article shows how you can use PHP on Google App Engine.
Running PHP on GAE is possible by using Quercus from Caucho, Quercus implements PHP in Java, see below URL's about running Quercus on GAE>
- http://blog.caucho.com/?p=187
- http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine/
- http://brian.brispace.net/2009/04/09/php-on-google-app-engine/
Assuming also that you did the Java Getting Started tutorial to get hands-on experience with the GAE Java SDK and the Google Eclipse Plugin.
Then you can also get PHP running on GAE with below steps.
1) Create a Google Web Application inside Eclipse
Optional: De-select GWT on the "New Web Application project" wizzard.
2) Copy resin.jar from Resin 4.0 to WEB-INF/lib
Add resin.jar to the java build path: Right-click on the project-name, select 'properties' then 'Java build path' and the add resin.jar under 'Libraries'
3) Modify war/WEB-INF/web.xml so that it contains (also) below content
<welcome-file-list>4) Add below lines to war/WEB-INF/appengine-web.xml
<welcome-file>index.php</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>quercus</servlet-name>
<servlet-class>com.caucho.quercus.servlet.GoogleQuercusServlet<servlet-class>
</servlet>
<servlet-mapping>
<url-pattern>*.php</url-pattern>
<servlet-name>quercus</servlet-name>
</servlet-mapping>
<static-files>5) Create the war/index.php file.
<exclude path="/**.php" />
</static-files>
<resource-files>
<include path="/**.php" />
</resource-files>
<?php6) Run the development server.
phpinfo();
?>
7) Surf to: http://localhost:8080/
3 reacties:
Why don't you post a detailed description on how to get to run your PHP code on appengine, I've been reading blogs for hours and no one really explains how to get it to work, all describe the magic 4 steps only, which of course don't work.
Thank you
aichholzer: If you have a concrete question I would be glad to help you. However I don't think I must duplicate what Google has done. The Google documentation is very good.
That's why I did wrote below line in this blog posting:
"Assuming also that you did the Java Getting Started tutorial to get hands-on experience with the GAE Java SDK and the Google Eclipse Plugin."
I am unable to upload because the resin.jar is too big. thoughts?
Een reactie plaatsen