47

I currently work on an open source e-commerce platform (www.oscmax.com) and I am trying to work out if I can deploy an offline version that can run on an tablet. I was hoping to use an iPad but this has proved very difficult (impossible?)

a) Does anyone know of an AMP (apache mysql php) version that will run on a tablet - eg. Android?

The idea is to have a local version of the online store that sales reps can use when selling to wholesale customers that will store the orders locally until they find a WiFi or 3G signal at which point it will merge the new records into the webserver.

If I could get Apache, MySQL and PHP to run locally (like it does using WAMP, MAMP, LAMP, etc.) it would be great as the app would be usable without an internet connection.

Regards,

Giles
  • 851
  • 1
  • 9
  • 19
  • 2
    Why not just use a custom app? – Dunhamzzz Jul 04 '11 at 14:04
  • 1
    @Dunhamzzz is right. You'd be much better off writing an app for this. Installing a whole AMP stack is going to use a substantial amount of space, RAM, and processing power on the device. – ceejayoz Oct 06 '11 at 16:18
  • 2
    I'm considering to get a Via APC 8750 board, and this question is absolutely relevant, and make me hate even more people that keep changing the question to make their answer idea work. I don't want to create a phone app either. – FMaz008 Jun 03 '13 at 18:08
  • You Might be interested in https://www.box.com/s/1wskqrgpe043azsfmh3c and its source code https://github.com/punkboy/android – Shushant Jun 21 '13 at 13:20
  • sorry for dead link this project is moved to http://droidphp.github.io – Shushant Aug 21 '13 at 11:09
  • Install termux app in play store and get into the linux terminal. after you can install php. then you can run a local dev server with php by `php -S 127.0.0.1:8000` command – Ramesh Kithsiri HettiArachchi Jul 30 '19 at 21:20

14 Answers14

21

Finally - someone has released the full package!

Bit Web Server (AMP; also see their homepage) stack running on Android. No hacking required. $2 to pay though!

If you are looking for a stack for iOS then the cydia-ios-lighttpd-php-mysql-web-stack does the trick: Should run lighttpd + php 5.4 + mysql - unfortunately only on jailbroken devices.

Edit: In case anyone is interested I have switched to Windows 8 tablet which happily runs all of the opensource AMP stacks. Runs very nicely and with a bit of Bootstrap styling I have a full feature sales order "app" for nothing. Little bit of code to sync back to the online version - no need to spend $50 per month per user on HandShake or similar.

Izzy
  • 1,134
  • 3
  • 25
  • 58
Giles
  • 851
  • 1
  • 9
  • 19
  • 6
    Problem with lighttpd is that it doesn't understand apache mod_rewrite so you can't use friendly url's. – Codebeat Aug 31 '13 at 01:20
15

If you're not stuck with PHP and MySql, then another option would be to use Html 5.

Then your site can run in the browser on iOS and (most) versions of android. By using offline cache and a local database, you could avoid using PhoneGap, etc. You could also use jQuery if you like.

You would, however, have to use javascript to access the local database instead of php. Also - since the sqlite support is being dropped in Html 5, you would have to use local storage or indexed db. I find the former much simpler and fine for my purpose.

BTW - for developing, Google Chrome has nice tools for debugging javascript.

AndyS
  • 600
  • 5
  • 14
6

Have you tried using Linux Installer to get a full Debian build on the phone? It's billed as being able to run a full LAMP environment in about 300M and has gotten some good reviews.

Ken
  • 61
  • 1
  • 1
6

I'm looking for the same thing, but all I found was PAW Server.

I haven't tried it but I was told it should work just like a standard AMP install but without the mySQL.

The database is what I'm finding to be a pain. I might just have to use a remote DB and local web server to feed from that, but that will mean I'll need to have it always online.

Dori
  • 865
  • 1
  • 12
  • 20
Chewwwy
  • 77
  • 1
  • 2
4

There is something called ksweb:

https://play.google.com/store/apps/details?id=ru.kslabs.ksweb&feature=search_result

the Tin Man
  • 150,910
  • 39
  • 198
  • 279
Abul Hassan
  • 61
  • 1
  • 3
4

You can also try Palapa Web Server. It is completely free.

https://play.google.com/store/apps/details?id=com.alfanla.android.pws&hl=en

Vibin TV
  • 822
  • 9
  • 25
3

There are no PHP interpreters that I know of for Android or IOS (or WebOS or BlackBerryOS).

If you want to run a web site as an app on a mobile device or tablet as a native application, all functionality needs to be in Javascript and wrapped with a library like PhoneGap or Titanium. Android and IOS web apps are both able to use local storage databases where data can be kept until a network connection is made. Any server-side logic would require a call out to your web server and an active internet connection on the device.

rust
  • 49
  • 1
2

Check out androPHP I use it for testing on android ANdroPHP.

windwaker
  • 305
  • 2
  • 12
2

I think this is what you're looking for: PAW Server from http://paw-android.fun2code.de/

hope it works

Izzy
  • 1,134
  • 3
  • 25
  • 58
Juan Ignacio
  • 2,987
  • 8
  • 32
  • 53
0

On Google Play, PAW Server is the typical PHP server package ( contain Beanshell code ). You can put your webpages in the "html" folder. However, typical Beanshell code is not very familiar to be edited. On Android device, I recommend you to use SL4A and phpforandroid to build up Perl and PHP Server. Yet, they do not use MySQL as DATA base. You should be familiar with the Scripting Layer for Android (SL4A) platform. See this link for reference

ggiroux
  • 6,106
  • 1
  • 20
  • 23
Alex
  • 1
0

Here is the App Bit Web Server (PHP,MySQL,PMA)

It can run a variety of CMS like Wordpress, Joomla, Drupal, Prestashop, etc. Besides CMS can also run PHP frameworks like Code Igniter, YII, CakePHP, etc. It is the same as WAMP or LAMP or XAMPP on your computer or laptop, but this is for android devices with lighttpd instead of apache.

JGrinon
  • 1,421
  • 1
  • 14
  • 34
Dwij
  • 11
  • 3
0

For me AndroPHP (its an app name) , worked perfectly... see below links

http://gntheprogrammer.blogspot.in/2013/09/how-to-use-your-android-device-as.html

https://doc.tiki.org/AndroPHP

Please follow the steps it will help u .....

Sunny Shukla
  • 481
  • 5
  • 13
  • AndroPHP google play link : https://play.google.com/store/apps/details?id=com.ayansoft.androphp&hl=en you can download the app's apk from the below site... http://apps.evozi.com/apk-downloader/ – Sunny Shukla Jan 16 '15 at 10:27
0

In PHP I use Server For PHP app in playstore, for MySql I use MariaDB Server, and to connect to MariaDB with PHP 7 use this code:

<?php
$your_variable = mysqli_connect('your hostname', 'root(default)', 'leave this empty', 'the database you want to connect');
?>
Nathan Tuggy
  • 2,239
  • 27
  • 28
  • 36
0

Use this app : Servers Ultimate
With this app can run any server you can imagine on your android device (php, mysql, ftp, dhcp, ...) your phone will be a real server, just install the app click on (+) sign to add server, if the server is not installed the app will ask to download the package. You can access your server via LAN or WAN easily.

Charaf
  • 161
  • 1
  • 1
  • 10