Documents

Checking license

After you install the Bit Web Server from Google Play Store. The Bit Web Server will ask a license, it will contact server LVL Google. Because this license producted by Google. When checking license the devices must be connected to Internet, only needed around 3-5 seconds to checking license.

After the Bit Web Server was confirmed have a legitimate license, then this application can run offline.

  • If you have experience licensing issues while accessing Bit Web Server, might you using a different account than the one used at the time of the app purchase. If the Bit Web Server is associated with a different Google Account, so the license will fail. Please make sure that you is logged into the appropriate Google Play account before opening the Bit Web Server.
  • We're aware that some users are receiving a license check failure after making the switch from @Googlemail to @gmail, and we're currently investigating a more permanent solution. In the meantime, some users have found resolved their problem by clearing their Google Play store data (Menu > Settings > Applications > Manage applications > All > Play Store > Clear data).
If you have some questions about license, you can contact to my email.

Default password for MySQL root user

The default password for the root MySQL in Bit Web Server is no password. Why I create this doc, because I still get email from users which ask to my email how to login to phpMyAdmin?

So to manage (create read update delete) your MySQL database via phpMyAdmin, and in login page phpMyAdmin is:

username: root
password: (empty, don't input anything and click go and done)

Example in your PHP code to test connect to MySQL server as below:

<?php
$con = mysql_connect("localhost", "root", "");
if (!$con) {
  die("Could not connect: " . mysql_error());
} else {
  echo "Connected successfully";
}
?>

And if you install a CMS from scratch, such as CMS (joomla, wordpress, drupal, etc). When installing you will see with field which ask the MySQL password, then you just empty the field.

In current version the Bit Web Server not supported to manage MySQL database via MySQL console (terminal), so if you want to manage your MySQL database you can do it via phpMyAdmin. You can use tool sql query in phpMyAdmin if you want use MySQL query like in command line.

I think phpMyAdmin is a tool of powerful for management a MySQL databases.

Change or give a password for MySQL root user

The default password for the root MySQL in the Bit Web Server is no password (I know it's not secure), but you can give a password for MySQL root user.

If you want to change/give the password for MySQL root user is you can using phpMyAdmin, after you successfully login to phpMyAdmin in home page phpMyAdmin click Change Password like image in below:

And type your password in field password and confirm your password again in field confirm, like image in below:

and click button go, done, now your MySQL for root user have a password (to test your password work or not, you can logout phpMyAdmin and login again with your password).

So now, in your PHP code to test connect to MySQL server approximately like below:

<?php
$con = mysql_connect("localhost", "root", "yourpassword");
if (!$con) {
  die("Could not connect: " . mysql_error());
} else {
  echo "Connected successfully";
}
?>

And if you install a CMS from scratch, such as CMS (joomla, wordpress, drupal, etc). When installing you will see with field which ask the MySQL password, then you must type your password in the field.

For more secure: After you give the root a password, you should change the configuration on phpMyAdmin does not allow to login without a password. Go to menu Preferences>>Config MySql>>Edit config.inc.php

Code before/default is:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
For secure change a value to be false, like this:
$cfg['Servers'][$i]['AllowNoPassword'] = false;

Sending email from PHP (mail function)

Before you send email from PHP script, first you must config the MSMTP, you can follow instruction in below:

Go to menu preferences and then click Email to edit your account smtp. If you don't have smtp server, you can still to use smtp by Gmail, you just change value (user, password and from) at default configuration msmtp with your Gmail account, example:

user robetmars@gmail.com
password guest!n4t!on
from robetmars@gmail.com

To test send mail from PHP, you can use scripts in here or here.

If you want to using smtp with Gmail account and your device has been rooted, I recommended you create a new Gmail account, because for keep your original Gmail account from malicious applications.

This function support for Bit Web Server version 2.1.8 and above.

Wrong timezone in PHP

Because the default value date.timezone in php.ini is "Asia/Jakarta", If your location in London replace "Asia/Jakarta" to "Europe/London". If you get wrong time zone when running PHP script with date function, The solution is:

Go to menu preferences and then click PHP (Edit configuration php.ini) to edit your php.ini.

In variable date.timezone, replace the value with your time zone.

To test your time zone php is working or not, you can try running this script.

<?php
echo date("Y-m-d H:i:s");
?>

Please read this link to know list time zone, the value in coloumn TZ*.

Wrong timezone in MySQL

Because the default time zone in MySQL server is "+00:00", If your location in London so your time zone is "+01:00". If you get wrong time zone when you running NOW() function in MySQL query, The solution is:

Open phpMyAdmin, after that go to SQL tab to running MySQL query via phpMyAdmin. In the coloumn query type query to set global time zone, the query is:

SET GLOBAL time_zone = "+01:00";

To test it work or not, still in SQL tab run this query:

SELECT NOW();

And see the result, whether the date and time is correct?! if the result is correct so result year, month, date, hour, minute, second at this point.

Please read this link to know list time zone, the value in coloumn UTC DST offset.

Install YII-framework

I create this doc because the problem is Bit Web Server there is not php-cli and files on SDCard cannot using chmod function

Standart installation YII-framework is with command line:

$ ./yiic webapp folderwebapp

and then will be generating folderwebapp

The problem with standart installation can't running, because the Bit Web Server there is not php-cli, so the solution is just copied folder webapp to root path your yii and there was little change in files to patch the chmod.

First, download YII-framework from the official site, after downloaded extract the yii-version.zip to your path web root, the default path web root for the Bit Web Server is /sdcard/www , then rename the folder yii-version with a name that is easy be called, example folder name is yii and full path your YII-framework will be /sdcard/www/yii

And then download files to patch chmod in here and extract it, and next step to make YII-framework can running on Bit Web Server is:

- Replace CFileHelper.php from yii-patch-chmod to /sdcard/www/yii/framework/utils/CFileHelper.php
- Replace CAssetManager.php from yii-patch-chmod to /sdcard/www/yii/framework/web/CAssetManager.php
- Copy webapp folder from yii/framework/cli/views to /sdcard/www/yii/!paste-folder-webapp-in-here!
- [Optional] => Rename webapp folder with up to you, example folder name is firstwebapp

And now you can accessing your webapp with go to http://localhost:port/yii/firstwebapp

Done, just it, and happy coding :-)

Import .sql/.gz/.bz2/.zip file from SDCard to phpMyAdmin

If you have a problem can't import MySQL database with format .sql/.gz/.bz2/.zip file from SDCard to phpMyAdmin, the solution is you must install a third-party file manager app first, because the default file manager app in your device can't find the .sql/.gz/.bz2/.zip file in SDCard when you choose/looking for files from SDCard.

I recommend you to install this app ES File Explorer you can download it with click this link.

After you finish install the ES File Explorer. Now when you do looking for the .sql/.gz/.bz2/.zip file from SDCard, then you can see your MySQL database files on the SDCard. Way to import is as usually:

- Open phpMyAdmin
- Create a database, if the database is not yet available
- Select the database and click import tab
- When you browse MySQL database file, choose a file using ES File Explorer
- And click Go button, will be successful if your query correctly