Installation using AndroPHP


To install a webapplication like Image Wiki CMS Groupware or others like Wordpress, Joomla etc. on an Android device, you need to setup a webserver with PHP (based on Apache or Lighttpd or anything else) and a MySQL server first.
Thee Apps we are knowing to provide Servers on Android use Lighttpd and whilst Tiki is mainly optimised for Apache, it works on Lighttpd aswell.

AndroPHP is an App, which you can get for free at the Google PlayStore and different more sources. Simply go to the Source, search for AndroPHP and click onto the "Install" link.

Once AndroPHP is installed, you just need to start it and you will see a slim screen with an On/Off button, which starts and stops the two Servers.

General information


AndroPHP's default www path: sdcard/www
AndroPHP's default webserver port: 8080
Access phpMyAdmin via the same port: 8080
AndroPHP's default MySQL server port: 3306
Localhost on Android devices should be 127.0.0.1

Access the webservers root from the device's internal webbrowser(s):
http://127.0.0.1:8080
(in the default setting, this will bring you to the directory sdcard/www, which in this case is the "website root")
Access phpMyAdmin from the device's internal webbrowser(s):
http://127.0.0.1:8080/phpmyadmin

How to access the webserver from another computer via a LAN / WLAN or Hotspot of my phone ?


On the startpage of the running AndroPHP App, you see the local (LAN/WLAN) IP adress of your Android device.

This IP number could be something like 192.168.2.109 ... that depends on the Routers configuration ... as said, AndroPHP will show you the actual IP.

Open a browser on any computer which has access to the LAN / WLAN and type:
http://192.168.2.109:8080 to access the website root or http://192.168.2.109:8080/phpmyadmin to access your MySQL databases, respectively to create or to import them.

How to install my webapplication?


Webapplication

The installation process is quite similar than on any Linux webserver - just some kind of easier (at least with Tiki, as no root access to the Android device is needed.

Download your webapplication to your local computer and unpack.

Get the external SDcard plugged into your computer or connect your Android device to the computer as hard drive.

Create a folder and copy the webapplications directories and files to the SDcard of the Android.

Optionally (slightly recommended) store this folder internally on your device - maybe in sdcard/www ... you can choose a different structure and location, but you then have to change the default path in the AndroPHP settings.

When you now access port :8080, you will mostlikely find some message of your webapplication or directly be connected to the installer.
Maybe you get some error messages due to inconvenient file permissions.

If you have no shell on your Android device, you have to fix the permissions manually (for Tiki not a big deal, if you have not to do this every day).
If you have shell access and you use Tiki, you could fix the permissions with sh setup.sh (after cd into the installation directory).

Otherwise you need a file manager which can alter permissions on your Android device - if the default file manager is not convenient, get another one for free for example in Googles PlayStore.

Database

Most webapplications need a database - we have a MySQL server on board now:

Connect to phpMyAdmin and create a database (ex. 'mydb'), a database user (ex. 'mydbuser'), a password for the database user (ex. '12345difficult').
http://127.0.0.1:8080/phpmyadmin or http://192.168.2.109:8080/phpmyadmin

If you have an existing database (an exported dump) you also can import it into the freshly created database.

Installer

Now you can start your webapplications installer.
http://127.0.0.1:8080 or http://192.168.2.109:8080

Optionally, if necessary for a reason, you could setup the local.php manually.

The local.php for Tiki would look something like this:

Copy to clipboard
<?php $db_tiki='mysql'; $dbversion_tiki='10.0'; $host_tiki='127.0.0.1'; $user_tiki='mydbuser'; $pass_tiki='12345difficult'; $dbs_tiki='mydb'; $client_charset='utf8'; //default and optional comments ...

That should be pretty much it. Have Fun.