Thursday, January 10, 2013

PHP 5, MySQL web server on Android

Want to run a web app server on your smartphone or tablet? Specifically, run a full fledge PHP-MySQL Web Server straight from your Android device.

Well, there are a few pre-built apps on the Google App Store. In the past, there were a few lightweight HTTP servers running customize apps like AirDroid or PAW. These new ones have full PHP and MySQL run-times.

I tried a few and settled with Bit Web Server. I also tried KSWEB.

Bit WebServer also comes with PHPMyAdmin (PMA) installed and you are ready to go.
You can install Drupal and Wordpress as well. I got Code Igniter running without any problems.

A few notes. These apps tend to be a bit buggy. They can force-quit or hang under load. I can't really blame them as the fault may be with Android OS itself or the hardware I am running. I've tried them with the Galaxy Nexus and a Samsung Galaxy Tab 2. I've been reading that the OS (Jelly Bean and ICS) may starve the apps due to power savings and other reasons such as auto close.

I can't really complain though. I'm not running anything mission critical. If the app crashes, I simply restart it. It comes in handy show off web apps.

Moreover, it runs LIGHTTPD instead of Apache so PHP run as a CGI.

The apps range from $2 to $3. Yeah, you're paying for open source software and may have an issue with it. However, think about the time you are saving without having to resort to building PHP/MySQL from scratch and make it work on your phone. I have no problem with the pricing.

Just add a keyboard and you are ready to go!


Bit Web Server


  1. Thanks for taking the time - Quite exiting to see the development of the Android Platform - to become an alternative (light) OS for misc purpose.
    I am thinking of getting a APC.IO or MK803 to serve as "Home-Web Server" - could be fun to see if we somehow can hack it to become full force web appliance.

    1. You are better off getting a PogoPlug to run as a "home webserver". It is much cheaper and better. PogoPlug can be had for $20 and you can install full ArchLinux. Search my blog for PogoPlug . Still, having a portable LAMP stack in your pocket is pretty cool.

  2. try DroidPHP its open source alternative to Ksweb and Bit Web