WiFiDB Alpha 0.16 Build 4

Post Reply
User avatar
Posts: 406
Joined: Mon Oct 22, 2007 8:38 am
Location: The Universe

WiFiDB Alpha 0.16 Build 4

Post by pferland »

I just wanted to get a message out, that Build 4 is just about ready, but with going to New Jersey till Wednesday i wont have much time to polish off a few last details.
a few of the changes that have been made since 3.1

1-> Added Daemon Generated KML exports. Details here.
2-> Fixed some HTML mode issues. KB385
3-> Fixed some issues that relate to WiFiDB running on a shared server host.KB385
4-> Forgot to remove a mysql_error() function from a verbose statement, in the update portion of the import_vs1() function
5-> Added Daemon Console Viewer.
6-> Fixed the issue with some tables in the 'vistumbler' theme where not centered.
7-> Fixed an issue with the user stat page, where the second AP import list was not showing up.
8-> Fixed an issue with the daemon where it would not start to import a file if said file was uploaded when the daemon was in the middle of an import.
9-> Added Daemon Generated KML History page, along with a link to it in the main menu.
10-> Made the output log and pid file for the daemon vars in the config file for the daemon.
11-> Disabled fields in the daemon section of the install page, if the daemon is not going to be used.
12-> Disabled the submit buttons on the Exports page if there is no imports/APs in the database.
13-> Extended `title` and `user` fields to 255 chars.
14-> Fixed a bug where the time was severly off in some cases, in Andrews instance, UTC said it was 01:11 (real UTC was 00:56), also local [-5] was reported as 21:11 (real time 20:40)
15-> Removed the "This is just a test" line on the import page after an import with the daemon enabled.

Things to finish before the release:
1-> Auto Detect if the clients time is using DST or not, and also the Timezone that the client is in, to calculate times off of the Databases UTC based time.
2-> Sort the Historical Exports on the Daemon Generated KMZ page.
  • a-> Add time of last update for the Current Update.kml File.
    b-> Separate out the newest KMZ file from the historical ones.
3-> Add word wrapping to the 'notes' and 'title' of all pages.

As a note, if you have wifidb in a folder that is not at the root of your server, you will need to add that folder name to the end of the HostURL var during the install.
i.e. http://www.randomintervals.com/wifidb/ is the $hosturl value, and the $root value is demo, so the full URL would make http://www.randomintervals.com/wifidb/demo/
if you do not have a setup like this you can just leave the hosturl as http://www.randomintervals.com or what ever your domain is.

Then also on the WWW server I am moving the wifidb code to a folder inside of the WiFiDB folder called demo. The root of wifidb will now be a details page about the Database, with links to the Production Demo, Andrews Official Instance of WiFiDB, and my Development server (RIHQ)

The best acceleration you can get on a Mac is 9.8ms^2
User avatar
Posts: 406
Joined: Mon Oct 22, 2007 8:38 am
Location: The Universe

Re: WiFiDB Alpha 0.16 Build 4

Post by pferland »

ok this is it, one last change, adding the ability for the daemon to remove the console log after so many lines, so it doesn't take for freaking ever to return something to the screen.

once this is done, the release will be made
The best acceleration you can get on a Mac is 9.8ms^2
User avatar
Posts: 406
Joined: Mon Oct 22, 2007 8:38 am
Location: The Universe

Re: WiFiDB Alpha 0.16 Build 4

Post by pferland »

OK after a long and torturous wait, 0.16 Build 4 is ready. Oh also a week and a half late.
Any way I have already explained the additions/fixes in the post above,

Tar.gz Archive: http://sourceforge.net/projects/vistumb ... z/download

ZIP Archive: http://sourceforge.net/projects/vistumb ... p/download

SVN: http://vistumbler.svn.sourceforge.net/v ... athrev=482

This part is the install details, if you know how to, you can skip this, if not, go on and read. don't complain if you cant get it to work and didn't read this.

The install Page, I think it is pretty simple.
You will note that there is two banners, you will need GD2 installed and enabled in PHP and also the PHP ZipArchive class
install screenshot
install screenshot
install_page.png (37.76 KiB) Viewed 4840 times
I mean if you cant follow that.. well.. lets just ask for help in the forum.

Here is the Upgrade Page, again pretty simple.
upgrade page screen shot
upgrade page screen shot
upgrade_page.png (36.99 KiB) Viewed 4840 times
This is a sample Config.inc.php file for the database.

#---------------- Daemon Info ----------------#
---Weather you want to run the daemon script (1) or HTML mode (0). set during install.
$daemon = 1;
---Run Debug mode (1) or not (0 default)
$debug = 0;
---The installed path for the Tools folder (only if you are using the daemon) set during install.
$wifidb_tools = '/CLI';
---The time zone that the server is running
$timezn = 'System/Localtime';
---The User the apache server is running as, only used if the daemon is in use. set during install.
$WiFiDB_LNZ_User = 'www-data';
---The group that the apache server is running as, also only if the daemon is in use. set during install.
$apache_grp = 'www-data';

#-------------Themes Settings--------------#
--- The default theme that the database will use. set during install
$default_theme = 'wifidb';
---The default refresh rate for any auto loading page.
$default_refresh = 15;
---The defult time zone for any page that has a time calculated on it, IE the scheduling page.
$default_timezone = 0;
---Cant remember this one, will be in use in the future though
$default_dst = 0;
---The timeout time for any cookies set by WiFiDB
$timeout = (86400 * 365); #(86400 [seconds in a day] * 365 [days in a year])

#-------------Console Viewer Settings--------------#
---The default refresh rate for the console page
$console_refresh = 15;
---The default setting for the auto scroll for the console page
$console_scroll = 1;
---The default setting for the summery of the console page
$console_last5 = 1;
---The default setting for summery lines to show on the console page
$console_lines = 10;
---The default location of the console log
$console_log = '/var/log/wifidb';

#---------------- Debug Info ----------------#
---(1) set the Database into rebuild mode, dont allow imports, or (0) allow imports.
$rebuild = 0;
---(1) Turn on benchmark mode, some functions may not have it yet, (0) off
$bench = 0;

#---------------- URL Info ----------------#
---The root folder that WiFiDB is installed in, set during install
$root = 'wifidb';
---The host URL that wifidb resides in, set during install
$hosturl = '';

#---------------- Tables ----------------#
---the name for the settings table
$settings_tb = 'settings';
---the name for the users table
$users_t = 'users';
---the name for the links table, not used right now, links are hard coded for the time being
$links = 'links';
---the name for the AP Pointers table
$wtable = 'wifi0';
---the name for the GPS table extension for the storage tables
$gps_ext = '_GPS';
---The char that is used to separate the values in an APs table name
$sep = '-';

#---------------- DataBases ----------------#
---The name of the WiFi settings database, holds the annunc (not used yet), annunc-comm (not used yet), files, files_tmp, links, settings, users, wifi0 tables
$db = 'wifi';
$db_st = 'wifi_st';

#---------------- SQL Info ----------------#
---The hostname for the MySQL server
$host = 'localhost';
----The username for wifidb to connect to MySQL, limited permissions to the wifi and wifi_st DBs, set during install
$db_user = 'wifidb username';
----The password for wifidb user to connect to MySQL, set during install
$db_pwd = 'wifidb user password';
--The connection resource for the database to connecte to the MySQL server.
$conn = mysql_pconnect($host, $db_user, $db_pwd) or die("Unable to connect to SQL server: $host");

#---------------- Export Info ----------------#
---The icon locations for the KML exports, same icons used in Vistumlber
$open_loc = 'http://vistumbler.sourceforge.net/image ... s/open.png';
$WEP_loc = 'http://vistumbler.sourceforge.net/image ... re-wep.png';
$WPA_loc = 'http://vistumbler.sourceforge.net/image ... secure.png';
---The KML Definitions source URL
$KML_SOURCE_URL = 'http://www.opengis.net/kml/2.2';
---The export folders for the databse to send files after they are finished exporting
$kml_out = '../out/kml/';
$vs1_out = '../out/vs1/';
$daemon_out = 'out/daemon/';
$gpx_out = '../out/gpx/';

---Put the code for your ads in here http://www.google.com/adsense
$ads = '';
--Add a header information if you want
$header = '<meta name="description" content="A Wireless Database based off of scans from Vistumbler." /><meta name="keywords" content="WiFiDB, linux, windows, vistumbler, Wireless, database, db, php, mysql" />';
--Track your dirty untrust worthy users, you know they have been bad
$tracker = ''; # <-- put the code for the url tracker that you use here (ie - http://www.google.com/analytics )

Now for the Daemon, The config file.

---Defaults for unclaimed imports, If there is no information included in the 'username' 'title' or 'notes' fields they are filed with the following
$default_user = 'WiFiDB';
$default_title = 'Recovery';
$default_notes = 'No Notes';

---Path to the folder that wifidb is installed in default is /var/www/wifidb/ , because I use Debian. fuck windows.
$wifidb_install = '/var/www/wifidb';

---This is the limit on how many lines the console log file can get until it will copy it to [tools_dir]/backups/logs/console_wifidbd_log_[date].log
$console_line_limit = 500;

---This is the flag to tell the daemon weather or not to trim the console log, if it is set (1) it will trim it, if not (0) it will let the log file grow evidentially.
$console_trim_log = 0;

---The pid file for the daemon process, this is so the rund.php and wifidbd.sh scripts can stop/restart the daemon, and so we can see all the neat output from 'ps -ax'
$pid_file_loc = '/var/run/wifidbd.pid';

---If you are running windows you need to define the install path to the PHP binary, but I feel bad for you if you run windows as a server *ducks*
$php_install = "C:\php5_install_folder";

---In seconds 1800 = 30 min interval
$time_interval_to_check = 500;

---The level that you want the log file to write, off (0), Errors only (1), Detailed Errors [when available] (2). That is all for now.
$log_level = 0;

---The interval that the log file will be made in, 0, one file 'log/wifidbd_log.log'. 1, one file a day 'log/wifidbd_log_[yyyy-mm-dd].log'.
$log_interval = 0;

---The Default time zone is UTC ( Universal Time Code ) but you can choose what ever the hell you want. It is only this because vistumblers interal, but this var isnt really used yet, its just incase, this was pointless....
$timezn = 'UTC';

---What is sent to the screen from the daemon, 0; no out put, STUF, 1; let me see the world.
$verbose = 1;

---if you want the CLI output to be color coded 1 = ON, 0 = OFF. If you ware running windows, this is disabled for you, so even if you turn it on, its not going to work :-p
$colors_setting = 1;

As always please let me know what you think, or how your experience went, or if you have and bugs to report.

The best acceleration you can get on a Mac is 9.8ms^2
Post Reply