PHPWirelessMap Part-II

March 21st, 2005

Here’s a buglist post I made to the devs, some of you might find it helpful

On XP w/ WAMP & XP w/ XAMPP, as well as 2ksrv w/ XAMPP, and (webhosting) FreeBSD/Apache/MySQL/PHP (All systems were setup as required, all dependencies accounted for)

The following errors occur during installation:

*If config.inc.php.bak and config.inc.php exist during installation, a function_unlist permission denied install.php line 109 error occurs. These files can be written after errors occur during setup, and before setup is complete.

Stopgap solution: Delete both files, go back one step in the install process and continue.

Suggested solution: Keep config.inc.php as writeable until the success message occurs, or have the user manually CHMOD 644 it after install is successful.

*When following the install documentation, DB is made, schema is run against DB, permissions set and install.php is executed. Once you get to the DB and Table page of the install process, “permission denied:database exists” or “permission denied:table exists” error appears.

Stopgap solution: Use the installer to create the DB, installer will report “tables successfully created” but DB will be blank. THEN manually run the schema against the DB, which will insert tables and default data. Make sure that config.inc.php does not exist and continue with installer.

Suggested solution: Increased interaction between install.php and mysql.schema. Have install.php essentially write mysql.schema before running it against the DB. Check for DB existence, if DB of the same name exists, check for tables, if they exist, rename existing with prefix old_ then run the schema to insert tables and data.

Increased automation, redundancy and user interaction here is crucial – assume the user is on webhosting (limited server access) so the installer has to handle as much as possible, including sql permission issues.

*After installation, dynamic map window returns error message: “ERROR: No Map define inside the database” Although all settings in config.inc.php and the DB match perfectly. Staticmap.php works fine

Stopgap solution: in config.inc.php, add the line $map_name = “map”; (where “map” is your map name), open panel.php and comment out the line $map_name = $enr->img_map_name;

(eg //$map_name = $enr->img_map_name; ) reupload these files and then run phpwirelessmap as per norm. If it works, you can go back and uncomment that line in panel.php, reupload and see if that works.

Suggested solution: *shrugs* perhaps this is an error caused by the manual install methods mentioned above?

$absolute_path might come in handy as well for those of us installing phpwirelessmap into a subdirectory of hosting, eg www.example.com/map/ This would help for individual node views. At the moment if you click on a node, it will try to go to www.example.com/nodeExample, which wont work

Apart from that, excellent product and keep up the good work!

PHPWirelessMap

March 21st, 2005

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

The plot thickens

March 19th, 2005

So Flatfinder asked me to put up a test listing to see if the listings were being harvested automagically or manually, with a limit of 300 chars I put this up:

flatfinder test listing, plz ignore. this listing & contact details are copyright (berne convention), & are the sole literal domain copyright of rawiri blundell. by using the email address above for any purpose other than to organise a residential flatting agreement, you agree to pay rawiri blundell nzd$50,000 + nzgst for each violation of copyright.

So this morning I received an email from 4let.co.nz calling me a dick head. I’m still probing them for info, but all their abusive emails are going straight to abuse@theirisp and interestingly a whois points 4let straight back to homeads.

Arguing with Spammers

March 16th, 2005

Recently my flatmate decided to move out. No biggy I thought, and proceeded to make a listing on flatfinder.co.nz

Shortly after I was spammed by homeads.co.nz, I wrote a response that was abrasive, witty and comical. Their response:

When you advertise your email address in an ad of any sort it becomes public domain. If you do not wish people to email you then you should not display your address. As to Flatfinders terms, you do not have to be a member to view therefore no terms are applicable as you have not agreed to any terms. As to the email address from us being auckland@homeads.co.nz you will note the ad inviting you to join quotes www.homeads.co.nz which is a national identity. Therefore your ability to be confused and/or to get angry is obviously very easy. As to you not appreciating us harvesting your address many others have been and therefore we will continue to do so until it is illegal for us to do so or breaches the terms of Flatfinders which at this time it does not. As you are not on our mailing list and we were replying to your ad we can not unsubscribe you from something you are not subscribed to. We will however make a note of your email address and should you re advertise within the next week we will not email you.

Wow, so let’s break this down into digestable chunks.

When you advertise your email address in an ad of any sort it becomes public domain.

Article 2, (1) of the Berne Copyright Convention says that I am posting into a LITERARY DOMAIN (I used brainpower to give the listing written structure and content. I typed it all in. I put in the effort.) Therefore by using and abusing my email address, homeads.co.nz is breaching my copyright, which by the way is illegal. For more reading on this, read Brad Templeton’s 10 biggest copyright myths, with specific attention to #3

As to the email address from us being auckland@homeads.co.nz you will note the ad inviting you to join quotes www.homeads.co.nz which is a national identity.

Typical fucking Jaffa, guess what, there is a whole country south of the Bombays, moron. This argument just proves how idiotic homeads.co.nz is

As to you not appreciating us harvesting your address many others have been and therefore we will continue to do so until it is illegal for us to do so or breaches the terms of Flatfinders which at this time it does not.

Well, I’ve just said that it is illegal, homeads, you’re breaching my copyright.

We will however make a note of your email address and should you re advertise within the next week we will not email you.

OH HOW GENEROUS OF YOU!

In other news, Kitten, I want to breed with you in the least furry sounding way. Your antispam plugin “Spaminator” has cleared me of all comment spam to date, and maybe just maybe I love you. To other bloggers suffering from comment spamming arsehats, give it a crack. Three thumbs up here ;)