[php] Running AMP (apache mysql php) on Android

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,

This question is related to php mysql apache tablet

The answer is


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.


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.


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');
?>

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


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

hope it works


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.


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


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.



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.


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


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 .....


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.


Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Examples related to apache

Enable PHP Apache2 Switch php versions on commandline ubuntu 16.04 Laravel: PDOException: could not find driver How to deploy a React App on Apache web server Apache POI error loading XSSFWorkbook class How to enable directory listing in apache web server Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details How to enable php7 module in apache? java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache server on my computer

Examples related to tablet

Android ADB doesn't see device HTML Mobile -forcing the soft keyboard to hide Running AMP (apache mysql php) on Android Media Queries: How to target desktop, tablet, and mobile? How to detect the device orientation using CSS media queries? Emulate Samsung Galaxy Tab