Those of us familiar with dynamic web programming have most likely heard the term LAMP (Linux, Apache, MySQL and PHP) or WAMP(Windows, Apache, MySQL and PHP). LAMP/WAMP refers to a stack of software used to run a website or server. In LAMP, Apache is the web server, MySQL is the database and PHP is the programming language. Good news is that, as the outcome of the open source research of Nokia PAMP, the AMP stack for Series60 mobile devices is now available. Now a Series60 device can be turned into a web server - LAMP users can publish their PHP sites on their mobile devices which can be accessed from anywhere in the world.
The PAMP StackIn the Symbian Series60 environment the AMP stack is implemented over Open C. Open C is a set of industry-standard POSIX and middleware C libraries for S60 on Symbian OS. In PAMP, PHP and MySQL are both version 5.
Installing PAMPThe pre-requisite for running PAMP is a Symbian Series60 3rd edition handset having 128MB of free RAM. As per the PAMP wiki they have tested with Nokia N95 8GB and Nokia E90. But any S60 3rd edition phone with sufficient memory should work. (I used Nokia N95 8GB (thanks to Mr. Benjamin Allen H. Burgos III)).
The PAMP installation package (the one I used and test-run) can be downloaded here.
You should install the following files contained in the package (just hit "yes" for some security prompts):
NOTE: To avoid "Certificate Errors", move your date back to year 2008 (In my case, I moved the phone's date to November 2, 2008).
The installation will then create the following new directories:
c:\data\apache- the ServerRoot of Apache httpd.
c:\data\php- the location of PHP's ini file.
c:\data\mysql- the location of MySQL's configuration file.
c:\mysql- the location of MySQL databases.
e:\data\apache\htdocs- the DocumentRoot of Apache httpd (In WAMP, this is your
NOTE: DocumentRoot is always on
E:, so you cannot install PAMP on a device that lacks a memory card. However, after the installation, DocumentRoot can be made to point elsewhere.
Building a Network of Connectivity/Creating a LAN
This is an optional thing for you to do as I've found out that this is only a need if you're to manipulate your databases residing on your phone using your laptop via Ad-Hoc network. Importing your databases to your phone's memory (
c:\mysql) simplifies the task. A detailed description on connectivity can be found here.
Running the PAMP
Step 1: Start
PAMP, MySQL, Apache
Step 2: Let's Test ....
Using the phone's native browser or Opera Mobile 10, browse to
http://localhost/. You should be greeted with a page that says It works!.
Step 3: View
Run More PHP Scripts
There are a number of FREE
html/php editorfor mobile flooded in the internet today, but LCG X-plore should still do.
Step 1: Create
Step 2: Save the file. Make sure to save
NOTE: Saving the file as
Unicodedoesn't work. So make sure to uncheck
Save as Unicode.
Step 3: Run...