cloudy cloudy

Author Topic: Tides Processor Script  (Read 60483 times)

0 Members and 1 Guest are viewing this topic.

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 27,331
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 63.0.3239.132
Re: Tides Processor Script
« Reply #255 on: January 12, 2018, 09:49:31 PM »
Assuming this line 39 refers to the dates in tideprediction.html I think you need to change $yearDate to "no", or whatever it was originally, since your dates do not have the year:

Code: [Select]
//   If your tide dates include years (Monday 2008-09-10) change this to "yes"  //
$yearDate = "yes";                                                               //

Quote
Wednesday 01-10   
Sunrise 0713, Sunset 1623
Moonrise 0113, Moonset 1221
  High Tide:  0559   9.3
   Low Tide:  1217   0.6
  High Tide:  1829   8.5






Offline Matthew Conklin

  • Signature 1
  • Posts: 88
  • South Turner, Maine
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • South Turner Maine Weather
Re: Tides Processor Script
« Reply #256 on: January 12, 2018, 10:01:10 PM »
got part of the tides back now still showing issues with sun and moon
Matthew Conklin
Robert Conklin
Webmasters
www.southturnermaineweather.com
CoCoRAHS
SkyWarn observer
Weather Display Ver. 10.37S 47

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 27,331
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 63.0.3239.132
Re: Tides Processor Script
« Reply #257 on: January 12, 2018, 10:22:52 PM »
Try changing line 43 to "yes"

Code: [Select]
$convertRF = "no";

Offline Matthew Conklin

  • Signature 1
  • Posts: 88
  • South Turner, Maine
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • South Turner Maine Weather
Re: Tides Processor Script
« Reply #258 on: January 12, 2018, 10:37:23 PM »
did not fix it
Matthew Conklin
Robert Conklin
Webmasters
www.southturnermaineweather.com
CoCoRAHS
SkyWarn observer
Weather Display Ver. 10.37S 47

Offline R_o_B

  • Posts: 180
  • Maple Bay, British Columbia, Canada
  • OS/Browser:
  • Win NT 10.0
  • Firefox 52.0
    • Tzouhalem-Maple Bay Weather
Re: Tides Processor Script
« Reply #259 on: January 14, 2018, 01:53:50 PM »
Matthew, I am working on the script you have posted a few days ago.

There are many variables that have not been 'declared' (such as, for example, setting the default value of the variable $moon to null). So, when an 'if' statement only check if the variable within (the 'if' statement) is 'yes' and does not provide an option in case the variable within (the 'if' statement) is 'no', then errors are produced and they prevent the script from continuing and producing the expected results...
R_o_B
---
eMail: weather@tzweather.org

Offline sunwharf

  • Nick
  • Posts: 89
  • Eastbourne, Sussex
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • Nicks Website
Re: Tides Processor Script
« Reply #260 on: January 20, 2018, 06:28:11 PM »
Hi all,

I've just started using the script and am having problems, I get the the empty table but nothing else. I'm not expert at all with php and need a bit of help please.

This is the table link http://www.sunwharf.com/willingdon/tides/tides.html
the input data is here http://www.sunwharf.com/willingdon/tideprediction.html

The tides_processor is in directory www.sunwharf.com/willingdon/tides/ and the icons directory is a sub-directory from there

I've attached the tides.html and tides_processor files as text files.

Any clues to what I've done wrong?

Thanks
Nick

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,320
  • Davis Vue/Win10
  • Ocean Park, WA.
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • Traveling RV Weather
Re: Tides Processor Script
« Reply #261 on: January 21, 2018, 01:54:54 AM »
See attachment...note the unzip directions...

Offline sunwharf

  • Nick
  • Posts: 89
  • Eastbourne, Sussex
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • Nicks Website
Re: Tides Processor Script
« Reply #262 on: January 21, 2018, 12:56:26 PM »
Thanks for that but I'm a bit confused. That's just a jpg of the the download link and I've already downloaded the zip file and believe I installed in line with the instructions. I can generate the tide table data but just can't get it to populate into tabular form.

Cheers
Nick

Offline broadstairs

  • Stuart
  • Posts: 7,004
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 56.0.2
    • Broadstairs
Re: Tides Processor Script
« Reply #263 on: January 21, 2018, 03:57:45 PM »
Nick I think the issue is that the php code is not being executed on the server, it should not show up when viewing the page source the php code should be executed on the server and just the result show up in the page source on the browser. Make sure you have PHP active on your server. Then try renaming your file to tides.phtml which if the server is set up correctly should tell it that the file contains php code which must be executed on the server side before being sent to the browser.

Stuart

Offline sunwharf

  • Nick
  • Posts: 89
  • Eastbourne, Sussex
  • OS/Browser:
  • Win NT 10.0
  • Chrome 63.0.3239.132
    • Nicks Website
Re: Tides Processor Script
« Reply #264 on: January 21, 2018, 04:52:00 PM »
That's great, just renamed file to phtml and the table is populated :-) https://www.sunwharf.com/willingdon/tides/tides.phtml

Thanks very much Stuart, most kind of you. I have never seen phtml as a file extension before.

Thanks again

Nick

Offline broadstairs

  • Stuart
  • Posts: 7,004
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 56.0.2
    • Broadstairs
Re: Tides Processor Script
« Reply #265 on: January 21, 2018, 09:31:16 PM »
I have never seen phtml as a file extension before.

You have to tell the server the file contains PHP code to be executed and that is one way, the other is a .php extension but in your case that would not work. You can also force the server to check a .html file for PHP code but that wastes time if there is none there.

Stuart

 

cumulus