Using Pawserver to build the Android platform PHP Environment

Source: Internet
Author: User
Tags port number

Pawserver can implement our desire to run PHP on Android @appinn

This is a technical article, some toss, do not involve the code (with the simulator words need a few lines), but not difficult, mainly to explore ideas.

There is no particular practical use of sex, not toss the emperor can be ignored.

Main software: Pawserver,

Equipment requirements: Installation of PHP requirements ARM architecture.

So the rat's ZTE U880 can not do, using the simulator operation, ARM architecture mobile phone users to see the second section directly.

Section one: Android Emulator port mapping

The Android system defaults to only a one-way access to the PC via IP (10.0.2.2), and PC computers cannot access the Android emulator system directly via IP. A port redirection (redir) is required to enable communication between PC and Android emulator systems and the Android emulator.

To use the Telnet command, WIN7 users to the "Turn on or off Windows feature" Check the Telnet-related items

Run the Android emulator and wait for the boot to complete.

Windows run CMD, enter the following command:

telnetlocalhost5554

5554 of which is displayed in the running? The port number in the upper-left corner of the Android emulator

After execution goes into androidconsole, you can see Help

Enter the following command:

rediraddtcp:8080:8080

The redir order is explained as follows:

Rediradd?::

Add a map under the UDP/TCP protocol

Example:

Redirlist

List all port mappings

Example: None

Redirdel?:

Remove specified port mappings

Example: redirdeltcp:8080

If you find yourself in the operation without errors, but the error, close the command window to reopen, try again (remember to connect with the Telnet command first)

Section II: Installation of pawserver on mobile phones

This step has no suspense and operates on its own.

Then open, start the service

Then the mobile phone user opens the web address on the computer.

Emulator user open: 127.0.0.1:8080 (port is the port you just set)

Login (default username/password: admin/paw)

You can use it to control the mobile phone operation and management, it turned out that he is a mobile phone management software.

Section III: Installing PHP plug-ins

On the page open above

Left "add-ons"--"plug-ins"

This page avast report poison, everybody casually, anyway the mouse went in

See how powerful it is? How many mice can not understand the things ah ...

We use the first one? Phpplug-in (Setup). The right side has the download button, you can download it.

Then extract it to (can be assisted with pea pods)/sdcard/paw/html/app/plugins/

Then refresh the page, the left side out a "plug-ins" main menu, enter, and then "Phpsetup"

Select a version, point "Install".

Then turn off the paw service on the phone (just click on the big button) and then start (or click the big button)

Refresh the page, or just that page, the right gray stripe area above the one? Phpinfopage, click on the link.

If you see the following image of the page is successful.

It's not going to work. Phpsetup choose another version of the installation, and then restart the service, try.

Section Fourth: Installing the Phpdome plugin

Methods basically, including three plug-ins one is guessing the word, a file Manager (I run the error here), a chat room (very practical)

Postscript:

In fact, the mouse wanted to install a database-free blog, but did not succeed, it is estimated that a PHP function does not support anything.

In addition theoretical support: SQLite

Of course, if you have a dynamically resolved domain name ... OK, it's time to play the handsome.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.