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.
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
- ARM cross-compiling
- Cross compiling static C hello world
Anyway you can read this article how i cross compile for DroidPHP
- Cross Compiling for DroidPHP
here is some articles regarding cross compiling PHP, Nginx, Lighttpd on arm6
Cross compiling PHP
- Cross Compile PHP 5.3.3 to ARM
- Error while compiling PHP for ARM (not reverent but helpful)
- starting with php cross compile
- Cross Compile Lighttpd + PHP + MySQL for ARM (2) (in Chinese but translate it to English)
Cross compling LIghttpd
- lighttpd cross compiling
- Cross compiling for ARM9 doesn't work
Cross compiling Nginx
I am New to android but something sounds wrong about all this.php is a server side scripting language. Now you are going to run around from hot spot to hot spot hosting I guess a web service backed by a mysql database. Do you have a static ip? Mysql is an excellent choice for a low end dbms if sqlite was not already built into droid. Like I said I am New and it's probably me but this just sounds wrong.
From the answers I see someone talking about compiling php which would make it no longer script.
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.