So for the Zephyr project we’d hit a snag. We want to co-ordinate with other wireless providers to share information about what frequencies each of us are using, that way when we setup new links and POPs we can easily see what’s existing and configure around that for the least interference.
That and we want to display a tidy map of our backbone. Doing this amongst the NodeDB would be extremely messy, so we had to look at our own solution.
NodeDB is based on an older project called MeshDB. You can still grab the MeshDB CVS Tarball from SourceForge. Though it doesnt appear to have been touched in a couple of years, and it’s got a fairly ugly end-user interface anyway.
So in the searches I stumbled across a promising project, PHPWirelessMap which is French made. At present it is still in a beta release stage, so to say it’s a little rough around the edges is to understate, but it does show a lot of promise. It seems to have everything we need as well as a nice user interface.
Well, although the documentation would imply that installing it is easy, I did not have such an experience.
After a spate of issues with installing it on my hosting, I eventually gave up and decided to try and install it on a server that’s sitting on my Home WLAN. So I installed XAMPP, got it all configured as required and proceeded to follow the instructions by the letter.
Ok, so the instructions run you through creating the MYSQL Database manually, then importing the schema through a provided SQL Schema file, then setting permissions on the MYSQL Database.
Constructive criticism:[i] While handy for people who have complete control over their hosting, a lot of people dont. So this step will have to be automated through the install process.[/i]
Then the instructions direct you to run the installer file, which appears to want to create the database and schema itself. The funky thing here is that if you havent created the database, it might pack a wobbly, and if you have already created the database, it will return an error like “database exists” or “table
exists”
Constructive criticism:[i] Not only does the installer file have to automate the creation of MYSQL Databases, it has to determine if a Database by that name exists already and prompt the user with a warning “A database by this name already exists, if you continue you could lose data from your Database. Continue Y/N?” If the user chooses Yes, then the installer script should determine if the tables already exist. It should rename existing tables with the prefix old_ before creating new tables.
If of course the desired Database name does not exist, then the installer script should just create the Database, run the schema file to setup the schema and then carry on. Further on in the installation process, the installer will populate the Database with base config data as well as generate a config file.
Some Hosting providers wont allow a script to have permissions to create Databases, the installer correctly spits out an error message in this case. The user just has to create a Database manually in PHPMyAdmin or similar and then repeat the previous step. The installer should then detect the Database and try to insert the required schema.[/i]
So now I have an existing Database with correct schema, and a stuck installer script that wants to create a new Database of the same name. So I got the installer to create a database of a different name. Then within PHPMyAdmin I ran the import schema on the new Database. After doing this, I could proceed through the installer.
Then the next problem we had is in the final step of the installer it would report back that the Database did not exist or one of the tables did not exist.
So, to get this installed, what I had to do was this:
1) Ignore the manual MYSQL creation section of the documenation for now, run the installer script. The script will create the Database.
2) Go back to the manual MYSQL section and import the schema on the new database, then set permissions as per the instructions
3) Go back to the installer and follow through the process, being EXTREMELY METICULOUS with what you put in the fields. Any errors from now on should be along the lines of “something expected at line7 of config.inc.php” Open up the config.inc.php file and see what line7 is. It will relate to something in the previous page that you filled in incorrectly, so use the back button and fix your input. Rinse and repeat until it goes through.
3b) You might receive an error message stating something like “function-unlist permission denied on install.php line 109″ or something like that (all off the top of my head right now) which relates to the config.inc.php file being read only. Delete the config.inc.php file, go back a step, correct any errors and then click on next. It should complete installing and you should be up and running!
Or at least you’d hope.
So to get PHPWirelessMap running on my hosting, I had to install it locally as above, export the SQL and then import that into my hosted SQL. Then I uploaded the file structure, pulled the generated config.inc.php from my local copy, modify it to suit my hosting (host’s SQL server etc) and saved and uploaded that. As the admin password is saved, encrypted in the config.inc.php file, I can login to the minimalistic admin setup on my hosting with the same password I set on my local copy. YMMV.
So now it almost works, when going to view the map I receive this message though:
ERROR: No Map define inside the database
A google search returns one result, which then needs to be translated back to english.
If, when acceding to the tool, the error takes place
ERROR: Map does not define inside the database
it implies that a line like the following one to the file must be introduced config.inc.php
$$map_name=’map ‘;
This it must be a temporary error in the version of development of PhpWirelessMap
Doesnt work. For me at least. I’ve also tried modifying the $default_img_map_name=”map”; to read img_map_name=”map”; to no avail. (This would of course make multimap handling tricky)
So anyway, dont let this post dissuade you from using PHPWirelessMap. It is beta software, it is rough around the edges, and you might find yourself with a challenge just to get it working. It needs for the installation process to be more robust and user friendly, it needs the admin interface to be a bit more complete and even with a logout link or button would be an improvement.
Once it’s working though, it appears to give great results. I wouldnt know, I’m still battling to get it going. Maybe when I get some spare time I can do some recoding work on it and submit that back to the authors, unfortunately I’ll have to dust up on my French.
Oh well, at least it keeps me out of trouble… for the timebeing
//EDIT: So I went into panel.php and commented a line of code: //$map_name = $enr->img_map_name; and phpwirelessmap sprung into life. Then I uncommented it and it continued working fine. This is with the $map_name = “map”; string in config.inc.php as mentioned before. So now we’re away and laughing, now to just set it up completely