Running AMP (apache mysql php) on Android [closed]
开发者_开发问答
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI currently work on an open source e-commerce platform 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,
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.
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.
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.
There is something called ksweb:
https://play.google.com/store/apps/details?id=ru.kslabs.ksweb&feature=search_result
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
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.
Check out androPHP I use it for testing on android ANdroPHP.
I think this is what you're looking for: PAW Server from http://paw-android.fun2code.de/
hope it works
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
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.
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 .....
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');
?>
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.
精彩评论