cloudy

Author Topic: Error Message using Saraotga PHP Bouy Data mesomap scripts  (Read 3512 times)

0 Members and 1 Guest are viewing this topic.

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Error Message using Saraotga PHP Bouy Data mesomap scripts
« on: November 17, 2006, 12:55:44 PM »
Hello All,
  I have just placed a PHP script and related files onto my website to get dynamic, real-time data from the NDBC Buoy systems. The page comes up with the map and table ok, but i am getting a list of errors of undefined variables showing. Below is the printout of those messages. Also you can go to my site www.espwxctr.com and select Live Chesapeake Bay and you should see the errors along with the map and table... Any help would greatly be welcomed..

Notice: Undefined index: cvt in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 146

Notice: Undefined index: inc in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 148

Notice: Undefined index: sce in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 163

Notice: Undefined index: show in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 168

Notice: Undefined index: cfg in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 181

Notice: Undefined index: cache in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 187

Notice: Undefined variable: PHP_SELF in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 191

Notice: Undefined variable: myStatus in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 833

Notice: Undefined offset: 1 in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 848

Notice: Undefined index: show in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 215

Notice: Undefined variable: PHP_SELF in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 220

Notice: Undefined variable: otherParms in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 220


V/R,

Jim

Offline broadstairs

  • Stuart
  • Posts: 6,407
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #1 on: November 17, 2006, 01:06:24 PM »
Well to be of much help I think we need to see the script source, there is obviously a problem of some sort. I guess one question could be what level of PHP is on your server and what level was the script coded for? I have seen some strange issues with scripts coded for PHP 4 and run on PHP 5!

Stuart

Offline cayman wx

  • Roger
  • Posts: 551
  • Grand Cayman
    • Weather in Cayman
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #2 on: November 17, 2006, 01:26:30 PM »
I use the script exactly as it is downloaded and have no problems so wonder if you changed anything that might be the cause. Remember that you need to use notepad or similar to make changes rather than frontpage or such.

As suggested your ISP may not support the version of php that ken used.

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #3 on: November 17, 2006, 01:27:44 PM »

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #4 on: November 17, 2006, 01:28:39 PM »
I used DreamWeaver to edit the script.

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #5 on: November 17, 2006, 01:31:47 PM »
Also, I am using the PHP script for tropical weather RSS feed from the NHC with no problem. The script came from the same developer and web site.

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,724
  • VP 2 w/FARS - WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #6 on: November 17, 2006, 01:58:52 PM »
Are you running your own web server?  The errors appear to be related to paths located on a windows local machine?

-Bob

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #7 on: November 17, 2006, 02:02:35 PM »
No. this is running on a web hosting services provided by my ISP.

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,783
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #8 on: November 17, 2006, 02:44:46 PM »
It's working fine for me now.

Offline JaxWeather

  • Bob
  • Global Moderator
  • Posts: 11,724
  • VP 2 w/FARS - WML Station: WD00007
  • Jacksonville, Fl. USA
    • JaxWeather.net
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #9 on: November 17, 2006, 02:49:17 PM »
http://www.espwxctr.com/buoy-data.php

Working for me now as well :)

-Bob

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #10 on: November 17, 2006, 02:57:37 PM »
Yes. It should. I went through the script and eliminated the undefine variable errors. Seems to work fine now. Thanks for the inputs. If you still have any reason for the errors in the unmodified script. please let me know...

thanks!

Jim

Offline carterlake

  • Tom Chaplin
  • Posts: 2,273
  • Carter Lake, Iowa USA
    • Carter Lake, Iowa Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #11 on: November 17, 2006, 03:46:23 PM »
I used DreamWeaver to edit the script.

You're using an HTML editor to edit a text file?  8O

WD; Davis VP2 6153; Quickcam for Notebooks Pro; Boltek w/ Nexstorm; GRLevel3; Live NOAA radio

Offline jwyman

  • Posts: 20
  • Lexington Park, Maryland
    • Southern Maryland Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #12 on: November 17, 2006, 04:36:44 PM »
I did but switched to notepad and used the original script.

Offline broadstairs

  • Stuart
  • Posts: 6,407
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #13 on: November 17, 2006, 05:35:52 PM »
Most if not all of the errors relate to $_REQUEST or super globals, this must be a clue. It is expecting the variables to be passed on the url calling the script, the other odd errors may result from these failures. I've never used this so I'm guessing here. There are differences between function in PHP 4.1.0 and 4.3.0.

Stuart

Offline saratogaWX

  • Posts: 5,030
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Error Message using Saraotga PHP Bouy Data mesomap scripts
« Reply #14 on: November 17, 2006, 10:31:42 PM »
Broadstairs is correct.. most of the notices are generated from $_REQUEST items that aren't on the calling of the script.

All of these are 'Notice' type messages which I never saw since my ISP's default php.ini setting for error_reporting is E_ALL && ^E_NOTICE , so these messages didn't show up for me.

For
Quote
Notice: Undefined index: cvt in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 146

Notice: Undefined index: inc in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 148

Notice: Undefined index: sce in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 163

Notice: Undefined index: show in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 168

Notice: Undefined index: cfg in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 181

Notice: Undefined index: cache in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 187

Notice: Undefined index: show in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 215
  I should rewrite the code to use an if (isset($_REQUEST['...']) first to avoid referring to a missing element.

The Undefined variable ones:
Quote
Notice: Undefined variable: PHP_SELF in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 191

Notice: Undefined variable: myStatus in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 833

Notice: Undefined offset: 1 in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 848

Notice: Undefined variable: PHP_SELF in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 220

Notice: Undefined variable: otherParms in D:\Webspace\resadmin\Jim\espwxctr.com\www\buoy-data.php on line 220

are likely due to setting these variables from 'undefined' vars previously.

You can ignore these kinds of messages by adding
Code: [Select]
error_reporting(E_ALL && ^E_NOTICE);
I'll try to update the source so Notices won't appear (by adding the isset() function calls).

BTW jwyman, please feel free to email me directly if you have questions/comments/improvement suggestions on the Buoy-data script set.

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

 

cumulus