10

I want to run PHP + MySQL server on my Android Device. People seem to suggest applications like KSWeb and Bit Web.

Other solutions suggested are that I install an application that allows me to run Linux on Android. This requires the Android Device to be rooted. :(

I don't want to use any other application for this. So I would like to build an application similar to KSWeb myself. I have searched around for how to start building such application but it has not helped so far. Any guidance on how to go about this?

I mean how is it possible for KSWeb to build something like this, without root. :O

Any guidance on how to go about building this application would be very helpful.

Somewhere I was told to get the binaries compiled for ARMv6, but I don't know how to start.

Can NDK be of any use to me?

Please Help.

3 Answers 3

12

I am currently maintaining free and open source web server solution stack package, consisting mainly of the Lighttptd HTTP Server, MySQL database, PHP programming languages. It is still at beta stage.

It can give you a basic idea about how to develop this type of stuffs in android.

Yes, its true binaries must compiled for ARM CPU in order make file executable.

And you can use NDK but i recommend you to go with alternatives like CodeSourcery or Linaro

Here some starter tutorial for cross compiling Linux program to ARM

Anyway you can read this article how i cross compile for DroidPHP

Sign up to request clarification or add additional context in comments.

7 Comments

Thanks. This looks very similar to what I need. I will study this and get back to you.
Hey Shushant.. Can you explain me the steps to compile PHP, MySQL and Apache into Android? Compiling from source looks to be big work. I remember building Apache, PHP and MySQL on FreeBSD, it took several hours! :O I would be happy if you can explain the steps for compilation. :D
compiling php along with commonly required extension is nightmare you will need to cross compile extension separately. if you need help in cross compiling create an new question at unix.stackexchange.com
Thanks for a quick revert. I will learn more about cross compiling extension separately. Can you share with me the steps for compiling PHP in general on Android.
Shushant.. I don't know if this is a bug with DroidPHP or no. But when I use getRunningServices I always get a service by the name of com.github.DroidPHP.ServerService. I get this even if the server is not running. I guess you need to add stopService in the btn_stopServer.setOnClickListener in the HomeActivity.java .
|
7
+50

here is some articles regarding cross compiling PHP, Nginx, Lighttpd on arm6

Cross compiling PHP

Cross compling LIghttpd

Cross compiling Nginx

Comments

0

If you're open to use something other than PHP/Mysql, Python may be a good option. You can listen to sockets and send info through Python, which is supported through SL4A app.

Apparently CherryPy works on Android: http://www.defuze.org/archives/228-running-cherrypy-on-android-with-sl4a.html

There's Django and probably others, but those may be more complex to set up.

1 Comment

If I was to write a new application, then I would rather write a native android application, why would I go the client-server way? :P

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.