在 Android 上运行 AMP(apache mysql php)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6571911/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 00:45:09  来源:igfitidea点击:

Running AMP (apache mysql php) on Android

phpmysqlapachetablet

提问by Giles

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

我目前在一个开源电子商务平台 (www.oscmax.com) 上工作,我正在尝试确定是否可以部署可以在平板电脑上运行的离线版本。我希望使用 iPad,但事实证明这非常困难(不可能?)

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

a) 有谁知道可以在平板电脑上运行的 AMP (apache mysql php) 版本 - 例如。安卓?

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.

这个想法是拥有一个本地版本的在线商店,销售代表在向批发客户销售时可以使用该版本将订单存储在本地,直到他们找到 WiFi 或 3G 信号,此时它将新记录合并到网络服务器中。

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.

如果我能让 Apache、MySQL 和 PHP 在本地运行(就像它使用 WAMP、MAMP、LAMP 等那样),那就太好了,因为该应用程序可以在没有互联网连接的情况下使用。

Regards,

问候,

采纳答案by Giles

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!

在 Android 上运行的Bit Web Server(AMP;另请参阅他们的主页)堆栈。无需黑客攻击。不过要付2美元!

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

如果您正在寻找适用于 iOS 的堆栈,那么cydia-ios-lighttpd-php-mysql-web-stack可以解决问题:应该运行 lighttpd + php 5.4 + mysql - 不幸的是,只能在越狱设备上运行。

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.

编辑:如果有人感兴趣,我已经切换到 Windows 8 平板电脑,它可以愉快地运行所有开源 AMP 堆栈。运行得非常好,加上一些 Bootstrap 样式,我有一个功能齐全的销售订单“应用程序”。同步回在线版本的少量代码 - 每个用户每月无需在 HandShake 或类似产品上花费 50 美元。

回答by AndyS

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

如果您没有坚持使用 PHP 和 MySql,那么另一种选择是使用 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.

然后您的网站可以在 iOS 和(大多数)Android 版本的浏览器中运行。通过使用离线缓存和本地数据库,您可以避免使用 PhoneGap 等。如果您愿意,也可以使用 jQuery。

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.

但是,您必须使用 javascript 而不是 php 来访问本地数据库。另外 - 由于 SQLite 支持在 Html 5 中被删除,您将不得不使用本地存储或索引数据库。我发现前者更简单,更适合我的目的。

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

顺便说一句 - 对于开发,谷歌浏览器有很好的工具来调试 javascript。

回答by Ken

Have you tried using Linux Installerto 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.

您是否尝试过使用Linux 安装程序在手机上获得完整的 Debian 构建?它被宣传为能够在大约 300M 中运行完整的 LAMP 环境,并获得了一些好评。

回答by Chewwwy

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

我正在寻找同样的东西,但我发现的只是PAW Server

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

我还没有尝试过,但有人告诉我它应该像标准 AMP 安装一样工作,但没有 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.

数据库是我发现的痛苦。我可能只需要使用远程数据库和本地 Web 服务器来从中获取数据,但这意味着我需要让它始终在线。

回答by Vibin TV

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

您也可以尝试 Palapa Web Server。它是完全免费的。

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

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

回答by rust

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

据我所知,没有适用于 Android 或 IOS(或 WebOS 或 BlackBerryOS)的 PHP 解释器。

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.

如果您想在移动设备或平板电脑上将网站作为应用程序作为本机应用程序运行,则所有功能都需要在 Javascript 中并使用 PhoneGap 或 Titanium 等库进行包装。Android 和 IOS 网络应用程序都能够使用本地存储数据库,在建立网络连接之前,数据可以保存在其中。任何服务器端逻辑都需要调用您的网络服务器和设备上的活动互联网连接。

回答by Juan Ignacio

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

我认为这就是你要找的:来自http://paw-android.fun2code.de/ 的PAW 服务器

hope it works

希望它有效

回答by windwaker

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

查看 androPHP 我用它在 android 上测试ANdroPHP

回答by Dwij

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

这是 App Bit Web 服务器(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.

它可以运行多种 CMS,如 Wordpress、Joomla、Drupal、Prestashop 等。此外 CMS 还可以运行 PHP 框架,如 Code Igniter、YII、CakePHP 等。它与您的计算机或笔记本电脑上的 WAMP 或 LAMP 或 XAMPP 相同,但这是针对带有 lighttpd 而不是 apache 的 android 设备。