Can anyone tell me what I am doing wrong on setting up the NWWN-mesomap page…It will work but when I try to add the
atom-top warning I get PHP Fatal error: Cannot redeclare microtime_float() (previously declared in C:\Server\wdisplay\web\NWWN-mesomap.php:985) in C:\Server\wdisplay\web\atom-top-warning.php on line 880
I can get it to work with the old rss-top-warning nut not the atom???
Here’s a link to look at I will leave it broke so you can check it out for now… #-o
Ahhh… the perils of using include()
The issue is that BOTH atom-top-warning.php and the NWWN-mesomap.php use the function ‘microtime_float()’ which is defined in both scripts. PHP doesn’t allow redefinition/redeclaration of a function once defined, so the last one included() in the page get’s the ‘previously declared’ error.
I’d suggest that you rename the microtime_float() function inside the NWWN-mesomap so the code looks like this
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
You can do this by doing a mass rename, finding ‘microtime_float’ and replacing it with ‘microtime_float_NWWN’ and that should fix the issue.
Thanks so much Ken that doesn’t sound to hard I will do that when I get home tonight
I figured it wasn’t that big of a problem but I needed to be steered in the right direction!!!
Thanks again Ken for all your hard work!!!